:root {
    --sc-cobalt: #184EBB;
    --sc-cobalt-bright: #1D4ED8;
    --sc-cobalt-soft: #EEF4FF;
    --sc-bg: #F5F7FC;
    --sc-surface: #FFFFFF;
    --sc-border: #E2E8F0;
    --sc-text: #0F172A;
    --sc-navy: #0F172A;
    --sc-muted: #64748B;
    --sc-radius: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--sc-bg);
    color: var(--sc-text);
}

h1, h2, h3, h4, h5, h6, .sc-heading, .sc-brand-title {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
}

.btn-primary {
    background-color: var(--sc-cobalt-bright);
    border-color: var(--sc-cobalt-bright);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--sc-cobalt);
    border-color: var(--sc-cobalt);
}

.sc-auth-body {
    background: radial-gradient(circle at top right, #DBEAFE 0%, var(--sc-bg) 52%);
}

.sc-auth-card {
    border-radius: 24px;
    border: 1px solid var(--sc-border) !important;
}

.sc-shell {
    min-height: 100vh;
}

/* Desktop Navigation Rail (mirrors Android NavigationRail) */
.sc-rail {
    width: 248px;
    flex-shrink: 0;
    background: var(--sc-surface);
    border-right: 1px solid var(--sc-border);
    padding: 20px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sc-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
}

.sc-brand-logo-sm {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    object-fit: cover;
}

.sc-brand-title {
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.15;
    color: var(--sc-text);
}

.sc-brand-sub {
    font-size: 0.72rem;
    color: var(--sc-muted);
    font-weight: 500;
}

.sc-rail-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 14px;
    color: var(--sc-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sc-rail-link:hover {
    background-color: var(--sc-cobalt-soft);
    color: var(--sc-cobalt);
}

.sc-rail-link.active {
    background-color: var(--sc-cobalt-soft);
    color: var(--sc-cobalt-bright);
}

.sc-rail-link i {
    width: 18px;
    text-align: center;
}

.sc-topbar {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--sc-border);
}

.sc-content-pad {
    padding-bottom: 92px !important;
}

@media (min-width: 992px) {
    .sc-content-pad {
        padding-bottom: 28px !important;
    }
}

/* Mobile Bottom Navigation Bar (mirrors Android NavigationBar) */
.sc-bottom-nav {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--sc-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    z-index: 1030;
}

.sc-bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 6px;
    border-radius: 12px;
    color: var(--sc-muted);
    text-decoration: none;
    font-size: 0.65rem;
    font-weight: 600;
    min-width: 52px;
    flex-shrink: 0;
    white-space: nowrap;
}

.sc-bottom-item i {
    font-size: 1.05rem;
}

.sc-bottom-item.active {
    color: var(--sc-cobalt-bright);
    background-color: var(--sc-cobalt-soft);
}

