:root {
    --bg: #f4f7ff;
    --panel: #f1f5f9;
    --card: #ffffff;
    --border: #d7dde8;
    --text: #0f172a;
    --muted: #475569;
    --danger: #dc2626;
    --ok: #16a34a;
    --warn: #d97706;
    --accent: #ee2a36;
    --fs: 14px;
    --fsS: 12px;
    --fsL: 16px;
    --r: 14px;
    --pad: 14px;
    --shadow: 0 12px 30px rgba(15, 23, 42, .14);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--fs);
    line-height: 1.35;
    background: #f4f7ff;
    display: block;
    height: 100vh;
    overflow: hidden;
}

body[data-page="login"] {
    background: #f4f7ff;
}

.loginBackground {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(254, 219, 221, 0.8) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(244, 247, 255, 0.8) 0%, #f4f7ff 100%);
}

.blob {
    position: absolute;
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, rgba(238, 42, 54, 0.1), rgba(15, 23, 42, 0.05));
    filter: blur(80px);
    border-radius: 50%;
    z-index: -1;
    animation: blobFloat 20s infinite alternate ease-in-out;
}

.blob-1 { top: -100px; left: -100px; }
.blob-2 { bottom: -100px; right: -100px; animation-duration: 25s; }

@keyframes blobFloat {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(100px, 50px) scale(1.1); }
}

.hidden {
    display: none !important;
}

/* Layout */
.shell {
    width: 100%;
    height: 100vh;
    margin: 0;
    border: none;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    background: rgba(255, 255, 255, .72);
    display: flex;
}

@media (min-width: 1400px) {
    .shell {
        max-width: 1600px;
        margin: 20px auto;
        height: calc(100vh - 40px);
        min-height: 0;
        border: 1px solid rgba(15, 23, 42, .07);
        border-radius: 18px;
        box-shadow: var(--shadow);
    }
}

.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, .95);
    border-right: 1px solid rgba(15, 23, 42, .07);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.3s ease, width 0.3s ease, opacity 0.3s ease;
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 100;
}

/* Sidebar Backdrop for mobile */
.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 90;
    display: none;
    backdrop-filter: blur(4px);
}

@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
        box-shadow: 20px 0 50px rgba(0, 0, 0, 0.1);
    }

    .shell.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .shell.sidebar-open .sidebar-backdrop {
        display: block;
    }
}

/* Sidebar collapsed state */
/* Sidebar collapsed state (desktop) */
@media (min-width: 993px) {
    .shell.sidebar-collapsed .sidebar {
        width: 0;
        padding: 0;
        opacity: 0;
        border-right: none;
        pointer-events: none;
    }

    .shell.sidebar-collapsed .main {
        flex: 1;
    }
}

/* Sidebar toggle button in topbar */
.sidebar-toggle {
    flex-shrink: 0;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px;
    border: 1px solid rgba(15, 23, 42, .10);
    border-radius: 18px;
    background: rgba(15, 23, 42, .04);
}

