:root {
    --navy: #102947;
    --blue: #2457d6;
    --teal: #137f80;
    --ink: #20334d;
    --muted: #718096;
    --line: #e5ebf2;
    --bg: #f4f7fb;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}
a {
    color: var(--blue);
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
.sidebar {
    width: 245px;
    position: fixed;
    inset: 0 auto 0 0;
    background: var(--navy);
    color: white;
    padding: 32px 22px;
    display: flex;
    flex-direction: column;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: inherit;
    font-size: 13px;
}
.brand small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0;
    opacity: 0.65;
}
.mark {
    display: grid;
    place-items: center;
    background: var(--blue);
    border-radius: 12px;
    width: 43px;
    height: 43px;
    font-size: 25px;
    color: white;
}
.nav-label {
    font-size: 10px;
    letter-spacing: 2px;
    color: #8fa5c1;
    margin: 40px 12px 14px;
}
nav {
    display: grid;
    gap: 5px;
}
nav a {
    color: #ced9e7;
    padding: 11px 14px;
    border-radius: 8px;
}
nav a:hover {
    background: #203e61;
    color: white;
    text-decoration: none;
}
.sidebar-bottom {
    margin-top: auto;
    padding: 28px 12px 0;
    color: #bdcde0;
}
.sidebar-bottom small {
    font-size: 10px;
    opacity: 0.65;
}
.workspace {
    margin-left: 245px;
}
.topbar {
    height: 80px;
    border-bottom: 1px solid var(--line);
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 38px;
    color: var(--muted);
}
.topbar > div {
    display: flex;
    align-items: center;
    gap: 20px;
}
.role,
.badge {
    font-size: 11px;
    padding: 5px 11px;
    border-radius: 30px;
    background: #edf3ff;
    color: var(--blue);
    white-space: nowrap;
}
.text-button {
    border: 0;
    background: none;
    color: var(--muted);
    cursor: pointer;
}
main {
    padding: 32px 38px;
    max-width: 1550px;
    margin: auto;
}
.eyebrow {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--teal);
}
h1 {
    font-size: 28px;
    line-height: 1.3;
    margin: 8px 0 25px;
    letter-spacing: -0.7px;
}
h2 {
    font-size: 18px;
    line-height: 1.4;
    margin: 0 0 16px;
}
p {
    margin: 10px 0 20px;
}
.welcome {
    background: linear-gradient(110deg, #11345c, #24548b);
    color: white;
    border-radius: 16px;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 20px;
}
.welcome .eyebrow {
    color: #91cddc;
}
.welcome h2 {
    font-size: 29px;
    margin: 10px 0;
}
.welcome p {
    color: #c5d6ea;
    margin: 0;
    max-width: 550px;
}
.button,
button.primary,
button.danger {
    display: inline-block;
    border: 0;
    background: var(--blue);
    color: white;
    padding: 11px 20px;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}
.button:hover {
    text-decoration: none;
    filter: brightness(0.97);
}
.button.light {
    background: white;
    color: var(--navy);
    white-space: nowrap;
}
.danger {
    background: #b63848 !important;
}
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}
.card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 25px;
    margin-bottom: 22px;
    box-shadow: 0 3px 9px #14345403;
}
.stats .card {
    margin: 0;
}
.stats strong {
    display: block;
    font-size: 31px;
    line-height: 1.8;
}
.stats strong small {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
}
.muted {
    color: var(--muted);
}
.fine {
    font-size: 12px;
    color: var(--muted);
}
.section-heading,
.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}
.section-heading h2 {
    margin: 0;
}
.table-wrap {
    overflow: auto;
    margin-top: 18px;
}
table {
    border-collapse: collapse;
    width: 100%;
    text-align: left;
    white-space: nowrap;
}
th {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    background: #fafbfd;
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
}
td {
    padding: 18px 14px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}
