:root {
    --white: #ffffff;
    --off-white: #f7f8fa;
    --green: #1f7a3d;
    --green-dark: #0f5c2a;
    --green-light: #e7f4ec;
    --sunset: #f28c38;
    --sunset-dark: #d97725;
    --sunset-light: #fdeee0;
    --blue: #3b82f6;
    --blue-dark: #2563eb;
    --blue-light: #eff6ff;
    --ink: #1f2933;
    --muted: #6b7280;
    --border: #e5e7eb;
    --danger: #dc2626;
    --radius: 12px;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--off-white);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- topbar ---------- */
.topbar {
    position: relative;
    background: var(--white);
    border-bottom: 2px solid var(--green);
    padding: 0 24px;
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo-img { height: 46px; width: auto; object-fit: contain; }
.logo {
    background: var(--green);
    color: var(--white);
    font-weight: 700;
    border-radius: 8px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    font-size: 18px;
}
.brand-name { font-weight: 700; font-size: 18px; color: var(--green-dark); }
.brand-sub { color: var(--muted); font-size: 13px; border-left: 1px solid var(--border); padding-left: 10px; }

/* ---------- topbar: popup nav panel ---------- */
.main-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 20px;
    z-index: 120;
    display: none;
    flex-direction: column;
    gap: 2px;
    width: 272px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
    padding: 10px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(15, 46, 31, .18);
}
.main-nav.open { display: flex; }
.main-nav a {
    text-decoration: none;
    color: var(--ink);
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.main-nav a:hover { background: var(--green-light); color: var(--green-dark); }

.nav-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding: 4px 8px 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
}
.nav-user-name { color: var(--green-dark); word-break: break-word; }

.nav-item { display: flex; flex-direction: column; width: 100%; }
.nav-menu-btn {
    background: none;
    border: 0;
    font: inherit;
    color: var(--ink);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.nav-menu-btn:hover { background: var(--green-light); color: var(--green-dark); }
.nav-menu-btn:focus-visible, .nav-toggle:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.caret { font-size: 10px; line-height: 1; transition: transform .2s; }
.nav-item.open .caret { transform: rotate(180deg); }

.nav-submenu {
    display: none;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 6px;
    padding: 4px;
    background: var(--off-white);
    border-radius: 8px;
}
.nav-item.open > .nav-submenu { display: flex; }
.nav-submenu a { padding: 9px 12px 9px 24px; }

.nav-logout {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}
.nav-logout .inline { display: block; }
.nav-logout-btn { width: 100%; padding: 9px 12px; font-weight: 600; }

.nav-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    background: var(--green-light);
    border: 1px solid var(--green);
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    color: var(--green-dark);
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    transition: background .15s, color .15s;
}
.nav-toggle:hover { background: var(--green); color: var(--white); }
.nav-toggle:hover .nav-toggle-bar { background: var(--white); }
.nav-toggle-bars { display: block; line-height: 0; }
.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--green-dark);
    margin: 4px 0;
    border-radius: 2px;
    transition: transform .2s, opacity .2s, background .15s;
}
.nav-toggle[aria-expanded="true"] { background: var(--green); color: var(--white); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: var(--white); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- layout ---------- */
.badge {
    background: var(--green-light);
    color: var(--green-dark);
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 600;
}
.badge-admin { background: var(--sunset-light); color: var(--sunset-dark); }

.inline { display: inline; }
.link-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}
.link-btn:hover { border-color: var(--sunset); color: var(--sunset-dark); }

/* ---------- layout ---------- */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 28px auto;
    padding: 0 20px;
    flex: 1;
}
.footer {
    text-align: center;
    color: var(--muted);
    padding: 24px;
    font-size: 13px;
    border-top: 1px solid var(--border);
    background: var(--white);
}

/* ---------- cards ---------- */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 20px;
}
.card h1, .card h2 { margin-top: 0; color: var(--green-dark); }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 14px; }
.field label .req { color: var(--sunset-dark); }
.field input, .field select, .field textarea {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    background: var(--white);
    transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-light);
}
.field .help { font-size: 12px; color: var(--muted); }
.field .errorlist { color: var(--danger); font-size: 13px; margin: 0; padding-left: 16px; }

.actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
    display: inline-block;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); }
.btn-sunset { background: var(--sunset); color: var(--white); }
.btn-sunset:hover { background: var(--sunset-dark); }
.btn-outline { background: var(--white); color: var(--green-dark); border: 1px solid var(--green); }
.btn-outline:hover { background: var(--green-light); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-ghost { background: var(--white); color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }
.btn-sm { padding: 6px 12px; font-size: 13px; }

/* ---------- auth ---------- */
.auth-wrap { max-width: 420px; margin: 40px auto; }
.auth-card { text-align: center; }
.auth-card h1 { color: var(--green-dark); }
.auth-logo {
    width: 64px; height: 64px;
    background: var(--green);
    color: var(--white);
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 30px;
    font-weight: 700;
    margin: 0 auto 14px;
}
.auth-card .field { text-align: left; margin-bottom: 14px; }
.auth-card .btn { width: 100%; }
.auth-hint { font-size: 13px; color: var(--muted); }
.auth-logo-img { height: 64px; width: auto; object-fit: contain; margin: 0 auto 14px; display: block; }

/* ---------- profile ---------- */
.profile-head { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.avatar {
    width: 110px; height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--green-light);
    background: var(--green-light);
    color: var(--green-dark);
    display: grid;
    place-items: center;
    font-size: 40px;
    font-weight: 700;
    overflow: hidden;
}
.profile-title h1 { margin: 0; color: var(--green-dark); }
.profile-title .sub { color: var(--muted); font-size: 15px; margin-top: 4px; }

.section-title { color: var(--green-dark); border-bottom: 2px solid var(--sunset); padding-bottom: 8px; margin-bottom: 14px; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.profile-item label { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.profile-item span { font-weight: 500; }

/* ---------- stats/dashboard ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.stat {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    text-align: center;
}
.stat .num { font-size: 30px; font-weight: 700; color: var(--green-dark); }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 4px; }

.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.bar-label { width: 110px; font-size: 13px; color: var(--muted); text-align: right; }
.bar-track { flex: 1; background: var(--green-light); border-radius: 6px; height: 18px; overflow: hidden; }
.bar-fill { background: linear-gradient(90deg, var(--green), var(--sunset)); height: 100%; border-radius: 6px; }
.bar-count { width: 40px; font-weight: 600; font-size: 13px; }

/* ---------- dashboard: KPI cards ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--green);
}
.kpi-card:nth-child(2) { border-top-color: var(--blue); }
.kpi-card:nth-child(4) { border-top-color: var(--sunset); }
.kpi-num { font-size: 32px; font-weight: 700; color: var(--green-dark); line-height: 1.1; }
.kpi-num small { font-size: 16px; font-weight: 600; color: var(--muted); }
.kpi-label { color: var(--muted); font-size: 14px; margin-top: 6px; font-weight: 600; }
.kpi-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }

/* ---------- dashboard: donuts ---------- */
.donut-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.donut {
    width: 150px; height: 150px; border-radius: 50%;
    position: relative; flex-shrink: 0;
}
.donut-hole {
    position: absolute; inset: 26px;
    background: var(--white); border-radius: 50%;
    display: grid; place-items: center;
}
.donut-total { font-size: 26px; font-weight: 700; color: var(--green-dark); }
.legend { list-style: none; padding: 0; margin: 0; flex: 1; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 4px 0; }
.legend li b { margin-left: auto; }
.swatch { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.bar-item { display: flex; align-items: center; gap: 10px; }

/* ---------- dashboard: vertical column chart ---------- */
.column-chart { display: flex; align-items: flex-end; gap: 12px; height: 190px; padding-top: 10px; }
.col-group { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.col-bar {
    width: 70%; max-width: 44px;
    background: var(--green);
    border-radius: 6px 6px 0 0;
    position: relative;
    min-height: 4px;
    transition: background .2s;
}
.col-bar:hover { background: var(--green-dark); }
.col-count { position: absolute; top: -20px; left: 0; right: 0; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink); }
.col-label { margin-top: 8px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.col-group.empty .col-bar { background: var(--border); min-height: 4px; }
.col-group.empty .col-label { opacity: 0.5; }

/* ---------- dashboard: callout cards ---------- */
.callout-card {
    text-align: center;
    padding: 28px 16px;
}
.callout-card .kpi-num {
    font-size: 40px;
    color: var(--green-dark);
}
.callout-card .kpi-sub {
    font-size: 15px;
    margin-top: 4px;
    color: var(--ink);
    font-weight: 600;
}
.callout-card .kpi-label {
    margin-top: 8px;
    font-size: 13px;
}

/* ---------- dashboard: data table ---------- */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.data-table th {
    background: var(--green-light); color: var(--green-dark); cursor: pointer;
    white-space: nowrap; user-select: none;
}
.data-table th:hover { text-decoration: underline; }
.data-table th.num, td.num { text-align: right; }
.data-table tbody tr:hover td { background: #fafcfb; }
.search-input {
    padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 14px; background: var(--white); color: var(--ink);
}
.search-input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-light); }
.pager { justify-content: space-between; margin-top: 12px; }
.tag-admin { background: var(--sunset-light); color: var(--sunset-dark); }

/* ---------- dashboard: empty states ---------- */
.card-empty { opacity: .6; }
.empty-sub { text-align: left; padding: 0; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
table.list th { background: var(--green-light); color: var(--green-dark); font-weight: 600; }
table.list tr:hover td { background: #fafcfb; }
.avatar-sm {
    width: 36px; height: 36px; border-radius: 50%;
    object-fit: cover; vertical-align: middle;
    background: var(--green-light);
}
.thumb {
    width: 80px; height: 80px; border-radius: 8px;
    object-fit: cover; border: 1px solid var(--border); background: var(--green-light);
}

/* ---------- messages ---------- */
.messages { margin-bottom: 18px; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 10px; font-weight: 500; }
.alert-success { background: var(--green-light); color: var(--green-dark); border: 1px solid #bfe3cb; }
.alert-error { background: #fdecec; color: var(--danger); border: 1px solid #f5c6c6; }
.alert-info { background: var(--sunset-light); color: var(--sunset-dark); border: 1px solid #f6d2b0; }

/* ---------- misc ---------- */
.muted { color: var(--muted); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.tag {
    background: var(--green-light); color: var(--green-dark);
    border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600;
}
.tag-critical { background: #fdecec; color: var(--danger); }
.tag-high { background: var(--sunset-light); color: var(--sunset-dark); }
.tag-medium { background: var(--blue-light); color: var(--blue-dark); }
.tag-low { background: var(--green-light); color: var(--green-dark); }
.tag-trivial { background: var(--off-white); color: var(--muted); }
.file-label { font-size: 13px; color: var(--green-dark); }
.login-note { background: var(--sunset-light); border-left: 4px solid var(--sunset); padding: 12px 16px; border-radius: 8px; font-size: 14px; margin-bottom: 18px; }
.card-list { list-style: none; padding: 0; margin: 0; }
.card-list li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.card-list li:last-child { border-bottom: none; }
.cert-name { font-weight: 600; }
.cert-desc { color: var(--muted); font-size: 14px; }
.dl-list { margin: 0; }
.empty { text-align: center; color: var(--muted); padding: 30px 0; }

/* ---------- resources: thumbnail grid ---------- */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 8px;
}
.resource-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}
.resource-thumb-link { display: block; }
.resource-thumb-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    background: var(--green-light);
    border-bottom: 1px solid var(--border);
}
.resource-thumb-icon {
    width: 100%;
    height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--green-light), var(--off-white));
    border-bottom: 1px solid var(--border);
}
.resource-thumb-glyph { font-size: 44px; line-height: 1; }
.resource-thumb-ext {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--green-dark);
    background: var(--white);
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
}
.resource-thumb-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }

/* ---------- landing page ---------- */
.landing-hero {
    position: relative;
    min-height: 72vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 60px 24px;
}
.landing-hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('../img/hero-home.jpg');
    background-size: cover;
    background-position: center;
    transform: scale(1.06);
    animation: heroZoom 22s ease-in-out infinite alternate;
}
.landing-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 40%, rgba(30, 77, 43, 0.18), rgba(30, 77, 43, 0.32) 75%),
        linear-gradient(180deg, rgba(30, 77, 43, 0.30) 0%, rgba(30, 77, 43, 0.24) 45%, rgba(107, 68, 35, 0.35) 100%);
}
@keyframes heroZoom {
    from { transform: scale(1.06); }
    to   { transform: scale(1.14); }
}
.landing-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 860px;
    color: #F9F9F6;
}
.landing-eyebrow {
    font-size: 14px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #D4AF37;
    margin: 0 0 18px;
    font-weight: 600;
}
.landing-title {
    font-size: clamp(34px, 6vw, 62px);
    line-height: 1.1;
    margin: 0 0 18px;
    font-weight: 800;
    color: #F9F9F6;
}
.accent-dot { color: #D4AF37; }
.landing-welcome {
    font-size: clamp(17px, 2.4vw, 23px);
    color: #F0EFE6;
    margin: 0 0 14px;
    font-weight: 500;
}
.welcome-anim {
    display: inline-block;
    opacity: 0;
    animation: fadeSlideUp 1.1s ease forwards;
    animation-delay: 0.25s;
}
.company-glow {
    color: #D4AF37;
    font-weight: 700;
    background: linear-gradient(90deg, #D4AF37, #f6dd96, #D4AF37);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% auto;
    animation: goldShimmer 3.5s linear infinite;
}
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes goldShimmer {
    0%   { background-position: 0% center; }
    100% { background-position: -200% center; }
}
.landing-sub {
    font-size: 16px;
    color: rgba(249, 249, 246, 0.86);
    max-width: 620px;
    margin: 0 auto 30px;
    line-height: 1.6;
    opacity: 0;
    animation: fadeSlideUp 1.1s ease forwards;
    animation-delay: 0.45s;
}
.landing-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeSlideUp 1.1s ease forwards;
    animation-delay: 0.65s;
}
.btn-cta {
    display: inline-block;
    padding: 14px 34px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.btn-cta-solid {
    background: #28A745;
    color: #fff;
    box-shadow: 0 10px 26px rgba(40, 167, 69, 0.4);
}
.btn-cta-solid:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(40, 167, 69, 0.5);
}
.btn-cta-outline {
    background: transparent;
    color: #F9F9F6;
    border: 2px solid #F9F9F6;
}
.btn-cta-outline:hover {
    background: rgba(249, 249, 246, 0.14);
    border-color: #D4AF37;
    color: #D4AF37;
    transform: translateY(-2px);
}
.landing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
    margin: -70px 0 20px;
    position: relative;
    z-index: 2;
    padding: 0 10px;
}
.landing-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 20px;
    text-decoration: none;
    color: var(--ink);
    transition: transform .15s, box-shadow .15s, border-color .15s;
    display: flex;
    flex-direction: column;
}
.landing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.12);
    border-color: #28A745;
}
.landing-card-icon {
    font-size: 30px;
    margin-bottom: 10px;
}
.landing-card h3 {
    margin: 0 0 6px;
    font-size: 17px;
    color: #1E4D2B;
}
.landing-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}
@media (max-width: 720px) {
    .landing-cards {
        margin-top: 34px;
        grid-template-columns: 1fr;
    }
    .landing-hero { min-height: 62vh; padding: 44px 18px; }
}

