:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --primary: #1f5fbf;
    --primary-dark: #164a94;
    --muted: #667085;
    --text: #1f2937;
    --border: #d7dde8;
    --success: #17803d;
    --warning: #b7791f;
    --danger: #b42318;
    --sidebar: #0f2748;
    --shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
}
* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100%;
    font-family: "Century Gothic", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
}
button, input, select, textarea { font-family: inherit; }
a { color: inherit; }
small { color: var(--muted); }
.app-shell { min-height: 100vh; display: flex; }
.sidebar {
    width: 250px;
    background: var(--sidebar);
    color: white;
    padding: 22px 18px;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1000;
    overflow-y: auto;
}
.sidebar-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.brand { display: flex; gap: 12px; align-items: center; margin-bottom: 26px; min-width: 0; }
.brand img { width: 52px; height: 52px; border-radius: 50%; background: white; object-fit: contain; flex: 0 0 auto; }
.brand strong { display: block; font-size: 19px; }
.brand span { display: block; color: #c9d7ee; font-size: 12px; }
.sidebar-close {
    display: none;
    border: 0;
    color: white;
    background: rgba(255,255,255,.12);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
}
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav a {
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 10px;
    color: #eef4ff;
    font-size: 14px;
}
.sidebar nav a:hover, .sidebar nav a.active { background: rgba(255,255,255,0.14); }
.sidebar-logout-form { margin: 0; }
.sidebar-logout-button {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 11px 12px;
    border-radius: 10px;
    color: #eef4ff;
    font-size: 14px;
    cursor: pointer;
}
.sidebar-logout-button:hover, .sidebar-logout-button:focus-visible { background: rgba(255,255,255,0.14); }
.sidebar-overlay { display: none; }
.main-content { width: 100%; min-width: 0; margin-left: 250px; padding: 26px; }
.main-content.centered {
    margin-left: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(117, 149, 255, 0.28), transparent 30%),
        radial-gradient(circle at 100% 0, rgba(246, 126, 177, 0.22), transparent 26%),
        linear-gradient(135deg, #eef4ff 0%, #f8fbff 48%, #fdf3fa 100%);
    overflow: hidden;
}
.topbar {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px 22px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}
.topbar-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title { min-width: 0; }
.topbar h1 { margin: 0 0 4px; font-size: 24px; line-height: 1.2; }
.topbar p { margin: 0; color: var(--muted); font-size: 13px; }
.menu-toggle {
    display: none;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    padding: 10px;
    cursor: pointer;
}
.menu-toggle span { display: block; height: 2px; margin: 4px 0; background: #1f2937; border-radius: 2px; }
.user-pill {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #eef5ff;
    border: 1px solid #d5e6ff;
    padding: 7px 12px 7px 7px;
    border-radius: 999px;
    text-align: right;
    max-width: 290px;
    text-decoration: none;
}
.user-pill:hover { background: #e6f0ff; }
.topbar-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    overflow: hidden;
    background: #dbeafe;
    color: #1e40af;
    font-size: 13px;
    font-weight: 800;
}
.topbar-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topbar-avatar .avatar-initials { display: block; overflow: visible; white-space: normal; }
.user-pill-copy { display: block; min-width: 0; }
.user-pill-copy > span { display: block; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-pill-copy small { display: block; color: var(--muted); }
.card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 18px;
}
.card h2, .card h3 { margin-top: 0; }
.card p { line-height: 1.55; }
.grid { display: grid; gap: 18px; }
.grid-1 { grid-template-columns: minmax(0, 1fr); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat { padding: 18px; border-radius: 16px; border: 1px solid var(--border); background: #fbfdff; }
.stat strong { display: block; font-size: 34px; color: var(--primary-dark); }
.stat span { color: var(--muted); }
.login-card {
    width: min(460px, calc(100vw - 32px));
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
}
.login-header { text-align: center; margin-bottom: 20px; }
.login-logos { display: flex; justify-content: center; gap: 18px; margin-bottom: 12px; }
.login-logos img { width: 70px; height: 70px; border-radius: 50%; object-fit: contain; }
.login-header h1, .login-header h2 { margin: 0; font-size: 22px; line-height: 1.35; }
.login-header p { margin: 6px 0 0; color: var(--muted); }
.form-row { margin-bottom: 14px; min-width: 0; }
label { display: block; font-weight: 700; margin-bottom: 7px; font-size: 14px; }
input, select, textarea {
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 16px;
    background: white;
    color: var(--text);
}
input[type="checkbox"], input[type="radio"] { width: auto; padding: 0; }
textarea { min-height: 96px; resize: vertical; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    border: 1px solid #d8e0eb;
    border-radius: 11px;
    padding: 9px 14px;
    background: #f3f6fa;
    color: #344054;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.btn:hover { background: #e9eef5; border-color: #c7d1df; transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid rgba(31, 95, 191, .20); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-sm { min-height: 34px; padding: 7px 10px; border-radius: 9px; font-size: 12px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-edit { background: #e9f2ff; border-color: #c8dcfb; color: #174f9b; }
.btn-edit:hover { background: #dceaff; border-color: #aac8f3; }
.btn-danger { background: #fff0ef; border-color: #fecaca; color: var(--danger); }
.btn-danger:hover { background: #fee4e2; border-color: #fca5a5; }
.btn-success { background: #eaf8ef; border-color: #b7e4c7; color: var(--success); }
.btn-success:hover { background: #dcf4e5; border-color: #95d5ac; }
.btn-warning { background: #fff7e5; border-color: #f6d99a; color: #9a5f0b; }
.btn-warning:hover { background: #fff0cf; border-color: #efc56e; }
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--border); padding: 12px 10px; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
th { color: #344054; font-size: 13px; background: #f8fafc; }
td { font-size: 14px; }
.badge { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-draft { background: #eef2f6; color: #475467; }
.badge-submitted { background: #e0f2fe; color: #075985; }
.badge-checked { background: #e7f7ed; color: #166534; }
.badge-returned { background: #fee4e2; color: #991b1b; }
.badge-ready_for_review { background: #fff4dc; color: #92400e; }
.badge-approved { background: #dcfce7; color: #166534; }
.notice { padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; line-height: 1.5; }
.notice-success { background: #e7f7ed; color: #166534; }
.notice-error { background: #fee4e2; color: #991b1b; }
.notice-info { background: #e0f2fe; color: #075985; }
.no-bottom-margin { margin-bottom: 0; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.filter-bar .form-row { margin-bottom: 0; min-width: 150px; }
.actions-cell { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.actions-cell form { margin: 0; display: inline-flex; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.section-heading h2, .section-heading h3 { margin-bottom: 4px; }
.section-heading p { margin: 0; color: var(--muted); }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 18px 0; }
.summary-box { border: 1px solid #e2e8f0; border-radius: 14px; padding: 14px; background: #f8fafc; min-width: 0; }
.summary-box span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.summary-box strong { display: block; overflow-wrap: anywhere; }
.count-pill, .smart-label { display: inline-block; border-radius: 999px; font-size: 12px; font-weight: 700; }
.count-pill { padding: 7px 10px; background: #eef2f6; color: #475467; white-space: nowrap; }
.smart-label { padding: 5px 9px; background: #e0f2fe; color: #075985; margin-bottom: 7px; }
.smart-stack { display: grid; gap: 16px; }
.smart-card { border: 1px solid #cbd5e1; border-radius: 16px; padding: 16px; background: #fbfdff; }
.card.smart-card { background: var(--panel); }
.smart-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.smart-card-header h2, .smart-card-header h3 { margin: 0; }
.source-list { display: grid; gap: 7px; padding: 12px; border-radius: 12px; background: #f1f5f9; margin-bottom: 16px; font-size: 13px; }
.source-list small { display: inline; }
.smart-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.smart-form-grid .smart-wide { grid-column: 1 / -1; }
.source-toolbar { margin-bottom: 14px; }
.source-checkbox { transform: scale(1.2); accent-color: var(--primary); }
.top-action-form { margin-top: 16px; }
.review-actions { display: grid; grid-template-columns: auto minmax(220px, 1fr) auto; gap: 10px; align-items: center; margin-top: 18px; }
.return-note { margin-top: 8px; padding: 8px; border-radius: 8px; background: #fff1f0; color: #991b1b; font-size: 12px; }
.details-list { display: grid; gap: 7px; margin-top: 9px; min-width: 230px; font-size: 12px; }
details summary { cursor: pointer; color: var(--primary-dark); font-weight: 700; }
.mobile-help { display: none; margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.mobile-label { display: none; }
[data-fit-print-preview] {
    position: relative;
    width: 100%;
    min-height: 140px;
    overflow: hidden;
}
[data-print-sheet] {
    transform-origin: top left;
    will-change: transform;
}
.muted { color: var(--muted); }
.print-page { background: white; max-width: 980px; margin: 0 auto; padding: 28px; border: 1px solid #333; }
.print-header { display: grid; grid-template-columns: 90px 1fr 90px; align-items: center; text-align: center; }
.print-header img { width: 75px; height: 75px; justify-self: center; }
.print-header h2, .print-header p { margin: 0; }
.print-header h2 { font-size: 18px; }
.print-office { text-align: center; margin: 26px 0; font-weight: 700; }
.print-title { text-align: center; margin-bottom: 22px; }
.print-title h3, .print-title p { margin: 0; }
.print-table th, .print-table td { border: 1px solid #222; padding: 8px; }

/* Landing page enhancement */
.landing-shell {
    position: relative;
    width: min(1220px, 100%);
    isolation: isolate;
}
.landing-blur {
    position: absolute;
    border-radius: 999px;
    filter: blur(14px);
    pointer-events: none;
    opacity: .7;
    z-index: -1;
}
.landing-blur-one {
    width: 340px;
    height: 340px;
    top: -90px;
    left: -80px;
    background: rgba(129, 161, 255, 0.28);
}
.landing-blur-two {
    width: 280px;
    height: 280px;
    right: -60px;
    top: 70px;
    background: rgba(254, 132, 180, 0.24);
}
.landing-blur-three {
    width: 260px;
    height: 260px;
    left: 34%;
    bottom: -50px;
    background: rgba(87, 202, 255, 0.20);
}
.landing-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(390px, .85fr);
    gap: 22px;
    align-items: stretch;
}
.landing-panel {
    position: relative;
    border: 1px solid rgba(255,255,255,.45);
    background: rgba(255,255,255,.56);
    box-shadow: 0 20px 50px rgba(29, 58, 119, 0.10);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 28px;
}
.landing-showcase {
    padding: 30px;
    display: grid;
    gap: 24px;
}
.landing-showcase-copy h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.1;
    color: #102a56;
}
.landing-showcase-copy p {
    margin: 0;
    color: #49566b;
    font-size: 16px;
    line-height: 1.7;
    max-width: 680px;
}
.landing-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(31,95,191,.10);
    color: #174f9b;
    font-weight: 700;
    font-size: 13px;
    border: 1px solid rgba(31,95,191,.14);
}
.landing-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}
.landing-highlights span {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(198, 210, 231, .95);
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}
.landing-visual {
    position: relative;
    min-height: 330px;
    overflow: hidden;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(31,95,191,.06) 0%, rgba(139, 92, 246, .08) 100%),
        linear-gradient(135deg, #edf4ff 0%, #f6f9ff 52%, #fff2f8 100%);
    border: 1px solid rgba(212, 222, 236, .85);
}
.landing-visual img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.landing-visual.no-image::before {
    content: 'Add your enhanced building image as assets/img/mswdo_building.png';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    color: #526173;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
}
.landing-visual-overlay {
    position: absolute;
    inset: auto 0 0 0;
    height: 42%;
    background: linear-gradient(to top, rgba(11, 19, 43, 0.70), rgba(11, 19, 43, 0));
    z-index: 1;
    pointer-events: none;
}
.landing-visual-card {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 2;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.26);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
}
.landing-visual-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 18px;
}
.landing-visual-card span { font-size: 13px; color: rgba(255,255,255,.88); }
.landing-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}
.landing-login-card {
    width: 100%;
    background: rgba(255,255,255,.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.56);
    box-shadow: 0 16px 40px rgba(20, 58, 112, 0.12);
}
.landing-login-header { margin-bottom: 18px; }
.landing-login-form { margin-top: 6px; }
.landing-login-btn {
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
    margin-top: 4px;
    font-size: 14px;
}
.landing-login-note {
    margin-top: 16px;
    background: rgba(224, 242, 254, 0.82);
}
.password-field { position: relative; }
.password-field input { padding-right: 78px; }
.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #cdd9e8;
    background: #f8fbff;
    color: #33517d;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.password-toggle:hover { background: #edf4ff; }

@media (max-width: 1100px) {
    .landing-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }
    .landing-login-panel { padding: 0; }
}

@media (max-width: 900px) {
    body.sidebar-open { overflow: hidden; }
    .app-shell { display: block; }
    .sidebar {
        width: min(310px, 86vw);
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 18px 0 44px rgba(15, 39, 72, .28);
    }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar-close { display: inline-grid; place-items: center; }
    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 900;
        border: 0;
        background: rgba(15, 23, 42, .45);
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s ease, visibility .2s ease;
    }
    body.sidebar-open .sidebar-overlay { opacity: 1; visibility: visible; }
    .main-content { margin-left: 0; padding: 16px; }
    .menu-toggle { display: block; }
    .grid { grid-template-columns: 1fr !important; }
    .grid-1 { grid-template-columns: minmax(0, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .topbar { padding: 14px 16px; }
    .topbar h1 { font-size: 21px; }
    .topbar p { font-size: 12px; }
    .mobile-help { display: block; }
}

@media (max-width: 760px) {
    .main-content { padding: 10px; }
    .main-content.centered { padding: 12px; }
    .topbar { border-radius: 14px; margin-bottom: 14px; align-items: flex-start; }
    .topbar p { display: none; }
    .topbar h1 { font-size: 18px; margin: 0; }
    .user-pill { max-width: 120px; padding: 7px 10px; font-size: 12px; }
    .user-pill small { font-size: 10px; }
    .card { border-radius: 14px; padding: 14px; margin-bottom: 12px; }
    .login-card { width: calc(100vw - 20px); padding: 20px 16px; border-radius: 18px; }
    .login-header h1, .login-header h2 { font-size: 18px; }
    .login-logos img { width: 58px; height: 58px; }
    .grid-3, .grid-4, .summary-grid { grid-template-columns: 1fr; gap: 10px; }
    .stat strong { font-size: 28px; }
    .filter-bar {
        align-items: flex-end;
        gap: 8px;
    }
    .filter-bar .form-row {
        width: auto;
        min-width: 0;
        flex: 1 1 140px;
    }
    .filter-bar > .btn {
        width: auto;
        flex: 0 1 auto;
        min-height: 38px;
        padding: 8px 11px;
        font-size: 12px;
        white-space: nowrap;
    }
    .form-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        align-items: stretch;
    }
    .form-actions > .btn, .form-actions > form, .form-actions > form .btn { width: 100%; }
    .desktop-label { display: none; }
    .mobile-label { display: inline; }
    .section-heading, .smart-card-header { display: block; }
    .section-heading > :last-child, .smart-card-header > :last-child { margin-top: 10px; }
    .smart-form-grid { grid-template-columns: 1fr; }
    .smart-form-grid .smart-wide { grid-column: auto; }
    .review-actions { grid-template-columns: 1fr; }
    .review-actions .btn { width: 100%; }
    .top-action-form .btn { width: 100%; }
    .landing-shell { width: 100%; }
    .landing-panel { border-radius: 22px; }
    .landing-showcase { padding: 20px; gap: 18px; }
    .landing-showcase-copy h1 { font-size: 26px; }
    .landing-showcase-copy p { font-size: 14px; }
    .landing-highlights { gap: 8px; }
    .landing-highlights span { width: calc(50% - 4px); justify-content: center; text-align: center; }
    .landing-visual { min-height: 250px; }
    .landing-login-panel { padding: 0; }

    .table-wrap { overflow: visible; }
    .table-wrap table, .table-wrap tbody { display: block; width: 100%; }
    .table-wrap thead { display: none; }
    .table-wrap tr {
        display: block;
        width: 100%;
        border: 1px solid var(--border);
        border-radius: 13px;
        padding: 6px 10px;
        margin-bottom: 10px;
        background: #fff;
        box-shadow: 0 4px 14px rgba(31, 41, 55, .05);
    }
    .table-wrap td {
        display: grid;
        grid-template-columns: minmax(105px, 38%) minmax(0, 1fr);
        gap: 10px;
        width: 100%;
        border: 0;
        border-bottom: 1px dashed #e2e8f0;
        padding: 9px 2px;
        font-size: 13px;
    }
    .table-wrap td:last-child { border-bottom: 0; }
    .table-wrap td::before {
        content: attr(data-label);
        color: #475467;
        font-size: 12px;
        font-weight: 700;
        overflow-wrap: anywhere;
    }
    .table-wrap td[colspan] { display: block; text-align: center; padding: 14px 4px; }
    .table-wrap td[colspan]::before { display: none; }
    .table-wrap td.actions-cell {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 7px;
    }
    .table-wrap td.actions-cell::before { flex: 0 0 min(105px, 38%); }
    .table-wrap td.actions-cell .btn { width: auto; min-height: 34px; padding: 7px 10px; font-size: 12px; }
    .table-wrap td.actions-cell form { width: auto; display: inline-flex; }
    .table-wrap td.actions-cell form .btn { width: auto; }
    .details-list { min-width: 0; }
    .source-list { font-size: 12px; }
}

@media (max-width: 420px) {
    .filter-bar { gap: 7px; }
    .filter-bar .form-row { flex-basis: calc(50% - 4px); }
    .filter-bar > .btn {
        flex: 1 1 auto;
        padding-left: 8px;
        padding-right: 8px;
        font-size: 11px;
    }
    .topbar { gap: 8px; }
    .menu-toggle { width: 38px; height: 38px; padding: 8px; }
    .user-pill { display: none; }
    .table-wrap td { grid-template-columns: 96px minmax(0, 1fr); }
    .landing-highlights span { width: 100%; }
    .landing-showcase-copy h1 { font-size: 23px; }
    .landing-showcase { padding: 16px; }
    .landing-visual { min-height: 210px; }
    .landing-visual-card strong { font-size: 16px; }
}

@media print {
    .sidebar, .topbar, .sidebar-overlay, .no-print { display: none !important; }
    [data-fit-print-preview] {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
    }
    [data-print-sheet] {
        position: static !important;
        left: auto !important;
        top: auto !important;
        margin: 0 !important;
        transform: none !important;
    }
    .main-content { margin-left: 0; padding: 0; }
    body { background: white; }
    .print-page { border: none; max-width: 100%; padding: 0; }
}

/* Admin remarks on finalized consolidated targets */
.admin-remark-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}
.remark-editor {
    border: 1px solid #fecaca;
    border-radius: 14px;
    padding: 14px;
    background: #fffafa;
    min-width: 0;
}
.remark-editor textarea { min-height: 110px; }
.current-field-value {
    min-height: 58px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.admin-remark {
    margin-top: 9px;
    padding: 9px 10px;
    border-left: 4px solid #dc2626;
    border-radius: 8px;
    background: #fff1f2;
    color: #b42318;
    font-size: 12px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.admin-remark strong { display: inline; color: #991b1b; }
.admin-remark small { display: block; margin-top: 4px; color: #b42318; font-weight: 700; }
.row-has-remark { background: #fffafa; }
.card-has-remark { border-color: #fca5a5; box-shadow: 0 10px 30px rgba(180, 35, 24, 0.10); }

@media (max-width: 760px) {
    .admin-remark-grid { grid-template-columns: 1fr; }
    .remark-editor { padding: 12px; }
}

/* Enhanced User Management */
.user-overview-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}
.user-overview-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(31, 41, 55, .045);
}
.user-overview-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #eaf2ff;
    color: #1f5fbf;
    font-size: 16px;
    font-weight: 800;
}
.user-overview-card strong { display: block; color: #17243a; font-size: 24px; line-height: 1; }
.user-overview-card div > span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.user-overview-success .user-overview-icon { background: #e6f7ed; color: #177245; }
.user-overview-muted .user-overview-icon { background: #eef2f6; color: #667085; }
.user-overview-mswdo .user-overview-icon { background: #f6e3f4; color: #7e1d72; }
.user-overview-kalahi .user-overview-icon { background: #e2f7e7; color: #166534; }

.user-management-grid {
    display: grid;
    grid-template-columns: minmax(340px, .84fr) minmax(0, 1.66fr);
    gap: 18px;
    align-items: start;
}
.user-form-card { position: sticky; top: 18px; }
.user-section-heading h2 { margin-top: 3px; }
.section-kicker {
    display: block;
    color: #1f5fbf;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .09em;
}
.mode-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 9px;
    border-radius: 999px;
    background: #e9f2ff;
    color: #174f9b;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.user-account-form .form-row { margin-bottom: 13px; }
.user-account-form input,
.user-account-form select { min-height: 43px; }
.user-form-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.user-form-pair .form-row { margin-bottom: 5px; }
.office-help { display: block; margin: 0 0 13px; line-height: 1.4; }
.user-password-row small,
.user-form-card .form-row > small { display: block; margin-top: 6px; line-height: 1.4; }
.user-password-row strong { color: #344054; }
.user-form-actions { margin-top: 4px; }
.user-form-actions .btn-primary { min-width: 130px; }

.user-list-card { min-width: 0; }
.user-list-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: -2px 0 14px;
    padding: 11px 12px;
    border: 1px solid #e3e9f1;
    border-radius: 13px;
    background: #f8fafc;
}
.user-list-toolbar p { margin: 0; max-width: 310px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.user-search-wrap { position: relative; flex: 1 1 320px; max-width: 430px; }
.user-search-wrap input { min-height: 39px; padding: 8px 12px 8px 36px; background: #fff; font-size: 13px; }
.user-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #667085;
    font-size: 17px;
    pointer-events: none;
}
.user-table { min-width: 840px; table-layout: auto; }
.user-table th { white-space: nowrap; }
.user-table th:first-child { width: 29%; }
.user-table th:last-child { width: 220px; }
.user-table td { vertical-align: middle; }
.user-action-heading { text-align: left; }
.user-identity { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.user-list-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #dbeafe;
    color: #1e40af;
    font-size: 11px;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px #cbd5e1;
}
.user-list-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.user-identity-copy { min-width: 0; }
.user-identity-copy strong { display: block; line-height: 1.35; overflow-wrap: anywhere; }
.user-identity-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.username-chip,
.office-chip,
.role-chip,
.account-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.username-chip { background: #eef2ff; color: #3730a3; }
.office-mswdo { background: #f5d0f1; color: #7e1d72; }
.office-kalahi { background: #dcfce7; color: #166534; }
.role-staff { background: #eef2f6; color: #475467; }
.role-consolidator { background: #e0f2fe; color: #075985; }
.role-admin { background: #ede9fe; color: #5b21b6; }
.account-status-active { background: #dcfce7; color: #166534; }
.account-status-inactive { background: #eef2f6; color: #667085; }
.user-inactive-row { background: #fafafa; }
.user-inactive-row > td:not(.user-actions) { opacity: .72; }
.user-actions { min-width: 215px; white-space: nowrap; }
.user-action-group { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.user-action-group form { margin: 0; display: inline-flex; }
.current-account-note {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 9px;
    border-radius: 9px;
    background: #eef2f6;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}
#userSearchEmpty td { padding: 24px; text-align: center; color: var(--muted); }

@media (max-width: 1280px) {
    .user-overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .user-management-grid { grid-template-columns: 1fr; }
    .user-form-card { position: static; }
    .user-list-toolbar p { display: none; }
}

@media (max-width: 760px) {
    .user-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
    .user-overview-card { grid-template-columns: 36px minmax(0, 1fr); padding: 11px; border-radius: 13px; }
    .user-overview-icon { width: 36px; height: 36px; border-radius: 10px; font-size: 14px; }
    .user-overview-card strong { font-size: 20px; }
    .user-overview-card div > span { font-size: 10px; }
    .user-management-grid { gap: 12px; }
    .user-form-pair { grid-template-columns: 1fr; gap: 0; }
    .user-list-toolbar { display: block; padding: 9px; }
    .user-search-wrap { max-width: none; }
    .user-table { min-width: 0; }
    .user-table tr.user-row { padding: 9px 11px; }
    .user-table td[data-label="User"] { grid-template-columns: 1fr; }
    .user-table td[data-label="User"]::before { display: none; }
    .user-identity { min-width: 0; }
    .user-list-avatar { width: 42px; height: 42px; flex-basis: 42px; }
    .user-actions { min-width: 0; }
    .user-table td.user-actions {
        display: grid;
        grid-template-columns: minmax(96px, 34%) minmax(0, 1fr);
        align-items: center;
    }
    .user-table td.user-actions::before { flex: none; }
    .user-action-group {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        min-width: 0;
    }
    .user-action-group form,
    .user-action-group .btn,
    .user-action-group form .btn { width: 100%; min-width: 0; }
    .current-account-note { justify-content: center; width: 100%; }
}

@media (max-width: 430px) {
    .user-overview-grid { grid-template-columns: 1fr 1fr; }
    .user-overview-card:last-child { grid-column: 1 / -1; }
    .user-table td.user-actions { grid-template-columns: 1fr; gap: 7px; }
    .user-table td.user-actions::before { display: block; }
    .user-action-group { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}


/* Private Daily Accomplishment module */
.accomplishment-summary-grid { margin-bottom: 18px; }
.accomplishment-summary-grid .stat { background: #fff; box-shadow: var(--shadow); }
.accomplishment-summary-grid .stat strong { font-size: 28px; }
.accomplishment-form-card { max-width: 860px; }
.accomplishment-form-card textarea { min-height: 170px; }
.accomplishment-form-card small { display: block; margin-top: 7px; line-height: 1.45; }

@media (max-width: 760px) {
    .accomplishment-summary-grid { grid-template-columns: 1fr !important; gap: 10px; }
    .accomplishment-form-card { max-width: none; }
}

/* End-of-month accomplishment remarks for consolidated targets */
.accomplishment-entry {
    margin-top: 4px;
    padding: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
}
.accomplishment-entry-heading h3 { margin: 0 0 4px; font-size: 16px; }
.accomplishment-entry-heading p { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.accomplishment-entry-grid {
    display: grid;
    grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr);
    gap: 14px;
    align-items: start;
}
.accomplishment-entry textarea { min-height: 104px; }
.field-help { display: block; margin-top: 6px; color: var(--muted); line-height: 1.4; }
.badge-accomplished { background: #dcfce7; color: #166534; }
.badge-not-accomplished { background: #fee2e2; color: #991b1b; }
.badge-pending-result { background: #eef2f6; color: #667085; }
.result-remarks {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.45;
    color: #475467;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .accomplishment-entry { padding: 13px; }
    .accomplishment-entry-grid { grid-template-columns: 1fr; }
}


/* Self-service user profile */
.profile-layout {
    display: grid;
    grid-template-columns: minmax(270px, .72fr) minmax(0, 1.5fr);
    gap: 18px;
    align-items: start;
}
.profile-summary-card { text-align: center; position: sticky; top: 18px; }
.profile-avatar-large {
    width: 150px;
    height: 150px;
    margin: 2px auto 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #dbeafe;
    color: #1e40af;
    border: 5px solid #fff;
    box-shadow: 0 0 0 1px #cbd5e1, 0 12px 28px rgba(15, 39, 72, .14);
    font-size: 42px;
    font-weight: 800;
}
.profile-avatar-large img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-summary-card h2 { margin-bottom: 5px; overflow-wrap: anywhere; }
.profile-summary-card > p { margin: 0 0 14px; color: var(--muted); overflow-wrap: anywhere; }
.profile-meta { display: grid; gap: 9px; margin-top: 16px; text-align: left; }
.profile-meta-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #e2e8f0; }
.profile-meta-row span { color: var(--muted); font-size: 13px; }
.profile-meta-row strong { text-align: right; font-size: 13px; overflow-wrap: anywhere; }
.profile-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.profile-form-grid .profile-wide { grid-column: 1 / -1; }
.profile-section { border-top: 1px solid #e2e8f0; margin-top: 8px; padding-top: 18px; }
.profile-section h3 { margin: 0 0 5px; }
.profile-section > p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.profile-photo-control {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px dashed #b8c4d6;
    border-radius: 14px;
    background: #f8fafc;
}
.profile-preview {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    overflow: hidden;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: #1e40af;
    font-size: 24px;
    font-weight: 800;
}
.profile-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-upload-copy { min-width: 0; }
.profile-upload-copy input[type="file"] { padding: 9px; background: #fff; }
.inline-check { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 400; }
.inline-check input { flex: 0 0 auto; }
.password-input-wrap { position: relative; }
.password-input-wrap input { padding-right: 78px; }
.password-toggle {
    position: absolute;
    right: 7px;
    top: 50%;
    transform: translateY(-50%);
    min-height: 32px;
    padding: 5px 9px;
    border: 0;
    border-radius: 8px;
    background: #e8eef8;
    color: #344054;
    font-weight: 700;
    cursor: pointer;
}
.profile-security-note { padding: 12px 14px; border-radius: 12px; background: #fff7e6; color: #8a5a00; font-size: 13px; line-height: 1.5; }

@media (max-width: 980px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-summary-card { position: static; }
}

@media (max-width: 760px) {
    .topbar-avatar { width: 34px; height: 34px; flex-basis: 34px; }
    .user-pill { max-width: 150px; padding: 5px 9px 5px 5px; gap: 7px; }
    .profile-form-grid { grid-template-columns: 1fr; }
    .profile-form-grid .profile-wide { grid-column: auto; }
    .profile-photo-control { grid-template-columns: 74px minmax(0, 1fr); padding: 12px; }
    .profile-preview { width: 74px; height: 74px; }
    .profile-avatar-large { width: 126px; height: 126px; font-size: 36px; }
}

@media (max-width: 460px) {
    .profile-photo-control { grid-template-columns: 1fr; text-align: center; }
    .profile-preview { margin: 0 auto; }
    .inline-check { justify-content: center; }
}

/* Landing page specific password toggle override */
.landing-login-card .password-field { position: relative; }
.landing-login-card .password-field input { padding-right: 78px; }
.landing-login-card .password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #cdd9e8;
    background: #f8fbff;
    color: #33517d;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.landing-login-card .password-toggle:hover { background: #edf4ff; }

/* Login page redesign: direct login with MSWDO building background */
.main-content.centered {
    position: relative;
    min-height: 100vh;
    padding: 24px;
    background: transparent;
    overflow: hidden;
}

.auth-page-shell {
    position: relative;
    width: 100%;
    min-height: calc(100vh - 48px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    isolation: isolate;
}

.auth-hero-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image:
        linear-gradient(135deg, rgba(12, 25, 56, 0.62), rgba(21, 76, 156, 0.34)),
        var(--auth-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.auth-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.24), transparent 30%),
        radial-gradient(circle at bottom right, rgba(255,255,255,.16), transparent 28%),
        rgba(11, 26, 55, .10);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.auth-login-card-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-login-card {
    width: min(460px, 100%);
    padding: 28px 24px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.48);
    box-shadow: 0 24px 65px rgba(10, 25, 58, 0.24);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.auth-branding {
    text-align: center;
    margin-bottom: 20px;
}

.auth-brand-logos {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 14px;
}

.auth-brand-logos img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255,255,255,.88);
    box-shadow: 0 8px 18px rgba(30, 64, 175, 0.12);
}

.auth-branding h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 30px);
    line-height: 1.2;
    color: #112b57;
}

.auth-branding p {
    margin: 8px 0 0;
    color: #5b6780;
    font-size: 15px;
}

.auth-login-form {
    margin-top: 8px;
}

.auth-password-wrap {
    position: relative;
}

.auth-password-wrap input {
    padding-right: 76px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    border: 1px solid #ced9ea;
    background: #f7faff;
    color: #24529c;
    border-radius: 10px;
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.auth-password-toggle:hover {
    background: #edf4ff;
}

.auth-submit-btn {
    width: 100%;
    min-height: 46px;
    margin-top: 6px;
    border-radius: 14px;
    font-size: 14px;
}

.auth-login-note {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(224, 242, 254, 0.82);
    color: #075985;
    text-align: center;
    line-height: 1.5;
    font-size: 13px;
}

@media (max-width: 760px) {
    .main-content.centered {
        padding: 12px;
    }

    .auth-page-shell {
        min-height: calc(100vh - 24px);
        padding: 0;
    }

    .auth-login-card {
        width: min(100%, 410px);
        padding: 22px 18px;
        border-radius: 22px;
    }

    .auth-brand-logos img {
        width: 56px;
        height: 56px;
    }

    .auth-branding h1 {
        font-size: 22px;
    }

    .auth-branding p {
        font-size: 14px;
    }
}

@media (max-width: 420px) {
    .auth-page-shell {
        align-items: center;
    }

    .auth-login-card {
        padding: 20px 16px;
        border-radius: 20px;
    }

    .auth-brand-logos {
        gap: 10px;
    }

    .auth-brand-logos img {
        width: 52px;
        height: 52px;
    }

    .auth-branding h1 {
        font-size: 20px;
    }

    .auth-login-note {
        font-size: 12px;
        padding: 11px 12px;
    }
}

/* Final login refinement: system title outside the compact login card */
.main-content.centered {
    overflow-y: auto;
}

.auth-page-shell {
    padding: 20px;
}

.auth-page-content {
    width: min(560px, 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.auth-page-branding {
    width: 100%;
    text-align: center;
    color: #ffffff;
    text-shadow: 0 3px 16px rgba(8, 22, 50, .72);
}

.auth-page-logos {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.auth-page-logos img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    border: 2px solid rgba(255,255,255,.70);
    box-shadow: 0 10px 24px rgba(8, 22, 50, .22);
}

.auth-page-branding h1 {
    max-width: 760px;
    margin: 0 auto;
    font-size: clamp(28px, 3.2vw, 38px);
    line-height: 1.16;
    letter-spacing: -.02em;
}

.auth-page-branding p {
    margin: 8px 0 0;
    font-size: 15px;
    font-weight: 700;
    color: rgba(255,255,255,.94);
}

.auth-login-card-wrap {
    width: min(420px, 100%);
}

.auth-login-card {
    width: 100%;
    padding: 22px 22px 20px;
    border-radius: 24px;
}

.auth-login-heading {
    margin-bottom: 16px;
    text-align: center;
}

.auth-login-heading h2 {
    margin: 0;
    color: #112b57;
    font-size: 22px;
    line-height: 1.2;
}

.auth-login-heading p {
    margin: 5px 0 0;
    color: #667085;
    font-size: 13px;
}

.auth-login-form {
    margin-top: 0;
}

.auth-login-card .form-row {
    margin-bottom: 12px;
}

.auth-login-card input {
    min-height: 44px;
}

.auth-submit-btn {
    min-height: 44px;
    margin-top: 3px;
}

.auth-login-note {
    margin-top: 13px;
    padding: 10px 12px;
    font-size: 12px;
}

@media (max-width: 760px) {
    .auth-page-shell {
        min-height: calc(100dvh - 24px);
        padding: 14px 0;
    }

    .auth-page-content {
        width: min(100%, 430px);
        gap: 14px;
    }

    .auth-page-logos {
        margin-bottom: 9px;
    }

    .auth-page-logos img {
        width: 52px;
        height: 52px;
    }

    .auth-page-branding h1 {
        padding: 0 8px;
        font-size: 24px;
        line-height: 1.18;
    }

    .auth-page-branding p {
        margin-top: 6px;
        font-size: 13px;
    }

    .auth-login-card-wrap {
        width: min(100%, 390px);
    }

    .auth-login-card {
        padding: 19px 17px 17px;
        border-radius: 21px;
    }

    .auth-login-heading {
        margin-bottom: 14px;
    }

    .auth-login-heading h2 {
        font-size: 20px;
    }
}

@media (max-width: 420px) {
    .main-content.centered {
        padding: 10px;
    }

    .auth-page-shell {
        min-height: calc(100dvh - 20px);
        padding: 10px 0;
    }

    .auth-page-content {
        gap: 12px;
    }

    .auth-page-logos img {
        width: 46px;
        height: 46px;
    }

    .auth-page-branding h1 {
        font-size: 21px;
    }

    .auth-page-branding p {
        font-size: 12px;
    }

    .auth-login-card {
        padding: 17px 15px 15px;
        border-radius: 19px;
    }

    .auth-login-heading h2 {
        font-size: 19px;
    }

    .auth-login-heading p {
        font-size: 12px;
    }

    .auth-login-note {
        margin-top: 11px;
        padding: 9px 10px;
    }
}

/* =========================================================
   Official LGU application header and sidebar
   ========================================================= */
:root {
    --app-header-height: 80px;
    --app-sidebar-width: 224px;
    --chrome-blue: #0e3f6c;
    --chrome-blue-deep: #082a49;
    --chrome-blue-soft: #2e6ea3;
    --chrome-gold: #c8961e;
    --chrome-gold-soft: #e9c877;
    --chrome-maroon: #7a2331;
    --chrome-line: #d8e2ed;
}

.app-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1100;
    height: var(--app-header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 0 20px 0 22px;
    background: #fff;
    border-bottom: 1px solid #cfd9e5;
    box-shadow: 0 3px 12px rgba(8, 42, 73, .09);
}

.app-header::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--chrome-blue-deep) 0%, var(--chrome-blue) 45%, var(--chrome-gold) 100%);
}

.app-header-left,
.app-header-right,
.system-brand,
.header-agency-logos,
.header-user-pill,
.header-clock {
    display: flex;
    align-items: center;
}

.app-header-left { gap: 14px; min-width: 0; }
.app-header-right { gap: 12px; flex: 0 0 auto; }

.app-header-menu { display: none; }

.system-brand {
    position: relative;
    gap: 12px;
    min-width: 0;
    padding-right: 4px;
    text-decoration: none;
}

.system-brand-logo {
    position: relative;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: grid;
    place-items: center;
    padding: 3px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e3e9f1;
    box-shadow:
        0 0 0 3px rgba(200, 150, 30, .16),
        0 4px 11px rgba(14, 63, 108, .14);
}

.system-brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.system-brand-copy { display: block; min-width: 0; line-height: 1.05; }
.system-kicker {
    display: block;
    margin-bottom: 4px;
    color: var(--chrome-blue-soft);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
}
.system-brand-copy strong {
    display: block;
    color: var(--chrome-blue-deep);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.system-brand-copy small {
    display: block;
    margin-top: 4px;
    color: #687789;
    font-size: 11px;
    white-space: nowrap;
}
.system-brand::after {
    content: '';
    position: absolute;
    left: 0;
    right: 14px;
    bottom: -9px;
    height: 2px;
    background: linear-gradient(90deg, var(--chrome-gold) 0%, rgba(200, 150, 30, 0) 92%);
    border-radius: 2px;
}

.header-agency-divider {
    width: 1px;
    height: 42px;
    margin-left: 7px;
    background: linear-gradient(180deg, transparent, var(--chrome-line) 20%, var(--chrome-line) 80%, transparent);
}
.header-agency-logos { gap: 8px; }
.agency-logo-box {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 5px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e0e7f0;
    box-shadow: 0 3px 8px rgba(14, 63, 108, .06);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.agency-logo-box:hover {
    border-color: rgba(200, 150, 30, .45);
    box-shadow: 0 4px 11px rgba(14, 63, 108, .10);
}
.agency-logo-box img { width: 100%; height: 100%; object-fit: contain; }

.header-clock {
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid #dce5ef;
    border-radius: 999px;
    background: #f8fafd;
    color: var(--chrome-blue-deep);
    box-shadow: inset 0 1px 0 #fff, 0 3px 8px rgba(14, 63, 108, .05);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.header-clock-icon { color: var(--chrome-gold); font-size: 16px; line-height: 1; }

.header-user-pill {
    min-height: 46px;
    gap: 9px;
    max-width: 270px;
    padding: 5px 12px 5px 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--chrome-blue-deep), var(--chrome-blue) 75%);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(8, 42, 73, .22);
    transition: filter .15s ease, box-shadow .15s ease;
}
.header-user-pill:hover { filter: brightness(1.05); box-shadow: 0 8px 18px rgba(8, 42, 73, .28); }
.header-user-avatar {
    width: 35px;
    height: 35px;
    flex: 0 0 35px;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 2px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(233, 200, 119, .55);
}
.header-user-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.header-user-copy { display: block; min-width: 0; line-height: 1.15; }
.header-user-copy small {
    display: block;
    color: var(--chrome-gold-soft);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .07em;
}
.header-user-copy strong {
    display: block;
    max-width: 175px;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}
.header-user-caret { margin-left: 1px; color: rgba(255,255,255,.65); font-size: 10px; }

.sidebar {
    width: var(--app-sidebar-width);
    top: var(--app-header-height);
    bottom: 0;
    height: auto;
    padding: 18px 14px 22px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,0) 8%),
        linear-gradient(180deg, #14477a 0%, #0e3a66 22%, #082a49 100%);
    color: #fff;
    border-right: 1px solid rgba(255,255,255,.06);
    box-shadow: 4px 0 18px rgba(8, 30, 54, .14);
    display: flex;
    flex-direction: column;
}

.sidebar-head { align-items: center; margin-bottom: 14px; }
.sidebar-office-badge {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(233, 200, 119, .28);
    border-radius: 12px;
    background: rgba(255,255,255,.06);
    color: #eaf1fb;
    text-align: center;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: .09em;
}
.sidebar-close { flex: 0 0 36px; }

.sidebar-profile-card {
    position: relative;
    margin-bottom: 20px;
    padding: 18px 10px 14px;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 17px;
    background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
    overflow: hidden;
}
.sidebar-profile-card::before {
    content: '';
    position: absolute;
    left: 14%;
    right: 14%;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--chrome-gold-soft), transparent);
}
.sidebar-profile-avatar {
    position: relative;
    width: 76px;
    height: 76px;
    margin: 0 auto 10px;
    padding: 4px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(233, 200, 119, .35), 0 6px 16px rgba(3, 20, 40, .30);
}
.sidebar-profile-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.online-dot {
    position: absolute;
    right: 3px;
    bottom: 7px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #23c36b;
    border: 2px solid #fff;
}
.sidebar-profile-card > strong {
    display: block;
    padding: 0 5px;
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.sidebar-position {
    display: block;
    margin-top: 3px;
    padding: 0 5px;
    color: #bcd3ec;
    font-size: 10px;
    line-height: 1.3;
}
.sidebar-role-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 9px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(233, 200, 119, .30);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}
.sidebar-role-pill svg { width: 13px; height: 13px; fill: var(--chrome-gold-soft); }

.sidebar-nav { display: block !important; flex: 1 1 auto; }
.nav-section-label {
    position: relative;
    margin: 18px 6px 8px;
    padding-left: 11px;
    color: #9db9d8;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
}
.nav-section-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 4px;
    height: 4px;
    border-radius: 1px;
    background: var(--chrome-gold);
    transform: rotate(45deg);
}
.sidebar-link,
.sidebar-logout-button {
    position: relative;
    width: 100%;
    min-height: 39px;
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin: 3px 0;
    padding: 8px 10px !important;
    border: 1px solid transparent !important;
    border-radius: 10px !important;
    color: #eef7ff !important;
    background: transparent !important;
    font-size: 12px !important;
    font-weight: 700;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}
.sidebar-link:hover,
.sidebar-logout-button:hover {
    background: rgba(255,255,255,.09) !important;
    border-color: rgba(255,255,255,.08) !important;
}
.sidebar-link.active {
    padding-left: 12px !important;
    background: linear-gradient(90deg, rgba(233, 200, 119, .20), rgba(255,255,255,.06)) !important;
    border-color: rgba(233, 200, 119, .22) !important;
    box-shadow: inset 3px 0 0 var(--chrome-gold);
}
.nav-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: grid;
    place-items: center;
}
.nav-icon svg { width: 16px; height: 16px; fill: currentColor; }
.sidebar-link.active .nav-icon { color: var(--chrome-gold-soft); }
.sidebar-logout-form { margin: 0; }
.sidebar-logout-button { cursor: pointer; }
.sidebar-logout-button .nav-icon { color: #ffb9b9; }

.sidebar-footer {
    flex: 0 0 auto;
    margin-top: auto;
    padding: 12px 8px 4px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    text-align: center;
}
.sidebar-footer p {
    margin: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, .6);
    letter-spacing: .02em;
    line-height: 1.4;
}

.main-content {
    margin-left: var(--app-sidebar-width);
    padding: calc(var(--app-header-height) + 22px) 20px 24px;
    background: #f5f8fc;
}
.main-content.centered {
    margin-left: 0;
    padding-top: 24px;
}

/* The old floating topbar is no longer used, but keep it hidden if any page outputs one. */
.topbar { display: none !important; }

@media (max-width: 1100px) {
    .header-agency-divider,
    .header-agency-logos { display: none; }
    .system-brand-copy small { white-space: normal; }
}

@media (max-width: 900px) {
    .app-header { height: 68px; padding: 0 12px; }
    :root { --app-header-height: 68px; }
    .app-header-menu {
        display: block;
        width: 38px;
        height: 38px;
        border-color: #d7e0ea;
        background: #f7f9fc;
        border-radius: 10px;
    }
    .system-brand-logo { width: 42px; height: 42px; flex-basis: 42px; }
    .system-brand-copy strong { font-size: 17px; }
    .system-kicker { font-size: 8px; }
    .system-brand-copy small { font-size: 9px; }
    .header-clock { display: none; }
    .sidebar {
        top: 0;
        bottom: 0;
        height: 100vh;
        width: min(300px, 86vw);
        padding-top: 16px;
        z-index: 1200;
    }
    .sidebar-overlay { z-index: 1150; }
    .sidebar-close { display: inline-grid; place-items: center; }
    .main-content {
        margin-left: 0;
        padding: calc(var(--app-header-height) + 14px) 14px 18px;
    }
}

@media (max-width: 620px) {
    .app-header { gap: 8px; }
    .system-brand { gap: 7px; }
    .system-brand-logo { width: 38px; height: 38px; flex-basis: 38px; }
    .system-kicker,
    .system-brand-copy small { display: none; }
    .system-brand-copy strong { font-size: 15px; }
    .header-user-pill { max-width: 118px; min-height: 40px; padding-right: 7px; }
    .header-user-avatar { width: 30px; height: 30px; flex-basis: 30px; }
    .header-user-copy small { display: none; }
    .header-user-copy strong { max-width: 58px; font-size: 10px; }
    .header-user-caret { display: none; }
    .main-content { padding-left: 10px; padding-right: 10px; }
}

@media (max-width: 400px) {
    .system-brand-copy { display: none; }
    .header-user-pill { max-width: 108px; }
}

@media print {
    .app-header,
    .sidebar,
    .sidebar-overlay { display: none !important; }
    .main-content { margin-left: 0 !important; padding: 0 !important; }
}

/* =========================================================
   My Targets - polished workspace
   ========================================================= */
.targets-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 14px;
    padding: 2px 2px 0;
}
.targets-eyebrow,
.targets-period-label {
    display: block;
    margin-bottom: 5px;
    color: #2b67b2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
}
.targets-page-heading h1 {
    margin: 0;
    color: #102a43;
    font-size: 27px;
    line-height: 1.15;
}
.targets-page-heading p {
    margin: 5px 0 0;
    color: #66788a;
    font-size: 13px;
}
.targets-heading-status {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.targets-count-pill,
.targets-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.targets-count-pill {
    border: 1px solid #cfe0f5;
    background: #edf5ff;
    color: #1d5fae;
}
.targets-status-pill.is-draft {
    border: 1px solid #d8e0ea;
    background: #f4f6f8;
    color: #586776;
}
.targets-status-pill.is-submitted {
    border: 1px solid #bce6ca;
    background: #ebf8ef;
    color: #18743c;
}

.targets-filter-card {
    padding: 15px 16px;
    border-radius: 15px;
    box-shadow: 0 5px 18px rgba(27, 65, 102, .06);
}
.targets-filter-bar {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(130px, .65fr) auto auto;
    gap: 10px;
    align-items: end;
}
.targets-filter-bar .form-row {
    min-width: 0;
    margin: 0;
}
.targets-filter-bar label {
    margin-bottom: 6px;
    color: #34495e;
    font-size: 12px;
}
.targets-filter-bar select,
.targets-filter-bar input {
    min-height: 42px;
    border-color: #d5deea;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
}
.targets-filter-btn,
.targets-add-btn {
    min-height: 42px;
    padding-left: 17px;
    padding-right: 17px;
}
.targets-add-btn {
    min-width: 118px;
    background: #edf9f1;
    border-color: #bde7ca;
    color: #168447;
}
.targets-add-btn:hover {
    background: #e1f5e8;
    border-color: #99d9ae;
    color: #106f3b;
}

.targets-list-card {
    padding: 0;
    overflow: hidden;
    border-radius: 17px;
    box-shadow: 0 7px 24px rgba(27, 65, 102, .07);
}
.targets-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 13px;
    border-top: 4px solid #2e78d2;
    border-bottom: 1px solid #e6edf5;
}
.targets-list-heading h2 {
    margin: 0;
    color: #112d4e;
    font-size: 22px;
    line-height: 1.2;
}
.targets-list-meta {
    min-width: 72px;
    padding: 7px 12px;
    border: 1px solid #d9e6f4;
    border-radius: 12px;
    background: #f6f9fd;
    text-align: center;
}
.targets-list-meta strong {
    display: block;
    color: #155fac;
    font-size: 19px;
    line-height: 1;
}
.targets-list-meta span {
    display: block;
    margin-top: 3px;
    color: #7b8997;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.targets-workflow-note {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 14px 20px;
    padding: 11px 13px;
    border: 1px solid #cfe5f7;
    border-radius: 12px;
    background: linear-gradient(90deg, #edf8ff, #f7fbff);
    color: #225c84;
}
.targets-workflow-icon {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #d8efff;
    color: #0875b8;
    font-size: 14px;
    font-weight: 900;
}
.targets-workflow-note strong {
    display: block;
    margin: 0 0 2px;
    color: #105d8c;
    font-size: 12px;
}
.targets-workflow-note p {
    margin: 0;
    color: #497591;
    font-size: 12px;
    line-height: 1.45;
}

.targets-table-wrap {
    margin: 0 20px 18px;
    border: 1px solid #dfe7f0;
    border-radius: 13px;
    overflow: hidden;
}
.targets-table {
    border-collapse: separate;
    border-spacing: 0;
}
.targets-table thead th {
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid #d8e3ee;
    background: #eef5fc;
    color: #24496f;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .035em;
}
.targets-table tbody td {
    padding: 13px 12px;
    border-bottom: 1px solid #e9eef4;
    color: #33465a;
    font-size: 13px;
    line-height: 1.45;
}
.targets-table tbody tr:last-child td { border-bottom: 0; }
.targets-table tbody tr:not(.targets-empty-row):hover { background: #f9fbfe; }
.target-ppa-cell {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #152f4d;
    font-weight: 700;
}
.target-row-number {
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    display: inline-grid;
    place-items: center;
    margin-top: -1px;
    border-radius: 7px;
    background: #eaf3ff;
    color: #2467b5;
    font-size: 10px;
    font-weight: 800;
}
.targets-actions-cell {
    min-width: 118px;
}
.targets-actions-cell .btn {
    min-height: 32px;
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 11px;
}

.targets-empty-state {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 28px 12px;
    text-align: center;
}
.targets-empty-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    margin-bottom: 3px;
    border-radius: 12px;
    background: #edf6ff;
    color: #2671c5;
    font-size: 24px;
}
.targets-empty-state strong { color: #26435f; }
.targets-empty-state small { margin-bottom: 7px; color: #7a8998; }

.targets-submit-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-top: 1px solid #dfe7f0;
    background: #f8fbff;
}
.targets-submit-copy {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.targets-submit-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #e6f0ff;
    color: #2a69b7;
    font-size: 15px;
    font-weight: 900;
}
.targets-submit-icon.is-submitted {
    background: #e8f7ed;
    color: #1d8a4d;
}
.targets-submit-copy strong {
    display: block;
    color: #233d57;
    font-size: 12px;
}
.targets-submit-copy small {
    display: block;
    margin-top: 2px;
    color: #718192;
    font-size: 10px;
    line-height: 1.35;
}
.targets-submit-panel form { margin: 0; }
.targets-submit-btn { min-height: 39px; }

@media (max-width: 900px) {
    .targets-page-heading { align-items: center; }
    .targets-filter-bar {
        grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) auto auto;
    }
}

@media (max-width: 760px) {
    .targets-page-heading {
        align-items: center;
        margin-bottom: 10px;
        padding: 0 2px;
    }
    .targets-eyebrow { display: none; }
    .targets-page-heading h1 { font-size: 21px; }
    .targets-page-heading p { display: none; }
    .targets-heading-status { gap: 5px; }
    .targets-count-pill,
    .targets-status-pill {
        min-height: 27px;
        padding: 5px 8px;
        font-size: 9px;
    }

    .targets-filter-card {
        padding: 12px;
        margin-bottom: 11px;
        border-radius: 14px;
    }
    .targets-filter-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .targets-filter-bar .form-row { flex: none; width: 100%; }
    .targets-filter-bar label {
        margin-bottom: 5px;
        font-size: 11px;
    }
    .targets-filter-bar select,
    .targets-filter-bar input {
        min-height: 40px;
        padding: 8px 10px;
        font-size: 13px;
    }
    .targets-filter-bar > .btn {
        width: 100%;
        min-height: 40px;
        margin: 0;
        padding: 8px 9px;
        font-size: 12px;
    }

    .targets-list-card {
        margin-bottom: 10px;
        border-radius: 14px;
    }
    .targets-list-heading {
        padding: 13px 14px 10px;
        border-top-width: 3px;
    }
    .targets-period-label {
        margin-bottom: 3px;
        font-size: 8px;
    }
    .targets-list-heading h2 { font-size: 19px; }
    .targets-list-meta {
        min-width: 56px;
        padding: 6px 8px;
        border-radius: 10px;
    }
    .targets-list-meta strong { font-size: 16px; }
    .targets-list-meta span { font-size: 7px; }

    .targets-workflow-note {
        gap: 8px;
        margin: 10px 12px;
        padding: 9px 10px;
        border-radius: 10px;
    }
    .targets-workflow-icon {
        width: 25px;
        height: 25px;
        flex-basis: 25px;
        border-radius: 8px;
        font-size: 12px;
    }
    .targets-workflow-note strong { font-size: 10px; }
    .targets-workflow-note p {
        font-size: 10px;
        line-height: 1.4;
    }

    .targets-table-wrap {
        margin: 0 10px 12px;
        border: 0;
        border-radius: 0;
        overflow: visible;
    }
    .targets-table tr {
        position: relative;
        padding: 6px 10px 7px 12px;
        border: 1px solid #dce5ef;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(31, 65, 101, .05);
        overflow: hidden;
    }
    .targets-table tr:not(.targets-empty-row)::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: #3e83d0;
    }
    .targets-table tbody td {
        grid-template-columns: 103px minmax(0, 1fr);
        gap: 8px;
        padding: 8px 1px;
        border-bottom: 1px dashed #e6ebf1;
        font-size: 11px;
        line-height: 1.4;
    }
    .targets-table tbody td::before {
        color: #54677b;
        font-size: 10px;
    }
    .target-ppa-cell { gap: 6px; font-size: 11px; }
    .target-row-number {
        width: 20px;
        height: 20px;
        flex-basis: 20px;
        border-radius: 6px;
        font-size: 9px;
    }
    .targets-table td.targets-actions-cell {
        display: grid;
        grid-template-columns: 103px minmax(0, 1fr) minmax(0, 1fr);
        gap: 7px;
        align-items: center;
    }
    .targets-table td.targets-actions-cell::before {
        flex: none;
        width: auto;
    }
    .targets-actions-cell .btn,
    .targets-actions-cell form,
    .targets-actions-cell form .btn {
        width: 100%;
    }
    .targets-actions-cell .btn {
        min-height: 31px;
        padding: 6px 7px;
        font-size: 10px;
    }

    .targets-empty-state { padding: 22px 8px; }

    .targets-submit-panel {
        display: block;
        padding: 11px 12px 12px;
    }
    .targets-submit-copy {
        align-items: flex-start;
        margin-bottom: 9px;
    }
    .targets-submit-icon {
        width: 29px;
        height: 29px;
        flex-basis: 29px;
        border-radius: 9px;
        font-size: 13px;
    }
    .targets-submit-copy strong { font-size: 11px; }
    .targets-submit-copy small { font-size: 9px; }
    .targets-submit-panel form,
    .targets-submit-btn { width: 100%; }
    .targets-submit-btn {
        min-height: 39px;
        font-size: 11px;
    }
}

@media (max-width: 430px) {
    .targets-page-heading h1 { font-size: 19px; }
    .targets-count-pill { display: none; }
    .targets-list-heading h2 { font-size: 18px; }
    .targets-table tbody td,
    .targets-table td.targets-actions-cell {
        grid-template-columns: 92px minmax(0, 1fr);
    }
    .targets-table td.targets-actions-cell {
        grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* =========================================================
   Daily Accomplishment - polished personal workspace
   ========================================================= */
.accomplishments-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 14px;
    padding: 2px 2px 0;
}
.accomplishments-eyebrow,
.accomplishments-period-label {
    display: block;
    margin-bottom: 5px;
    color: #2b67b2;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .11em;
}
.accomplishments-page-heading h1 {
    margin: 0;
    color: #102a43;
    font-size: 27px;
    line-height: 1.15;
}
.accomplishments-page-heading p {
    margin: 5px 0 0;
    color: #66788a;
    font-size: 13px;
}
.accomplishments-heading-status {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.accomplishments-private-pill,
.accomplishments-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.accomplishments-private-pill {
    border: 1px solid #bce6ca;
    background: #ebf8ef;
    color: #18743c;
}
.accomplishments-count-pill {
    border: 1px solid #cfe0f5;
    background: #edf5ff;
    color: #1d5fae;
}

.accomplishments-filter-card {
    padding: 15px 16px;
    margin-bottom: 13px;
    border-radius: 15px;
    box-shadow: 0 5px 18px rgba(27, 65, 102, .06);
}
.accomplishments-filter-bar {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(125px, .65fr) auto auto auto;
    gap: 10px;
    align-items: end;
}
.accomplishments-filter-bar .form-row {
    min-width: 0;
    margin: 0;
}
.accomplishments-filter-bar label {
    margin-bottom: 6px;
    color: #34495e;
    font-size: 12px;
}
.accomplishments-filter-bar select,
.accomplishments-filter-bar input {
    min-height: 42px;
    border-color: #d5deea;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
}
.accomplishments-filter-btn,
.accomplishments-add-btn,
.accomplishments-print-btn {
    min-height: 42px;
    padding-left: 16px;
    padding-right: 16px;
}
.accomplishments-add-btn {
    background: #edf9f1;
    border-color: #bde7ca;
    color: #168447;
}
.accomplishments-add-btn:hover {
    background: #e1f5e8;
    border-color: #99d9ae;
    color: #106f3b;
}
.accomplishments-print-btn {
    background: #f4f7fb;
    border-color: #d8e1ec;
    color: #33465a;
}

.accomplishments-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
    margin: 0 0 13px;
}
.accomplishment-stat-card {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 11px;
    min-height: 82px;
    padding: 13px 15px;
    overflow: hidden;
    border: 1px solid #dfe7f0;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(27, 65, 102, .05);
}
.accomplishment-stat-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #5595db;
}
.accomplishment-stat-card.is-days::before { background: #28a66a; }
.accomplishment-stat-card.is-month::before { background: #9458c8; }
.accomplishment-stat-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #edf5ff;
    color: #1764b9;
    font-size: 15px;
    font-weight: 900;
}
.accomplishment-stat-card.is-days .accomplishment-stat-icon {
    background: #eaf8f0;
    color: #18854e;
}
.accomplishment-stat-card.is-month .accomplishment-stat-icon {
    background: #f6edfb;
    color: #8644b5;
}
.accomplishment-stat-card strong {
    display: block;
    margin-bottom: 2px;
    color: #112d4e;
    font-size: 23px;
    line-height: 1.05;
}
.accomplishment-stat-card div > span {
    display: block;
    color: #6b7d8f;
    font-size: 11px;
    line-height: 1.3;
}
.stat-label-mobile { display: none !important; }

.accomplishments-list-card {
    padding: 0;
    overflow: hidden;
    border-radius: 17px;
    box-shadow: 0 7px 24px rgba(27, 65, 102, .07);
}
.accomplishments-list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 13px;
    border-top: 4px solid #2e78d2;
    border-bottom: 1px solid #e6edf5;
}
.accomplishments-list-heading h2 {
    margin: 0;
    color: #112d4e;
    font-size: 22px;
    line-height: 1.2;
}
.accomplishments-list-meta {
    min-width: 72px;
    padding: 7px 12px;
    border: 1px solid #d9e6f4;
    border-radius: 12px;
    background: #f6f9fd;
    text-align: center;
}
.accomplishments-list-meta strong {
    display: block;
    color: #155fac;
    font-size: 19px;
    line-height: 1;
}
.accomplishments-list-meta span {
    display: block;
    margin-top: 3px;
    color: #7b8997;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.accomplishments-privacy-note {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 14px 20px;
    padding: 11px 13px;
    border: 1px solid #cfe5f7;
    border-radius: 12px;
    background: linear-gradient(90deg, #edf8ff, #f7fbff);
    color: #225c84;
}
.accomplishments-privacy-icon {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #d8efff;
    color: #0875b8;
    font-size: 14px;
    font-weight: 900;
}
.accomplishments-privacy-note strong {
    display: block;
    margin: 0 0 2px;
    color: #105d8c;
    font-size: 12px;
}
.accomplishments-privacy-note p {
    margin: 0;
    color: #497591;
    font-size: 12px;
    line-height: 1.45;
}

.accomplishments-table-wrap {
    margin: 0 20px 18px;
    border: 1px solid #dfe7f0;
    border-radius: 13px;
    overflow: hidden;
}
.accomplishments-table {
    border-collapse: separate;
    border-spacing: 0;
}
.accomplishments-table thead th {
    padding: 11px 12px;
    border: 0;
    border-bottom: 1px solid #d8e3ee;
    background: #eef5fc;
    color: #24496f;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .035em;
}
.accomplishments-table tbody td {
    padding: 13px 12px;
    border-bottom: 1px solid #e9eef4;
    color: #33465a;
    font-size: 13px;
    line-height: 1.5;
}
.accomplishments-table tbody tr:last-child td { border-bottom: 0; }
.accomplishments-table tbody tr:not(.accomplishments-empty-row):hover { background: #f9fbfe; }
.accomplishment-date-cell {
    color: #173b61 !important;
    font-weight: 700;
}
.accomplishment-date-cell .accomplishment-row-number {
    display: none;
}
.accomplishment-activity-cell {
    white-space: normal;
}
.accomplishments-actions-cell {
    min-width: 126px;
}
.accomplishments-actions-cell .btn {
    min-height: 32px;
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 11px;
}
.accomplishments-empty-state {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 30px 12px;
    text-align: center;
}
.accomplishments-empty-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    margin-bottom: 3px;
    border-radius: 12px;
    background: #edf6ff;
    color: #2671c5;
    font-size: 24px;
}
.accomplishments-empty-state strong { color: #26435f; }
.accomplishments-empty-state small { margin-bottom: 7px; color: #7a8998; }

@media (max-width: 980px) {
    .accomplishments-filter-bar {
        grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) repeat(3, auto);
    }
}

@media (max-width: 760px) {
    .accomplishments-page-heading {
        align-items: center;
        margin-bottom: 10px;
        padding: 0 2px;
    }
    .accomplishments-eyebrow { display: none; }
    .accomplishments-page-heading h1 { font-size: 21px; }
    .accomplishments-page-heading p { display: none; }
    .accomplishments-heading-status { gap: 5px; }
    .accomplishments-private-pill,
    .accomplishments-count-pill {
        min-height: 27px;
        padding: 5px 8px;
        font-size: 9px;
    }

    .accomplishments-filter-card {
        padding: 12px;
        margin-bottom: 10px;
        border-radius: 14px;
    }
    .accomplishments-filter-bar {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 8px;
    }
    .accomplishments-filter-bar .form-row {
        grid-column: span 3;
        flex: none;
        width: 100%;
    }
    .accomplishments-filter-bar label {
        margin-bottom: 5px;
        font-size: 11px;
    }
    .accomplishments-filter-bar select,
    .accomplishments-filter-bar input {
        min-height: 40px;
        padding: 8px 10px;
        font-size: 13px;
    }
    .accomplishments-filter-bar > .btn {
        grid-column: span 2;
        width: 100%;
        min-height: 40px;
        margin: 0;
        padding: 8px 6px;
        font-size: 10px;
    }

    .accomplishments-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
        margin-bottom: 10px;
    }
    .accomplishment-stat-card {
        display: block;
        min-height: 82px;
        padding: 10px 8px 9px 10px;
        border-radius: 13px;
        text-align: left;
    }
    .accomplishment-stat-card::before { width: 3px; }
    .accomplishment-stat-icon {
        width: 25px;
        height: 25px;
        margin-bottom: 7px;
        border-radius: 8px;
        font-size: 10px;
    }
    .accomplishment-stat-card strong {
        margin-bottom: 2px;
        font-size: 18px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .accomplishment-stat-card div > span { font-size: 9px; }
    .stat-label-desktop { display: none !important; }
    .stat-label-mobile { display: block !important; }

    .accomplishments-list-card {
        margin-bottom: 10px;
        border-radius: 14px;
    }
    .accomplishments-list-heading {
        padding: 13px 14px 10px;
        border-top-width: 3px;
    }
    .accomplishments-period-label {
        margin-bottom: 3px;
        font-size: 8px;
    }
    .accomplishments-list-heading h2 {
        font-size: 18px;
        line-height: 1.25;
    }
    .accomplishments-list-meta {
        min-width: 56px;
        padding: 6px 8px;
        border-radius: 10px;
    }
    .accomplishments-list-meta strong { font-size: 16px; }
    .accomplishments-list-meta span { font-size: 7px; }

    .accomplishments-privacy-note {
        gap: 8px;
        margin: 10px 12px;
        padding: 9px 10px;
        border-radius: 10px;
    }
    .accomplishments-privacy-icon {
        width: 25px;
        height: 25px;
        flex-basis: 25px;
        border-radius: 8px;
        font-size: 12px;
    }
    .accomplishments-privacy-note strong { font-size: 10px; }
    .accomplishments-privacy-note p {
        font-size: 10px;
        line-height: 1.4;
    }

    .accomplishments-table-wrap {
        margin: 0 10px 12px;
        border: 0;
        border-radius: 0;
        overflow: visible;
    }
    .accomplishments-table tr.accomplishment-row {
        position: relative;
        padding: 6px 10px 7px 12px;
        border: 1px solid #dce5ef;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(31, 65, 101, .05);
        overflow: hidden;
    }
    .accomplishments-table tr.accomplishment-row::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: #3e83d0;
    }
    .accomplishments-table tbody td {
        grid-template-columns: 94px minmax(0, 1fr);
        gap: 8px;
        padding: 8px 1px;
        border-bottom: 1px dashed #e6ebf1;
        font-size: 11px;
        line-height: 1.45;
    }
    .accomplishments-table tbody td::before {
        color: #54677b;
        font-size: 10px;
    }
    .accomplishment-date-cell {
        display: grid !important;
        grid-template-columns: 94px 21px minmax(0, 1fr) !important;
        align-items: center;
        gap: 6px !important;
    }
    .accomplishment-date-cell::before { grid-column: 1; }
    .accomplishment-date-cell .accomplishment-row-number {
        display: inline-grid;
        grid-column: 2;
        width: 20px;
        height: 20px;
        place-items: center;
        border-radius: 6px;
        background: #eaf3ff;
        color: #2467b5;
        font-size: 9px;
        font-weight: 800;
    }
    .accomplishment-date-cell strong { grid-column: 3; }
    .accomplishment-activity-cell {
        color: #2e4359 !important;
        line-height: 1.5 !important;
    }
    .accomplishments-table td.accomplishments-actions-cell {
        display: grid;
        grid-template-columns: 94px minmax(0, 1fr) minmax(0, 1fr);
        gap: 7px;
        align-items: center;
    }
    .accomplishments-table td.accomplishments-actions-cell::before {
        flex: none;
        width: auto;
    }
    .accomplishments-actions-cell .btn,
    .accomplishments-actions-cell form,
    .accomplishments-actions-cell form .btn {
        width: 100%;
    }
    .accomplishments-actions-cell .btn {
        min-height: 31px;
        padding: 6px 7px;
        font-size: 10px;
    }
    .accomplishments-empty-state { padding: 22px 8px; }
}

@media (max-width: 430px) {
    .accomplishments-page-heading h1 { font-size: 19px; }
    .accomplishments-count-pill { display: none; }
    .accomplishments-filter-bar > .btn { font-size: 9px; }
    .accomplishments-list-heading h2 { font-size: 17px; }
    .accomplishment-stat-card strong { font-size: 17px; }
    .accomplishments-table tbody td {
        grid-template-columns: 86px minmax(0, 1fr);
    }
    .accomplishment-date-cell {
        grid-template-columns: 86px 21px minmax(0, 1fr) !important;
    }
    .accomplishments-table td.accomplishments-actions-cell {
        grid-template-columns: 86px minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* =========================================================
   SMART CONSOLIDATION — CLEAN WORKSPACE + MANUAL PPA ORDER
   ========================================================= */
.consolidation-page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 12px;
    padding: 2px 2px 0;
}
.consolidation-page-heading .page-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #2772c8;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.consolidation-page-heading h1 {
    margin: 0;
    color: #102f50;
    font-size: 25px;
    line-height: 1.15;
}
.consolidation-page-heading p {
    margin: 5px 0 0;
    color: #6f7e8f;
    font-size: 12px;
}

.consolidation-filter-card {
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid #dce6f1;
    border-radius: 16px;
    box-shadow: 0 6px 18px rgba(31, 65, 101, .05);
}
.consolidation-filter-bar {
    display: grid;
    grid-template-columns: 128px 150px auto auto;
    align-items: end;
    gap: 10px;
}
.consolidation-filter-bar .form-row { min-width: 0; }
.consolidation-filter-bar label {
    margin-bottom: 5px;
    color: #274a6d;
    font-size: 11px;
    font-weight: 800;
}
.consolidation-filter-bar select,
.consolidation-filter-bar input {
    min-height: 39px;
}
.consolidation-filter-bar > .btn {
    min-height: 39px;
    margin: 0;
    white-space: nowrap;
}

.consolidation-overview-card,
.consolidation-staff-card,
.finalized-targets-card {
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid #dce6f1;
    border-radius: 17px;
    box-shadow: 0 6px 20px rgba(29, 61, 96, .055);
}
.consolidation-overview-card::before,
.finalized-targets-card::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(90deg, #1f69c9, #4aa0df);
}
.consolidation-overview-heading h2,
.finalized-targets-heading h2,
.consolidation-simple-heading h2 {
    color: #122f4c;
    font-size: 20px;
    line-height: 1.2;
}
.consolidation-overview-heading p,
.finalized-targets-heading p,
.consolidation-simple-heading p {
    max-width: 920px;
    color: #738296;
    font-size: 12px;
    line-height: 1.45;
}
.consolidation-overview-card .count-pill,
.finalized-targets-card .count-pill,
.consolidation-staff-card .count-pill {
    border: 1px solid #d9e6f3;
    background: #f3f8fd;
    color: #295d91;
    font-weight: 800;
}

.consolidation-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin: 13px 0;
}
.consolidation-summary-box {
    position: relative;
    min-height: 72px;
    padding: 12px 13px 11px 15px;
    border-color: #dce7f2;
    border-radius: 13px;
    background: linear-gradient(145deg, #f8fbff, #f4f8fc);
    overflow: hidden;
}
.consolidation-summary-box::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #4b91d6;
}
.consolidation-summary-box span {
    margin-bottom: 6px;
    color: #728196;
    font-size: 10px;
    font-weight: 700;
}
.consolidation-summary-box strong {
    color: #132f4c;
    font-size: 18px;
    line-height: 1.1;
}
.consolidation-overview-card .notice {
    padding: 10px 12px;
    border-radius: 11px;
    font-size: 11px;
}

.consolidation-staff-card .section-heading {
    margin-bottom: 12px;
}
.consolidation-staff-card .table-wrap {
    border: 1px solid #e0e8f1;
    border-radius: 12px;
    overflow: hidden;
}
.consolidation-staff-card table thead th {
    background: #f2f7fc;
    color: #315678;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .035em;
}
.consolidation-staff-card table tbody td {
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 12px;
}

/* Finalized target ordering */
.finalized-targets-heading {
    margin-bottom: 13px;
}
.finalized-targets-heading .smart-label {
    display: inline-block;
    margin: 0 0 5px;
    color: #2772c8;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .11em;
    text-transform: uppercase;
}
.finalized-targets-card .table-wrap {
    border: 1px solid #dfe7f0;
    border-radius: 13px;
    overflow-x: auto;
}
.finalized-targets-card table {
    min-width: 1380px;
}
.finalized-targets-card table thead th {
    padding: 10px 8px;
    background: #eef5fc;
    color: #294e73;
    font-size: 10px;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: .025em;
}
.finalized-targets-card table tbody td {
    padding: 10px 8px;
    color: #31465c;
    font-size: 11px;
    line-height: 1.4;
    vertical-align: top;
}
.finalized-targets-card table tbody tr:hover {
    background: #fbfdff;
}
.order-column {
    width: 70px;
    text-align: center;
}
.final-order-cell {
    width: 70px;
    min-width: 70px;
}
.final-order-control {
    display: grid;
    grid-template-columns: 25px 30px;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.final-order-number {
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #edf5ff;
    color: #2368b7;
    font-size: 10px;
    font-weight: 900;
}
.final-order-form {
    display: grid !important;
    grid-template-rows: repeat(2, 22px);
    gap: 3px;
    margin: 0 !important;
}
.order-arrow {
    width: 30px;
    min-width: 30px;
    height: 22px;
    padding: 0;
    border: 1px solid #cfdceb;
    border-radius: 6px;
    background: #fff;
    color: #245f9f;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    transition: .15s ease;
}
.order-arrow:hover:not(:disabled) {
    border-color: #6ea3db;
    background: #eaf4ff;
    transform: translateY(-1px);
}
.order-arrow:disabled {
    opacity: .28;
    cursor: default;
}
.finalized-targets-card .actions-cell {
    min-width: 160px;
}
.finalized-targets-card .actions-cell .btn {
    min-height: 31px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 10px;
}
.finalized-targets-card details summary {
    color: #245f9f;
    font-weight: 800;
    cursor: pointer;
}

/* Smart suggestion/manual source sections stay visually related */
.smart-card,
.manual-draft-card {
    border-color: #dce6f1;
    box-shadow: 0 4px 14px rgba(31, 65, 101, .035);
}
.smart-card-header .smart-label {
    color: #2772c8;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}
.source-toolbar {
    gap: 8px;
}

@media (max-width: 980px) {
    .consolidation-filter-bar {
        grid-template-columns: 1fr 1fr auto auto;
    }
    .consolidation-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .consolidation-page-heading {
        align-items: center;
        margin-bottom: 9px;
        padding: 0 2px;
    }
    .consolidation-page-heading .page-eyebrow,
    .consolidation-page-heading p { display: none; }
    .consolidation-page-heading h1 { font-size: 20px; }

    .consolidation-filter-card {
        padding: 11px;
        margin-bottom: 10px;
        border-radius: 14px;
    }
    .consolidation-filter-bar {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 7px;
    }
    .consolidation-filter-bar .form-row {
        grid-column: span 2;
        width: 100%;
    }
    .consolidation-filter-bar label {
        margin-bottom: 4px;
        font-size: 10px;
    }
    .consolidation-filter-bar select,
    .consolidation-filter-bar input {
        min-height: 39px;
        padding: 8px 10px;
        font-size: 12px;
    }
    .consolidation-filter-bar > .btn {
        grid-column: span 2;
        width: 100%;
        min-height: 39px;
        padding: 8px 6px;
        font-size: 10px;
    }

    .consolidation-overview-card,
    .consolidation-staff-card,
    .finalized-targets-card {
        padding: 13px;
        margin-bottom: 10px;
        border-radius: 14px;
    }
    .consolidation-overview-card::before,
    .finalized-targets-card::before { height: 3px; }
    .consolidation-overview-heading,
    .finalized-targets-heading,
    .consolidation-simple-heading {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 9px;
    }
    .consolidation-overview-heading > div,
    .finalized-targets-heading > div,
    .consolidation-simple-heading > div { min-width: 0; }
    .consolidation-overview-heading h2,
    .finalized-targets-heading h2,
    .consolidation-simple-heading h2 {
        margin: 0;
        font-size: 17px;
        line-height: 1.25;
    }
    .consolidation-overview-heading p,
    .consolidation-simple-heading p { display: none; }
    .finalized-targets-heading p {
        margin-top: 4px;
        font-size: 9px;
        line-height: 1.35;
    }
    .finalized-targets-heading .smart-label {
        margin-bottom: 3px;
        font-size: 7px;
    }
    .consolidation-overview-card .count-pill,
    .finalized-targets-card .count-pill,
    .consolidation-staff-card .count-pill {
        flex: 0 0 auto;
        min-height: 25px;
        margin: 0 !important;
        padding: 5px 7px;
        font-size: 8px;
    }

    .consolidation-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 7px;
        margin: 9px 0;
    }
    .consolidation-summary-box {
        min-height: 67px;
        padding: 9px 8px 8px 11px;
        border-radius: 11px;
    }
    .consolidation-summary-box span {
        margin-bottom: 4px;
        font-size: 8px;
        line-height: 1.2;
    }
    .consolidation-summary-box strong {
        font-size: 15px;
        line-height: 1.15;
    }
    .consolidation-overview-card .notice {
        padding: 8px 9px;
        font-size: 9px;
        line-height: 1.35;
    }

    .consolidation-staff-card .table-wrap {
        border: 0;
        overflow: visible;
    }
    .consolidation-staff-card .table-wrap tr {
        padding: 7px 10px;
        border: 1px solid #dce5ef;
        border-radius: 11px;
        box-shadow: 0 3px 10px rgba(31, 65, 101, .04);
    }
    .consolidation-staff-card .table-wrap td {
        grid-template-columns: 90px minmax(0, 1fr);
        gap: 7px;
        padding: 6px 0;
        font-size: 10px;
    }
    .consolidation-staff-card .table-wrap td::before {
        color: #617386;
        font-size: 9px;
    }

    /* The generic responsive table becomes a compact finalized PPA card. */
    .finalized-targets-card .table-wrap {
        border: 0;
        overflow: visible;
    }
    .finalized-targets-card table { min-width: 0; }
    .finalized-targets-card .table-wrap tr:not(:first-child) {
        position: relative;
        padding: 7px 10px 8px 12px;
        border: 1px solid #dce5ef;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(31, 65, 101, .05);
        overflow: hidden;
    }
    .finalized-targets-card .table-wrap tr:not(:first-child)::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: #3c83d1;
    }
    .finalized-targets-card .table-wrap td {
        grid-template-columns: 92px minmax(0, 1fr);
        gap: 8px;
        padding: 7px 0;
        border-bottom: 1px dashed #e6ebf1;
        font-size: 10px;
        line-height: 1.4;
    }
    .finalized-targets-card .table-wrap td::before {
        color: #5c6f82;
        font-size: 9px;
        font-weight: 800;
    }
    .finalized-targets-card .table-wrap td.final-order-cell {
        display: grid;
        width: auto;
        min-width: 0;
        grid-template-columns: 92px minmax(0, 1fr);
        align-items: center;
    }
    .final-order-control {
        grid-template-columns: 27px auto;
        justify-content: start;
    }
    .final-order-number {
        width: 27px;
        height: 27px;
        font-size: 10px;
    }
    .final-order-form {
        grid-template-columns: repeat(2, 34px);
        grid-template-rows: 27px;
        gap: 5px;
    }
    .order-arrow {
        width: 34px;
        height: 27px;
        border-radius: 7px;
        font-size: 15px;
    }
    .finalized-targets-card .actions-cell {
        display: grid !important;
        grid-template-columns: 92px minmax(0, 1fr) 76px;
        gap: 7px;
        align-items: center;
        min-width: 0;
    }
    .finalized-targets-card .actions-cell::before {
        width: auto;
        flex: none;
    }
    .finalized-targets-card .actions-cell .btn,
    .finalized-targets-card .actions-cell form,
    .finalized-targets-card .actions-cell form .btn {
        width: 100%;
    }
    .finalized-targets-card .actions-cell .btn {
        min-height: 30px;
        padding: 5px 6px;
        font-size: 9px;
    }
    .source-toolbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 7px;
    }
    .source-toolbar .btn,
    .source-toolbar form,
    .source-toolbar form .btn { width: 100%; }
    .source-toolbar > :last-child { grid-column: 1 / -1; }
}

@media (max-width: 430px) {
    .consolidation-overview-heading h2,
    .finalized-targets-heading h2,
    .consolidation-simple-heading h2 { font-size: 16px; }
    .finalized-targets-heading p { font-size: 8px; }
    .consolidation-summary-box strong { font-size: 14px; }
    .finalized-targets-card .table-wrap td,
    .finalized-targets-card .table-wrap td.final-order-cell {
        grid-template-columns: 84px minmax(0, 1fr);
    }
    .finalized-targets-card .actions-cell {
        grid-template-columns: 84px minmax(0, 1fr) 70px;
    }
}

/* Finalized PPA editor — clearer field boundaries and visual grouping */
.edit-finalized-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #c9ddf2;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(31, 78, 121, .08);
}
.edit-finalized-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1f68b5, #4d9ae7);
}
.edit-finalized-card > .section-heading {
    margin: -2px -2px 18px;
    padding: 15px 16px 13px;
    border-bottom: 1px solid #d8e5f2;
    background: #f4f9ff;
}
.edit-finalized-card > .section-heading h2 {
    color: #123f70;
}
.edit-finalized-card .smart-form-grid {
    gap: 13px 14px;
}
.edit-finalized-card .smart-form-grid > .form-row {
    margin-bottom: 0;
    padding: 12px;
    border: 1px solid #d9e6f3;
    border-radius: 12px;
    background: #f9fcff;
}
.edit-finalized-card .form-row label {
    color: #244f79;
    font-weight: 800;
}
.edit-finalized-card input,
.edit-finalized-card select,
.edit-finalized-card textarea {
    border: 1.5px solid #9fb9d4;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(31, 65, 101, .035);
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.edit-finalized-card input:hover,
.edit-finalized-card select:hover,
.edit-finalized-card textarea:hover {
    border-color: #7da5cb;
}
.edit-finalized-card input:focus,
.edit-finalized-card select:focus,
.edit-finalized-card textarea:focus {
    outline: none;
    border-color: #2a73bf;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(42, 115, 191, .12);
}
.edit-finalized-card .field-help {
    color: #6b7f92;
    font-size: 11px;
}
.edit-finalized-card .accomplishment-entry {
    margin-top: 2px;
    padding: 15px;
    border: 1.5px solid #aac9e8;
    background: linear-gradient(180deg, #f1f8ff 0%, #f8fbff 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.edit-finalized-card .accomplishment-entry-heading {
    margin: -2px -2px 14px;
    padding: 10px 12px;
    border-left: 4px solid #2a73bf;
    border-radius: 9px;
    background: #e6f2ff;
}
.edit-finalized-card .accomplishment-entry-heading h3 {
    color: #174f84;
}
.edit-finalized-card .accomplishment-entry-heading p {
    margin-bottom: 0;
    color: #58718a;
}
.edit-finalized-card .accomplishment-entry .form-row {
    margin-bottom: 0;
    padding: 11px;
    border: 1px solid #d5e5f5;
    border-radius: 11px;
    background: rgba(255,255,255,.82);
}
.edit-finalized-card > form > .btn-primary {
    margin-top: 14px;
    min-height: 42px;
    box-shadow: 0 5px 12px rgba(31, 104, 181, .16);
}

/* Outcome remains editable in the end-of-month form, but is intentionally
   hidden from the finalized target list to keep the working table compact. */
.finalized-targets-card table {
    min-width: 1200px;
}

@media (max-width: 760px) {
    .edit-finalized-card {
        padding: 12px;
    }
    .edit-finalized-card > .section-heading {
        margin: -12px -12px 13px;
        padding: 14px 12px 11px;
    }
    .edit-finalized-card .smart-form-grid {
        gap: 9px;
    }
    .edit-finalized-card .smart-form-grid > .form-row,
    .edit-finalized-card .accomplishment-entry .form-row {
        padding: 10px;
        border-radius: 10px;
    }
    .edit-finalized-card .accomplishment-entry {
        padding: 10px;
        border-radius: 12px;
    }
    .edit-finalized-card .accomplishment-entry-heading {
        margin: 0 0 10px;
        padding: 9px 10px;
    }
    .edit-finalized-card input,
    .edit-finalized-card select,
    .edit-finalized-card textarea {
        border-width: 1.5px;
    }
    .edit-finalized-card > form > .btn-primary {
        width: 100%;
    }
    .finalized-targets-card table {
        min-width: 0;
    }
}

/* =========================================================
   Landing page v3 — Senior Citizens-inspired desktop layout
   with compact mobile login
   ========================================================= */
body:has(.auth-landing-v3) {
    background: #0d3156;
}

body:has(.auth-landing-v3) .main-content.centered {
    padding: 0;
    min-height: 100dvh;
    overflow-x: hidden;
}

.auth-landing-v3 {
    min-height: 100dvh;
    width: 100%;
    padding: 22px 28px 12px;
    align-items: stretch;
}

.auth-landing-v3 .auth-hero-bg {
    background-image:
        linear-gradient(90deg, rgba(7, 38, 72, .82) 0%, rgba(9, 48, 88, .66) 46%, rgba(13, 39, 73, .48) 100%),
        var(--auth-bg-image);
    background-position: center 48%;
}

.auth-landing-v3 .auth-hero-bg::after {
    background:
        linear-gradient(180deg, rgba(12, 50, 84, .06), rgba(4, 29, 55, .28)),
        radial-gradient(circle at 82% 18%, rgba(255,255,255,.16), transparent 28%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.auth-landing-frame {
    width: min(1260px, 100%);
    min-height: calc(100dvh - 34px);
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 16px;
}

.auth-government-bar {
    min-height: 78px;
    padding: 10px 18px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(255,255,255,.80);
    box-shadow: 0 16px 36px rgba(4, 25, 52, .20);
}

.auth-gov-left,
.auth-gov-right {
    display: flex;
    align-items: center;
}

.auth-gov-left { gap: 14px; }
.auth-gov-right { gap: 16px; }

.auth-gov-logo {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 12px rgba(22, 74, 125, .12);
}

.auth-gov-logo img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.auth-gov-logo-mswdo {
    border-radius: 14px;
}

.auth-gov-copy {
    display: flex;
    flex-direction: column;
    color: #183255;
    line-height: 1.12;
}

.auth-gov-copy span {
    font-size: 12px;
    color: #596982;
}

.auth-gov-copy strong {
    margin: 2px 0;
    font-size: 19px;
    letter-spacing: .015em;
}

.auth-gov-copy small {
    font-size: 12px;
    color: #69758a;
}

.auth-gov-office {
    max-width: 235px;
    color: #144775;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    text-align: right;
}

.auth-landing-grid {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, .72fr);
    gap: clamp(36px, 6vw, 82px);
    align-items: center;
    padding: 12px 4px;
}

.auth-showcase {
    max-width: 770px;
    color: #fff;
}

.auth-mobile-logos {
    display: none;
}

.auth-showcase-badge {
    width: max-content;
    max-width: 100%;
    margin-bottom: 18px;
    padding: 7px 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    background: rgba(255,255,255,.11);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .07em;
}

.auth-showcase-badge span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffd43b;
    box-shadow: 0 0 0 4px rgba(255,212,59,.13);
}

.auth-showcase h1 {
    margin: 0;
    max-width: 760px;
    color: #fff;
    font-size: clamp(42px, 4.4vw, 68px);
    line-height: .99;
    letter-spacing: -.035em;
    text-shadow: 0 5px 24px rgba(3, 20, 43, .36);
}

.auth-showcase-location {
    margin: 14px 0 0;
    font-size: 17px;
    font-weight: 800;
    color: rgba(255,255,255,.96);
}

.auth-showcase-description {
    max-width: 700px;
    margin: 13px 0 0;
    color: rgba(255,255,255,.91);
    font-size: 15px;
    line-height: 1.6;
}

.auth-showcase-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.auth-showcase-tags span {
    padding: 7px 11px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(7, 35, 66, .34);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

.auth-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.auth-feature-card {
    min-height: 102px;
    padding: 14px;
    display: flex;
    align-items: flex-start;
    gap: 11px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.23);
    background: rgba(5, 31, 59, .44);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.auth-feature-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255,255,255,.13);
    font-size: 15px;
    font-weight: 900;
}

.auth-feature-card div {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.auth-feature-card strong {
    color: #fff;
    font-size: 13px;
    line-height: 1.25;
}

.auth-feature-card small {
    margin-top: 5px;
    color: rgba(255,255,255,.82);
    font-size: 10.5px;
    line-height: 1.45;
}

.auth-landing-v3 .auth-login-card-wrap {
    width: 100%;
}

.auth-landing-v3 .auth-login-card {
    width: 100%;
    max-width: 410px;
    margin-left: auto;
    padding: 24px 24px 18px;
    border-radius: 24px;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.88);
    box-shadow: 0 28px 62px rgba(3, 24, 51, .30);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    overflow: hidden;
    position: relative;
}

.auth-landing-v3 .auth-login-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #1b7a46 0 38%, #f1c40f 38% 70%, #1f65ad 70% 100%);
}

.auth-login-brand {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 18px;
}

.auth-login-logo {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d9e3ed;
    box-shadow: 0 7px 16px rgba(19, 68, 112, .12);
}

.auth-login-logo img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.auth-landing-v3 .auth-login-heading {
    margin: 0;
    text-align: left;
}

.auth-access-label {
    display: block;
    margin-bottom: 4px;
    color: #1b7a46;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
}

.auth-landing-v3 .auth-login-heading h2 {
    font-size: 24px;
    color: #132b4a;
}

.auth-landing-v3 .auth-login-heading p {
    margin-top: 4px;
    color: #718097;
    font-size: 12px;
    line-height: 1.35;
}

.auth-landing-v3 .auth-login-form {
    margin-top: 0;
}

.auth-landing-v3 .auth-login-card .form-row {
    margin-bottom: 12px;
}

.auth-landing-v3 .auth-login-card label {
    color: #183255;
    font-size: 12px;
    font-weight: 800;
}

.auth-landing-v3 .auth-login-card input {
    min-height: 43px;
    margin-top: 5px;
    border: 1.5px solid #cfdae7;
    border-radius: 11px;
    background: #fbfdff;
}

.auth-landing-v3 .auth-login-card input:focus {
    border-color: #2870b8;
    box-shadow: 0 0 0 3px rgba(40,112,184,.12);
}

.auth-landing-v3 .auth-password-toggle {
    min-height: 31px;
    border-radius: 8px;
}

.auth-landing-v3 .auth-submit-btn {
    min-height: 44px;
    margin-top: 3px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 800;
}

.auth-login-notice {
    margin: -2px 0 13px;
    padding: 10px 12px;
    border-radius: 11px;
    font-size: 12px;
}

.auth-landing-v3 .auth-login-note {
    margin-top: 14px;
    padding: 9px 11px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 7px;
    border-radius: 10px;
    background: #f3f8fc;
    color: #64748b;
    font-size: 10.5px;
    line-height: 1.4;
}

.auth-note-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    margin-top: 4px;
    border-radius: 50%;
    background: #22b573;
    box-shadow: 0 0 0 3px rgba(34,181,115,.11);
}

.auth-landing-footer {
    color: rgba(255,255,255,.82);
    font-size: 10.5px;
    text-align: center;
    text-shadow: 0 2px 8px rgba(3,20,43,.35);
}

@media (max-width: 900px) {
    .auth-landing-v3 {
        padding: 14px;
    }

    .auth-government-bar {
        display: none;
    }

    .auth-landing-frame {
        min-height: calc(100dvh - 28px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 0;
    }

    .auth-landing-grid {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 14px;
        padding: 0;
    }

    .auth-showcase {
        width: min(100%, 520px);
        margin: 0 auto;
        text-align: center;
    }

    .auth-mobile-logos {
        display: flex;
        justify-content: center;
        gap: 9px;
        margin-bottom: 9px;
    }

    .auth-mobile-logos img {
        width: 46px;
        height: 46px;
        object-fit: contain;
        border-radius: 50%;
        background: rgba(255,255,255,.92);
        border: 2px solid rgba(255,255,255,.70);
        box-shadow: 0 7px 16px rgba(4, 24, 49, .22);
    }

    .auth-showcase-badge,
    .auth-showcase-description,
    .auth-showcase-tags,
    .auth-feature-grid {
        display: none;
    }

    .auth-showcase h1 {
        max-width: 460px;
        margin: 0 auto;
        padding: 0 6px;
        font-size: clamp(23px, 6.3vw, 30px);
        line-height: 1.12;
    }

    .auth-desktop-break {
        display: none;
    }

    .auth-showcase-location {
        margin-top: 7px;
        font-size: 13px;
    }

    .auth-landing-v3 .auth-login-card-wrap {
        width: min(94%, 350px);
        margin: 0 auto;
    }

    .auth-landing-v3 .auth-login-card {
        max-width: 350px;
        margin: 0;
        padding: 17px 16px 14px;
        border-radius: 20px;
        background: rgba(255,255,255,.91);
    }

    .auth-login-brand {
        display: block;
        margin-bottom: 11px;
        text-align: center;
    }

    .auth-login-logo,
    .auth-access-label,
    .auth-landing-v3 .auth-login-heading p {
        display: none;
    }

    .auth-landing-v3 .auth-login-heading {
        text-align: center;
    }

    .auth-landing-v3 .auth-login-heading h2 {
        font-size: 20px;
    }

    .auth-landing-v3 .auth-login-card .form-row {
        margin-bottom: 9px;
    }

    .auth-landing-v3 .auth-login-card input {
        min-height: 41px;
        margin-top: 4px;
    }

    .auth-landing-v3 .auth-submit-btn {
        min-height: 41px;
    }

    .auth-login-notice {
        margin: 0 0 10px;
        padding: 8px 10px;
    }

    .auth-landing-v3 .auth-login-note {
        margin-top: 10px;
        padding: 8px 10px;
        font-size: 10px;
    }

    .auth-landing-footer {
        display: none;
    }

    .auth-landing-v3 .auth-hero-bg {
        background-image:
            linear-gradient(180deg, rgba(18, 70, 119, .50), rgba(9, 39, 73, .48)),
            var(--auth-bg-image);
        background-position: center;
    }
}

@media (max-width: 430px) {
    body:has(.auth-landing-v3) .main-content.centered {
        padding: 0;
    }

    .auth-landing-v3 {
        padding: 10px 12px;
    }

    .auth-landing-frame {
        min-height: calc(100dvh - 20px);
    }

    .auth-landing-grid {
        gap: 11px;
    }

    .auth-mobile-logos {
        margin-bottom: 7px;
    }

    .auth-mobile-logos img {
        width: 42px;
        height: 42px;
    }

    .auth-showcase h1 {
        font-size: 22px;
        line-height: 1.12;
    }

    .auth-showcase-location {
        margin-top: 5px;
        font-size: 12px;
    }

    .auth-landing-v3 .auth-login-card {
        padding: 15px 14px 13px;
        border-radius: 18px;
    }

    .auth-login-brand {
        margin-bottom: 9px;
    }

    .auth-landing-v3 .auth-login-heading h2 {
        font-size: 19px;
    }

    .auth-landing-v3 .auth-login-card label {
        font-size: 11px;
    }

    .auth-landing-v3 .auth-login-card input {
        min-height: 39px;
        font-size: 13px;
    }

    .auth-landing-v3 .auth-password-toggle {
        min-height: 29px;
        font-size: 11px;
    }

    .auth-landing-v3 .auth-submit-btn {
        min-height: 39px;
        font-size: 12px;
    }

    .auth-landing-v3 .auth-login-note {
        font-size: 9.5px;
        line-height: 1.35;
    }
}

@media (max-height: 700px) and (max-width: 900px) {
    .auth-landing-v3 {
        align-items: flex-start;
    }

    .auth-landing-frame {
        justify-content: flex-start;
    }

    .auth-mobile-logos img {
        width: 38px;
        height: 38px;
    }

    .auth-showcase h1 {
        font-size: 20px;
    }

    .auth-showcase-location {
        font-size: 11px;
    }

    .auth-landing-v3 .auth-login-card {
        padding-top: 13px;
        padding-bottom: 11px;
    }
}

/* =========================================================
   Header account dropdown
   Profile and logout now live in the top-right account menu.
   ========================================================= */
.header-account {
    position: relative;
    flex: 0 0 auto;
}

.header-account .header-user-pill {
    border: 0;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

.header-account .header-user-pill:focus-visible {
    outline: 3px solid rgba(200, 150, 30, .35);
    outline-offset: 3px;
}

.header-account.is-open .header-user-pill {
    filter: brightness(1.05);
    box-shadow: 0 8px 20px rgba(8, 42, 73, .30);
}

.header-account.is-open .header-user-caret {
    transform: rotate(180deg);
}

.header-user-caret {
    transition: transform .16s ease;
}


/* Native fail-safe: keep the account panel out of layout until JavaScript
   explicitly opens it. This also protects against stale cached CSS. */
.header-account-menu[hidden] {
    display: none !important;
}

.header-account-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1400;
    width: min(285px, calc(100vw - 24px));
    padding: 10px;
    border: 1px solid #dbe4ee;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(8, 42, 73, .22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-7px) scale(.985);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.header-account-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 24px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid #dbe4ee;
    border-top: 1px solid #dbe4ee;
    transform: rotate(45deg);
}

.header-account.is-open .header-account-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.account-menu-profile {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 13px;
    background: #f3f7fd;
}

.account-menu-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 2px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #dbe4ee;
    box-shadow: 0 0 0 2px rgba(200, 150, 30, .16);
}

.account-menu-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.account-menu-copy {
    min-width: 0;
    display: block;
    line-height: 1.25;
}

.account-menu-copy strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--chrome-blue-deep);
    font-size: 13px;
    font-weight: 800;
}

.account-menu-copy small {
    display: block;
    margin-top: 3px;
    color: #6f7f91;
    font-size: 10px;
    font-weight: 700;
}

.account-menu-link {
    width: 100%;
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #17324f;
    text-decoration: none;
    text-align: left;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: background-color .14s ease, color .14s ease;
}

.account-menu-link:hover,
.account-menu-link:focus-visible {
    background: #eef4fb;
    outline: none;
}

.account-menu-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: grid;
    place-items: center;
    color: #1c64c8;
}

.account-menu-icon svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.account-menu-divider {
    height: 1px;
    margin: 5px 2px;
    background: #e3e9f0;
}

.account-menu-logout-form {
    margin: 0;
}

.account-menu-logout {
    color: #d93445;
}

.account-menu-logout .account-menu-icon {
    color: #ef4b5b;
}

.account-menu-logout:hover,
.account-menu-logout:focus-visible {
    background: #fff1f2;
    color: #c62435;
}

@media (max-width: 620px) {
    .header-account-menu {
        position: fixed;
        top: calc(var(--app-header-height) - 2px);
        right: 10px;
        width: min(270px, calc(100vw - 20px));
        border-radius: 16px;
    }
    .header-account-menu::before {
        right: 27px;
    }
}

@media print {
    .header-account-menu { display: none !important; }
}

/* =========================================================
   Landing page v4 — final mobile LGU / Capstone presentation
   Keeps the desktop layout while giving mobile a complete
   government header, branded TargetTrack title and compact login.
   ========================================================= */
.auth-system-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: .14em;
    row-gap: .06em;
}

.auth-system-name {
    position: relative;
    display: inline-block;
    color: #ffffff;
    font-family: "Trebuchet MS", "Arial Rounded MT Bold", "Segoe UI", sans-serif;
    font-weight: 900;
    letter-spacing: -.045em;
}

.auth-system-name::after {
    content: '';
    position: absolute;
    left: .03em;
    right: .02em;
    bottom: -.20em;
    height: .06em;
    min-height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #2ab36f 0 34%, #f5cf37 34% 67%, #5da8ec 67% 100%);
    box-shadow: 0 2px 10px rgba(245, 207, 55, .24);
}

.auth-system-colon {
    color: #f5cf37;
    font-family: "Trebuchet MS", "Arial Rounded MT Bold", "Segoe UI", sans-serif;
    font-weight: 900;
}

.auth-system-full {
    color: #fff;
    font-family: "Segoe UI", Arial, sans-serif;
    font-weight: 800;
}

@media (min-width: 901px) {
    .auth-system-title {
        max-width: 790px;
        line-height: .98;
    }
    .auth-system-name,
    .auth-system-colon {
        font-size: .94em;
    }
    .auth-system-full {
        flex-basis: 100%;
        margin-top: .12em;
    }
}

@media (max-width: 900px) {
    body:has(.auth-landing-v3) .main-content.centered {
        min-height: 100dvh;
        overflow-y: auto;
    }

    .auth-landing-v3 {
        min-height: 100dvh;
        padding: 12px;
        align-items: flex-start;
    }

    .auth-landing-frame {
        width: min(100%, 560px);
        min-height: calc(100dvh - 24px);
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 12px;
    }

    /* Re-introduce the official LGU header on mobile. */
    .auth-government-bar {
        width: 100%;
        min-height: 66px;
        padding: 8px 10px;
        display: flex;
        border-radius: 12px;
        gap: 8px;
        background: rgba(255,255,255,.96);
        box-shadow: 0 10px 24px rgba(4, 25, 52, .20);
    }

    .auth-gov-left {
        min-width: 0;
        flex: 1 1 auto;
        gap: 12px;
    }

    .auth-gov-right {
        flex: 0 0 auto;
        gap: 7px;
    }

    .auth-gov-logo {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        box-shadow: 0 3px 9px rgba(22, 74, 125, .11);
    }

    .auth-gov-logo img {
        width: 38px;
        height: 38px;
    }

    .auth-gov-logo-mswdo {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
        border-radius: 5px;
    }

    .auth-gov-copy {
        min-width: 0;
    }

    .auth-gov-copy span {
        font-size: 8px;
        line-height: 1.1;
    }

    .auth-gov-copy strong {
        margin: 2px 0;
        font-size: 11px;
        line-height: 1.08;
        letter-spacing: .035em;
        white-space: normal;
    }

    .auth-gov-copy small {
        font-size: 8px;
        line-height: 1.1;
    }

    .auth-gov-office {
        max-width: 108px;
        font-size: 8.5px;
        line-height: 1.18;
    }

    .auth-landing-grid {
        width: 100%;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 30px;
        padding: 0 0 8px;
    }

    .auth-showcase {
        width: min(100%, 510px);
        margin: 0 auto;
        padding: 4px 6px 0;
        text-align: center;
    }

    /* The header already carries both official seals on mobile. */
    .auth-mobile-logos {
        display: none;
    }

    .auth-showcase-badge,
    .auth-showcase-description,
    .auth-showcase-tags,
    .auth-feature-grid {
        display: none;
    }

    .auth-showcase h1.auth-system-title {
        max-width: 500px;
        margin: 0 auto;
        padding: 0;
        display: block;
        font-size: 25px;
        line-height: 1.08;
        letter-spacing: -.025em;
        text-align: center;
    }

    .auth-system-name,
    .auth-system-colon {
        font-size: 1.20em;
    }

    .auth-system-name {
        margin-right: .09em;
        text-shadow: 0 5px 18px rgba(3, 20, 43, .38);
    }

    .auth-system-name::after {
        left: .08em;
        right: .08em;
        bottom: -.20em;
        height: 2px;
    }

    .auth-system-full {
        display: block;
        max-width: 470px;
        margin: 8px auto 0;
        font-size: .98em;
        line-height: 1.16;
        letter-spacing: .028em;
        text-wrap: balance;
    }

    .auth-showcase-location {
        margin-top: 7px;
        color: rgba(255,255,255,.92);
        font-size: 11px;
        font-weight: 900;
        letter-spacing: .01em;
    }

    .auth-landing-v3 .auth-login-card-wrap {
        width: min(92%, 390px);
        margin: 0 auto;
    }

    .auth-landing-v3 .auth-login-card {
        max-width: 390px;
        margin: 0;
        padding: 16px 16px 14px;
        border-radius: 20px;
        background: rgba(255,255,255,.94);
        box-shadow: 0 18px 42px rgba(3, 24, 51, .27);
    }

    .auth-login-brand {
        display: block;
        margin-bottom: 10px;
        text-align: center;
    }

    .auth-login-logo,
    .auth-access-label,
    .auth-landing-v3 .auth-login-heading p {
        display: none;
    }

    .auth-landing-v3 .auth-login-heading {
        text-align: center;
    }

    .auth-landing-v3 .auth-login-heading h2 {
        font-size: 21px;
        letter-spacing: -.02em;
    }

    .auth-landing-footer {
        display: block;
        margin-top: auto;
        padding: 0 8px 3px;
        color: rgba(255,255,255,.78);
        font-size: 8.5px;
        line-height: 1.35;
    }

    .auth-landing-v3 .auth-hero-bg {
        background-image:
            linear-gradient(180deg, rgba(17, 68, 116, .53), rgba(7, 35, 67, .50)),
            var(--auth-bg-image);
        background-position: center 38%;
    }
}

@media (max-width: 430px) {
    .auth-landing-v3 {
        padding: 9px 10px;
    }

    .auth-landing-frame {
        min-height: calc(100dvh - 18px);
        gap: 10px;
    }

    .auth-government-bar {
        min-height: 61px;
        padding: 7px 8px;
        border-radius: 14px;
    }

    .auth-gov-logo,
    .auth-gov-logo-mswdo {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
    }

    .auth-gov-logo img {
        width: 35px;
        height: 35px;
    }

    .auth-gov-copy span,
    .auth-gov-copy small {
        font-size: 7.5px;
    }

    .auth-gov-copy strong {
        font-size: 10px;
    }

    .auth-gov-office {
        max-width: 91px;
        font-size: 7.7px;
    }

    .auth-showcase {
        padding-top: 2px;
    }

    .auth-showcase h1.auth-system-title {
        font-size: 23px;
    }

    .auth-system-full {
        margin-top: 7px;
        font-size: .76em;
    }

    .auth-showcase-location {
        margin-top: 6px;
        font-size: 10.5px;
    }

    .auth-landing-v3 .auth-login-card {
        padding: 14px 13px 12px;
        border-radius: 18px;
    }

    .auth-landing-v3 .auth-login-heading h2 {
        font-size: 20px;
    }

    .auth-landing-v3 .auth-login-card .form-row {
        margin-bottom: 9px;
    }

    .auth-landing-v3 .auth-login-note {
        margin-top: 9px;
    }
}

@media (max-width: 365px) {
    .auth-gov-office {
        display: none;
    }

    .auth-gov-copy strong {
        font-size: 9.5px;
    }

    .auth-showcase h1.auth-system-title {
        font-size: 21px;
    }
}

@media (max-height: 700px) and (max-width: 900px) {
    .auth-landing-v3 {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .auth-landing-frame {
        min-height: auto;
        gap: 8px;
    }

    .auth-government-bar {
        min-height: 56px;
    }

    .auth-gov-logo,
    .auth-gov-logo-mswdo {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .auth-gov-logo img {
        width: 31px;
        height: 31px;
    }

    .auth-showcase h1.auth-system-title {
        font-size: 20px;
    }

    .auth-system-full {
        margin-top: 5px;
    }

    .auth-showcase-location {
        margin-top: 4px;
    }

    .auth-landing-v3 .auth-login-card {
        padding-top: 12px;
        padding-bottom: 11px;
    }

    .auth-landing-footer {
        display: none;
    }
}


/* =========================================================
   FINAL MOBILE LANDING POLISH
   - Keep the official header cleaner by removing only the
     MSWDO seal from the banner on phones/tablets.
   - Show the MSWDO seal inside the login card instead.
   ========================================================= */
@media (max-width: 900px) {
    .auth-government-bar .auth-gov-logo-mswdo {
        display: none !important;
    }

    .auth-gov-right {
        flex: 0 1 auto;
    }

    .auth-login-brand {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-bottom: 11px;
        text-align: left;
    }

    .auth-login-logo {
        width: 48px;
        height: 48px;
        flex: 0 0 48px;
        display: grid !important;
        place-items: center;
        border-radius: 50%;
    }

    .auth-login-logo img {
        width: 43px;
        height: 43px;
        display: block;
        object-fit: contain;
    }

    .auth-landing-v3 .auth-login-heading {
        text-align: left;
    }

    .auth-landing-v3 .auth-login-heading h2 {
        margin: 0;
        line-height: 1.05;
    }
}

@media (max-width: 430px) {
    .auth-gov-office {
        max-width: 112px;
        font-size: 7.8px;
    }

    .auth-login-brand {
        gap: 9px;
        margin-bottom: 10px;
    }

    .auth-login-logo {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .auth-login-logo img {
        width: 39px;
        height: 39px;
    }

    .auth-landing-v3 .auth-login-heading h2 {
        font-size: 20px;
    }
}

@media (max-height: 700px) and (max-width: 900px) {
    .auth-login-logo {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .auth-login-logo img {
        width: 36px;
        height: 36px;
    }
}

/* =========================================================
   Landing page v5 — polished sign-in experience
   - Icon-led username/password fields
   - Accessible eye toggle
   - Distinct mobile login card while preserving desktop layout
   ========================================================= */
.auth-landing-v3 .auth-login-card {
    isolation: isolate;
}

.auth-landing-v3 .auth-login-card::after {
    content: '';
    position: absolute;
    z-index: 0;
    width: 170px;
    height: 170px;
    right: -92px;
    bottom: -105px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(31,101,173,.10), rgba(31,101,173,0) 70%);
    pointer-events: none;
}

.auth-landing-v3 .auth-login-card > * {
    position: relative;
    z-index: 1;
}

.auth-form-row {
    min-width: 0;
}

.auth-field-shell {
    position: relative;
    margin-top: 5px;
}

.auth-field-icon {
    position: absolute;
    z-index: 2;
    left: 13px;
    top: 50%;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    color: #6f8197;
    pointer-events: none;
    transition: color .16s ease;
}

.auth-field-icon svg {
    width: 19px;
    height: 19px;
}

.auth-field-shell:focus-within .auth-field-icon {
    color: #1f65ad;
}

.auth-landing-v3 .auth-login-card .auth-field-shell input {
    width: 100%;
    margin-top: 0;
    padding-left: 43px;
}

.auth-landing-v3 .auth-password-wrap input {
    padding-right: 52px;
}

.auth-landing-v3 .auth-password-toggle {
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    right: 6px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #54708d;
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.auth-landing-v3 .auth-password-toggle:hover,
.auth-landing-v3 .auth-password-toggle:focus-visible {
    background: #edf4fb;
    color: #175c9f;
    outline: none;
}

.auth-landing-v3 .auth-password-toggle:active {
    transform: translateY(-50%) scale(.95);
}

.auth-eye-icon {
    width: 20px;
    height: 20px;
}

.auth-eye-closed {
    display: none;
}

.auth-password-toggle[aria-pressed="true"] .auth-eye-open {
    display: none;
}

.auth-password-toggle[aria-pressed="true"] .auth-eye-closed {
    display: block;
}

.auth-landing-v3 .auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 10px 20px rgba(28, 100, 200, .16);
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.auth-landing-v3 .auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 13px 24px rgba(28, 100, 200, .21);
}

.auth-landing-v3 .auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-icon {
    width: 18px;
    height: 18px;
    transition: transform .16s ease;
}

.auth-landing-v3 .auth-submit-btn:hover .auth-submit-icon {
    transform: translateX(2px);
}

.auth-landing-v3 .auth-login-note {
    align-items: center;
    justify-content: flex-start;
    text-align: left;
}

.auth-note-shield {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #e8f8f0;
    color: #1e9a62;
}

.auth-note-shield svg {
    width: 17px;
    height: 17px;
}

.auth-note-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.auth-note-copy strong {
    color: #31465e;
    font-size: 10.5px;
    line-height: 1.25;
}

.auth-note-copy small {
    color: #718096;
    font-size: 9.5px;
    line-height: 1.35;
}

@media (min-width: 901px) {
    .auth-landing-v3 .auth-login-card {
        max-width: 420px;
        padding: 26px 26px 20px;
    }

    .auth-landing-v3 .auth-login-card .auth-field-shell input {
        min-height: 46px;
    }

    .auth-landing-v3 .auth-submit-btn {
        min-height: 47px;
    }
}

@media (max-width: 900px) {
    .auth-landing-v3 .auth-hero-bg {
        background-image:
            linear-gradient(180deg, rgba(12, 62, 108, .47) 0%, rgba(6, 38, 72, .55) 55%, rgba(5, 31, 60, .64) 100%),
            var(--auth-bg-image);
        background-position: center 34%;
    }

    .auth-landing-grid {
        gap: 18px;
    }

    .auth-showcase {
        padding-top: 3px;
    }

    .auth-landing-v3 .auth-login-card-wrap {
        width: min(94%, 405px);
    }

    .auth-landing-v3 .auth-login-card {
        max-width: 405px;
        padding: 18px 18px 15px;
        border-radius: 24px;
        border: 1px solid rgba(255,255,255,.95);
        background:
            linear-gradient(180deg, rgba(255,255,255,.985), rgba(248,251,255,.965));
        box-shadow: 0 22px 48px rgba(2, 23, 48, .32);
        backdrop-filter: blur(13px);
        -webkit-backdrop-filter: blur(13px);
    }

    .auth-landing-v3 .auth-login-card::before {
        height: 5px;
        border-radius: 24px 24px 0 0;
    }

    .auth-login-brand {
        gap: 11px;
        margin-bottom: 14px;
    }

    .auth-login-logo {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
        box-shadow: 0 6px 15px rgba(19, 68, 112, .14);
    }

    .auth-login-logo img {
        width: 45px;
        height: 45px;
    }

    .auth-landing-v3 .auth-login-heading h2 {
        font-size: 22px;
        color: #102e52;
    }

    .auth-landing-v3 .auth-login-card label {
        display: inline-block;
        margin-left: 2px;
        font-size: 11.5px;
        letter-spacing: .01em;
    }

    .auth-landing-v3 .auth-login-card .form-row {
        margin-bottom: 11px;
    }

    .auth-field-shell {
        margin-top: 6px;
    }

    .auth-landing-v3 .auth-login-card .auth-field-shell input {
        min-height: 49px;
        padding-left: 45px;
        border-radius: 14px;
        border-color: #cbd8e6;
        background: rgba(255,255,255,.92);
        font-size: 16px;
        box-shadow: inset 0 1px 2px rgba(9, 46, 83, .025);
    }

    .auth-field-icon {
        left: 14px;
        width: 21px;
        height: 21px;
    }

    .auth-field-icon svg {
        width: 20px;
        height: 20px;
    }

    .auth-landing-v3 .auth-password-wrap input {
        padding-right: 55px;
    }

    .auth-landing-v3 .auth-password-toggle {
        width: 39px;
        height: 39px;
        min-height: 39px;
        right: 6px;
        border-radius: 11px;
        background: #f2f7fc;
        color: #355f89;
    }

    .auth-eye-icon {
        width: 21px;
        height: 21px;
    }

    .auth-landing-v3 .auth-submit-btn {
        min-height: 48px;
        margin-top: 5px;
        border-radius: 14px;
        font-size: 13px;
        letter-spacing: .005em;
        box-shadow: 0 11px 22px rgba(28,100,200,.21);
    }

    .auth-submit-icon {
        width: 17px;
        height: 17px;
    }

    .auth-landing-v3 .auth-login-note {
        margin-top: 12px;
        padding: 9px 10px;
        gap: 9px;
        border: 1px solid #e5edf5;
        border-radius: 12px;
        background: rgba(244, 249, 253, .96);
    }

    .auth-note-shield {
        width: 29px;
        height: 29px;
        flex-basis: 29px;
    }

    .auth-note-copy strong {
        font-size: 10px;
    }

    .auth-note-copy small {
        font-size: 9px;
    }
}

@media (max-width: 430px) {
    .auth-landing-v3 {
        padding: 9px 10px 10px;
    }

    .auth-landing-frame {
        gap: 9px;
    }

    .auth-landing-grid {
        gap: 15px;
        padding-bottom: 4px;
    }

    .auth-showcase h1.auth-system-title {
        font-size: 22px;
    }

    .auth-system-full {
        margin-top: 6px;
        font-size: .76em;
    }

    .auth-showcase-location {
        margin-top: 5px;
        font-size: 10px;
    }

    .auth-landing-v3 .auth-login-card-wrap {
        width: min(95%, 390px);
    }

    .auth-landing-v3 .auth-login-card {
        padding: 16px 14px 13px;
        border-radius: 22px;
    }

    .auth-login-brand {
        gap: 9px;
        margin-bottom: 12px;
    }

    .auth-login-logo {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .auth-login-logo img {
        width: 41px;
        height: 41px;
    }

    .auth-landing-v3 .auth-login-heading h2 {
        font-size: 20.5px;
    }

    .auth-landing-v3 .auth-login-card .auth-field-shell input {
        min-height: 47px;
        border-radius: 13px;
    }

    .auth-landing-v3 .auth-password-toggle {
        width: 37px;
        height: 37px;
        min-height: 37px;
    }

    .auth-landing-v3 .auth-submit-btn {
        min-height: 46px;
        border-radius: 13px;
    }

    .auth-landing-footer {
        font-size: 8px;
    }
}

@media (max-width: 365px) {
    .auth-government-bar {
        padding-left: 7px;
        padding-right: 7px;
    }

    .auth-gov-left {
        gap: 8px;
    }

    .auth-showcase h1.auth-system-title {
        font-size: 20px;
    }

    .auth-landing-v3 .auth-login-card-wrap {
        width: 97%;
    }

    .auth-landing-v3 .auth-login-card {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-height: 740px) and (max-width: 900px) {
    .auth-landing-grid {
        gap: 11px;
    }

    .auth-showcase h1.auth-system-title {
        font-size: 20px;
    }

    .auth-system-full {
        margin-top: 4px;
    }

    .auth-showcase-location {
        margin-top: 3px;
        font-size: 9.5px;
    }

    .auth-landing-v3 .auth-login-card {
        padding-top: 13px;
        padding-bottom: 11px;
    }

    .auth-login-brand {
        margin-bottom: 9px;
    }

    .auth-login-logo {
        width: 41px;
        height: 41px;
        flex-basis: 41px;
    }

    .auth-login-logo img {
        width: 37px;
        height: 37px;
    }

    .auth-landing-v3 .auth-login-heading h2 {
        font-size: 19px;
    }

    .auth-landing-v3 .auth-login-card .form-row {
        margin-bottom: 8px;
    }

    .auth-landing-v3 .auth-login-card .auth-field-shell input {
        min-height: 44px;
    }

    .auth-landing-v3 .auth-submit-btn {
        min-height: 43px;
    }

    .auth-landing-v3 .auth-login-note {
        margin-top: 8px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .auth-landing-footer {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-landing-v3 .auth-submit-btn,
    .auth-submit-icon,
    .auth-landing-v3 .auth-password-toggle,
    .auth-field-icon {
        transition: none !important;
    }
}


/* ==============================================================
   ADMIN ACTIVITY LOGS - scoped styles (no changes to other pages)
   ============================================================== */
.audit-logs-page { width: 100%; min-width: 0; }
.audit-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.audit-summary-card { display: flex; align-items: center; gap: 13px; min-width: 0; padding: 16px 17px; border: 1px solid #d9e2ee; border-radius: 15px; background: #fff; box-shadow: 0 3px 12px rgba(22, 47, 76, .04); }
.audit-summary-icon { width: 42px; height: 42px; border-radius: 12px; flex: 0 0 42px; display: grid; place-items: center; font-size: 20px; font-weight: 800; color: #245eb6; background: #eaf2ff; }
.audit-summary-green .audit-summary-icon { background: #e6f7ef; color: #11824a; }
.audit-summary-purple .audit-summary-icon { background: #f3eaff; color: #8d4fc0; }
.audit-summary-orange .audit-summary-icon { background: #fff1de; color: #a76017; }
.audit-summary-card > span:last-child { min-width: 0; }
.audit-summary-card strong { display: block; font-size: 24px; line-height: 1.15; color: #142b4a; font-weight: 800; }
.audit-summary-card small { display: block; font-size: 11px; color: #69809b; margin-top: 4px; }
.audit-card { padding: 22px; }
.audit-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.audit-card-heading h1 { margin: 4px 0 6px; color: #1d3350; font-size: 23px; }
.audit-card-heading p { font-size: 13px; color: #73839b; margin: 0; }
.audit-readonly-pill { white-space: nowrap; color: #37629a; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 7px 11px; background: #eaf2fc; }
.audit-filters { display: grid; grid-template-columns: minmax(180px, 1.8fr) minmax(145px, 1fr) minmax(155px, 1fr) auto; gap: 11px; align-items: end; background: #f7f9fc; border: 1px solid #e1e8f2; border-radius: 14px; padding: 14px; margin-bottom: 21px; }
.audit-filter-field { min-width: 0; }
.audit-filter-field label { color: #435a76; font-size: 11px; margin-bottom: 6px; }
.audit-filter-field input, .audit-filter-field select { min-height: 41px; padding: 9px 10px; font-size: 12px; border-radius: 10px; }
.audit-filter-buttons { display: flex; gap: 7px; align-items: end; }
.audit-filter-buttons .btn { min-height: 41px; }
.audit-results-heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; margin-bottom: 12px; }
.audit-results-heading h2 { font-size: 16px; margin: 0 0 5px; color: #1b304c; }
.audit-results-heading p { margin: 0; color: #73839b; font-size: 12px; }
.audit-tz-note { flex: 0 0 auto; font-size: 11px; color: #72839a; }
.audit-table-scroller { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e1e7f0; border-radius: 13px; }
.audit-log-table { width: 100%; min-width: 690px; border-collapse: collapse; table-layout: fixed; margin: 0; }
.audit-log-table th { background: #f4f7fb; color: #415572; font-size: 11px; font-weight: 800; text-align: left; padding: 14px 13px; border-bottom: 1px solid #dfe7f1; }
.audit-log-table td { padding: 14px 13px; border-bottom: 1px solid #e9eef4; vertical-align: top; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.audit-log-table tbody tr:last-child td { border-bottom: 0; }
.audit-log-table tbody tr:hover { background: #f9fbfe; }
.audit-log-table th:nth-child(1) { width: 155px; }
.audit-log-table th:nth-child(2) { width: 210px; }
.audit-log-table th:nth-child(3) { width: 190px; }
.audit-time-cell time, .audit-actor-cell { color: #253b58; }
.audit-time-cell strong, .audit-actor-cell strong { display: block; font-size: 12px; }
.audit-time-cell small, .audit-actor-cell small { display: block; font-size: 11px; color: #71819a; margin-top: 2px; }
.audit-detail-cell { color: #52617a; }
.audit-action-badge { display: inline-block; border-radius: 999px; padding: 5px 10px; max-width: 100%; font-weight: 700; font-size: 11px; line-height: 1.3; color: #52637c; background: #edf1f6; }
.audit-action--access { color: #1c7545; background: #e2f6e9; }
.audit-action--target { color: #215fad; background: #e9f2ff; }
.audit-action--accomplishment { color: #7a4bb0; background: #f3eaff; }
.audit-action--account { color: #955314; background: #fff0d9; }
.audit-empty-row td { padding: 30px 12px; text-align: center; color: #71819a; }
.audit-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 13px; margin-top: 16px; }
.audit-pagination span { color: #60738e; font-size: 12px; font-weight: 700; }
.audit-pagination-disabled { opacity: .4; pointer-events: none; }
@media (max-width: 1190px) {
    .audit-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .audit-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .audit-filter-buttons { align-self: end; }
}
@media (max-width: 700px) {
    .audit-summary { gap: 8px; }
    .audit-summary-card { padding: 12px; gap: 9px; }
    .audit-summary-icon { width: 36px; height: 36px; flex-basis: 36px; }
    .audit-summary-card strong { font-size: 19px; }
    .audit-summary-card small { font-size: 10px; }
    .audit-card { padding: 14px; }
    .audit-card-heading { display: block; }
    .audit-card-heading h1 { font-size: 20px; }
    .audit-readonly-pill { display: inline-block; margin-top: 12px; }
    .audit-filters { display: grid; grid-template-columns: minmax(0, 1fr); padding: 11px; }
    .audit-filter-buttons, .audit-filter-buttons .btn { width: 100%; }
    .audit-results-heading { flex-wrap: wrap; }
    .audit-table-scroller { overflow: visible; border: 0; }
    .audit-log-table { display: block; min-width: 0; }
    .audit-log-table thead { display: none; }
    .audit-log-table tbody { display: grid; gap: 10px; }
    .audit-log-table tbody tr { display: block; border: 1px solid #e1e7f0; border-radius: 11px; padding: 5px 12px; background: #fff; }
    .audit-log-table tbody td { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid #edf1f6; overflow-wrap: anywhere; }
    .audit-log-table tbody td:last-child { border-bottom: 0; }
    .audit-log-table tbody td::before { content: attr(data-label); font-size: 10px; font-weight: 800; color: #71819a; padding-top: 3px; }
    .audit-log-table .audit-empty-row td { display: block; text-align: center; padding: 24px 4px; }
    .audit-log-table .audit-empty-row td::before { display: none; }
    .audit-pagination { justify-content: center; gap: 10px; }
}
@media (max-width: 390px) {
    .audit-summary { grid-template-columns: minmax(0, 1fr); }
    .audit-log-table tbody td { grid-template-columns: 84px minmax(0, 1fr); }
}
