:root {
    --bg: #f4f7fb;
    --text: #14213d;
    --muted: #6b7280;
    --line: #e7edf5;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
}

* { box-sizing: border-box; }
body {
    font-family: 'Hind Siliguri', sans-serif;
    background: linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
    color: var(--text);
}

.app-navbar {
    background: linear-gradient(90deg, #536dfe 0%, #4f46e5 100%);
}

.navbar-brand, .nav-link, .btn, .form-control, .form-select, .table, .badge {
    font-family: 'Hind Siliguri', sans-serif;
}

.card, .mini-stat-card, .holiday-static-box {
    border: 1px solid rgba(255,255,255,.7);
    box-shadow: var(--shadow);
}

.compact-alert {
    padding: .7rem .9rem;
}

.dashboard-topbar h2 { font-size: 1.25rem; }
.dashboard-topbar .btn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; }

.mini-stat-card {
    min-height: 102px;
    border-radius: 18px;
    padding: 10px 12px;
    position: relative;
    overflow: hidden;
    color: #17324d;
}
.mini-stat-card::after {
    content: '';
    position: absolute;
    right: -18px;
    top: -18px;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255,255,255,.28);
}
.mini-stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.68);
    font-size: 1rem;
    margin-bottom: .35rem;
}
.mini-stat-label {
    font-size: .76rem;
    color: rgba(20, 33, 61, .78);
    line-height: 1.2;
    min-height: 30px;
}
.mini-stat-value {
    font-size: 1.28rem;
    font-weight: 700;
    line-height: 1.05;
    margin-top: 2px;
    word-break: break-word;
}
.mini-stat-text { font-size: 1rem; }
.mini-stat-smalltext { font-size: .88rem; line-height: 1.15; }
.mini-stat-footnote, .mini-date { font-size: .72rem; color: rgba(20, 33, 61, .7); }
.compact-countdown { font-size: .95rem; }

