body.app-page {
    --ink: #172b4d;
    --muted: #66758d;
    --line: #e4eaf2;
    --surface: #ffffff;
    --canvas: #f3f6fb;
    --primary: #315ee8;
    --primary-dark: #2349c2;
    --teal: #0b8f87;
    --danger: #c93b50;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 92% 0%, rgba(49, 94, 232, 0.08), transparent 25rem),
        var(--canvas);
    color: var(--ink);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

.app-page *,
.app-page *::before,
.app-page *::after {
    box-sizing: border-box;
}

.app-page a {
    color: var(--primary);
}

.app-page a:hover {
    color: var(--primary-dark);
}

.app-page :focus-visible {
    outline: 3px solid #0b6f68;
    outline-offset: 2px;
}

.app-page .header {
    position: sticky;
    z-index: 5;
    top: 0;
    min-height: 74px;
    padding: 14px max(24px, calc((100vw - 1240px) / 2));
    background: #152746;
    box-shadow: 0 8px 24px rgba(17, 35, 67, 0.12);
    gap: 18px;
}

.app-page .header h2 {
    margin: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 650;
}

.app-page .header > div {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px 18px;
}

.app-page .header a {
    margin: 0 !important;
    color: #dbe7ff !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 150ms ease;
}

.app-page .header a:hover {
    color: #81e1d8 !important;
}

.app-page .container {
    width: min(1240px, calc(100% - 40px));
    margin: 30px auto 56px;
    padding: 0;
}

.app-page .card,
.app-page .login-card,
.app-page main.card {
    overflow-x: auto;
    padding: clamp(20px, 3vw, 30px);
    border: 1px solid rgba(222, 230, 241, 0.9);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 12px 36px rgba(31, 51, 87, 0.07);
}

.app-page .card h2,
.app-page .card h3,
.app-page .login-card h2,
.app-page main.card h2 {
    margin-top: 0;
    color: var(--ink);
    letter-spacing: -0.025em;
}

.app-page .card h3 {
    margin-bottom: 16px;
    font-size: 19px;
}

.app-page table {
    min-width: 660px;
    margin-top: 18px;
    border-collapse: separate;
    border-spacing: 0;
}

.app-page th,
.app-page td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    color: #31415c;
    font-size: 13px;
    vertical-align: middle;
}

.app-page th {
    background: #f5f8fc;
    color: #62718a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.app-page thead th:first-child {
    border-radius: 9px 0 0 0;
}

.app-page thead th:last-child {
    border-radius: 0 9px 0 0;
}

.app-page tbody tr:hover td {
    background: #f8faff;
}

.app-page input,
.app-page select,
.app-page textarea {
    min-height: 43px;
    padding: 10px 12px;
    border: 1px solid #d5deeb;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.app-page input:focus,
.app-page select:focus,
.app-page textarea:focus {
    border-color: #7897f0;
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 94, 232, 0.13);
}

.app-page input[readonly] {
    background: #f4f7fb;
    color: #53647e;
}

.app-page .password-input-wrap {
    position: relative;
}

.app-page .password-input-wrap input {
    padding-right: 52px;
}

.app-page .password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    transform: translateY(-50%);
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    box-shadow: none;
    color: #66758d;
    cursor: pointer;
}

.app-page .password-toggle:hover {
    transform: translateY(-50%);
    background: #eef2ff;
    box-shadow: none;
    color: var(--primary);
}

.app-page .password-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

.app-page .password-toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.app-page .password-toggle .eye-slash {
    display: none;
}

.app-page .password-toggle.is-visible .eye-slash {
    display: block;
}

.app-page .form-group {
    margin-bottom: 18px;
}