td small,
.file-row small {
    display: block;
    color: var(--muted);
    font-size: 11px;
}
.empty {
    text-align: center;
    color: var(--muted);
    padding: 35px;
}
.notice {
    background: #eef8f7;
    border: 1px solid #cbe5e0;
    border-radius: 9px;
    padding: 14px 18px;
    margin-bottom: 20px;
    color: #216460;
}
.form-card {
    max-width: 900px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 22px;
}
label {
    display: block;
    font-weight: 600;
    font-size: 12px;
    margin: 16px 0;
}
input,
select,
textarea {
    font: inherit;
    font-weight: 400;
    color: var(--ink);
    background: white;
    border: 1px solid #d5dfeb;
    border-radius: 7px;
    width: 100%;
    padding: 11px 12px;
    margin-top: 7px;
}
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #c6d8ff;
    outline-offset: 1px;
    border-color: var(--blue);
}
textarea {
    resize: vertical;
}
.fold summary {
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 13px 0;
}
.fold {
    border-top: 1px solid var(--line);
    margin-top: 20px;
}
.card.fold {
    border: 1px solid var(--line);
}
.upload-zone {
    padding: 24px;
    border: 1px dashed #a6bad3;
    border-radius: 9px;
    background: #f8fbff;
}
.upload-zone input {
    border: 0;
    background: none;
    padding: 6px 0;
}
.file-summary {
    font-weight: 400;
    color: var(--muted);
    font-size: 11px;
}
.file-row {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
    gap: 15px;
}
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
dl {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 15px;
}
dt {
    color: var(--muted);
}
dd {
    margin: 0;
    overflow-wrap: anywhere;
}
.stage {
    border-left: 2px solid #cbd9ed;
    padding: 12px 0 12px 18px;
    margin: 12px 0;
}
.stage strong,
.stage span,
.stage small {
    display: block;
}
.stage small {
    color: var(--muted);
}
.auth-main {
    min-height: 100vh;
    display: grid;
    place-content: center;
    padding: 30px;
    background: radial-gradient(ellipse at top right, #e0ebff, transparent 60%);
}
.auth-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 42px;
    width: min(460px, 90vw);
    box-shadow: 0 14px 50px #1739650a;
}
.auth-card .brand {
    margin-bottom: 40px;
}
.auth-card h1 {
    font-size: 31px;
}
.full {
    width: 100%;
    margin-top: 10px;
}
footer {
    padding: 15px 38px;
    color: var(--muted);
    font-size: 11px;
}
@media (max-width: 1050px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .sidebar {
        width: 210px;
    }
    .workspace {
        margin-left: 210px;
    }
    .topbar {
        padding: 0 24px;
    }
    main {
        padding: 25px 24px;
    }
    .detail-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 720px) {
    .sidebar {
        position: static;
        width: auto;
        padding: 20px;
    }
    .sidebar nav {
        display: flex;
        overflow: auto;
        margin-top: 15px;
    }
    nav a {
        white-space: nowrap;
    }
    .nav-label,
    .sidebar-bottom {
        display: none;
    }
    .workspace {
        margin: 0;
    }
    .topbar {
        height: 60px;
        font-size: 11px;
    }
    .welcome {
        display: block;
        padding: 24px;
    }
    .welcome .button {
        margin-top: 20px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .stats {
        gap: 10px;
    }
    .card {
        padding: 18px;
    }
    .stats strong {
        font-size: 26px;
    }
    main {
        padding: 22px 16px;
    }
    dl {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    dd {
        margin-bottom: 10px;
    }
    .actions {
        flex-wrap: wrap;
    }
    .auth-card {
        padding: 28px;
    }
}

.check {
    display: flex;
    align-items: center;
    gap: 10px;
}
.check input {
    width: auto;
    margin: 0;
}

@media print {
    body {
        background: white;
    }
    .sidebar,
    .topbar,
    footer,
    form,
    [data-print],
    .actions {
        display: none !important;
    }
    .workspace {
        margin: 0;
    }
    main {
        padding: 0;
    }
    .card {
        box-shadow: none;
        break-inside: avoid;
    }
    .detail-grid {
        display: block;
    }
    .fold {
        display: block;
    }
    .fold > summary {
        display: none;
    }
    a {
        color: black;
    }
    .card:has(form) {
        display: none;
    }
}

.sweet-alert {
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}
.sweet-alert .btn {
    display: inline-block;
    border: 0;
    border-radius: 7px;
    padding: 10px 24px;
    cursor: pointer;
    font:
        600 14px "Segoe UI",
        Arial,
        sans-serif;
}
.sweet-alert .btn-primary,
.sweet-alert .confirm {
    background: #2457d6;
    color: white;
}
.sweet-alert .btn-default,
.sweet-alert .cancel {
    background: #edf1f7;
    color: #20334d;
}
.sweet-alert h2 {
    font-size: 23px;
}
.sweet-alert p {
    overflow-wrap: anywhere;
}
.sweet-alert .icon {
    box-sizing: content-box;
}
/* Employee workspace, responsive record filters and application dialog. */
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.5fr);
    gap: 22px;
    align-items: start;
}
.credit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}
.credit-value {
    font-size: 11px;
    background: #edf3ff;
    color: #2457d6;
    border-radius: 20px;
    padding: 4px 10px;
    white-space: nowrap;
}
.calendar-navigation {
    display: flex;
    gap: 7px;
    align-items: center;
}
.calendar-navigation a {
    padding: 4px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
}
.calendar-title {
    text-align: center;
    font-size: 21px;
    margin: 20px 0 10px;
}
.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 10px;
    margin: 12px 0;
    color: var(--muted);
}
.legend-holiday::before,
.legend-leave::before,
.legend-cto::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 5px;
    background: #bd4351;
}
.legend-leave::before {
    background: #2457d6;
}
.legend-cto::before {
    background: #137f80;
}
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-left: 1px solid var(--line);
    border-top: 1px solid var(--line);
}
.calendar-weekday {
    text-align: center;
    background: #f8fafc;
    padding: 8px 2px;
    font-size: 11px;
    font-weight: 600;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.calendar-day {
    min-height: 86px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 5px;
    min-width: 0;
}
.calendar-day time {
    display: block;
    text-align: right;
    font-size: 11px;
    margin-bottom: 5px;
}
.calendar-day.outside {
    background: #fafbfd;
    color: #a0adbd;
}
.calendar-day.today {
    background: #fff9df;
}
.calendar-event {
    display: block;
    font-size: 9px;
    padding: 3px 4px;
    border-radius: 4px;
    margin-bottom: 3px;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
}
.event-holiday {
    color: #a12b3c;
    background: #fff0f2;
}
.event-leave {
    color: #2457d6;
    background: #edf3ff;
}
.event-cto {
    color: #137f80;
    background: #eaf7f5;
}
.record-filters {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}
.filter-main {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
}
.filter-main label {
    margin: 0;
    flex: 1 1 140px;
}
.filter-main label:first-child {
    flex-grow: 2;
}
.filter-main input,
.filter-main select {
    min-width: 0;
    padding: 9px 10px;
}
.filter-main button,
.filter-main > .button {
    margin-bottom: 1px;
    white-space: nowrap;
}
.secondary {
    background: #edf1f7;
    color: #20334d;
    border: 0;
    border-radius: 7px;
    padding: 10px 16px;
    cursor: pointer;
    font: inherit;
}
.button.secondary {
    color: #20334d;
}
.filter-advanced {
    padding-top: 14px;
}
.filter-advanced summary {
    cursor: pointer;
    color: var(--blue);
    font-size: 12px;
    margin-bottom: 12px;
}
.record-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding-top: 18px;
    color: var(--muted);
    font-size: 12px;
    flex-wrap: wrap;
}
.pagination {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.pagination a {
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--blue);
}
.table-print {
    margin-left: 10px;
}
.advanced-record-table {
    max-width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}