/* App-like Cards & Controls */
.sc-card {
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.sc-hero-card {
    background: linear-gradient(135deg, var(--sc-cobalt) 0%, var(--sc-cobalt-bright) 100%);
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(24, 78, 187, 0.22);
}

.sc-kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.sc-kpi-val {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.15;
}

.sc-kpi-label {
    font-size: 0.78rem;
    color: var(--sc-muted);
    font-weight: 500;
}

.sc-input {
    border-radius: 12px;
    border-color: var(--sc-border);
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.sc-input:focus {
    border-color: var(--sc-cobalt-bright);
    box-shadow: 0 0 0 0.2rem rgba(29, 78, 216, 0.14);
}

.sc-pill-select {
    border-radius: 999px;
    border-color: var(--sc-border);
    max-width: 240px;
}

.sc-badge-cobalt {
    background-color: var(--sc-cobalt-soft);
    color: var(--sc-cobalt-bright);
    font-weight: 600;
}

.sc-modal {
    border-radius: 22px;
    border: none;
}

.letter-spacing-code {
    letter-spacing: 0.28em;
}

/* Weekly Roster Matrix (Zero-table responsive CSS Grid) */
.sc-matrix-scroll {
    overflow-x: auto;
    border: 1px solid var(--sc-border);
    border-radius: 18px;
    background: var(--sc-surface);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}

.sc-matrix-grid {
    min-width: 1180px;
}

.sc-matrix-header,
.sc-matrix-row {
    display: grid;
    grid-template-columns: minmax(215px, 1.2fr) repeat(7, minmax(140px, 1fr));
    border-bottom: 1px solid var(--sc-border);
}

.sc-matrix-header {
    background: #F8FAFC;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 4;
}

.sc-matrix-row:last-child {
    border-bottom: none;
}

.sc-matrix-emp-head,
.sc-matrix-emp-cell {
    padding: 0.75rem 0.85rem;
    border-right: 1px solid var(--sc-border);
    background: var(--sc-surface);
    position: sticky;
    left: 0;
    z-index: 3;
}

.sc-matrix-emp-head {
    background: #F8FAFC;
    z-index: 5;
    display: flex;
    align-items: center;
}

.sc-matrix-day-head {
    padding: 0.65rem 0.6rem;
    border-right: 1px solid var(--sc-border);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.sc-matrix-day-head:last-child,
.sc-matrix-day-cell:last-child {
    border-right: none;
}

.sc-matrix-day-cell {
    padding: 0.5rem;
    border-right: 1px solid var(--sc-border);
    background: #F8FAFC;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.35rem;
    min-height: 122px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.sc-matrix-day-cell.is-active {
    background: #FFFFFF;
    box-shadow: inset 3px 0 0 var(--sc-cell-color, var(--sc-cobalt-bright));
}

.sc-matrix-day-cell.is-free {
    background: #F8FAFC;
}

.sc-matrix-day-cell.is-absent {
    background: #FFF7ED;
    border-bottom-color: #FED7AA;
}

.sc-matrix-day-cell.is-absent-vacation {
    background: #FEF3C7;
}

.sc-matrix-day-cell.is-absent-sick {
    background: #FEE2E2;
}

.sc-matrix-day-cell.is-absent-comp {
    background: #E0E7FF;
}

.sc-matrix-absence-box {
    border-radius: 10px;
    padding: 0.45rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.76rem;
    font-weight: 600;
}

.sc-matrix-day-cell.is-absent-vacation .sc-matrix-absence-box {
    color: #92400E;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid #FCD34D;
}

.sc-matrix-day-cell.is-absent-sick .sc-matrix-absence-box {
    color: #991B1B;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #FCA5A5;
}

.sc-matrix-day-cell.is-absent-comp .sc-matrix-absence-box {
    color: #3730A3;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #A5B4FC;
}

.sc-matrix-day-cell.is-absent-other .sc-matrix-absence-box {
    color: #334155;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #CBD5E1;
}

.sc-matrix-time-input {
    padding: 0.2rem 0.35rem;
    font-size: 0.78rem;
}

.sc-roster-save-bar {
    position: sticky;
    bottom: 72px;
    z-index: 20;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

@media (min-width: 992px) {
    .sc-roster-save-bar {
        bottom: 14px;
    }
}

@media (max-width: 991.98px) {
    .sc-matrix-scroll {
        overflow-x: visible;
        border: none;
        background: transparent;
        box-shadow: none;
    }

    .sc-matrix-grid {
        min-width: 0;
        display: grid;
        gap: 0.85rem;
    }

    .sc-matrix-header {
        display: none;
    }

    .sc-matrix-row {
        display: grid;
        grid-template-columns: 1fr;
        border: 1px solid var(--sc-border);
        border-radius: 16px;
        background: var(--sc-surface);
        overflow: hidden;
    }

    .sc-matrix-emp-cell {
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--sc-border);
    }

    .sc-matrix-day-cell {
        border-right: none;
        border-bottom: 1px solid var(--sc-border);
        min-height: auto;
    }

    .sc-matrix-day-cell:last-child {
        border-bottom: none;
    }
}

/* Shift Models Management */
.sc-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(15, 23, 42, 0.14);
}

.sc-color-swatch-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.sc-color-swatch-btn.is-selected,
.sc-color-swatch-btn.is-active {
    border-color: #0F172A;
    transform: scale(1.1);
    box-shadow: 0 0 0 2px #FFFFFF inset;
}

/* Schedule Calendar View (Zero-HTML-Table pure CSS Grid) */
.sc-cal-wrapper {
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.sc-cal-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sc-cal-week-grid,
.sc-cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(140px, 1fr));
    min-width: 980px;
}

.sc-cal-day-header {
    background: #F8FAFC;
    padding: 0.65rem 0.5rem;
    text-align: center;
    border-bottom: 2px solid var(--sc-border);
    border-right: 1px solid var(--sc-border);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--sc-navy);
}

.sc-cal-day-header:last-child {
    border-right: none;
}

.sc-cal-day-header.is-today {
    background: #EFF6FF;
    color: var(--sc-cobalt-bright);
    border-bottom-color: var(--sc-cobalt-bright);
}

.sc-cal-day-cell {
    background: #FFFFFF;
    border-bottom: 1px solid var(--sc-border);
    border-right: 1px solid var(--sc-border);
    padding: 0.5rem;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    transition: background-color 0.12s ease;
}

.sc-cal-day-cell:nth-child(7n) {
    border-right: none;
}

.sc-cal-day-cell.is-today {
    background: #F8FAFF;
}

.sc-cal-day-cell.is-outside-month {
    background: #F8FAFC;
    opacity: 0.55;
}

.sc-cal-day-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.2rem;
}

.sc-cal-date-number {
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.sc-cal-day-cell.is-today .sc-cal-date-number {
    background: var(--sc-cobalt-bright);
    color: #FFFFFF;
}

.sc-cal-shift-chip {
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-left: 3px solid var(--sc-cobalt-bright);
    border-radius: 8px;
    padding: 0.35rem 0.45rem;
    font-size: 0.76rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.sc-cal-shift-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.sc-cal-shift-chip.is-open {
    border-left-color: #06B6D4;
    background: #ECFEFF;
}

.sc-cal-shift-chip.is-changed {
    border-left-color: #F59E0B;
}

.sc-cal-shift-title {
    font-weight: 700;
    color: var(--sc-navy);
    line-height: 1.2;
}

.sc-cal-shift-time {
    color: #64748B;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.sc-cal-shift-emp {
    color: #334155;
    font-size: 0.73rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.sc-cal-filter-bar {
    background: var(--sc-surface);
    border: 1px solid var(--sc-border);
    border-radius: var(--sc-radius);
    padding: 0.75rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

