:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #667085;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --line: #dde5f2;
    --success: #15803d;
    --warning: #b45309;
    --danger: #b91c1c;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Arial, sans-serif;
}

body {
    background:
        radial-gradient(circle at 75% 0%, rgba(37, 99, 235, .08), transparent 28%),
        #f4f7fb;
}

.app-shell { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.sidebar {
    width: 270px;
    background: #102033;
    color: #fff;
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    margin-bottom: 26px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
}

.sidebar nav a {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #cbd5e1;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 8px;
    margin-bottom: 4px;
}

.sidebar nav a:hover,
.sidebar nav a.active { background: rgba(255,255,255,.12); color: #fff; }

.topbar {
    min-height: 82px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 26px;
}

.topbar h1 { margin: 0; font-size: 1.35rem; font-weight: 750; }
.topbar span { color: var(--muted); font-size: .95rem; }
.content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 26px; flex: 1; }

.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 12px 28px rgba(16, 32, 51, .05);
}

.panel + .panel { margin-top: 20px; }
.panel.narrow { max-width: 820px; }
.panel h2, .panel-header h2 { font-size: 1.15rem; font-weight: 750; margin: 0 0 16px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-actions { margin-bottom: 18px; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    min-height: 120px;
    overflow: hidden;
}

.stat-card span { color: var(--muted); }
.stat-card strong { display: block; margin-top: 10px; font-size: 2rem; }
.stat-card i { position: absolute; right: 18px; bottom: 16px; font-size: 2rem; color: #d1d9e6; }
.stat-card.accent { background: #eef6ff; border-color: #bfdbfe; }

.filters, .form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 1fr));
    gap: 14px;
    align-items: end;
}

.stacked-form { display: grid; gap: 15px; }
.two-columns, .dictionary-layout, .report-grid {
    display: grid;
    gap: 18px;
}

.two-columns, .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dictionary-layout {
    grid-template-columns: minmax(720px, 1.25fr) minmax(420px, .75fr);
}

.dictionary-layout .table-responsive {
    overflow-x: hidden;
}

.dictionary-layout .table {
    table-layout: fixed;
    width: 100%;
}

.dictionary-layout .table th,
.dictionary-layout .table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.dictionary-layout .table th:last-child,
.dictionary-layout .table td:last-child {
    width: 86px;
}

.dictionary-layout .table-actions {
    justify-content: flex-start;
}

.dictionary-layout .table-actions .btn {
    width: 100%;
    padding-left: 8px;
    padding-right: 8px;
}

.form-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.approval-actions { display: grid; gap: 12px; }
.approval-actions h3 { font-size: 1rem; margin: 10px 0 0; font-weight: 750; }
.approval-actions .btn { width: 100%; text-align: left; }
.table-filter { max-width: 360px; margin-bottom: 14px; }
.actions { white-space: nowrap; }
.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.table-actions form {
    margin: 0;
}