@media (max-width: 720px) {
    .form-grid { grid-template-columns: 1fr; }
    .topbar { flex-wrap: wrap; flex-direction: row; align-items: center; padding: 12px 16px; }

    .nav-toggle { padding: 7px 12px; }
    .main-nav {
        right: 12px;
        left: 12px;
        width: auto;
        max-height: calc(100vh - 88px);
    }
}

/* ---------- staff list: search & filters ---------- */
.staff-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 18px;
}
.filter-search {
    flex: 1 1 240px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    background: var(--white);
}
.filter-search:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-light);
}
.filter-select {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    background: var(--white);
    color: var(--ink);
}
.filter-select:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-light);
}
@media (max-width: 720px) {
    .filter-search { flex: 1 1 100%; }
    .filter-select { flex: 1 1 100%; }
}

/* ---------- staff list: bulk line-manager bar ---------- */
.bulk-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 12px;
    margin-bottom: 16px;
    background: var(--green-light);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.bulk-bar .filter-select { min-width: 240px; }
.bulk-count { font-size: 14px; font-weight: 600; color: var(--green-dark); }
.col-check { width: 36px; }
.bulk-bar input[type="checkbox"],
table.list td.col-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--green);
    cursor: pointer;
}
table.list td.col-check { padding-right: 0; }
@media (max-width: 720px) {
    .bulk-bar .filter-select { min-width: 0; flex: 1 1 100%; }
    .bulk-bar .btn { width: 100%; }
}