.app-page .field-hint {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.app-page .form-group label,
.app-page label {
    display: block;
    margin-bottom: 7px;
    color: #43536d;
    font-size: 13px;
    font-weight: 650;
}

.app-page .form-group input,
.app-page .form-group select,
.app-page .form-group textarea {
    width: 100%;
}

.app-page .btn,
.app-page .btn-update,
.app-page button[type="submit"] {
    min-height: 42px;
    padding: 10px 16px;
    border: 0;
    border-radius: 9px;
    background: var(--primary);
    box-shadow: 0 5px 12px rgba(49, 94, 232, 0.18);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.app-page .btn:hover,
.app-page .btn-update:hover,
.app-page button[type="submit"]:hover {
    transform: translateY(-1px);
    background: var(--primary-dark);
    box-shadow: 0 7px 16px rgba(49, 94, 232, 0.25);
}

.app-page .due-indicator {
    display: inline-block;
    margin: 4px 0 0 6px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.app-page .due-indicator.overdue {
    background: #fde8e9;
    color: #a52e3c;
}

.app-page .due-indicator.upcoming {
    background: #fff3d5;
    color: #805b00;
}

.app-page .proof-rejection {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-left: 3px solid var(--danger);
    border-radius: 6px;
    background: #fff4f4;
    color: #772c37;
}

.app-page .proof-rejection p {
    margin: 4px 0 0;
}

.app-page .calendar-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.app-page .calendar-controls h2 {
    margin: 0;
}

.app-page .calendar-table-wrap {
    overflow-x: auto;
}

.app-page table.calendar-grid {
    width: 100%;
    min-width: 850px;
    table-layout: fixed;
    border-collapse: collapse;
    border: 1px solid var(--line);
}

.app-page .calendar-weekday {
    padding: 10px 6px;
    background: #f5f8fc;
    color: #43536d;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    text-transform: none;
}

.app-page .calendar-day {
    height: 125px;
    padding: 8px;
    border: 1px solid var(--line);
    vertical-align: top;
}

.app-page .calendar-day.is-empty {
    background: #f8f9fc;
}

.app-page .calendar-day-number {
    display: block;
    margin-bottom: 5px;
    color: #43536d;
    font-size: 12px;
    font-weight: 700;
}

.app-page .calendar-chore {
    display: grid;
    gap: 2px;
    margin: 5px 0;
    padding: 6px;
    border-left: 3px solid var(--primary);
    border-radius: 5px;
    background: #f0f4ff;
    font-size: 11px;
    line-height: 1.3;
}

.app-page .calendar-chore span,
.app-page .calendar-chore small {
    color: var(--muted);
    font-size: 10px;
}

.app-page .calendar-chore:focus-visible {
    outline-offset: 1px;
}

.app-page .tools-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
    margin: 16px 0;
}

.app-page .tools-filter label {
    font-size: 12px;
    font-weight: 650;
}

.app-page .request-filter-card {
    display: flex;
    align-items: end;
    gap: 12px;
    margin: 16px 0 8px;
    padding: 16px;
    border: 1px solid #e2e9f3;
    border-radius: 12px;
    background: #f6f8fc;
}

.app-page .request-filter-field {
    display: grid;
    gap: 6px;
}

.app-page .request-filter-search {
    flex: 1 1 320px;
}

.app-page .request-filter-status {
    flex: 0 1 190px;
}

.app-page .request-filter-card label {
    color: #43536d;
    font-size: 12px;
    font-weight: 700;
}

.app-page .request-filter-card input,
.app-page .request-filter-card select {
    width: 100%;
}

.app-page .request-filter-card > .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.app-page .request-filter-count {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 12px;
}

.app-page .nav-unread-badge {
    display: inline-flex;
    width: auto !important;
    min-width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 999px;
    background: #d63e52;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 700;
    line-height: 1;
}

.app-page .unread-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e7efff;
    color: #2349a5;
    font-size: 11px;
    font-weight: 700;
    vertical-align: middle;
}

.app-page .request-timeline {
    min-width: 190px;
    margin-top: 8px;
}

.app-page .request-timeline summary {
    color: var(--primary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
}

.app-page .request-timeline p {
    padding: 8px;
    border-left: 2px solid #9db3f6;
    background: #f6f8ff;
    font-size: 11px;
}

.app-page .announcement-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.app-page .announcement-item:last-child {
    border-bottom: 0;
}

.app-page .announcement-item h4,
.app-page .announcement-item p {
    margin: 0 0 5px;
}

.app-page .recognition-card {
    display: grid;
    justify-items: start;
    gap: 7px;
    background: linear-gradient(120deg, #fff, #f2f8ff);
}

.app-page .recognition-card h3,
.app-page .recognition-card p {
    margin: 0;
}

.app-page .recognition-card small {
    color: var(--muted);
}

.app-page .recognition-badge {
    padding: 4px 10px;
    border-radius: 999px;
    background: #e7f6ef;
    color: #176443;
    font-size: 12px;
    font-weight: 700;
}

.app-page .request-details {
    margin-top: 8px;
    color: var(--primary);
}

.app-page .request-details summary {
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
}

.app-page .request-details form {
    display: grid;
    gap: 8px;
    min-width: 200px;
    margin-top: 8px;
}

.app-page .request-details label {
    font-size: 12px;
    color: #fff;
}

.app-page .btn-danger {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: #fff0f1;
    color: var(--danger);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.app-page .btn-danger:hover {
    background: #ffe0e3;
    color: #a9283c;
}

.app-page .btn-secondary {
    margin-left: 8px;
    background: #eaf0fa;
    box-shadow: none;
    color: #344866;
}

.app-page .backup-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 18px;
    border: 1px solid #cbd7e8;
}

.app-page .btn-secondary:hover {
    background: #dce6f5;
    color: var(--ink);
}

.app-page button.btn-danger {
    background: #fff0f1;
    box-shadow: none;
    color: var(--danger);
}

.app-page button.btn-danger:hover {
    background: #ffe0e3;
    color: #a9283c;
}

.app-page .alert-success,
.app-page .alert-error,
.app-page .message {
    padding: 13px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px;
}

.app-page .alert-success,
.app-page .message.success {
    border-color: #bde9d5;
    background: #edfaf3;
    color: #176b49;
}

.app-page .alert-error,
.app-page .message.error,
.app-page .error {
    border-color: #f4c9ce;
    background: #fff1f2;
    color: #a83143;
}

.app-page .proof-image {
    width: 190px;
    max-width: 30vw;
    height: 120px;
    max-height: none;
    border: 1px solid var(--line);
    border-radius: 9px;
    object-fit: cover;
}

.app-page .proof-form {
    display: grid;
    gap: 8px;
}

.app-page .status-select {
    min-height: 36px;
}

.app-page .login-card,
.app-page main.card {
    width: min(100% - 32px, 460px);
    margin: auto;
}

.app-page .login-card {
    overflow: visible;
}

.app-page > .card,
.app-page > main.card,
.app-page > .login-card {
    margin-top: max(32px, 8vh);
    margin-bottom: 32px;
}

.app-page .login-card h2,
.app-page main.card h2 {
    margin-bottom: 8px;
    font-size: 25px;
    text-align: center;
}

.app-page .links,
.app-page .login-card > div[style],
.app-page .back {
    margin-top: 18px;
    color: var(--muted) !important;
    font-size: 13px !important;
}

.app-page .links a,
.app-page .login-card > div[style] a,
.app-page .back {
    color: var(--primary) !important;
    font-weight: 650;
    text-decoration: none;
}

.app-page .status-overview {
    width: min(1240px, calc(100% - 40px));
    margin: 26px auto 0 !important;
    padding: 22px 26px !important;
    border: 1px solid var(--line);
    border-radius: 16px !important;
    box-shadow: 0 12px 36px rgba(31, 51, 87, 0.06);
}

.app-page .status-overview h3 {
    color: var(--ink) !important;
}

.app-page .status-legend {
    flex-wrap: wrap;
    gap: 10px 20px;
    color: var(--muted) !important;
}

.app-page .stats-box {
    flex-wrap: wrap;
}

.app-page .stat-card {
    border-color: var(--line);
    border-radius: 12px;
    background: #f7f9fd;
}

.app-page .report-selector {
    flex-wrap: wrap;
}

.form-page {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}

.form-page > .card,
.form-page > .login-card {
    width: min(100%, 460px);
    margin: 0;
}

.form-page > .container {
    width: min(100%, 600px);
    margin: 0;
}

.backup-page > .container {
    width: min(100%, 900px);
}

.form-page > .container > .card {
    width: 100%;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin-bottom: 21px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    font-size: 16px;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.auth-brand img {
    width: 42px;
    height: 42px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
}

.auth-brand small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.app-page .btn-small {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 7px;
    font-size: 12px;
}

.report-page .container {
    width: min(1200px, calc(100% - 40px));
    margin: 32px auto;
    padding: clamp(20px, 4vw, 44px);
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 12px 36px rgba(31, 51, 87, 0.07);
}

.report-page .header-section {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-color: var(--line);
}

.report-page .header-section h2 {
    margin-bottom: 7px;
    color: var(--ink);
    font-size: 20px;
}

.report-page .header-section h3 {
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.report-page .meta-info {
    flex-wrap: wrap;
    gap: 8px 20px;
    color: var(--muted);
    font-size: 12px;
}

.report-page .no-print {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.report-page .report-selector {
    margin: 12px 0;
}

.report-page .report-selector select {
    min-width: 180px;
}

.report-page .stats-box {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.report-page .stat-card p {
    margin: 0;
}

.report-page table {
    width: 100%;
}

.report-page th,
.report-page td {
    border: 0;
    border-bottom: 1px solid var(--line);
}

.report-page tbody tr:last-child td {
    border-bottom: 0;
}

.report-page .btn-secondary {
    margin-left: 0;
}

.report-page .btn {
    display: inline-flex;
    align-items: center;
}

.report-page .btn:hover {
    background: var(--primary-dark);
    color: #fff;
}

.report-page .btn-secondary:hover {
    background: #dce6f5;
    color: var(--ink);
}

.report-page .stat-card p[style*="28a745"] {
    color: #168357 !important;
}

.report-page .stat-card p[style*="dc3545"] {
    color: var(--danger) !important;
}

.report-page {
    --report-accent: #0b8f87;
}

.report-page .container {
    width: min(1320px, calc(100% - 48px));
    margin: 28px auto;
    padding: clamp(22px, 4vw, 46px);
    overflow: visible;
    border-color: #e1e8f2;
    border-radius: 20px;
    background:
        radial-gradient(circle at 100% 0, rgba(49, 94, 232, 0.055), transparent 300px),
        #fff;
    box-shadow: 0 22px 60px rgba(25, 44, 78, 0.11);
}

.report-page .report-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.report-page .report-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 15px;
    font-weight: 750;
    text-decoration: none;
}

.report-page .report-brand img {
    width: 42px;
    height: 42px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
}

.report-page .report-brand small {
    display: block;
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 0.12em;
}

.report-page .header-section {
    margin: 0;
    padding: 38px 0 24px;
    border: 0;
    text-align: left;
}

.report-page .report-eyebrow {
    margin: 0 0 8px;
    color: var(--report-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.report-page .header-section h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -0.045em;
    line-height: 1.2;
}

.report-page .report-description {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.report-page .report-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7f9fd;
}

.report-page .report-selector {
    justify-content: flex-start;
    gap: 12px;
    margin: 0;
}

.report-page .report-selector label {
    margin: 0;
    color: #53647e;
    font-size: 12px;
    font-weight: 700;
}

.report-page .report-selector select {
    min-width: 220px;
    background-color: #fff;
}

.report-page .report-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 18px;
    color: var(--muted);
    font-size: 11px;
}

.report-page .report-meta strong {
    color: var(--ink);
}

.report-page .stats-box {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 22px;
}

.report-page .stat-card {
    position: relative;
    overflow: hidden;
    padding: 19px 20px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: linear-gradient(145deg, #fff, #f7f9fd);
    text-align: left;
}

.report-page .stat-card::before {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    content: "";
}

.report-page .stat-card:nth-child(2)::before {
    background: #168357;
}

.report-page .stat-card:nth-child(3)::before {
    background: #d34d60;
}

.report-page .stat-card h4 {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.report-page .stat-card p {
    margin: 2px 0 0;
    color: var(--ink);
    font-size: 28px;
    font-weight: 750;
}

.report-page .report-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.report-page table {
    min-width: 700px;
    margin: 0;
}

.report-page th,
.report-page td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
}

.report-page th {
    padding-top: 13px;
    padding-bottom: 13px;
    background: #f4f7fb;
    color: #65748d;
}

.report-page tbody tr:nth-child(even) td {
    background: #fbfcfe;
}

.report-page tbody tr:hover td {
    background: #f1f5ff;
}

.report-page tbody tr:last-child td {
    border-bottom: 0;
}

.report-page .report-actions {
    justify-content: space-between;
    margin-top: 18px;
    color: var(--muted);
    font-size: 12px;
}

.report-page .report-actions .btn {
    padding: 10px 15px;
}

.dashboard-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    flex-direction: column;
    padding: 26px 18px 18px;
    background: #152746;
    color: #fff;
}

.sidebar-brand {
    display: flex;
    min-height: 60px;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    margin-bottom: 20px;
    padding: 0 8px 20px;
    color: #fff !important;
    font-size: 17px;
    font-weight: 750;
    letter-spacing: -0.02em;
    text-decoration: none;
}

.sidebar-logo {
    display: block;
    width: 43px;
    height: 43px;
    flex: 0 0 43px;
    padding: 3px;
    border: 1px solid rgba(226, 236, 255, 0.35);
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
}

.sidebar-brand small {
    display: block;
    margin-top: 3px;
    color: #94a7c8;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.13em;
}

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(140deg, #5b83ff, #31c0b3);
    color: #fff;
    font-size: 19px;
    font-weight: 800;
}

.sidebar-profile {
    display: grid;
    gap: 4px;
    margin: 0 0 24px;
    padding: 14px 12px;
    border: 1px solid rgba(226, 236, 255, 0.1);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.055);
}

.sidebar-profile span {
    color: #9dafcc;
    font-size: 11px;
}

.sidebar-profile strong {
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-nav,
.sidebar-footer {
    display: grid;
    gap: 6px;
}

.sidebar-nav a,
.sidebar-footer a {
    display: flex;
    min-height: 43px;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 9px;
    color: #c6d3e9;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 150ms ease, color 150ms ease;
}

.sidebar-nav a span,
.sidebar-footer a span {
    width: 18px;
    color: #9db0cf;
    font-size: 16px;
    text-align: center;
}

.sidebar-nav a .nav-person-icon {
    display: grid;
    place-items: center;
}

.nav-person-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.sidebar-nav a:hover,
.sidebar-footer a:hover,
.sidebar-nav a.active {
    background: rgba(100, 133, 217, 0.2);
    color: #fff;
}

.sidebar-nav a.active {
    box-shadow: inset 3px 0 #62d6ca;
}

.sidebar-nav a.active span {
    color: #78e0d4;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid rgba(226, 236, 255, 0.12);
}

.dashboard-main {
    min-width: 0;
    padding: 30px clamp(20px, 4vw, 54px) 48px;
}

.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 2px 0 26px;
}

.calendar-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.dashboard-topbar p {
    margin: 0 0 5px;
    color: #7a8aa3;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.14em;
}

.dashboard-topbar h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(22px, 2vw, 29px);
    font-weight: 700;
    letter-spacing: -0.04em;
}

.topbar-date {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.profile-card {
    max-width: 760px;
}

.profile-alert {
    max-width: 760px;
    margin-bottom: 16px;
}

.profile-heading {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--line);
}

.profile-avatar {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    place-items: center;
    border-radius: 50%;
    background: #e9efff;
    color: var(--primary);
    font-size: 24px;
    font-weight: 750;
}

img.profile-avatar {
    border: 2px solid #e0e8fa;
    object-fit: cover;
}

.profile-photo-form {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}

.profile-photo-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-photo-controls input {
    width: min(100%, 360px);
}

.profile-photo-form small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

.profile-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 21px;
}

.profile-heading p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.profile-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
    margin: 8px 0 24px;
}

.profile-details div {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.profile-details dt {
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
}

.profile-details dd {
    margin: 0;
    color: var(--ink);
    font-size: 14px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.dashboard-page .container {
    width: 100%;
    max-width: none;
    margin: 0;
}

.dashboard-page .status-overview {
    width: 100%;
    margin: 0 0 22px !important;
}

@media (max-width: 760px) {
    .app-page .request-filter-card {
        align-items: stretch;
        flex-direction: column;
    }

    .app-page .request-filter-card > .btn {
        width: 100%;
    }

    .app-page .header {
        position: static;
        align-items: flex-start;
        flex-direction: column;
    }

    .calendar-page-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        padding: 16px 20px;
    }

    .app-page .header > div {
        justify-content: flex-start;
        gap: 8px 15px;
    }

    .app-page .container,
    .app-page .status-overview {
        width: calc(100% - 28px);
    }

    .app-page .container {
        margin-top: 20px;
    }

    .form-page > .container {
        margin: 0;
    }

    .report-page .container {
        width: calc(100% - 24px);
        margin: 12px auto;
        padding: 18px;
    }

    .report-page .meta-info {
        display: grid;
    }

    .report-page .report-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .report-page .report-meta {
        justify-content: flex-start;
    }

    .report-page .report-topbar {
        align-items: flex-start;
    }

    .app-page .form-row {
        display: grid;
    }

    .app-page .stats-box {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 14px 18px 12px;
    }

    .sidebar-brand {
        min-height: 50px;
        margin-bottom: 12px;
        padding: 0 4px 10px;
    }

    .sidebar-profile {
        display: none;
    }

    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .sidebar-nav a {
        flex: 0 0 auto;
    }

    .sidebar-footer {
        display: flex;
        padding-top: 8px;
        border-top: 0;
    }

    .sidebar-footer a {
        min-height: 36px;
        padding: 6px 10px;
    }

    .dashboard-main {
        padding: 22px 16px 36px;
    }

    .dashboard-page .container {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 480px) {
    .app-page .card,
    .app-page .login-card,
    .app-page main.card {
        padding: 19px;
        border-radius: 13px;
    }

    .app-page .stats-box {
        grid-template-columns: 1fr;
    }

    .report-page .stats-box {
        grid-template-columns: 1fr;
    }

    .report-page .no-print .btn {
        width: 100%;
        justify-content: center;
    }

    .app-page .status-legend {
        display: grid !important;
        justify-content: start !important;
    }

    .profile-details {
        grid-template-columns: 1fr;
    }

    .profile-photo-controls {
        align-items: stretch;
        flex-direction: column;
    }
}

@media print {
    @page {
        size: auto;
        margin: 14mm;
    }

    body.app-page {
        background: #fff;
        color: #172b4d;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .app-page .header {
        position: static;
        background: #fff;
        box-shadow: none;
        color: #111;
    }

    .app-page .header a {
        display: none;
    }

    .report-page {
        background: #fff;
    }

    .report-page .no-print {
        display: none !important;
    }

    .report-page .container {
        width: 100%;
        margin: 0;
        padding: 0;
        overflow: visible;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .report-page .header-section {
        padding: 0 0 16px;
        text-align: left;
    }

    .report-page .header-section h1 {
        font-size: 24pt;
    }

    .report-page .stats-box {
        grid-template-columns: repeat(3, 1fr);
        break-inside: avoid;
    }

    .report-page .stat-card {
        box-shadow: none;
    }

    .report-page .report-table-wrap {
        overflow: visible;
        border: 0;
    }

    .report-page table {
        min-width: 0;
        width: 100%;
        table-layout: auto;
        font-size: 9pt;
    }

    .report-page thead {
        display: table-header-group;
    }

    .report-page tr {
        break-inside: avoid;
    }

    .report-page th,
    .report-page td {
        padding: 7px 8px;
        overflow-wrap: anywhere;
        font-size: 9pt;
    }
}