.status-toggle {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.status-toggle form {
    margin: 0;
}

.print-only {
    display: none;
}

.inline-edit-wrap {
    display: grid;
    gap: 4px;
    min-width: 110px;
}

.inline-edit-input {
    min-width: 96px;
    background: #fff;
}

.inline-edit-input.is-saving {
    background: #f8fbff;
}

.inline-save-state {
    min-height: 16px;
    font-size: 12px;
    line-height: 1.2;
}

.inline-save-state.muted { color: #64748b; }
.inline-save-state.success { color: #15803d; }
.inline-save-state.danger { color: #dc2626; }

.danger-zone {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #fee2e2;
}

.user-form {
    display: grid;
    gap: 16px;
}

.user-form-row {
    display: grid;
    gap: 14px;
    align-items: end;
}

.user-form-row.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.user-form-row.two {
    grid-template-columns: 1fr minmax(260px, .9fr);
}

.user-form-row.four {
    grid-template-columns: 1fr 1fr 1fr minmax(220px, .9fr);
}

.user-check {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 8px 0 0;
    font-weight: 600;
}

.user-check .form-check-input {
    margin: 0;
}

.user-form-actions {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid #edf1f7;
}

.status {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 700;
}
.status-draft { background: #eef2ff; color: #3730a3; }
.status-submitted { background: #fff7ed; color: var(--warning); }
.status-head_approved { background: #eff6ff; color: #1d4ed8; }
.status-admin_approved { background: #ecfdf5; color: var(--success); }
.status-approved { background: #ecfdf5; color: var(--success); }
.status-revision { background: #fef2f2; color: var(--danger); }

.plan-document {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 34px;
    box-shadow: 0 12px 28px rgba(16, 32, 51, .05);
}
.plan-document h2 { text-align: center; font-weight: 800; margin-bottom: 6px; }
.plan-document h3 { margin-top: 28px; font-size: 1.08rem; font-weight: 750; }
.doc-subtitle { text-align: center; color: var(--muted); }
.doc-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    margin: 20px 0;
}
.doc-meta-column {
    display: grid;
    gap: 10px;
    align-content: start;
}
.document-table th { background: #f8fafc; }
.document-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.section-jump-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: -4px 0 18px;
}
.section-jump-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #0b4fc5;
    font-size: .9rem;
    font-weight: 650;
    text-decoration: none;
}
.section-jump-nav a:hover {
    border-color: #b7cff8;
    background: #eef6ff;
    color: var(--primary);
}
.scroll-top-button {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 30;
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid #b7cff8;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .28);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .18s ease, transform .18s ease, background .18s ease;
}
.scroll-top-button.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.scroll-top-button:hover {
    background: var(--primary-dark);
}
.plan-section-block {
    margin-top: 42px;
    scroll-margin-top: 24px;
}
.plan-section-block:first-of-type {
    margin-top: 30px;
}
.plan-section-heading {
    display: grid;
    gap: 14px;
    margin: 0 0 16px;
    padding-top: 4px;
}
.plan-section-heading h3 {
    margin: 0;
    text-align: center;
    color: #0b2148;
    font-size: clamp(1.2rem, 1.4vw, 1.45rem);
    line-height: 1.25;
    font-weight: 850;
}
.plan-section-heading h3::after {
    content: "";
    display: block;
    width: 72px;
    height: 3px;
    margin: 10px auto 0;
    border-radius: 999px;
    background: var(--primary);
}
.plan-section-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    min-height: 34px;
}
.plan-section-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.plan-section-block > .table-responsive {
    margin-top: 8px;
}
.section-hours-total {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-top: 0;
    background: #f8fafc;
    color: #0b2148;
    font-weight: 700;
}
.approval-review {
    margin-top: 34px;
    padding: 18px 20px;
    border: 1px solid #b7cff8;
    border-radius: 8px;
    background: #f8fbff;
}
.approval-review h3 {
    margin: 0 0 10px;
    text-align: center;
    color: #0b2148;
    font-size: 1.15rem;
    font-weight: 850;
}
.approval-review p {
    margin: 0;
    color: #0b2148;
    line-height: 1.55;
}
.plan-year-hours-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 28px;
    padding: 16px 18px;
    border: 1px solid #b7cff8;
    border-radius: 8px;
    background: #eef6ff;
    color: #0b2148;
    font-weight: 750;
}
.plan-year-hours-total div {
    display: grid;
    gap: 4px;
}
.plan-year-hours-total small {
    color: var(--muted);
    font-weight: 650;
}
.plan-year-hours-total strong {
    font-size: 1.45rem;
    white-space: nowrap;
}

.educational-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 12px;
}

.edu-report-table {
    width: 100%;
    border-collapse: collapse;
    font-family: "Times New Roman", serif;
    font-size: 14px;
    color: #000;
}

.edu-report-table th,
.edu-report-table td {
    border: 1px solid #000;
    padding: 4px 5px;
    text-align: center;
    vertical-align: middle;
    min-width: 42px;
}

.edu-report-table th:nth-child(2),
.edu-report-table td:nth-child(2) { min-width: 96px; }

.edu-report-table th:nth-child(3),
.edu-report-table td:nth-child(3) { min-width: 260px; }

.edu-report-table .vertical {
    height: 158px;
    width: 48px;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
    line-height: 1.15;
}

.edu-report-table .study-form-row td {
    font-weight: 700;
    text-align: center;
}

.edu-report-table .total-row td {
    font-weight: 700;
}

.edu-report-table .grand-total td {
    font-style: italic;
}

.educational-report {
    max-width: none;
}

.plan-educational-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-family: inherit;
    font-size: 11.8px;
    color: var(--text);
    background: #fff;
}

.plan-educational-table th,
.plan-educational-table td {
    border: 1px solid #dbe3ef;
    padding: 4px 4px;
    min-width: 0;
    height: auto;
    vertical-align: middle;
    overflow-wrap: anywhere;
}

.plan-educational-table th {
    background: #f8fafc;
    font-weight: 700;
}

.plan-educational-table th:nth-child(2),
.plan-educational-table td:nth-child(2) {
    min-width: 0;
}

.plan-educational-table th:nth-child(3),
.plan-educational-table td:nth-child(3) {
    min-width: 0;
    max-width: none;
}

.plan-educational-table .vertical {
    width: auto;
    min-width: 0;
    height: 88px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
}

.plan-educational-table .edu-col-num { width: 36px; }
.plan-educational-table .edu-col-group { width: 78px; }
.plan-educational-table .edu-col-discipline { width: 210px; }
.plan-educational-table .edu-col-small { width: 38px; }
.plan-educational-table .edu-col-total { width: 42px; }
.plan-educational-table .edu-col-status { width: 58px; }

.plan-educational-table .study-form-row td {
    background: #f8fafc;
    font-weight: 700;
    text-align: center;
}

.plan-educational-table .total-row td {
    background: #fbfdff;
    font-weight: 700;
}

.plan-educational-table .grand-total td {
    background: #f3f7fd;
    font-style: normal;
}

.plan-educational-table .status-toggle {
    justify-content: center;
    gap: 4px;
    display: grid;
}

.plan-educational-table .status-toggle .btn {
    width: 100%;
    padding: 2px 3px;
    font-size: 9px;
    line-height: 1.15;
}

.profile-list {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 12px;
}
.profile-list dt { color: var(--muted); }

.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #eef6ff, #f8fafc 55%, #eaf7ef);
}
.login-card {
    width: min(100%, 460px);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 22px 60px rgba(16, 32, 51, .16);
}
.login-heading { display: flex; gap: 14px; align-items: center; margin-bottom: 24px; }
.login-heading h1 { font-size: 1.25rem; margin: 0; font-weight: 800; }
.login-heading p, .demo-logins { color: var(--muted); margin: 4px 0 0; }
.demo-logins { margin-top: 18px; font-size: .92rem; }

.modern-login {
    min-height: 100vh;
    padding: 28px;
    background:
        radial-gradient(circle at 15% 12%, rgba(37, 99, 235, .16), transparent 26%),
        radial-gradient(circle at 86% 70%, rgba(20, 184, 166, .12), transparent 28%),
        #f4f7fb;
}

.login-layout {
    width: min(1180px, 100%);
    min-height: 700px;
    display: grid;
    grid-template-columns: 1.1fr 430px;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(8, 46, 100, .18);
}

.login-showcase {
    position: relative;
    overflow: hidden;
    display: grid;
    align-content: start;
    gap: 30px;
    padding: 58px 66px 150px;
    background:
        radial-gradient(circle at 48% 23%, rgba(255,255,255,.96), rgba(255,255,255,.62) 28%, transparent 50%),
        linear-gradient(135deg, #052856 0%, #edf5ff 50%, #082e64 100%);
}

.login-showcase::before {
    content: "";
    position: absolute;
    inset: auto -10% -92px -10%;
    height: 210px;
    border-radius: 50%;
    background: #052856;
    transform: rotate(4deg);
}

.login-showcase::after {
    content: "";
    position: absolute;
    left: -12%;
    right: -12%;
    bottom: 72px;
    height: 130px;
    border-top: 16px solid #fff;
    border-radius: 50%;
    transform: rotate(4deg);
}

.login-logo-orbit {
    position: relative;
    z-index: 1;
    width: 230px;
    height: 230px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 22px 42px rgba(8, 46, 100, .22);
}

.login-logo-orbit::before {
    content: "";
    position: absolute;
    inset: -18px;
    border: 2px solid rgba(255,255,255,.72);
    border-radius: inherit;
}

.login-logo-orbit img {
    width: 188px;
}

.login-showcase-copy {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

.login-showcase-copy span {
    display: inline-flex;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    color: #08295b;
    font-weight: 800;
}

.login-showcase-copy h1 {
    margin: 0;
    color: #08295b;
    font-size: clamp(2.6rem, 4.55vw, 4.65rem);
    line-height: .98;
    font-weight: 850;
}

.login-showcase-copy p {
    display: inline-block;
    max-width: 600px;
    margin: 22px 0 0;
    padding: 10px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 12px 28px rgba(8, 46, 100, .12);
    color: #071a3b;
    font-size: clamp(1.04rem, 1.45vw, 1.36rem);
    line-height: 1.32;
    font-weight: 750;
}

.login-dots {
    position: absolute;
    width: 110px;
    height: 110px;
    z-index: 1;
    opacity: .52;
    background-image: radial-gradient(circle, #fff 3px, transparent 3px);
    background-size: 22px 22px;
}

.login-dots.dots-a { left: 42px; top: 52px; }
.login-dots.dots-b { right: 44px; top: 70px; }

.login-panel {
    display: grid;
    align-content: center;
    padding: 48px;
    background: #ffffff;
}

.login-panel-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 34px;
}

.login-panel-head img {
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.login-panel-head h2 {
    margin: 0 0 6px;
    color: #08295b;
    font-weight: 850;
}

.login-panel-head p {
    margin: 0;
    color: #667085;
    line-height: 1.35;
}

.login-form {
    display: grid;
    gap: 18px;
}

.login-form label {
    display: grid;
    gap: 8px;
    color: #0b2148;
    font-weight: 700;
}

.login-input {
    display: grid;
    grid-template-columns: 44px 1fr;
    align-items: center;
    min-height: 54px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #f8fafc;
    transition: border-color .18s, box-shadow .18s, background .18s;
}

.login-input:focus-within {
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.login-input i {
    text-align: center;
    color: #2563eb;
    font-size: 1.16rem;
}

.login-input input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0b2148;
    font-size: 1rem;
}

.login-submit {
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 10px;
    font-weight: 800;
    box-shadow: 0 14px 28px rgba(37, 99, 235, .25);
}

.modern-demo {
    display: grid;
    gap: 4px;
    margin-top: 26px;
    padding: 16px;
    border-radius: 10px;
    background: #f8fafc;
    color: #475467;
}

.password-reset-page {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 20% 15%, rgba(37, 99, 235, .16), transparent 28%),
        radial-gradient(circle at 82% 78%, rgba(20, 184, 166, .12), transparent 28%),
        #f4f7fb;
}

.password-reset-shell {
    width: min(100%, 560px);
}

.password-reset-card {
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    padding: 36px;
    box-shadow: 0 28px 70px rgba(8, 46, 100, .16);
}

.password-reset-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

.password-reset-brand img {
    width: 78px;
    height: 78px;
    object-fit: contain;
}

.password-reset-brand span {
    display: block;
    color: #667085;
    font-weight: 700;
    margin-bottom: 4px;
}

.password-reset-brand h1 {
    margin: 0;
    color: #08295b;
    font-weight: 850;
}

.password-reset-logout {
    display: inline-flex;
    margin-top: 18px;
    color: #dc2626;
    text-decoration: none;
    font-weight: 700;
}

.footer { color: var(--muted); padding: 0 26px 22px; }

/* Оновлена головна сторінка */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #052856 0%, #06234a 44%, #031a38 100%);
    padding: 26px 16px;
    box-shadow: 18px 0 34px rgba(6, 35, 74, .18);
}

.sidebar-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 150px;
    margin-bottom: 18px;
    width: 128px;
    height: 128px;
    min-height: 128px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 18px 34px rgba(0,0,0,.2);
}

.sidebar-logo img {
    width: 108px !important;
    max-width: 108px !important;
    height: auto !important;
    max-height: 108px !important;
    object-fit: contain;
    filter: none;
}

.sidebar-nav {
    display: grid;
    gap: 7px;
}

.sidebar-nav a {
    position: relative;
    display: grid;
    grid-template-columns: 30px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: #eef5ff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
}

.sidebar-nav a i {
    font-size: 1.18rem;
    color: #fff;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #1d6cf2;
    box-shadow: 0 12px 26px rgba(29, 108, 242, .28);
}

.sidebar-nav a em {
    min-width: 28px;
    height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #1d6cf2;
    color: #fff;
    font-style: normal;
}

.sidebar-nav .logout-link {
    margin-top: 16px;
    border-top: 1px solid rgba(255,255,255,.18);
    padding-top: 18px;
}

.topbar {
    min-height: 88px;
    border-bottom: 0;
    background: rgba(255,255,255,.76);
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(15, 23, 42, .06);
}

.topbar-spacer {
    flex: 1;
}

.topbar-year,
.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    min-height: 54px;
    padding: 0 16px;
    color: #0b2148;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.topbar-user {
    border: 0;
    box-shadow: none;
    background: transparent;
}

.topbar-user strong,
.topbar-user span {
    display: block;
    line-height: 1.15;
}

.topbar-user strong {
    color: #0b2148;
}

.user-avatar {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #fff;
    color: #08295b;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
    font-size: 1.35rem;
}

.dashboard-page {
    max-width: 1600px;
    padding-top: 26px;
}

.dashboard-hero {
    position: relative;
    min-height: 390px;
    overflow: hidden;
    isolation: isolate;
    contain: layout paint;
    display: grid;
    grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
    align-items: center;
    gap: 26px;
    padding: 44px 72px;
    border-radius: 14px;
    background:
        radial-gradient(circle at 44% 30%, rgba(255,255,255,.96), rgba(255,255,255,.58) 34%, transparent 54%),
        linear-gradient(135deg, #082e64 0%, #f8fbff 48%, #082e64 100%);
    color: #081f46;
    box-shadow: 0 20px 48px rgba(8, 46, 100, .18);
}

.dashboard-hero::before,
.dashboard-hero::after {
    content: "";
    position: absolute;
    left: -6%;
    right: -6%;
    height: 150px;
    border-radius: 50%;
    pointer-events: none;
}

.dashboard-hero::before {
    bottom: -74px;
    background: #082e64;
    transform: rotate(4deg);
}

.dashboard-hero::after {
    bottom: 30px;
    border-top: 18px solid #fff;
    opacity: .96;
    transform: rotate(4deg);
}

.hero-logo-wrap {
    position: relative;
    z-index: 1;
    width: 250px;
    height: 250px;
    max-width: 100%;
    max-height: 250px;
    overflow: hidden;
    display: grid;
    place-items: center;
    justify-self: center;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(8, 46, 100, .18);
}

.hero-logo-wrap img {
    width: 210px !important;
    max-width: 84% !important;
    max-height: 84% !important;
    height: auto !important;
    display: block !important;
    object-fit: contain !important;
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.hero-copy h1 {
    margin: 0;
    color: #08295b;
    font-size: clamp(2.6rem, 5vw, 5.3rem);
    line-height: .98;
    font-weight: 850;
}

.hero-line {
    width: 110px;
    height: 6px;
    margin: 28px 0;
    border-radius: 999px;
    background: #1d6cf2;
}

.hero-copy p {
    margin: 0 0 12px;
    max-width: 720px;
    color: #071a3b;
    font-size: clamp(1.15rem, 2vw, 2rem);
    line-height: 1.2;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(255, 255, 255, .9);
}

.hero-copy span {
    display: inline-flex;
    max-width: 760px;
    padding: 7px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
    color: #0b2148;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.35;
    box-shadow: 0 8px 22px rgba(8, 46, 100, .12);
}

.hero-dots {
    position: absolute;
    z-index: 1;
    width: 96px;
    height: 96px;
    opacity: .55;
    background-image: radial-gradient(circle, #fff 3px, transparent 3px);
    background-size: 22px 22px;
}

.hero-dots.left { left: 42px; top: 52px; }
.hero-dots.right { right: 42px; top: 62px; }

.dashboard-stats {
    grid-template-columns: repeat(5, minmax(170px, 1fr));
    margin: 26px 0;
}

.dashboard-stats .stat-card {
    display: grid;
    grid-template-columns: 76px 1fr;
    align-items: center;
    column-gap: 18px;
    min-height: 128px;
    padding: 22px;
    border-radius: 14px;
}

.dashboard-stats .stat-card i {
    position: static;
    grid-row: span 2;
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    font-size: 1.9rem;
}

.dashboard-stats .stat-card strong {
    margin: 0;
    font-size: 2.2rem;
    line-height: 1;
    color: #0b2148;
}

.dashboard-stats .stat-card strong.stat-text {
    font-size: 1.05rem;
    line-height: 1.22;
}

.dashboard-stats .stat-card span {
    color: #0b2148;
    font-weight: 600;
}

.stat-blue i { background: #dbeafe; color: #2563eb !important; }
.stat-indigo i { background: #dbeafe; color: #1d4ed8 !important; }
.stat-green i { background: #dcfce7; color: #16a34a !important; }
.stat-orange i { background: #ffedd5; color: #f97316 !important; }
.stat-purple i { background: #ede9fe; color: #8b5cf6 !important; }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.12fr;
    gap: 24px;
}

.dashboard-panel {
    border-radius: 14px;
    padding: 26px;
}

.dashboard-panel .panel-header {
    margin-bottom: 18px;
}

.dashboard-panel .panel-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #0b2148;
}

.dashboard-panel .panel-header a {
    color: #0b63f6;
    text-decoration: none;
    font-weight: 600;
}

.notification-list {
    display: grid;
    gap: 18px;
}

.notification-item {
    display: grid;
    grid-template-columns: 62px 1fr auto;
    gap: 18px;
    align-items: center;
    padding-bottom: 18px;
    border-bottom: 1px solid #e8edf5;
}

.notification-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.notification-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    font-size: 1.45rem;
}

.notification-icon.icon-1 { background: #ffedd5; color: #f59e0b; }
.notification-icon.icon-2 { background: #dbeafe; color: #2563eb; }
.notification-icon.icon-3 { background: #dcfce7; color: #16a34a; }

.notification-item strong {
    display: block;
    margin-bottom: 6px;
    color: #0b2148;
}

.notification-item p {
    margin: 0;
    color: #27334c;
}

.notification-item time {
    color: #0b2148;
    font-size: .92rem;
    white-space: nowrap;
}

.instruction-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.instruction-hero h1 {
    margin: 6px 0 10px;
    color: #0b2148;
    font-size: clamp(1.55rem, 2.4vw, 2.25rem);
    font-weight: 850;
}

.instruction-hero p,
.instruction-note p,
.instruction-card p,
.instruction-step p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.section-kicker {
    display: inline-flex;
    color: var(--primary);
    font-size: .86rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.instruction-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.instruction-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
    gap: 18px;
    margin-bottom: 18px;
}

.instruction-steps {
    display: grid;
    gap: 14px;
}

.instruction-step {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.instruction-step span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eef6ff;
    color: var(--primary);
    font-weight: 850;
}

.instruction-step h3,
.instruction-card h3 {
    margin: 0 0 6px;
    color: #0b2148;
    font-size: 1rem;
    font-weight: 800;
}

.instruction-note {
    align-self: start;
}

.instruction-note ul {
    display: grid;
    gap: 10px;
    margin: 16px 0 0;
    padding-left: 18px;
    color: #0b2148;
}

.instruction-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.instruction-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.section-progress-list {
    display: grid;
    gap: 18px;
}

.section-progress-row {
    display: grid;
    grid-template-columns: 34px 260px 1fr 50px;
    align-items: center;
    gap: 14px;
}

.section-mini-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
}

.section-progress-row strong {
    color: #0b2148;
}

.section-progress-row em {
    color: #0b2148;
    font-style: normal;
    font-weight: 700;
    text-align: right;
}

.section-bar {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edf5;
}

.section-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

@media (max-width: 1100px) {
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dictionary-layout, .report-grid, .instruction-layout { grid-template-columns: 1fr; }
    .instruction-hero {
        align-items: flex-start;
        flex-direction: column;
    }
    .instruction-actions {
        justify-content: flex-start;
    }
    .dashboard-hero {
        grid-template-columns: 220px 1fr;
        min-height: 320px;
        padding: 34px;
    }
    .hero-logo-wrap {
        width: 190px;
        height: 190px;
        max-height: 190px;
    }
    .hero-logo-wrap img {
        width: 160px;
    }
    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .section-progress-row {
        grid-template-columns: 34px 210px 1fr 48px;
    }
    .login-layout {
        grid-template-columns: 1fr;
        max-width: 720px;
    }
    .login-showcase {
        min-height: 430px;
        padding: 42px 42px 126px;
    }
    .login-panel {
        padding: 42px;
    }
}

@media (max-width: 860px) {
    .sidebar { position: fixed; z-index: 20; transform: translateX(-100%); transition: .2s; }
    .sidebar.open { transform: translateX(0); }
    .content { padding: 18px; }
    .topbar { padding: 12px 18px; }
    .filters, .form-grid, .two-columns, .doc-meta, .educational-grid { grid-template-columns: 1fr; }
    .user-form-row.two,
    .user-form-row.three,
    .user-form-row.four { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .instruction-cards { grid-template-columns: 1fr; }
    .instruction-step { grid-template-columns: 36px 1fr; }
    .plan-year-hours-total {
        align-items: flex-start;
        flex-direction: column;
    }
    .topbar-year {
        display: none;
    }
    .dashboard-hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 28px 22px 120px;
    }
    .hero-logo-wrap {
        width: min(190px, 62vw);
        height: min(190px, 62vw);
        max-height: 190px;
    }
    .hero-line {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-dots {
        display: none;
    }
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    .notification-item {
        grid-template-columns: 52px 1fr;
    }
    .notification-item time {
        grid-column: 2;
    }
    .section-progress-row {
        grid-template-columns: 30px 1fr 46px;
    }
    .section-bar {
        grid-column: 2 / 4;
    }
    .modern-login {
        padding: 14px;
    }
    .login-layout {
        min-height: 0;
        border-radius: 14px;
    }
    .login-showcase {
        min-height: 360px;
        justify-items: center;
        text-align: center;
        padding: 34px 22px 112px;
    }
    .login-logo-orbit {
        width: 160px;
        height: 160px;
    }
    .login-logo-orbit img {
        width: 128px;
    }
    .login-dots {
        display: none;
    }
    .login-panel {
        padding: 28px 22px;
    }
    .login-panel-head {
        align-items: flex-start;
    }
    .login-panel-head img {
        width: 58px;
        height: 58px;
    }
}

@media print {
    @page { size: landscape; margin: 8mm; }
    .sidebar, .topbar, .footer, .no-print { display: none !important; }
    .content { padding: 0; }
    .plan-document { border: 0; box-shadow: none; padding: 0; }
    .table-responsive { overflow: visible !important; }
    .print-only { display: inline !important; }
    .edu-report-table { font-size: 11px; }
    .edu-report-table th,
    .edu-report-table td { padding: 2px 3px; }
    .edu-report-table .vertical { height: 118px; width: 34px; }
}