/* ---------- staff list: pagination ---------- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.pagination-info {
    font-size: 14px;
    color: var(--muted);
    font-weight: 500;
}

/* ---------- appraisals ---------- */
.score-input { width: 96px; }
#id_employees {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}
#id_employees > div { display: flex; }
#id_employees label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
}
#id_employees input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--green);
}

/* ---------- communications: moving ticker ---------- */
.ticker {
    display: flex;
    align-items: stretch;
    min-height: 44px;
    background: var(--green-dark);
    color: var(--white);
    border-bottom: 3px solid var(--sunset);
    overflow: hidden;
    position: relative;
}
.ticker-label {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    padding: 0 18px;
    background: var(--sunset);
    color: var(--white);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}
.ticker-viewport {
    flex: 1;
    overflow: hidden;
    display: flex;
    align-items: center;
}
.ticker-track {
    display: flex;
    width: max-content;
    animation: ticker-scroll var(--ticker-duration, 40s) linear infinite;
    will-change: transform;
}
.ticker-group { display: flex; align-items: center; flex: 0 0 auto; }
.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 28px;
    color: var(--white);
    text-decoration: none;
    white-space: nowrap;
    font-size: 14px;
    line-height: 1;
}
.ticker-item:hover { color: var(--sunset-light); text-decoration: underline; }
.ticker-kind {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
}
.ticker-close {
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, .22);
    color: var(--white);
    font-size: 24px;
    line-height: 1;
    width: 46px;
    cursor: pointer;
    transition: background .15s;
}
.ticker-close:hover,
.ticker-close:focus-visible { background: var(--sunset-dark); outline: none; }
.ticker-track:hover { animation-play-state: paused; }
.ticker-track:focus-within { animation-play-state: paused; }
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .ticker-track { animation: none; }
    .ticker-viewport { overflow-x: auto; }
}
@media (max-width: 720px) {
    .ticker-label { padding: 0 12px; font-size: 10px; }
    .ticker-item { padding: 12px 18px; font-size: 13px; }
    .ticker-close { width: 40px; }
}