.advanced-record-table table {
    min-width: 680px;
}
.application-dialog {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 25px 90px #10294740;
    width: min(940px, calc(100vw - 40px));
    max-width: calc(100vw - 40px);
    max-height: calc(100dvh - 40px);
    padding: 0;
    overflow: auto;
    color: var(--ink);
}
.application-dialog::backdrop {
    background: #10294790;
    backdrop-filter: blur(3px);
}
.dialog-heading {
    position: sticky;
    top: 0;
    z-index: 3;
    background: white;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 26px;
}
.dialog-heading h2 {
    margin: 5px 0 0;
    font-size: 23px;
}
.dialog-close {
    border: 0;
    background: #edf1f7;
    color: var(--ink);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 25px;
    cursor: pointer;
}
.leave-application-form {
    padding: 24px 26px;
    max-width: none;
}
.leave-day-preview {
    padding: 10px 14px;
    background: #edf3ff;
    color: #2457d6;
    border-radius: 7px;
    margin: 10px 0;
    font-size: 12px;
}
.modal-open {
    overflow: hidden;
}
.floating-plus {
    font-size: 22px;
}
@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .employee-calendar {
        min-width: 0;
    }
    .topbar > span {
        max-width: 55%;
    }
    .filter-main label {
        flex-basis: 130px;
    }
}
@media (max-width: 720px) {
    .sidebar {
        padding: 16px;
    }
    .sidebar .brand {
        font-size: 12px;
    }
    .sidebar nav {
        gap: 4px;
    }
    .sidebar nav a {
        padding: 8px 12px;
        font-size: 12px;
    }
    .topbar {
        padding: 0 16px;
    }
    .topbar > span {
        max-width: 50%;
        line-height: 1.4;
    }
    .topbar > div {
        gap: 10px;
    }
    .topbar form {
        margin: 0;
    }
    .welcome h2 {
        font-size: 25px;
    }
    .welcome .button.light {
        margin-top: 18px;
    }
    .page-heading h1 {
        font-size: 25px;
    }
    .dashboard-grid {
        gap: 0;
    }
    .credit-row {
        font-size: 12px;
    }
    .section-heading {
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .section-heading h2 {
        font-size: 17px;
    }
    .calendar-day {
        min-height: 66px;
        padding: 3px;
    }
    .calendar-event {
        font-size: 8px;
        padding: 2px;
        line-height: 1.25;
    }
    .calendar-title {
        font-size: 20px;
    }
    .calendar-legend {
        gap: 8px;
        font-size: 9px;
    }
    .calendar-navigation a {
        padding: 3px 8px;
    }
    .filter-main {
        gap: 10px;
    }
    .filter-main label {
        flex: 1 1 calc(50% - 10px);
    }
    .filter-main label:first-child {
        flex-basis: 100%;
    }
    .filter-main > .primary,
    .filter-main > .button {
        flex: 1 1 calc(50% - 10px);
    }
    .filter-main button {
        font-size: 12px;
        padding: 10px 12px;
    }
    .filter-advanced .filter-main label {
        flex-basis: calc(50% - 10px);
    }
    .record-footer {
        display: block;
        font-size: 11px;
    }
    .pagination {
        margin-top: 14px;
        font-size: 11px;
    }
    .pagination a {
        padding: 6px 8px;
    }
    .application-dialog {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        border-radius: 12px;
        margin: auto;
    }
    .dialog-heading {
        padding: 16px;
    }
    .dialog-heading h2 {
        font-size: 21px;
    }
    .leave-application-form {
        padding: 16px;
    }
    .leave-application-form h2 {
        font-size: 17px;
    }
    .leave-application-form .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .leave-application-form input,
    .leave-application-form select,
    .leave-application-form textarea {
        font-size: 16px;
    }
    .leave-application-form label {
        font-size: 12px;
    }
    .leave-application-form .check {
        line-height: 1.5;
    }
    .leave-application-form .actions {
        position: sticky;
        bottom: -16px;
        background: white;
        border-top: 1px solid var(--line);
        padding: 14px 0;
        margin-top: 18px;
        z-index: 2;
    }
    .leave-application-form .actions button {
        flex: 1;
        font-size: 13px;
    }
    .workspace main {
        padding-bottom: 85px;
    }
    .sweet-alert {
        width: calc(100vw - 30px) !important;
        max-width: 460px;
        margin-left: 0 !important;
        left: 50% !important;
        transform: translateX(-50%);
        padding: 20px !important;
    }
    .sweet-alert h2 {
        font-size: 22px;
    }
    .sweet-alert p {
        font-size: 14px;
    }
}
@media (max-width: 390px) {
    .sidebar nav a {
        padding: 8px 10px;
    }
    .credit-row {
        gap: 8px;
    }
    .credit-value {
        padding: 4px 8px;
        font-size: 10px;
    }
    .card {
        padding: 15px;
    }
    .calendar-day {
        min-height: 62px;
    }
    .calendar-weekday {
        font-size: 10px;
    }
    .calendar-event {
        font-size: 7px;
    }
    .calendar-legend {
        font-size: 8px;
    }
    .filter-main label,
    .filter-advanced .filter-main label {
        flex-basis: 100%;
    }
    .topbar .role {
        font-size: 10px;
        padding: 4px 8px;
    }
    .auth-card {
        width: calc(100vw - 32px);
        padding: 24px;
    }
    .auth-main {
        padding: 16px;
    }
    .dialog-heading {
        padding: 14px;
    }
    .leave-application-form {
        padding: 14px;
    }
    .welcome {
        padding: 22px;
    }
    .file-row {
        align-items: flex-start;
        overflow-wrap: anywhere;
    }
    .file-row span {
        min-width: 0;
    }
    .file-row a {
        flex-shrink: 0;
        font-size: 11px;
    }
}
@media print {
    dialog,
    .record-filters,
    .record-footer {
        display: none !important;
    }
}

/* Light workspace and account/menu controls. */
:root {
    --bg: #f8fafc;
    --line: #e2eaf3;
    --muted: #5f728a;
}
.sidebar {
    background: #fff;
    color: var(--ink);
    border-right: 1px solid var(--line);
    z-index: 30;
}
.sidebar .nav-label {
    color: #71839b;
}
.sidebar nav a {
    color: #405670;
}
.sidebar nav a:hover {
    background: #eef4ff;
    color: #2457d6;
}
.sidebar-bottom {
    padding: 20px 0 0;
}
.sidebar-signout {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 12px 16px;
    background: #f8fafc;
    color: #405670;
    text-align: left;
    font:
        600 14px "Segoe UI",
        sans-serif;
    cursor: pointer;
}
.sidebar-signout:hover {
    background: #eef4ff;
    color: var(--blue);
}
.welcome {
    background: linear-gradient(110deg, #edf5ff, #f0faf8);
    border: 1px solid #dbe8f5;
    color: var(--ink);
}
.welcome .eyebrow {
    color: #137f80;
}
.welcome p {
    color: #506984;
}
.welcome .button.light {
    background: #2457d6;
    color: #fff;
}
.card {
    box-shadow: 0 4px 18px #243f6604;
}
.account-dropdown {
    position: relative;
}
.account-dropdown summary {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #edf4ff;
    color: #2457d6;
    cursor: pointer;
    list-style: none;
    border: 1px solid #dfebfc;
}
.account-dropdown summary::-webkit-details-marker {
    display: none;
}
.account-dropdown summary svg,
.mobile-menu svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.account-dropdown summary:focus-visible,
.mobile-menu:focus-visible,
.sidebar-close:focus-visible {
    outline: 3px solid #9cbeff;
    outline-offset: 3px;
}
.account-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    z-index: 25;
    min-width: 220px;
    max-width: calc(100vw - 32px);
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 35px #18345318;
}
.account-identity {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 5px;
    overflow-wrap: anywhere;
}
.account-identity strong,
.account-identity small {
    display: block;
}
.account-identity strong {
    font-size: 13px;
    color: var(--ink);
}
.account-identity small {
    font-size: 11px;
    color: var(--muted);
}
.account-panel a,
.account-panel button {
    display: block;
    width: 100%;
    padding: 10px 12px;
    background: none;
    border: 0;
    border-radius: 7px;
    text-align: left;
    font: inherit;
    color: #405670;
    cursor: pointer;
}
.account-panel a:hover,
.account-panel button:hover {
    background: #eef4ff;
    text-decoration: none;
}
.account-panel form {
    margin: 0;
}
.account-signout {
    display: none;
}
.mobile-menu,
.sidebar-close,
.menu-backdrop {
    display: none;
}
.form-action-card {
    padding: 18px 25px;
}
.journal-action {
    display: inline-block;
    margin: 12px 8px 0 0;
}
.dialog-form-body {
    padding: 6px 26px 26px;
}
.dialog-form-body form {
    margin: 0;
}
.dialog-form-body .primary,
.dialog-form-body .danger {
    margin-top: 10px;
}
.action-dialog {
    width: min(760px, calc(100vw - 40px));
}
.modal-action {
    font-size: 13px;
}
@media (max-width: 720px) {
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(290px, calc(100vw - 56px));
        height: 100vh;
        height: 100dvh;
        padding: 28px 20px;
        transform: translateX(-105%);
        visibility: hidden;
        transition:
            transform 0.2s ease,
            visibility 0.2s;
        overflow-y: auto;
        z-index: 31;
        box-shadow: 12px 0 40px #20334d20;
    }
    .sidebar .brand {
        padding-right: 20px;
    }
    .sidebar nav {
        display: grid;
        overflow: visible;
        margin-top: 14px;
        gap: 5px;
    }
    .sidebar nav a {
        white-space: normal;
        padding: 12px 14px;
        font-size: 14px;
    }
    .sidebar .nav-label {
        display: block;
        margin: 28px 14px 8px;
    }
    .sidebar-bottom {
        display: block;
        margin-top: auto;
        padding-top: 24px;
    }
    .sidebar-close {
        display: block;
        position: absolute;
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        border: 0;
        border-radius: 50%;
        background: #eef4ff;
        color: #405670;
        font-size: 24px;
        cursor: pointer;
    }
    .menu-open {
        overflow: hidden;
    }
    .menu-open .sidebar {
        transform: translateX(0);
        visibility: visible;
    }
    .menu-backdrop:not([hidden]) {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 30;
        border: 0;
        background: #20334d50;
        cursor: pointer;
    }
    .mobile-menu {
        display: grid;
        place-items: center;
        position: fixed;
        right: max(16px, env(safe-area-inset-right));
        bottom: max(18px, env(safe-area-inset-bottom));
        z-index: 32;
        width: 54px;
        height: 54px;
        border: 0;
        border-radius: 50%;
        background: #2457d6;
        color: white;
        box-shadow: 0 7px 22px #2457d64a;
        cursor: pointer;
    }
    .modal-open .mobile-menu {
        display: none;
    }
    .workspace {
        margin-left: 0;
    }
    .topbar {
        height: 62px;
        position: relative;
    }
    .topbar > span {
        max-width: calc(100% - 60px);
        font-size: 11px;
    }
    .account-dropdown {
        margin-left: auto;
    }
    .account-dropdown summary {
        width: 38px;
        height: 38px;
    }
    .account-signout {
        display: block;
    }
    .account-panel {
        min-width: 210px;
    }
    .dialog-form-body {
        padding: 6px 16px 20px;
    }
    .dialog-form-body input,
    .dialog-form-body select,
    .dialog-form-body textarea {
        font-size: 16px;
    }
    .dialog-form-body .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .form-action-card {
        padding: 16px;
    }
    .action-dialog {
        width: calc(100vw - 16px);
    }
}
@media (prefers-reduced-motion: reduce) {
    .sidebar {
        transition: none;
    }
}
@media print {
    .mobile-menu,
    .menu-backdrop,
    .account-dropdown,
    .sidebar-close {
        display: none !important;
    }
}

.queue-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 6px;
}
.queue-tabs a {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    background: #fff;
    color: #405670;
}
.queue-tabs .selected {
    background: #edf4ff;
    border-color: #bacef3;
    color: #2457d6;
    font-weight: 600;
}
.queue-tabs span {
    margin-left: 7px;
    background: #2457d6;
    color: white;
    border-radius: 10px;
    padding: 1px 6px;
}
.queue-tabs a:hover {
    text-decoration: none;
    background: #eef4ff;
}
