:root {
    --primary: #103a68;
    --primary-2: #0d5e8f;
    --primary-3: #0a2540;
    --accent: #f4b740;
    --accent-2: #ffe3a3;
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #172033;
    --muted: #64748b;
    --danger: #b42318;
    --danger-soft: #fef3f2;
    --success: #067647;
    --success-soft: #ecfdf3;
    --warning: #b54708;
    --warning-soft: #fffaeb;
    --info: #175cd3;
    --info-soft: #eff6ff;
    --border: #e2e8f0;
    --border-strong: #cbd5e1;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, .06);
    --shadow: 0 20px 55px rgba(15, 23, 42, .10);
    --radius: 22px;
    --radius-sm: 14px;
    --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(244, 183, 64, .20), transparent 28rem),
        radial-gradient(circle at top right, rgba(13, 94, 143, .18), transparent 30rem),
        linear-gradient(180deg, #eef4fb 0%, var(--bg) 46%, #f8fafc 100%);
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(16, 58, 104, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(16, 58, 104, .035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.9), rgba(0,0,0,0));
    z-index: -1;
}

a { color: var(--primary-2); text-decoration: none; font-weight: 700; }
a:hover { color: var(--primary); text-decoration: none; }
img { max-width: 100%; height: auto; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .82);
    border-bottom: 1px solid rgba(226, 232, 240, .78);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
}
.nav-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-3);
    font-weight: 900;
    letter-spacing: -.02em;
    white-space: nowrap;
}
.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 12px 30px rgba(16, 58, 104, .22);
    font-size: .82rem;
    letter-spacing: .04em;
}
.brand-text span { display: block; }
.brand-text small { color: var(--muted); font-weight: 800; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; }
.topbar nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}
.topbar nav a {
    color: var(--text);
    font-size: .93rem;
    padding: 10px 13px;
    border-radius: 999px;
    font-weight: 800;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.topbar nav a:hover {
    background: var(--info-soft);
    color: var(--primary);
    transform: translateY(-1px);
}
.topbar nav a.nav-cta {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    box-shadow: 0 10px 22px rgba(16, 58, 104, .20);
}
.topbar nav a.nav-logout { color: var(--danger); }
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 800;
    padding: 9px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
}
.user-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }

.container { max-width: var(--container); margin: 0 auto; padding: 34px 18px 90px; }
.footer { text-align: center; padding: 26px 18px 40px; color: var(--muted); }
.footer strong { color: var(--primary); }

.page-title,
h1 { font-size: clamp(1.8rem, 3.5vw, 3rem); line-height: 1.05; margin: 0 0 18px; letter-spacing: -.04em; color: var(--primary-3); }
h2 { font-size: 1.35rem; margin: 0 0 14px; color: var(--primary-3); letter-spacing: -.02em; }
h3 { margin: 0 0 10px; color: var(--primary-3); }
p { line-height: 1.7; }
small { color: var(--muted); font-weight: 650; }

.card {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: var(--radius);
    padding: clamp(20px, 3vw, 30px);
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--primary-2));
    opacity: .75;
}
.card.clean::before,
.stat-card::before,
.table-card::before { display: none; }
.narrow { max-width: 900px; margin-left: auto; margin-right: auto; }
.small { max-width: 500px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }

.hero {
    min-height: 390px;
    display: grid;
    align-items: center;
    padding: clamp(32px, 6vw, 72px);
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(10, 37, 64, .95), rgba(13, 94, 143, .92)),
        radial-gradient(circle at 18% 20%, rgba(244, 183, 64, .5), transparent 20rem);
    color: #fff;
    border: 0;
}
.hero::before {
    height: 100%;
    background:
        radial-gradient(circle at 82% 22%, rgba(244, 183, 64, .35), transparent 16rem),
        linear-gradient(120deg, transparent 0 58%, rgba(255,255,255,.08) 58% 100%);
    opacity: 1;
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #fff; max-width: 820px; font-size: clamp(2.4rem, 6vw, 5rem); }
.hero p { max-width: 760px; color: rgba(255,255,255,.82); font-size: 1.08rem; margin: 0 0 12px; }
.eyebrow { color: var(--accent-2); font-weight: 950; letter-spacing: .16em; text-transform: uppercase; font-size: .85rem; margin-bottom: 10px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.stats { margin-bottom: 8px; }
.stat-card {
    padding: 22px;
    border-radius: 20px;
    background: linear-gradient(180deg, #fff, #f8fbff);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.stat-card span { color: var(--muted); font-weight: 850; font-size: .9rem; }
.stat-card strong { display: block; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1; margin-top: 10px; color: var(--primary); letter-spacing: -.06em; }
.steps .card strong,
.feature-card strong { display: block; color: var(--primary-3); font-size: 1.05rem; margin-bottom: 8px; }
.step-number {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: var(--primary-3);
    background: var(--accent-2);
    font-weight: 950;
    margin-bottom: 14px;
}

.form { display: grid; gap: 16px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label { display: grid; gap: 7px; font-weight: 850; color: var(--primary-3); }
input, select, textarea {
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    padding: 13px 14px;
    font: inherit;
    background: #fff;
    color: var(--text);
    box-shadow: 0 1px 0 rgba(15,23,42,.02);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
textarea { resize: vertical; min-height: 130px; }
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-2);
    box-shadow: 0 0 0 4px rgba(13, 94, 143, .14);
}
input[type=file] { padding: 10px; background: var(--surface-soft); }
input[type=file]::file-selector-button {
    border: 0;
    border-radius: 999px;
    padding: 9px 14px;
    margin-right: 12px;
    background: var(--primary);
    color: #fff;
    font-weight: 850;
    cursor: pointer;
}

.btn {
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    border-radius: 999px;
    padding: 13px 20px;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(16, 58, 104, .20);
    transition: transform .2s ease, filter .2s ease, box-shadow .2s ease;
}
.btn:hover { color: #fff; text-decoration: none; transform: translateY(-1px); filter: brightness(.98); box-shadow: 0 16px 32px rgba(16, 58, 104, .25); }
.btn.secondary { background: #fff; color: var(--primary); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm); }
.btn.secondary:hover { color: var(--primary); }
.btn.danger { background: linear-gradient(135deg, #b42318, #d92d20); box-shadow: 0 12px 24px rgba(180, 35, 24, .18); }
.small-btn { min-height: 38px; padding: 8px 13px; font-size: .86rem; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; align-items: center; }
.actions.no-margin { margin-top: 0; }

.alert {
    border-radius: 18px;
    padding: 15px 17px;
    margin-bottom: 20px;
    font-weight: 750;
    border: 1px solid var(--border);
    display: grid;
    gap: 4px;
}
.alert.success { background: var(--success-soft); color: var(--success); border-color: #abefc6; }
.alert.error { background: var(--danger-soft); color: var(--danger); border-color: #fecdca; }
.alert.info { background: var(--info-soft); color: var(--info); border-color: #bfdbfe; }
.alert.warning { background: var(--warning-soft); color: var(--warning); border-color: #fedf89; }
.field-error { color: var(--danger); font-size: .85rem; font-weight: 750; }
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #eef4ff;
    color: var(--primary);
    padding: 6px 11px;
    border-radius: 999px;
    font-weight: 900;
    font-size: .82rem;
    border: 1px solid rgba(23, 92, 211, .12);
    white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; opacity: .65; }
.badge.status-accepted,
.badge.status-approved,
.badge.status-verified { background: var(--success-soft); color: var(--success); border-color: #abefc6; }
.badge.status-rejected,
.badge.status-suspended { background: var(--danger-soft); color: var(--danger); border-color: #fecdca; }
.badge.status-under_review,
.badge.status-waiting_verification { background: var(--warning-soft); color: var(--warning); border-color: #fedf89; }
.badge.status-revision_required { background: #fff1f3; color: #c01048; border-color: #fecdd6; }
.badge.status-submitted,
.badge.status-pending { background: var(--info-soft); color: var(--info); border-color: #bfdbfe; }

.table-card { overflow-x: auto; padding: 0; }
.table-card h2, .table-card .table-heading { padding: 24px 24px 0; margin-bottom: 0; }
table { width: 100%; border-collapse: collapse; min-width: 780px; }
th, td { border-bottom: 1px solid var(--border); padding: 15px 16px; text-align: left; vertical-align: top; }
th {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    background: #f8fafc;
}
tbody tr:hover { background: rgba(239, 246, 255, .45); }
.actions-cell { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.inline-form select, .inline-form input { width: auto; min-width: 160px; }
.nested-table {
    margin-top: 14px;
    min-width: 680px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}
.nested-table th, .nested-table td { padding: 10px 12px; }

.status-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
    background: linear-gradient(135deg, #fff, #f8fbff);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 18px;
}
.status-panel p { margin: 4px 0 0; }

.timeline {
    display: grid;
    gap: 12px;
    counter-reset: step;
}
.timeline-item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 14px;
    align-items: start;
}
.timeline-item::before {
    counter-increment: step;
    content: counter(step);
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: #fff;
    font-weight: 950;
}
.timeline-item strong { color: var(--primary-3); display: block; margin-bottom: 3px; }
.timeline-item span { color: var(--muted); line-height: 1.55; }

.auth-shell { display: grid; grid-template-columns: 1.05fr .95fr; gap: 22px; align-items: stretch; }
.auth-info {
    background: linear-gradient(135deg, var(--primary-3), var(--primary-2));
    color: #fff;
    border-radius: var(--radius);
    padding: clamp(24px, 4vw, 38px);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.auth-info::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    right: -90px;
    bottom: -90px;
    background: rgba(244, 183, 64, .22);
}
.auth-info h1 { color: #fff; }
.auth-info p, .auth-info span { color: rgba(255,255,255,.78); }
.auth-info .eyebrow { color: var(--accent-2); }
.auth-card { height: 100%; }

.empty-state {
    text-align: center;
    padding: 32px;
    border: 1px dashed var(--border-strong);
    border-radius: 20px;
    background: #f8fafc;
}

@media (max-width: 900px) {
    .auth-shell,
    .grid-2,
    .status-panel { grid-template-columns: 1fr; }
    .nav-wrap { align-items: flex-start; }
    .topbar nav { width: 100%; justify-content: flex-start; }
}
@media (max-width: 700px) {
    .two-col { grid-template-columns: 1fr; }
    .container { padding-top: 24px; }
    .brand-text small { display: none; }
    .topbar nav a { padding: 8px 10px; font-size: .86rem; }
    .user-chip { display: none; }
}
@media print {
    .topbar, .footer, .actions, .btn { display: none !important; }
    body { background: #fff; }
    .card { box-shadow: none; border-color: #ccc; }
}
