:root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #141a43;
    background: #f4f6fc;
    --navy: #090d49;
    --ink: #141a43;
    --muted: #67728b;
    --blue: #2524df;
    --blue-dark: #1715ae;
    --line: #e2e6f1;
    --surface: #fff;
    --soft: #eff0ff;
    --shadow: 0 12px 38px rgba(17, 24, 81, .07);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; }
a { color: #2524ce; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.wrap { width: min(1220px, calc(100% - 48px)); margin-inline: auto; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 20; background: #fff; padding: 10px 14px; border-radius: 9px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid #6e75ff; outline-offset: 3px; }

.site-header { padding: 16px 0 22px; background: linear-gradient(112deg, #0a0e4b 0%, #171b77 62%, #302db4 100%); }
.nav { min-height: 82px; padding: 14px 24px; display: flex; align-items: center; gap: 26px; background: #fff; border-radius: 19px; box-shadow: 0 18px 42px rgba(4, 5, 56, .18); }
.brand { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 15px; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand img { display: block; width: 174px; height: auto; }
.brand-divider { width: 1px; height: 32px; background: #d9dded; }
.brand-caption { font-size: 12px; font-weight: 800; line-height: 1.2; letter-spacing: .025em; text-transform: uppercase; }
.nav nav { display: flex; align-items: center; gap: 3px; flex: 1; justify-content: center; }
.nav nav a { padding: 11px 12px; border-radius: 9px; color: #363b5c; font-size: 13px; font-weight: 700; white-space: nowrap; }
.nav nav a:hover { color: var(--blue); background: var(--soft); text-decoration: none; }
.user-menu { display: flex; align-items: center; gap: 10px; }
.user-menu form { margin: 0; }
.account-link { display: inline-block; max-width: 155px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 9px 10px; color: #343b61; font-size: 13px; font-weight: 700; }
.account-link:hover { color: var(--blue); }
.text-button { border: 0; border-radius: 8px; background: #f0f1fb; color: #262972; padding: 9px 11px; font-size: 13px; font-weight: 750; }
.text-button:hover { background: #e3e6ff; }
.page { min-height: calc(100vh - 225px); padding-top: 38px; padding-bottom: 76px; }
.footer { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid #dce2ef; padding: 22px 0 30px; color: #8992a6; font-size: 12px; }

h1, h2, h3 { color: var(--ink); letter-spacing: -.035em; line-height: 1.16; }
h1 { font-size: clamp(29px, 3.4vw, 43px); margin: 9px 0 12px; }
h2 { font-size: 24px; margin: 0 0 20px; }
h3 { font-size: 17px; margin: 25px 0 10px; }
p { line-height: 1.55; }
.muted, .hint { color: var(--muted); }
.hint { font-size: 13px; line-height: 1.45; }
.eyebrow { color: #3336d9; font-size: 11px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 44px; padding: 11px 19px; border: 1px solid transparent; border-radius: 10px; background: var(--blue); color: #fff; font-size: 14px; font-weight: 750; white-space: nowrap; box-shadow: 0 8px 20px rgba(37, 36, 223, .16); }
.button:hover { color: #fff; background: var(--blue-dark); text-decoration: none; box-shadow: 0 10px 24px rgba(37, 36, 223, .25); }
.button.small { min-height: 36px; padding: 7px 12px; font-size: 12px; }
.button.full { width: 100%; margin-top: 22px; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin: 26px 0 24px; }
.section-head h1, .section-head h2 { margin: 7px 0 5px; }
.section-head p { margin: 0; }
.card, .stat { background: var(--surface); border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }
.card { margin-bottom: 22px; padding: 28px; }
.card.narrow { max-width: 580px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 22px; }
.stat { position: relative; overflow: hidden; padding: 25px 28px; }
.stat::after { content: ""; position: absolute; right: -28px; top: -36px; width: 120px; height: 120px; border: 20px solid #f0f1ff; border-radius: 50%; }
.stat strong { display: block; position: relative; z-index: 1; color: #2025b2; font-size: 39px; line-height: 1; }
.stat span { display: block; position: relative; z-index: 1; margin-top: 9px; color: #65718a; font-size: 13px; font-weight: 650; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; padding: 12px 10px; color: #747e97; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
td { padding: 16px 10px; border-top: 1px solid #edf0f7; vertical-align: middle; }
tbody tr:hover { background: #fafbff; }
td:last-child { text-align: right; }
td a { font-weight: 750; }
.badge { display: inline-block; padding: 6px 9px; border-radius: 7px; background: #eceeff; color: #3033a4; font-size: 12px; font-weight: 750; white-space: nowrap; }
.search-row { display: flex; gap: 10px; margin-bottom: 22px; }
.search-row input { flex: 1; }
.search-row .button { box-shadow: none; }
.back { display: inline-block; margin-bottom: 12px; font-size: 14px; font-weight: 750; }

.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); align-items: center; gap: 20px; overflow: hidden; padding: 55px 58px; border-radius: 24px; background: linear-gradient(116deg, #0b0f4a 0%, #1a2186 60%, #4a45d7 100%); box-shadow: 0 22px 48px rgba(18, 24, 100, .17); }
.hero::before { content: ""; position: absolute; width: 440px; height: 440px; right: -145px; top: -205px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 76px rgba(255,255,255,.055), 0 0 0 155px rgba(255,255,255,.03); }
.hero-copy { position: relative; z-index: 1; }
.hero .eyebrow, .auth-intro .eyebrow { color: #b6c0ff; }
.hero h1 { max-width: 660px; color: #fff; font-size: clamp(32px, 3.6vw, 49px); line-height: 1.12; }
.hero p { max-width: 560px; margin: 0 0 26px; color: #dce2ff; font-size: 16px; }
.hero .button { background: #fff; color: #1b228c; box-shadow: 0 10px 28px rgba(5, 9, 65, .18); }
.hero .button:hover { background: #f0f1ff; color: #151a7d; }
.hero-art { position: relative; height: 280px; }
.hero-file { position: absolute; width: 250px; height: 255px; border-radius: 18px; }
.hero-file-back { top: 8px; left: 45px; transform: rotate(9deg); background: #d1d3ff; opacity: .54; }
.hero-file-front { top: 10px; left: 10px; padding: 25px; transform: rotate(-5deg); background: #fff; box-shadow: 0 25px 45px rgba(9, 14, 72, .26); }
.hero-file-top { display: flex; justify-content: space-between; align-items: start; margin-bottom: 32px; }
.hero-file-icon { display: grid; place-items: center; width: 53px; height: 58px; border-radius: 11px; background: #e8eaff; color: #282ed6; font-size: 12px; font-weight: 850; }
.hero-file-dot { width: 9px; height: 9px; border-radius: 50%; background: #c9cdeb; }
.hero-file i { display: block; height: 9px; margin-bottom: 11px; border-radius: 8px; background: #e9ebf5; }
.hero-file i:nth-of-type(1) { width: 84%; }.hero-file i:nth-of-type(2) { width: 65%; }.hero-file i:nth-of-type(3) { width: 72%; }
.hero-file-foot { display: flex; justify-content: space-between; margin-top: 28px; color: #4a51a7; font-size: 12px; font-weight: 750; }

.auth-layout { display: grid; grid-template-columns: 1.04fr .96fr; min-height: 555px; max-width: 1080px; margin: 14px auto 0; overflow: hidden; border: 1px solid #e4e6f3; border-radius: 24px; background: #fff; box-shadow: 0 24px 65px rgba(12, 17, 76, .12); }
.auth-intro { position: relative; display: flex; flex-direction: column; align-items: start; justify-content: center; overflow: hidden; padding: 56px; background: linear-gradient(135deg, #0a0e4b, #1b217c 65%, #3939c4); }
.auth-intro::before { content: ""; position: absolute; width: 400px; height: 400px; border-radius: 50%; border: 1px solid rgba(255,255,255,.12); top: -190px; right: -200px; box-shadow: 0 0 0 70px rgba(255,255,255,.04), 0 0 0 145px rgba(255,255,255,.025); }
.auth-intro h1 { position: relative; max-width: 440px; margin: 18px 0 14px; color: #fff; font-size: clamp(34px, 3.1vw, 45px); }
.auth-intro p { position: relative; max-width: 410px; color: #d8dfff; font-size: 15px; }
.auth-intro-tags { position: relative; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.auth-intro-tags span { padding: 8px 11px; border: 1px solid rgba(255,255,255,.25); border-radius: 100px; color: #e7eaff; font-size: 12px; font-weight: 650; }
.auth-art { position: absolute; right: -22px; bottom: -62px; width: 240px; height: 170px; transform: rotate(-12deg); border: 1px solid rgba(255,255,255,.3); border-radius: 22px; background: rgba(255,255,255,.12); box-shadow: 0 16px 45px rgba(0,0,0,.12); }
.auth-art-icon { position: absolute; left: 28px; top: 27px; display: grid; place-items: center; width: 52px; height: 60px; border-radius: 10px; background: #fff; color: #3235c8; font-size: 12px; font-weight: 850; }
.auth-art>div:last-child { position: absolute; left: 100px; top: 38px; width: 100px; }
.auth-art i { display: block; height: 8px; margin-bottom: 12px; border-radius: 5px; background: rgba(255,255,255,.45); }
.auth-art i:nth-child(2) { width: 70%; }.auth-art i:nth-child(3) { width: 85%; }
.auth-card { max-width: 520px; margin: 30px auto; padding: 48px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.auth-layout .auth-card { width: 100%; max-width: none; display: flex; flex-direction: column; justify-content: center; margin: 0; padding: 55px 58px; border: 0; border-radius: 0; box-shadow: none; }
.auth-card h1, .auth-card h2 { margin: 12px 0 11px; font-size: clamp(30px, 2.8vw, 37px); }
.auth-card .muted { margin: 0 0 13px; line-height: 1.5; }
.auth-card form { margin-top: 13px; }
.auth-foot { margin-top: 22px; font-size: 13px; }
.auth-foot a { font-weight: 750; }

label { display: block; margin: 16px 0 7px; color: #3d4866; font-size: 13px; font-weight: 750; }
input, select { width: 100%; min-height: 45px; padding: 11px 13px; border: 1px solid #cfd5e6; border-radius: 9px; background: #fff; color: #1a2248; font-size: 14px; }
input::placeholder { color: #a2abc0; }
input:focus, select:focus { border-color: #696bfa; outline: 3px solid #e2e4ff; outline-offset: 0; }
form > .button { margin-top: 20px; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
.admin-grid .card { margin-bottom: 0; }
.audit { margin-top: 22px; }
.list { margin-top: 21px; max-height: 290px; overflow: auto; border-top: 1px solid var(--line); }
.list-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #ecedf5; font-size: 13px; }
.list-row small { display: block; margin-top: 3px; color: #8790a6; word-break: break-word; }
.list-row form { margin: 0; }
.notice { margin-bottom: 20px; padding: 14px 17px; border: 1px solid #c6e9df; border-radius: 10px; background: #eaf9f3; color: #176449; font-size: 14px; }
.error { color: #963d45; background: #fff0f0; border-color: #ffd4d7; }
.error ul { margin: 0; padding-left: 20px; }
.validation-summary-valid { display: none; }
.status-card { max-width: 720px; margin: 45px auto; padding: 45px; }
.status-card .button { margin-top: 12px; }
.status-card code { word-break: break-all; }

@media (max-width: 1050px) {
    .nav { flex-wrap: wrap; justify-content: space-between; }
    .nav nav { order: 3; flex-basis: 100%; justify-content: start; overflow-x: auto; border-top: 1px solid var(--line); padding-top: 7px; }
    .hero { grid-template-columns: minmax(0, 1.3fr) 255px; }
    .hero-file-back { left: 20px; }.hero-file-front { left: 0; }
}
@media (max-width: 760px) {
    .wrap { width: min(100% - 32px, 1220px); }
    .site-header { padding: 10px 0 16px; }
    .nav { padding: 12px 16px; gap: 10px; border-radius: 15px; }
    .brand img { width: 145px; }
    .brand-caption { font-size: 10px; }
    .brand-divider { height: 27px; }
    .page { padding-top: 25px; padding-bottom: 52px; }
    .hero { grid-template-columns: 1fr; padding: 38px 35px; }
    .hero-art { display: none; }
    .auth-layout { grid-template-columns: 1fr; }
    .auth-intro { min-height: 220px; padding: 32px; }
    .auth-intro h1 { max-width: 550px; font-size: 32px; }
    .auth-intro p { margin: 0; }
    .auth-intro-tags, .auth-art { display: none; }
    .auth-layout .auth-card { padding: 34px; }
    .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
    .brand img { width: 124px; }
    .brand { gap: 8px; }
    .brand-caption { font-size: 9px; }
    .user-menu { gap: 4px; }
    .account-link { max-width: 90px; font-size: 12px; }
    .nav nav a { font-size: 12px; padding: 9px; }
    .hero { padding: 32px 25px; }
    .hero h1 { font-size: 31px; }
    .hero p { font-size: 14px; }
    .auth-intro { min-height: 180px; padding: 27px; }
    .auth-intro h1 { font-size: 28px; }
    .auth-intro p { display: none; }
    .auth-layout .auth-card { padding: 30px 26px; }
    .stats { gap: 10px; }
    .stat { padding: 20px; }
    .stat strong { font-size: 32px; }
    .card { padding: 20px; }
    .search-row { flex-direction: column; }
    .footer { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