.brand .left {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.brand .title {
    font-size: 20px;
    font-weight: 850;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.brand .sub {
    font-size: 14px;
    color: var(--muted);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.brand .brandUser {
    color: rgba(15, 23, 42, .92);
    font-weight: 750;
}

.brand .badge {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fedbdd;
    border: 1px solid rgba(238, 42, 54, .22);
}

.brand .badge i {
    font-size: 18px;
}

.brand .badge .brand-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    border-radius: 8px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.navbtn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 10px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: rgba(15, 23, 42, .04);
    color: rgba(15, 23, 42, .85);
    cursor: pointer;
    font-weight: 650;
    text-align: left;
    text-decoration: none;
}

.navbtn i {
    width: 18px;
    text-align: center;
}

.navbtn.active {
    background: #fedbdd;
    border-color: rgba(238, 42, 54, .25);
    color: var(--text);
}

.navbtn:active {
    transform: translateY(1px);
}

.sidebarfooter {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

.iconbtn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, .10);
    background: rgba(15, 23, 42, .05);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.iconbtn:active {
    transform: translateY(1px);
}

.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    min-width: 0; /* Important for preventing overflow */
    transition: flex 0.25s ease;
    background: var(--bg);
    overflow: hidden;
}

.topbar {
    height: 58px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, .07);
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar .left {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.topbar .h1 {
    font-size: 16px;
    font-weight: 750;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 720px;
}

.topbar .h2 {
    font-size: 12px;
    color: var(--muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 720px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .10);
    background: rgba(15, 23, 42, .04);
    font-size: 12px;
    color: rgba(15, 23, 42, .92);
    white-space: nowrap;
}

.pill.ok {
    border-color: rgba(22, 163, 74, .45);
}

.pill.warn {
    border-color: rgba(217, 119, 6, .45);
}

.pill.danger {
    border-color: rgba(220, 38, 38, .45);
}

.content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 16px 18px;
}

@media (max-width: 600px) {
    .content {
        padding: 10px 10px 14px;
    }
}

.content::-webkit-scrollbar {
    width: 10px;
}

.content::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, .18);
    border-radius: 999px;
}

/* Cards, tables, form */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.card {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: var(--r);
    padding: 12px;
}

.card .label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.card .value {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.muted {
    color: var(--muted);
}

.small {
    font-size: 12px;
}

.row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.toolbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

@media (max-width: 800px) {
    .toolbar-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .toolbar-actions .searchWrap {
        width: 100%;
    }
}

.dashboard-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
    flex-wrap: wrap;
}

.flex-large {
    flex: 1.2 1 500px;
}

.flex-small {
    flex: 0.8 1 340px;
}

@media (max-width: 900px) {
    .flex-large, .flex-small {
        flex: 1 1 100%;
    }
}

@media (max-width: 600px) {
    .toolbar > div {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .toolbar .btn {
        width: 100%;
    }
}

input,
select,
textarea {
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, .10);
    background: rgba(255, 255, 255, .80);
    color: var(--text);
    font-size: 14px;
    outline: none;
}

textarea {
    min-height: 90px;
    resize: vertical;
    width: 100%;
}

.btn {
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, .12);
    background: #fedbdd;
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
}

.btn.secondary {
    background: rgba(15, 23, 42, .05);
    border-color: rgba(15, 23, 42, .10);
}

.btn.danger {
    background: rgba(220, 38, 38, .14);
    border-color: rgba(220, 38, 38, .35);
}

.btn:active {
    transform: translateY(1px);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: rgba(255, 255, 255, .92);
    margin-bottom: 10px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 600px;
}

th,
td {
    padding: 10px 10px;
    font-size: 13px;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    vertical-align: top;
}

th {
    text-align: left;
    color: rgba(15, 23, 42, .92);
    font-weight: 750;
    background: rgba(15, 23, 42, .04);
    position: sticky;
    top: 0;
    z-index: 1;
}

tr:last-child td {
    border-bottom: none;
}

td .chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .10);
    background: rgba(15, 23, 42, .04);
    font-size: 12px;
    color: rgba(15, 23, 42, .92);
    margin-right: 6px;
    margin-top: 4px;
}

.chip.ok {
    border-color: rgba(22, 163, 74, .35);
}

.chip.warn {
    border-color: rgba(217, 119, 6, .35);
}

.chip.danger {
    border-color: rgba(220, 38, 38, .35);
}

.sectionTitle {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 10px;
}

.sectionSub {
    font-size: 12px;
    color: var(--muted);
    margin: -6px 0 12px;
}

/* Login view */
/* Login view - Modern Centered Layout */
.loginWrap {
    width: 100%;
    max-width: 440px;
    margin: auto;
    border: 1px solid rgba(255, 255, 255, 1);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(15, 23, 42, 0.15);
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    padding: 48px 40px;
    gap: 32px;
}

