:root {
    --navy: #16345f;
    --navy-dark: #102746;
    --blue: #2463a9;
    --teal: #168c8c;
    --gold: #e8a838;
    --ink: #17223b;
    --muted: #64748b;
    --line: #dce5ef;
    --surface: #ffffff;
    --background: #f5f8fc;
    --success: #13795b;
    --danger: #b4232f;
    --warning: #9a6700;
    --info: #175cd3;
    --radius: 16px;
    --shadow: 0 18px 45px rgba(15, 35, 66, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--background);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.container { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -60px; background: #fff; color: var(--ink); z-index: 1000; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); }
.skip-link:focus { top: 16px; }
.site-header { background: rgba(255,255,255,.98); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.nav-wrap { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); min-width: 0; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 43px; height: 43px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--navy), var(--teal)); font-weight: 800; letter-spacing: -.03em; box-shadow: 0 8px 20px rgba(22,52,95,.2); }
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 1.03rem; letter-spacing: .08em; }
.brand-copy small { color: var(--muted); font-size: .72rem; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.primary-nav { display: flex; align-items: center; gap: 8px; }
.primary-nav > a { color: #314158; padding: 9px 10px; border-radius: 10px; font-size: .93rem; font-weight: 650; }
.primary-nav > a:hover { background: #eef4fb; text-decoration: none; color: var(--navy); }
.nav-toggle { display: none; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; padding: 8px 11px; }
.nav-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: .7rem; }
.user-strip { background: var(--navy-dark); color: #dbe8f7; }
.user-strip-inner { min-height: 38px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: .85rem; }
.user-strip a { color: #fff; }
main { min-height: 66vh; }
.flash-stack { margin-top: 18px; }

.hero { position: relative; overflow: hidden; padding: 84px 0 72px; background: radial-gradient(circle at 85% 10%, rgba(22,140,140,.2), transparent 32%), linear-gradient(135deg, #102746 0%, #163f72 62%, #176a76 100%); color: #fff; }
.hero::after { content: ""; position: absolute; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; right: -100px; bottom: -190px; box-shadow: 0 0 0 40px rgba(255,255,255,.025), 0 0 0 85px rgba(255,255,255,.018); }
.hero-grid { display: grid; grid-template-columns: 1.22fr .78fr; gap: 54px; align-items: center; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 800; color: #8ce1da; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 4.7rem); letter-spacing: -.045em; line-height: 1.03; max-width: 760px; margin: 16px 0 22px; }
.hero p { color: #d5e5f5; max-width: 700px; font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-panel { background: rgba(255,255,255,.1); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.18); border-radius: 24px; padding: 24px; box-shadow: 0 30px 70px rgba(4,15,30,.24); }
.hero-panel h2 { margin-top: 0; font-size: 1.12rem; }
.hero-steps { display: grid; gap: 14px; margin-top: 18px; }
.hero-step { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; }
.hero-step span { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: #fff; color: var(--navy); font-weight: 800; }
.hero-step strong { display: block; }
.hero-step small { color: #cfe2ef; }

.section { padding: 70px 0; }
.section-sm { padding: 36px 0; }
.section-heading { max-width: 720px; margin-bottom: 28px; }
.section-heading h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -.025em; line-height: 1.15; margin: 8px 0; }
.section-heading p { color: var(--muted); margin: 0; }
.soft-section { background: #edf3f9; border-block: 1px solid var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 8px 30px rgba(15,35,66,.04); }
.card h2, .card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.feature-card .icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: #e9f3fb; color: var(--navy); font-weight: 900; margin-bottom: 16px; }
.feature-card p { color: var(--muted); }
.stat-card { padding: 20px; }
.stat-value { display: block; font-size: 2rem; font-weight: 850; letter-spacing: -.04em; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .9rem; }
.stat-note { font-size: .78rem; color: var(--muted); margin-top: 8px; }

.page-header { padding: 34px 0 20px; }
.page-header-row { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.page-header h1 { margin: 4px 0; font-size: clamp(1.85rem, 4vw, 2.7rem); letter-spacing: -.035em; }
.page-header p { color: var(--muted); margin: 0; max-width: 760px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.stack { display: grid; gap: 18px; }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.split-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; background: var(--navy); color: #fff; min-height: 44px; padding: 10px 16px; border-radius: 11px; font-weight: 750; line-height: 1.2; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.btn:hover { text-decoration: none; background: var(--navy-dark); box-shadow: 0 10px 24px rgba(16,39,70,.18); transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-secondary { background: var(--teal); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #eef5fb; }
.btn-outline { background: transparent; border-color: #b8c8da; color: var(--navy); }
.site-header .btn-outline { border-color: var(--line); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { min-height: 36px; padding: 7px 11px; border-radius: 9px; font-size: .84rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 4vw, 34px); box-shadow: var(--shadow); }
.form-section { padding-block: 5px 25px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.form-section h2 { font-size: 1.2rem; margin: 0 0 5px; }
.form-section > p { color: var(--muted); margin: 0 0 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.form-group { display: grid; gap: 7px; min-width: 0; }
.form-group.full { grid-column: 1 / -1; }
.form-group label, .field-label { font-size: .88rem; font-weight: 750; color: #26364e; }
.required::after { content: " *"; color: var(--danger); }
.form-control, input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="number"], input[type="url"], select, textarea {
    width: 100%; min-height: 46px; border: 1px solid #cbd7e5; border-radius: 11px; background: #fff; color: var(--ink); padding: 10px 12px; outline: none; transition: border .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
.form-control:focus, input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(36,99,169,.13); }
input:disabled, select:disabled, textarea:disabled { background: #edf1f5; color: #6f7c8e; cursor: not-allowed; }
.form-help { color: var(--muted); font-size: .78rem; }
.password-wrap { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.password-wrap button { border: 1px solid var(--line); border-radius: 10px; background: #f4f7fb; padding: 0 12px; color: var(--navy); }
.checkbox-row, .radio-row { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.checkbox-item, .radio-item { display: inline-flex; gap: 8px; align-items: flex-start; color: #34445a; }
.checkbox-item input, .radio-item input { margin-top: 5px; }
.choice-card { flex: 1 1 240px; border: 1px solid var(--line); border-radius: 12px; padding: 13px; background: #f9fbfd; }
.file-field { border: 1px dashed #aebfd2; background: #f8fbfe; padding: 16px; border-radius: 12px; }
.file-field input { width: 100%; }
.file-name { display: block; margin-top: 8px; color: var(--muted); font-size: .8rem; }
.search-bar { display: grid; grid-template-columns: minmax(0, 1fr) 220px auto; gap: 10px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.filter-bar .form-group { min-width: 170px; flex: 1 1 190px; }

.alert { border: 1px solid transparent; padding: 13px 15px; border-radius: 12px; margin: 14px 0; }
.alert ul { margin: 8px 0 0; padding-left: 20px; }
.alert-success { background: #e9f8f2; border-color: #b7e4d2; color: #0e6248; }
.alert-danger { background: #fff0f1; border-color: #f4c3c7; color: #8d1d28; }
.alert-warning { background: #fff8e7; border-color: #f2d58c; color: #7a5200; }
.alert-info { background: #edf5ff; border-color: #bdd7fb; color: #174f9b; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 5px 9px; font-size: .73rem; font-weight: 800; line-height: 1; }
.badge-muted { color: #536174; background: #e9eef4; }
.badge-success { color: #0c6247; background: #dff6ec; }
.badge-warning { color: #765000; background: #fff0c7; }
.badge-danger { color: #8a1e28; background: #ffe0e3; }
.badge-info { color: #174f9b; background: #dcecff; }

.progress { height: 11px; border-radius: 999px; overflow: hidden; background: #e4ebf3; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--teal)); }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; font-size: .85rem; }
.timeline { display: grid; gap: 0; }
.timeline-item { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 12px; padding-bottom: 18px; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 25px; bottom: 0; width: 2px; background: var(--line); }
.timeline-dot { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #e4ebf3; color: var(--muted); font-weight: 800; z-index: 1; }
.timeline-item.done .timeline-dot { background: var(--success); color: #fff; }
.timeline-copy strong { display: block; }
.timeline-copy small { color: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 12px 13px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f2f6fa; color: #405169; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdff; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.definition-list { display: grid; grid-template-columns: 210px 1fr; margin: 0; }
.definition-list dt, .definition-list dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.definition-list dt { color: var(--muted); font-size: .84rem; }
.definition-list dd { font-weight: 650; }
.empty-state { text-align: center; padding: 34px; color: var(--muted); }
.empty-state h3 { color: var(--ink); }
.pagination { display: flex; gap: 6px; justify-content: center; margin: 24px 0 0; }
.pagination a { min-width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; border-radius: 9px; color: var(--ink); }
.pagination a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination a:hover { text-decoration: none; }

.directory-card { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 15px; align-items: start; }
.avatar { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--navy), var(--teal)); font-weight: 850; }
.directory-meta { display: flex; flex-wrap: wrap; gap: 7px 13px; color: var(--muted); font-size: .82rem; }
.verify-panel { max-width: 760px; margin: 0 auto; text-align: center; }
.verify-seal { width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: #def6ec; color: var(--success); border: 6px solid #f3fbf8; font-size: 2.2rem; font-weight: 900; }

.auth-layout { padding: 56px 0; }
.auth-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 26px; align-items: start; }
.auth-aside { position: sticky; top: 110px; border-radius: 22px; padding: 28px; background: linear-gradient(145deg, var(--navy-dark), #175e72); color: #fff; }
.auth-aside p, .auth-aside li { color: #d7e6f2; }
.auth-aside ul { padding-left: 20px; }

.site-footer { margin-top: 68px; background: #0f263f; color: #d8e2ec; padding: 42px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 30px; }
.footer-grid p { color: #aebfd0; max-width: 650px; }
.footer-links { display: grid; gap: 8px; align-content: start; }
.footer-links a { color: #e8f1f8; }
.footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); color: #96aabc; font-size: .82rem; }

.print-card { max-width: 840px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.print-card-head { background: linear-gradient(135deg, var(--navy-dark), #17697a); color: #fff; padding: 24px; display: flex; justify-content: space-between; gap: 20px; }
.print-card-body { padding: 28px; display: grid; grid-template-columns: 150px 1fr; gap: 26px; }
.photo-placeholder { aspect-ratio: 3/4; border-radius: 14px; display: grid; place-items: center; background: #eaf0f6; color: var(--muted); text-align: center; font-size: .8rem; overflow: hidden; }
.photo-placeholder img { width: 100%; height: 100%; object-fit: cover; }
.verification-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }

@media (max-width: 980px) {
    .hero-grid, .dashboard-grid, .auth-grid { grid-template-columns: 1fr; }
    .auth-aside { position: static; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .brand-copy small { max-width: 220px; }
    .primary-nav { display: none; position: absolute; left: 16px; right: 16px; top: 68px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: var(--shadow); flex-direction: column; align-items: stretch; }
    .primary-nav.is-open { display: flex; }
    .nav-toggle { display: inline-flex; }
    .primary-nav > a { padding: 11px 12px; }
}

@media (max-width: 720px) {
    .container { width: min(100% - 22px, 1160px); }
    .hero { padding: 58px 0 52px; }
    .hero h1 { font-size: 2.45rem; }
    .section { padding: 50px 0; }
    .grid-2, .grid-3, .grid-4, .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
    .search-bar { grid-template-columns: 1fr; }
    .page-header-row, .split-row, .user-strip-inner { align-items: flex-start; flex-direction: column; }
    .user-strip-inner { padding-block: 8px; gap: 3px; }
    .brand-copy small { display: none; }
    .definition-list { grid-template-columns: 1fr; }
    .definition-list dt { border-bottom: 0; padding-bottom: 0; }
    .definition-list dd { padding-top: 2px; }
    .footer-grid { grid-template-columns: 1fr; }
    .print-card-body { grid-template-columns: 1fr; }
    .photo-placeholder { max-width: 150px; }
}

@media print {
    .site-header, .user-strip, .site-footer, .no-print, .flash-stack { display: none !important; }
    body { background: #fff; }
    main { min-height: 0; }
    .section, .section-sm { padding: 0; }
    .print-card { box-shadow: none; border: 1px solid #888; }
}