/* ---------- communications: announcements & events ---------- */
.announcement-card,
.event-card {
    background: var(--off-white);
    border-left: 4px solid var(--green);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.event-card { border-left-color: var(--sunset); }
.announcement-card h3,
.event-card h3 { color: var(--green-dark); }
.announcement-body,
.event-body {
    margin-top: 8px;
    line-height: 1.55;
    color: var(--ink);
}
.event-meta {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}
.calendar-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- communications: calendar ---------- */
.calendar {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    table-layout: fixed;
}
.calendar th {
    background: var(--green-light);
    color: var(--green-dark);
    padding: 10px 8px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    text-align: left;
    border: 1px solid var(--border);
}
.calendar td {
    border: 1px solid var(--border);
    vertical-align: top;
    height: 96px;
    padding: 7px;
    background: var(--white);
}
.calendar-day-empty { background: var(--off-white); }
.calendar-day-today { background: var(--green-light); box-shadow: inset 0 0 0 2px var(--green); }
.calendar-day-num { display: block; font-weight: 700; font-size: 13px; color: var(--green-dark); margin-bottom: 4px; }
.calendar-event {
    display: block;
    margin-top: 4px;
    padding: 3px 6px;
    border-radius: 5px;
    background: var(--sunset-light);
    color: var(--sunset-dark);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.calendar-event:hover { background: var(--sunset); color: var(--white); }

/* ---------- communications: staff checkboxes ---------- */
.checkbox-list {
    max-height: 320px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 12px;
    background: var(--white);
}
.checkbox-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-weight: 400;
}
.checkbox-list input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--green);
    flex: 0 0 auto;
}