.loginHeader {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.loginHeader h1 {
    margin: 0;
    font-size: 36px;
    font-weight: 900;
    font-family: var(--font-heading);
    color: var(--text);
    letter-spacing: -1.5px;
    line-height: 1;
}

.loginHeader p {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.6;
    max-width: 320px;
    margin: 0 auto;
}

.loginRight {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.field .label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 8px;
    padding-left: 12px;
}

.loginRight input {
    width: 100%;
    padding: 16px 20px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.6);
    color: var(--text);
    font-size: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.loginRight input:focus {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(238, 42, 54, 0.5);
    box-shadow: 0 0 0 4px rgba(238, 42, 54, 0.1);
    outline: none;
}

.loginActions {
    margin-top: 8px;
}

.btn-premium {
    width: 100%;
    padding: 16px;
    border-radius: 18px;
    border: none;
    background: linear-gradient(135deg, #ee2a36, #8b131b);
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    font-family: var(--font-heading);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(238, 42, 54, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.btn-premium::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(238, 42, 54, 0.4);
}

.btn-premium:hover::after {
    left: 100%;
}

.btn-premium:active {
    transform: scale(0.98);
}

.loginCard {
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: rgba(255, 255, 255, .92);
    padding: 16px;
}

.field {
    margin-bottom: 10px;
}

.field .label {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.loginActions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

/* Modal */
.modalOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.modalOverlay.show {
    display: flex;
    z-index: 1;
}

.modal {
    width: 860px;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, .10);
    background: rgba(255, 255, 255, .98);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (max-width: 600px) {
    .modal {
        border-radius: 0;
        max-height: 100vh;
        height: 100%;
    }
}

.modalHeader {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    background: rgba(15, 23, 42, .03);
}

.modalHeader .title {
    font-weight: 800;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 640px;
}

.modalBody {
    padding: 14px;
    flex: 1;
    overflow-y: auto;
}

.modalFooter {
    padding: 12px 14px;
    border-top: 1px solid rgba(15, 23, 42, .08);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(15, 23, 42, .03);
}

.twoCol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 600px) {
    .twoCol {
        grid-template-columns: 1fr;
    }
}

.full {
    grid-column: 1 / -1;
}

.notice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(238, 42, 54, .25);
    background: #fedbdd;
    margin-top: 10px;
}

.notice i {
    margin-top: 2px;
}

.dangerNote {
    border-color: rgba(220, 38, 38, .30);
    background: rgba(220, 38, 38, .10);
}

/* -----------------------------
      UI/UX Enhancements (v2)
      - Info icon notes with expand/collapse
      - Filter panels for tables
      - Exception resolution controls
      - Custom interval input (value + unit + presets)
      - Toast notifications
      - Modal focus handling
    ----------------------------- */
.srOnly {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    white-space: nowrap;
}

.noteWrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.noteIcon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(238, 42, 54, .28);
    background: #fedbdd;
    color: #ee2a36;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: transform .12s ease, box-shadow .12s ease;
    flex: 0 0 auto;
}

.noteIcon:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(2, 6, 23, .10);
}

.noteIcon.warn {
    border-color: rgba(220, 38, 38, .30);
    background: rgba(220, 38, 38, .10);
    color: rgba(220, 38, 38, .92);
}

.notePanel {
    flex: 1;
    border-radius: 14px;
    padding: 10px 12px;
    border: 1px solid rgba(238, 42, 54, .22);
    background: #fedbdd;
}

.notePanel.warn {
    border-color: rgba(220, 38, 38, .20);
    background: rgba(220, 38, 38, .06);
}

.noteTitle {
    font-weight: 800;
}

.notePanel .small {
    line-height: 1.45;
}

.searchWrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid rgba(15, 23, 42, .14);
    border-radius: 14px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 18px rgba(2, 6, 23, .06);
}

.searchWrap i {
    color: rgba(15, 23, 42, .55);
}

.searchWrap input {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 10px 4px !important;
    width: 100% !important;
    margin: 0 !important;
}

.searchWrap input:focus {
    outline: none;
}

.iconOnly {
    width: 42px;
    padding: 0;
    display: grid;
    place-items: center;
    height: 38px;
}