.grad-blue   { background: linear-gradient(135deg, #eef4ff, #d8e8ff); }
.grad-green  { background: linear-gradient(135deg, #eefdf4, #d5f5e3); }
.grad-orange { background: linear-gradient(135deg, #fff6ea, #ffe2bd); }
.grad-purple { background: linear-gradient(135deg, #f3efff, #e1d7ff); }
.grad-cyan   { background: linear-gradient(135deg, #ecfbff, #cff4fb); }
.grad-pink   { background: linear-gradient(135deg, #fff0f6, #ffd5e5); }
.grad-teal   { background: linear-gradient(135deg, #edfffb, #ccf5eb); }
.grad-gold   { background: linear-gradient(135deg, #fff9e8, #ffefb8); }

.dashboard-note-card { background: rgba(255,255,255,.8); }

.timeline-box {
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
}
.timeline-box.success { background: #eefbf3; }
.timeline-box.warning { background: #fff9e7; }
.timeline-box.info { background: #eef6ff; }
.countdown { font-weight: 700; color: #204d8d; }

.row-class { background: #eefbf3 !important; }
.row-free { background: #f7f8fb !important; }
.tiffin-row { background: #fff9e8 !important; }
.tick-cell { text-align: center; }
.schedule-checkbox { width: 1.25rem; height: 1.25rem; }
.day-card-period { width: 95px; }

.holiday-static-box {
    border-radius: 16px;
    background: linear-gradient(135deg, #fffdf0, #f8f5d6);
    padding: 14px;
}

.weekly-grid th, .weekly-grid td { vertical-align: middle; }
.weekly-transposed thead th {
    background: #f8fafc;
    min-width: 150px;
}
.weekly-transposed .day-head,
.weekly-transposed .sticky-day-col {
    min-width: 120px;
    background: rgba(255,255,255,.9);
}
.cell-has-class { background: rgba(255,255,255,.55); }
.cell-free { background: rgba(255,255,255,.22); }
.day-row-sun > * { background-color: #fff7ed !important; }
.day-row-mon > * { background-color: #eff6ff !important; }
.day-row-tue > * { background-color: #f0fdf4 !important; }
.day-row-wed > * { background-color: #faf5ff !important; }
.day-row-thu > * { background-color: #fefce8 !important; }
.day-row-sun .cell-has-class,
.day-row-mon .cell-has-class,
.day-row-tue .cell-has-class,
.day-row-wed .cell-has-class,
.day-row-thu .cell-has-class {
    box-shadow: inset 0 0 0 1px rgba(34, 197, 94, .2);
}

.table > :not(caption) > * > * {
    padding: .7rem .65rem;
    border-color: var(--line);
}

.form-control, .form-select {
    border-radius: 14px;
    border-color: #d7e0ec;
    padding: .65rem .8rem;
}

.btn-primary {
    background: linear-gradient(90deg, #4f6df5 0%, #5b4cf6 100%);
    border: none;
}
.btn-primary:hover { opacity: .95; }

@media (max-width: 767px) {
    .container { max-width: 100%; }
    .dashboard-cards-row { --bs-gutter-x: .45rem; --bs-gutter-y: .45rem; }
    .mini-stat-card { min-height: 94px; padding: 9px 10px; border-radius: 16px; }
    .mini-stat-icon { width: 30px; height: 30px; font-size: .92rem; margin-bottom: .25rem; }
    .mini-stat-label { font-size: .68rem; min-height: 26px; }
    .mini-stat-value { font-size: 1rem; }
    .mini-stat-text { font-size: .86rem; }
    .mini-stat-smalltext { font-size: .74rem; }
    .compact-countdown { font-size: .8rem; }
    .dashboard-topbar h2 { font-size: 1.05rem; }
    .dashboard-topbar .small { font-size: .76rem; }
    .weekly-transposed thead th { min-width: 118px; }
}


.mini-stat-footnote {
    font-size: .68rem;
    color: rgba(20, 33, 61, .74);
    line-height: 1.15;
    margin-top: .2rem;
}
.dashboard-note-card .text-primary { color: #2b59ff !important; }

@media (max-width: 767px) {
    .mini-stat-footnote { font-size: .62rem; }
    .dashboard-note-card .card-body { padding: .65rem .8rem !important; }
}


.nextday-date-pill {
    background: linear-gradient(135deg, #eef4ff, #dde8ff);
    border: 1px solid #d7e2ff;
    padding: .65rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    color: #274c9b;
}
.nextday-stat-card {
    background: rgba(255,255,255,.85);
}
.stat-soft-blue { background: linear-gradient(135deg, #eff5ff, #dfeaff); }
.stat-soft-green { background: linear-gradient(135deg, #effdf4, #d8f7e5); }
.stat-soft-orange { background: linear-gradient(135deg, #fff7ee, #ffe7ca); }
.nextday-routine-card {
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(248,251,255,.92));
}
.nextday-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.nextday-item {
    display: grid;
    grid-template-columns: 118px 1fr;
    gap: 14px;
    align-items: stretch;
}
.nextday-time {
    background: linear-gradient(180deg, #f7faff, #eef4ff);
    border-radius: 18px;
    border: 1px solid #dfebff;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.nextday-time-badge {
    font-weight: 700;
    color: #224b9f;
    font-size: .95rem;
}
.nextday-time-line {
    width: 2px;
    height: 24px;
    background: linear-gradient(180deg, #bfd3ff, #84a7ff);
    margin: 8px 0;
    border-radius: 999px;
}
.nextday-time-end {
    font-size: .78rem;
    color: #6a7ba4;
    font-weight: 600;
}
.nextday-content {
    border: 1px solid #e7edf5;
    border-radius: 20px;
    background: #fff;
    padding: 14px 16px;
    box-shadow: 0 10px 30px rgba(31, 41, 55, 0.05);
}
.nextday-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.nextday-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .38rem .7rem;
    font-size: .78rem;
    font-weight: 600;
}
.chip-blue { background: #edf4ff; color: #2458b8; }
.chip-purple { background: #f3efff; color: #6941c6; }

@media (max-width: 767px) {
    .nextday-item {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .nextday-time {
        flex-direction: row;
        gap: 10px;
        justify-content: flex-start;
        padding: 10px 12px;
    }
    .nextday-time-line {
        width: 24px;
        height: 2px;
        margin: 0;
    }
    .nextday-content { padding: 12px; }
}


.dashboard-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #eef4ff 52%, #e2ebff 100%);
    border: 1px solid rgba(120, 146, 255, .18);
    box-shadow: 0 18px 36px rgba(58, 86, 162, 0.10);
}
.dashboard-hero-main {
    min-width: 0;
}
.dashboard-hero-badge {
    display: inline-flex;
    align-items: center;
    padding: .42rem .78rem;
    border-radius: 999px;
    background: rgba(79, 109, 245, .10);
    color: #3152c8;
    font-size: .82rem;
    font-weight: 700;
    margin-bottom: .55rem;
}
.dashboard-day-title {
    font-size: 2rem;
    font-weight: 700;
    color: #172b5a;
    line-height: 1.05;
}
.dashboard-datetime-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.dashboard-date-text {
    font-size: 1rem;
    font-weight: 600;
    color: #38508a;
}
.dashboard-clock-box {
    display: inline-flex;
    align-items: center;
    padding: .55rem .95rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #233b7b, #3457b6);
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 14px 26px rgba(47, 83, 178, 0.22);
}
.dashboard-hero-actions {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.btn-dashboard-action {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255,255,255,.9);
    box-shadow: 0 10px 20px rgba(48, 73, 145, 0.08);
}
.mini-stat-card {
    min-height: 116px;
    border-radius: 20px;
    padding: 12px 14px;
    color: #13274c;
}
.mini-stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.02));
    pointer-events: none;
}
.mini-stat-icon {
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    border-radius: 14px;
    margin-bottom: .45rem;
}
.mini-stat-label {
    font-size: .83rem;
    font-weight: 600;
    color: rgba(16, 30, 59, .82);
    min-height: 34px;
}
.mini-stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #102342;
}
.mini-stat-text { font-size: 1.12rem; font-weight: 700; }
.mini-stat-smalltext { font-size: .96rem; line-height: 1.16; font-weight: 700; }
.mini-stat-footnote, .mini-date {
    font-size: .76rem;
    color: rgba(18, 34, 65, .86);
    font-weight: 600;
}
.grad-blue   { background: linear-gradient(135deg, #dcecff, #bfd8ff); }
.grad-green  { background: linear-gradient(135deg, #d9f8e7, #b7edd0); }
.grad-orange { background: linear-gradient(135deg, #ffe7cb, #ffd29e); }
.grad-purple { background: linear-gradient(135deg, #eadfff, #d2c1ff); }
.grad-cyan   { background: linear-gradient(135deg, #d8f7ff, #bfefff); }
.grad-pink   { background: linear-gradient(135deg, #ffe0ed, #ffc5dc); }
.grad-teal   { background: linear-gradient(135deg, #d9f8f1, #b7ebdf); }
.grad-gold   { background: linear-gradient(135deg, #fff0bd, #ffe187); }

.dashboard-note-card {
    background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,245,255,.95));
    border: 1px solid rgba(156, 177, 236, .18);
}
.status-note-label {
    font-size: .86rem;
    font-weight: 700;
    color: #5b6f97;
}
.status-note-title {
    font-size: 1rem;
    font-weight: 700;
    color: #13274c;
}
.status-note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.status-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: .45rem .78rem;
    font-size: .84rem;
    font-weight: 700;
}
.chip-primary {
    background: #e4ecff;
    color: #204ec5;
}
.chip-muted {
    background: #f1f5fb;
    color: #41506b;
}
.ajax-alert {
    margin-bottom: 14px;
    font-weight: 600;
}
.ajax-inline-form {
    display: inline-flex;
}
@media (max-width: 767px) {
    .dashboard-hero {
        padding: 12px;
        border-radius: 20px;
        gap: 10px;
    }
    .dashboard-day-title { font-size: 1.42rem; }
    .dashboard-date-text { font-size: .84rem; }
    .dashboard-clock-box {
        font-size: 1rem;
        padding: .45rem .72rem;
        border-radius: 14px;
    }
    .dashboard-hero-badge {
        font-size: .72rem;
        margin-bottom: .42rem;
    }
    .btn-dashboard-action {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }
    .mini-stat-card {
        min-height: 102px;
        padding: 10px 11px;
        border-radius: 17px;
    }
    .mini-stat-icon {
        width: 32px;
        height: 32px;
        font-size: .98rem;
        border-radius: 12px;
        margin-bottom: .3rem;
    }
    .mini-stat-label {
        font-size: .72rem;
        min-height: 28px;
    }
    .mini-stat-value { font-size: 1.12rem; }
    .mini-stat-text { font-size: .92rem; }
    .mini-stat-smalltext { font-size: .78rem; }
    .mini-stat-footnote, .mini-date { font-size: .64rem; }
    .status-note-title { font-size: .9rem; }
    .status-chip { font-size: .73rem; padding: .38rem .62rem; }
}


/* v10 mobile clock visibility fix */
@media (max-width: 767px) {
    .dashboard-hero {
        flex-direction: column;
        align-items: stretch;
    }
    .dashboard-hero-main,
    .dashboard-hero-actions {
        width: 100%;
    }
    .dashboard-hero-actions {
        justify-content: flex-end;
        margin-top: 2px;
    }
    .dashboard-datetime-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }
    .dashboard-clock-box {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100%;
        justify-content: center;
        min-height: 46px;
        white-space: nowrap;
    }
    #liveClock {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        line-height: 1;
    }
}


/* v11 ultra-compact single-screen mobile dashboard */
@media (max-width: 767px) {
    body {
        font-size: 14px;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .app-navbar {
        position: sticky;
        top: 0;
        z-index: 1030;
    }

    .dashboard-hero {
        padding: 10px 10px 8px;
        border-radius: 18px;
        gap: 8px;
        margin-bottom: 10px !important;
    }

    .dashboard-hero-badge {
        font-size: .64rem;
        padding: .32rem .56rem;
        margin-bottom: .28rem;
    }

    .dashboard-day-title {
        font-size: 1.18rem;
        margin-bottom: 2px !important;
    }

    .dashboard-datetime-row {
        gap: 6px;
    }

    .dashboard-date-text {
        font-size: .76rem;
        line-height: 1.1;
    }

    .dashboard-clock-box {
        min-height: 40px;
        padding: .34rem .62rem;
        border-radius: 12px;
        font-size: .92rem;
        box-shadow: 0 8px 18px rgba(47, 83, 178, 0.18);
    }

    .dashboard-hero-actions {
        gap: 8px;
    }

    .btn-dashboard-action {
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: .9rem;
    }

    .dashboard-cards-row {
        --bs-gutter-x: .38rem;
        --bs-gutter-y: .38rem;
        margin-bottom: .15rem !important;
    }

    .dashboard-cards-row > [class*="col-"] {
        flex: 0 0 auto;
        width: 25%;
    }

    .mini-stat-card {
        min-height: 84px;
        height: 100%;
        padding: 8px 7px;
        border-radius: 14px;
        box-shadow: 0 8px 18px rgba(31, 41, 55, 0.06);
    }

    .mini-stat-card::after {
        width: 48px;
        height: 48px;
        right: -14px;
        top: -14px;
    }

    .mini-stat-icon {
        width: 26px;
        height: 26px;
        font-size: .8rem;
        border-radius: 9px;
        margin-bottom: .2rem;
    }

    .mini-stat-label {
        font-size: .58rem;
        min-height: 20px;
        line-height: 1.06;
        letter-spacing: -.1px;
        margin-bottom: 1px;
    }

    .mini-stat-value {
        font-size: .86rem;
        line-height: 1.02;
        letter-spacing: -.2px;
    }

    .mini-stat-text {
        font-size: .74rem;
    }

    .mini-stat-smalltext {
        font-size: .63rem;
        line-height: 1.05;
    }

    .mini-stat-footnote,
    .mini-date {
        font-size: .52rem;
        line-height: 1.02;
        margin-top: 2px;
    }

    .compact-countdown {
        font-size: .66rem !important;
        line-height: 1.05;
    }

    .dashboard-note-card {
        margin-top: 8px !important;
        border-radius: 14px !important;
    }

    .dashboard-note-card .card-body {
        padding: 10px 10px !important;
    }

    .status-note-label {
        font-size: .66rem;
        margin-bottom: 4px !important;
    }

    .status-note-title {
        font-size: .75rem;
        line-height: 1.1;
        margin-bottom: 4px !important;
    }

    .status-note-meta {
        gap: 5px;
    }

    .status-chip {
        font-size: .62rem;
        padding: .28rem .48rem;
        line-height: 1.06;
    }

    .compact-alert {
        padding: .55rem .7rem;
        margin-bottom: .5rem !important;
        border-radius: 14px !important;
    }

    .compact-alert .fw-bold {
        font-size: .8rem;
    }

    .compact-alert .small {
        font-size: .64rem;
        line-height: 1.15;
    }
}

/* Slightly taller phones / small tablets */
@media (min-width: 390px) and (max-width: 767px) {
    .mini-stat-card {
        min-height: 88px;
    }
    .mini-stat-value {
        font-size: .92rem;
    }
    .mini-stat-label {
        font-size: .6rem;
    }
}

/* Extremely small phones fallback: keep 2 columns if width is very tight */
@media (max-width: 340px) {
    .dashboard-cards-row > [class*="col-"] {
        width: 50%;
    }
    .mini-stat-card {
        min-height: 78px;
    }
}


/* v12 readable compact mobile dashboard override */
@media (max-width: 767px) {
    .dashboard-hero {
        padding: 12px 12px 10px !important;
        border-radius: 18px !important;
        gap: 10px !important;
    }

    .dashboard-hero-badge {
        font-size: .7rem !important;
        padding: .34rem .6rem !important;
        margin-bottom: .35rem !important;
    }

    .dashboard-day-title {
        font-size: 1.32rem !important;
        line-height: 1.08 !important;
    }

    .dashboard-date-text {
        font-size: .82rem !important;
    }

    .dashboard-clock-box {
        min-height: 42px !important;
        font-size: 1rem !important;
        padding: .42rem .72rem !important;
    }

    .btn-dashboard-action {
        width: 38px !important;
        height: 38px !important;
        font-size: .95rem !important;
    }

    .dashboard-cards-row {
        --bs-gutter-x: .5rem !important;
        --bs-gutter-y: .5rem !important;
    }

    .dashboard-cards-row > [class*="col-"] {
        width: 50% !important;
    }

    .mini-stat-card {
        min-height: 98px !important;
        padding: 10px 10px !important;
        border-radius: 16px !important;
    }

    .mini-stat-icon {
        width: 30px !important;
        height: 30px !important;
        font-size: .92rem !important;
        border-radius: 10px !important;
        margin-bottom: .28rem !important;
    }

    .mini-stat-label {
        font-size: .7rem !important;
        min-height: 24px !important;
        line-height: 1.12 !important;
    }

    .mini-stat-value {
        font-size: 1rem !important;
        line-height: 1.08 !important;
    }

    .mini-stat-text {
        font-size: .86rem !important;
    }

    .mini-stat-smalltext {
        font-size: .74rem !important;
        line-height: 1.12 !important;
    }

    .mini-stat-footnote,
    .mini-date {
        font-size: .62rem !important;
        line-height: 1.1 !important;
    }

    .compact-countdown {
        font-size: .74rem !important;
        line-height: 1.12 !important;
    }

    .dashboard-note-card {
        margin-top: 10px !important;
        border-radius: 16px !important;
    }

    .dashboard-note-card .card-body {
        padding: 11px 12px !important;
    }

    .status-note-label {
        font-size: .72rem !important;
    }

    .status-note-title {
        font-size: .84rem !important;
        line-height: 1.18 !important;
    }

    .status-chip {
        font-size: .68rem !important;
        padding: .32rem .56rem !important;
        line-height: 1.12 !important;
    }

    .compact-alert {
        padding: .65rem .8rem !important;
    }

    .compact-alert .fw-bold {
        font-size: .86rem !important;
    }

    .compact-alert .small {
        font-size: .7rem !important;
        line-height: 1.18 !important;
    }
}


/* v13 mobile dashboard readability + inline bell/clock */
.dashboard-inline-tools {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.dashboard-day-title {
    font-size: 2.15rem;
}
.dashboard-date-text {
    font-size: 1.04rem;
    font-weight: 700;
}
.dashboard-clock-box {
    font-size: 1.28rem;
    min-height: 48px;
}
.btn-dashboard-action {
    width: 48px;
    height: 48px;
    font-size: 1rem;
}
.mini-stat-label {
    font-size: .9rem;
    min-height: 36px;
}
.mini-stat-value {
    font-size: 1.62rem;
}
.mini-stat-text {
    font-size: 1.18rem;
}
.mini-stat-smalltext {
    font-size: 1rem;
}
.mini-stat-footnote,
.mini-date {
    font-size: .8rem;
}
.compact-countdown {
    font-size: .98rem !important;
}
.status-note-label {
    font-size: .88rem;
}
.status-note-title {
    font-size: 1rem;
}
.status-chip {
    font-size: .86rem;
}

@media (max-width: 767px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    .dashboard-hero {
        padding: 10px 12px 8px !important;
        gap: 8px !important;
        margin-bottom: 8px !important;
    }
    .dashboard-day-title {
        font-size: 1.38rem !important;
        margin-bottom: 2px !important;
    }
    .dashboard-datetime-row {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px !important;
    }
    .dashboard-date-text {
        font-size: .86rem !important;
        line-height: 1.1;
    }
    .dashboard-inline-tools {
        width: 100%;
        display: grid;
        grid-template-columns: 38px 1fr auto;
        gap: 8px;
        align-items: center;
    }
    .dashboard-clock-box {
        width: 100%;
        min-height: 40px !important;
        padding: .38rem .65rem !important;
        border-radius: 12px !important;
        font-size: .98rem !important;
        justify-content: center;
        white-space: nowrap;
    }
    .btn-dashboard-action {
        width: 38px !important;
        height: 38px !important;
        min-width: 38px;
        border-radius: 11px !important;
        font-size: .92rem !important;
        padding: 0 !important;
    }
    #installAppBtn[hidden] {
        display: none !important;
    }

    .dashboard-cards-row {
        --bs-gutter-x: .44rem !important;
        --bs-gutter-y: .44rem !important;
        margin-bottom: 0 !important;
    }
    .dashboard-cards-row > [class*="col-"] {
        width: 50% !important;
    }
    .mini-stat-card {
        min-height: 90px !important;
        padding: 9px 10px !important;
        border-radius: 15px !important;
    }
    .mini-stat-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: .88rem !important;
        margin-bottom: .22rem !important;
    }
    .mini-stat-label {
        font-size: .76rem !important;
        min-height: 26px !important;
        line-height: 1.12 !important;
        margin-bottom: 2px !important;
    }
    .mini-stat-value {
        font-size: 1.08rem !important;
        line-height: 1.08 !important;
    }
    .mini-stat-text {
        font-size: .92rem !important;
    }
    .mini-stat-smalltext {
        font-size: .78rem !important;
        line-height: 1.12 !important;
    }
    .mini-stat-footnote,
    .mini-date {
        font-size: .64rem !important;
        line-height: 1.1 !important;
    }
    .compact-countdown {
        font-size: .76rem !important;
        line-height: 1.12 !important;
    }

    .dashboard-note-card {
        margin-top: 7px !important;
        border-radius: 15px !important;
    }
    .dashboard-note-card .card-body {
        padding: 9px 10px !important;
    }
    .status-note-label {
        font-size: .72rem !important;
        margin-bottom: 4px !important;
    }
    .status-note-title {
        font-size: .82rem !important;
        line-height: 1.14 !important;
        margin-bottom: 4px !important;
    }
    .status-chip {
        font-size: .68rem !important;
        padding: .3rem .5rem !important;
        line-height: 1.08 !important;
    }
    .compact-alert {
        padding: .58rem .74rem !important;
        margin-bottom: .42rem !important;
    }
    .compact-alert .fw-bold {
        font-size: .82rem !important;
    }
    .compact-alert .small {
        font-size: .68rem !important;
        line-height: 1.14 !important;
    }
}


.batch-series-card {
    border: 1px solid rgba(140, 154, 255, .18);
}
.series-smw {
    background: linear-gradient(135deg, #eef5ff, #deebff);
}
.series-rtb {
    background: linear-gradient(135deg, #f6efff, #ead9ff);
}
.batch-help-card {
    background: linear-gradient(135deg, #fffef4, #f6f1d8);
}


.category-summary-card {
    border-radius: 22px;
    padding: 16px 18px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.7);
    box-shadow: 0 14px 34px rgba(31, 41, 55, 0.08);
    height: 100%;
}
.class-summary-card {
    background: linear-gradient(135deg, #eef5ff 0%, #dceaff 100%);
}
.batch-summary-card {
    background: linear-gradient(135deg, #eefdf4 0%, #daf7e7 100%);
}
.category-summary-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}
.category-summary-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.72);
    color: #1d4ed8;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.batch-summary-card .category-summary-icon {
    color: #15803d;
}
.category-summary-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: #12284c;
    line-height: 1.15;
}
.category-summary-subtitle {
    font-size: .82rem;
    font-weight: 600;
    color: rgba(18, 40, 76, .72);
    margin-top: 3px;
}
.category-summary-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.category-pill {
    border-radius: 16px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.pill-blue { background: linear-gradient(135deg, #dcecff, #bfd7ff); }
.pill-cyan { background: linear-gradient(135deg, #d8f7ff, #bfefff); }
.pill-purple { background: linear-gradient(135deg, #eadfff, #d5c8ff); }
.pill-green { background: linear-gradient(135deg, #d9f8e7, #b7edd0); }
.pill-orange { background: linear-gradient(135deg, #ffe7cb, #ffd29e); }
.pill-label {
    font-size: .76rem;
    font-weight: 700;
    color: rgba(18, 40, 76, .78);
}
.pill-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: #102342;
    line-height: 1.05;
}
.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.category-tag {
    display: inline-flex;
    align-items: center;
    padding: .42rem .75rem;
    border-radius: 999px;
    background: rgba(255,255,255,.7);
    color: #1e3a5f;
    font-size: .78rem;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.38);
}
.muted-tag {
    background: rgba(255,255,255,.55);
    color: #516177;
}

@media (max-width: 767px) {
    .category-summary-row {
        --bs-gutter-x: .55rem;
        --bs-gutter-y: .55rem;
    }
    .category-summary-card {
        padding: 12px;
        border-radius: 18px;
    }
    .category-summary-head {
        gap: 10px;
        margin-bottom: 10px;
    }
    .category-summary-icon {
        width: 38px;
        height: 38px;
        border-radius: 13px;
        font-size: 1rem;
    }
    .category-summary-title {
        font-size: .95rem;
    }
    .category-summary-subtitle {
        font-size: .72rem;
    }
    .category-summary-stats {
        gap: 8px;
    }
    .category-pill {
        padding: 8px 9px;
        border-radius: 13px;
    }
    .pill-label {
        font-size: .66rem;
    }
    .pill-value {
        font-size: 1.02rem;
    }
    .category-tags {
        gap: 6px;
        margin-top: 10px;
    }
    .category-tag {
        padding: .34rem .58rem;
        font-size: .68rem;
    }
}


.progress-summary-card,
.session-board-card,
.nextday-combined-card {
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(244,248,255,.94));
    border: 1px solid rgba(225,232,245,.95);
    box-shadow: 0 14px 34px rgba(31, 41, 55, 0.06);
    border-radius: 22px;
    padding: 16px 18px;
}
.progress-batch-card {
    background: linear-gradient(180deg, rgba(241,255,247,.96), rgba(236,250,242,.94));
}
.progress-card-head,
.nextday-combined-head,
.session-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.progress-card-title,
.session-board-title,
.nextday-combined-title {
    font-size: 1rem;
    font-weight: 800;
    color: #13274c;
}
.progress-card-subtitle,
.session-board-subtitle,
.nextday-combined-subtitle {
    font-size: .82rem;
    color: #65748b;
    font-weight: 600;
}
.progress-percent {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1e3a8a;
}
.custom-progress {
    height: 12px;
    background: #e8eef9;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 12px;
}
.progress-bar-class {
    background: linear-gradient(90deg, #4f6df5, #7aa5ff);
}
.progress-bar-batch {
    background: linear-gradient(90deg, #16a34a, #5fe08b);
}
.session-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}
.session-item-card {
    display: grid;
    grid-template-columns: 130px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid #e7edf5;
    background: linear-gradient(135deg, #ffffff, #f6f9ff);
}
.private-board-card .session-item-card {
    background: linear-gradient(135deg, #ffffff, #f3fff7);
}
.session-item-card.is-disabled {
    opacity: .52;
    filter: grayscale(.08);
    background: linear-gradient(135deg, #f2f4f8, #edf1f6);
}
.session-item-card.is-live {
    border-color: #8fb4ff;
    box-shadow: 0 0 0 2px rgba(79, 109, 245, .08);
}
.session-item-card.private-live {
    border-color: #7dd3a4;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, .08);
}
.session-time {
    font-weight: 800;
    font-size: .9rem;
    color: #224b9f;
}
.session-name {
    font-weight: 800;
    color: #172b5a;
    font-size: .96rem;
}
.session-meta {
    font-size: .8rem;
    color: #6b7280;
    margin-top: 3px;
    font-weight: 600;
}
.session-state {
    font-size: .78rem;
    font-weight: 800;
    padding: .38rem .68rem;
    border-radius: 999px;
    background: #eef4ff;
    color: #2954c3;
}
.is-disabled .session-state {
    background: #eceff4;
    color: #6b7280;
}
.private-board-card .session-state {
    background: #eafbf0;
    color: #13803f;
}
.empty-session-card {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f6f8fb;
    color: #64748b;
    font-weight: 600;
}
.nextday-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.next-badge {
    display: inline-flex;
    align-items: center;
    padding: .45rem .78rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
}
.badge-class {
    background: #e6eeff;
    color: #2447a8;
}
.badge-batch {
    background: #eafbf0;
    color: #13763c;
}
.mini-board {
    background: linear-gradient(180deg, #f7faff, #f1f6ff);
    border: 1px solid #e4ebfb;
    border-radius: 18px;
    padding: 14px;
    height: 100%;
}
.batch-mini-board {
    background: linear-gradient(180deg, #f5fff8, #edfbf1);
    border-color: #def2e4;
}
.mini-board-title {
    font-size: .92rem;
    font-weight: 800;
    color: #172b5a;
    margin-bottom: 10px;
}
.next-mini-item {
    display: grid;
    grid-template-columns: 132px 1fr;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px dashed #d9e4f6;
}
.next-mini-item:first-of-type {
    border-top: none;
    padding-top: 0;
}
.next-mini-time {
    font-size: .82rem;
    font-weight: 800;
    color: #224b9f;
}
.next-mini-main {
    font-size: .82rem;
    font-weight: 700;
    color: #334155;
}

@media (max-width: 767px) {
    .progress-summary-card,
    .session-board-card,
    .nextday-combined-card {
        padding: 12px;
        border-radius: 18px;
    }
    .progress-card-title,
    .session-board-title,
    .nextday-combined-title {
        font-size: .9rem;
    }
    .progress-card-subtitle,
    .session-board-subtitle,
    .nextday-combined-subtitle {
        font-size: .72rem;
    }
    .progress-percent {
        font-size: 1rem;
    }
    .session-item-card {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px 11px;
        border-radius: 15px;
    }
    .session-time {
        font-size: .82rem;
    }
    .session-name {
        font-size: .88rem;
    }
    .session-meta {
        font-size: .74rem;
    }
    .session-state {
        width: fit-content;
        font-size: .7rem;
        padding: .3rem .56rem;
    }
    .next-mini-item {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .next-mini-time,
    .next-mini-main {
        font-size: .74rem;
    }
}


/* ===== Premium glass dashboard vNext ===== */
.glass-card,
.ticker-card,
.board-card,
.nextday-card {
    border-radius: 22px;
    padding: 14px 16px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.62);
    box-shadow: 0 14px 34px rgba(31,41,55,.08);
}
.glass-card {
    background: rgba(255,255,255,.55);
}
.glass-blue { background: linear-gradient(135deg, rgba(220,235,255,.72), rgba(190,215,255,.54)); }
.glass-green { background: linear-gradient(135deg, rgba(220,255,235,.72), rgba(180,245,210,.54)); }
.glass-orange { background: linear-gradient(135deg, rgba(255,240,220,.72), rgba(255,210,160,.54)); }
.glass-purple { background: linear-gradient(135deg, rgba(240,230,255,.72), rgba(210,190,255,.54)); }
.glass-cyan { background: linear-gradient(135deg, rgba(220,249,255,.72), rgba(189,239,255,.54)); }
.glass-pink { background: linear-gradient(135deg, rgba(255,232,242,.72), rgba(255,205,225,.54)); }
.glass-teal { background: linear-gradient(135deg, rgba(220,255,248,.72), rgba(187,242,227,.54)); }
.glass-gold { background: linear-gradient(135deg, rgba(255,245,215,.74), rgba(255,226,153,.56)); }
.glass-ai { background: linear-gradient(135deg, rgba(236,239,255,.78), rgba(221,229,255,.62)); }

.glass-head {
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:8px;
}
.glass-icon {
    width:34px;
    height:34px;
    border-radius:12px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.62);
    color:#224b9f;
    font-size:1rem;
    flex-shrink:0;
}
.glass-title {
    font-size:.9rem;
    font-weight:800;
    color:#172b5a;
    line-height:1.1;
}
.glass-value {
    font-size:1.22rem;
    font-weight:800;
    color:#102342;
    line-height:1.08;
}
.glass-value-text,
.glass-value-mix {
    font-size:.94rem;
    line-height:1.18;
}
.glass-sub {
    margin-top:4px;
    font-size:.75rem;
    color:#5b6475;
    font-weight:600;
}
.glass-count {
    font-size:1rem;
}
.progress-neo {
    height:10px;
    background:rgba(255,255,255,.52);
    border-radius:999px;
    overflow:hidden;
    box-shadow: inset 0 1px 2px rgba(15,23,42,.08);
}
.animated-progress {
    position: relative;
    overflow: hidden;
}
.animated-progress::after {
    content:'';
    position:absolute;
    inset:0;
    background:linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
    animation: progressShine 2.2s linear infinite;
}
@keyframes progressShine {
    from { transform: translateX(-100%); }
    to { transform: translateX(200%); }
}

.ticker-card {
    background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(240,246,255,.68));
}
.ticker-head,
.board-head,
.nextday-head {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}
.ticker-title,
.board-title,
.nextday-title,
.next-mini-title {
    font-size:.94rem;
    font-weight:800;
    color:#172b5a;
}
.ticker-sub,
.board-sub,
.nextday-sub {
    font-size:.76rem;
    color:#5b6475;
    font-weight:600;
}
.timeline-ticker {
    overflow:hidden;
    margin-top:10px;
    mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.timeline-track {
    display:flex;
    gap:10px;
    width:max-content;
    animation: moveTicker 28s linear infinite;
}
.timeline-ticker:hover .timeline-track {
    animation-play-state: paused;
}
@keyframes moveTicker {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.timeline-pill {
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:.52rem .8rem;
    border-radius:999px;
    white-space:nowrap;
    font-size:.78rem;
    font-weight:700;
    border:1px solid rgba(255,255,255,.58);
    box-shadow: 0 8px 20px rgba(31,41,55,.05);
}
.timeline-pill-class {
    background: linear-gradient(135deg, rgba(230,240,255,.88), rgba(212,227,255,.8));
    color:#214eae;
}
.timeline-pill-private {
    background: linear-gradient(135deg, rgba(233,255,241,.9), rgba(210,247,224,.82));
    color:#147a3f;
}
.pill-time { font-weight:800; }

.suggestion-list {
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-top:8px;
}
.suggestion-item {
    padding:.58rem .72rem;
    border-radius:14px;
    background:rgba(255,255,255,.54);
    font-size:.76rem;
    color:#39485d;
    font-weight:700;
    line-height:1.3;
}

.board-card {
    background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(243,248,255,.82));
}
.board-private {
    background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(240,255,244,.82));
}
.board-list {
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-top:10px;
}
.board-item {
    display:grid;
    grid-template-columns: 122px 1fr auto;
    align-items:center;
    gap:10px;
    padding:10px 12px;
    border-radius:16px;
    border:1px solid #e6ecf6;
    background:rgba(255,255,255,.64);
}
.board-item.is-disabled {
    opacity:.5;
    filter:grayscale(.12);
}
.board-item.is-live {
    box-shadow: 0 0 0 2px rgba(79,109,245,.08);
    border-color:#9fbaff;
}
.board-item.private-live {
    box-shadow: 0 0 0 2px rgba(34,197,94,.08);
    border-color:#9ce0b8;
}
.board-time {
    font-size:.78rem;
    font-weight:800;
    color:#214eae;
}
.board-name {
    font-size:.88rem;
    font-weight:800;
    color:#172b5a;
}
.board-meta {
    font-size:.74rem;
    font-weight:600;
    color:#667085;
}
.board-state {
    font-size:.68rem;
    font-weight:800;
    padding:.34rem .58rem;
    border-radius:999px;
    background:#edf3ff;
    color:#2447a8;
}
.board-private .board-state {
    background:#e9f9ef;
    color:#13763c;
}
.board-empty {
    padding:.8rem .9rem;
    border-radius:14px;
    background:rgba(255,255,255,.56);
    font-size:.76rem;
    font-weight:700;
    color:#6b7280;
    margin-top:8px;
}

.nextday-card {
    background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(247,250,255,.86));
}
.nextday-chip-group {
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}
.nextday-chip {
    display:inline-flex;
    align-items:center;
    padding:.44rem .74rem;
    border-radius:999px;
    font-size:.74rem;
    font-weight:800;
}
.nextday-chip-class { background:#e6eeff; color:#2447a8; }
.nextday-chip-private { background:#e9f9ef; color:#13763c; }
.next-mini-board {
    padding:12px;
    border-radius:18px;
    background:linear-gradient(180deg, rgba(240,246,255,.8), rgba(255,255,255,.7));
    border:1px solid #e5ecf8;
    height:100%;
}
.next-mini-board-private {
    background:linear-gradient(180deg, rgba(240,255,244,.8), rgba(255,255,255,.7));
}
.next-mini-item {
    display:grid;
    grid-template-columns: 126px 1fr;
    gap:10px;
    padding:9px 0;
    border-top:1px dashed #dbe5f4;
}
.next-mini-item:first-of-type {
    border-top:none;
    padding-top:0;
}
.next-mini-time {
    font-size:.76rem;
    font-weight:800;
    color:#214eae;
}
.next-mini-main {
    font-size:.76rem;
    font-weight:700;
    color:#374151;
}

.alert-toast {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 2000;
    width: min(360px, calc(100vw - 20px));
    opacity: 0;
    transform: translateY(18px) scale(.96);
    transition: all .25s ease;
}
.alert-toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.alert-toast-inner {
    display:flex;
    gap:12px;
    align-items:flex-start;
    padding:14px 14px 12px;
    border-radius:20px;
    background: linear-gradient(135deg, rgba(36,72,170,.96), rgba(52,87,182,.94));
    color:#fff;
    box-shadow:0 18px 40px rgba(31,41,55,.22);
}
.alert-toast-icon {
    width:40px;
    height:40px;
    border-radius:14px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.16);
    font-size:1rem;
    flex-shrink:0;
}
.alert-toast-title {
    font-size:.92rem;
    font-weight:800;
    line-height:1.1;
}
.alert-toast-body {
    margin-top:4px;
    font-size:.78rem;
    font-weight:600;
    line-height:1.3;
    color:rgba(255,255,255,.9);
}
.alert-toast-close {
    border:none;
    background:transparent;
    color:#fff;
    padding:0;
    font-size:.8rem;
    margin-left:auto;
}

@media (max-width: 767px) {
    .glass-card,
    .ticker-card,
    .board-card,
    .nextday-card {
        padding:10px 12px;
        border-radius:18px;
    }
    .glass-head { gap:8px; margin-bottom:6px; }
    .glass-icon {
        width:28px;
        height:28px;
        border-radius:10px;
        font-size:.86rem;
    }
    .glass-title { font-size:.78rem; }
    .glass-value { font-size:.98rem; }
    .glass-value-text,
    .glass-value-mix,
    .glass-count { font-size:.8rem; }
    .glass-sub { font-size:.66rem; line-height:1.2; }
    .ticker-title,
    .board-title,
    .nextday-title,
    .next-mini-title { font-size:.82rem; }
    .ticker-sub,
    .board-sub,
    .nextday-sub { font-size:.67rem; }
    .timeline-pill {
        padding:.42rem .64rem;
        font-size:.68rem;
        gap:6px;
    }
    .suggestion-item { font-size:.67rem; padding:.5rem .6rem; }
    .board-item {
        grid-template-columns: 1fr;
        gap:6px;
        padding:9px 10px;
        border-radius:14px;
    }
    .board-time,
    .next-mini-time,
    .next-mini-main { font-size:.68rem; }
    .board-name { font-size:.76rem; }
    .board-meta { font-size:.66rem; }
    .board-state { width: fit-content; font-size:.62rem; padding:.28rem .5rem; }
    .next-mini-item {
        grid-template-columns: 1fr;
        gap:4px;
        padding:8px 0;
    }
    .alert-toast {
        right: 10px;
        left: 10px;
        bottom: 10px;
        width: auto;
    }
    .alert-toast-inner {
        padding:12px;
        border-radius:18px;
    }
    .alert-toast-title { font-size:.84rem; }
    .alert-toast-body { font-size:.7rem; }
}