.filterPanel {
    margin-top: 12px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, .10);
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 20px 34px rgba(2, 6, 23, .10);
    padding: 12px;
}

.filterHeader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.filterTitle {
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
}

.filterGrid {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 12px;
}

@media (max-width:1200px) {
    .filterGrid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

.filterFooter {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.filterChips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.filterChip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, .14);
    background: rgba(15, 23, 42, .04);
    font-size: 12px;
    color: rgba(15, 23, 42, .90);
}

.filterChip button {
    border: none;
    background: transparent;
    cursor: pointer;
    color: rgba(15, 23, 42, .55);
}

.filterChip button:hover {
    color: rgba(15, 23, 42, .92);
}

.intervalRow {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.intervalInput {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, .14);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 18px rgba(2, 6, 23, .06);
}

.intervalInput input {
    width: 120px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, .14);
    background: rgba(255, 255, 255, .98);
}

.intervalInput select {
    width: 160px;
}

.inlineError {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(220, 38, 38, .30);
    background: rgba(220, 38, 38, .10);
    color: rgba(220, 38, 38, .92);
    font-size: 12px;
    line-height: 1.35;
}

.resolutionWrap {
    display: grid;
    gap: 10px;
}

.radioCard {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border-radius: 16px;
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, .12);
    background: rgba(255, 255, 255, .90);
    cursor: pointer;
    transition: box-shadow .12s ease, transform .12s ease;
}

.radioCard:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 26px rgba(2, 6, 23, .10);
}

.radioCard input {
    margin-top: 4px;
    accent-color: var(--accent);
}

.radioTitle {
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 10px;
}

.resolutionSub {
    margin-top: 10px;
    border-radius: 16px;
    padding: 12px;
    border: 1px dashed rgba(15, 23, 42, .18);
    background: rgba(15, 23, 42, .03);
}

body.modalOpen {
    overflow: hidden;
}

.toastHost {
    position: fixed;
    right: 16px;
    bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 60;
    max-width: 360px;
}

.toast {
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, .12);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 20px 34px rgba(2, 6, 23, .18);
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    animation: toastIn .16s ease-out;
}

.toast .toastTitle {
    font-weight: 900;
}

.toast .toastBody {
    font-size: 12px;
    color: rgba(15, 23, 42, .72);
    margin-top: 4px;
}

@keyframes toastIn {
    from {
        transform: translateY(8px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hiddentext {
    visibility: hidden;
    /* 只隐藏，仍占位 */
}

/* Attendance detail page */
.detail-card {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 16px;
    overflow: hidden;
}

.detail-header {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    background: rgba(15, 23, 42, .03);
}

.detail-title {
    font-size: 18px;
    font-weight: 850;
}

.detail-subtitle {
    margin-top: 4px;
}

.detail-body {
    padding: 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 900px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.detail-section {
    background: rgba(15, 23, 42, .03);
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 14px;
    padding: 14px;
}

.detail-section-title {
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(15, 23, 42, .80);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(15, 23, 42, .05);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}

.detail-value {
    font-size: 13px;
    font-weight: 750;
}

.detail-map {
    border-radius: 12px;
    overflow: hidden;
    min-height: 80px;
    border: 1px solid rgba(15, 23, 42, .08);
    background: rgba(15, 23, 42, .02);
}

.detail-placeholder {
    padding: 24px;
    text-align: center;
    font-size: 13px;
}

.detail-photo-wrap {
    min-height: 80px;
}

.selfie-photo {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, .10);
    object-fit: cover;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .10);
}


/* ── Group 4 total work time card ── */
.total-work-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fedbdd;
    border: 1px solid rgba(238, 42, 54, .25);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 16px;
}

.total-work-card .tw-label {
    font-weight: 700;
    font-size: 13px;
    color: #b91c1c;
}

.total-work-card .tw-value {
    font-size: 20px;
    font-weight: 900;
    color: #991b1b;
    letter-spacing: .5px;
}