/* Cents Roster admin UI — utilitarian, dense, blue accent */
:root {
    --accent: #1E4FD9;
    --accent-hover: #1a44b8;
    --accent-soft: #e8edfc;
    --bg: #fafbfc;
    --surface: #ffffff;
    --surface-2: #f5f6f8;
    --border: #e4e7eb;
    --border-strong: #cdd2d9;
    --text: #1a1d21;
    --text-soft: #5b6371;
    --text-faint: #8b93a1;
    --danger: #d93a3a;
    --danger-soft: #fce8e8;
    --success: #2f9e63;
    --success-soft: #e6f4ec;
    --warning: #b57200;
    --warning-soft: #fdf2d9;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 2px 4px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 32px rgba(15, 23, 42, 0.10), 0 4px 8px rgba(15, 23, 42, 0.06);
    --radius: 6px;
    --radius-lg: 10px;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    padding: 7px 13px;
    border-radius: var(--radius);
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
button:hover:not(:disabled) { background: var(--surface-2); border-color: #b7bdc7; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}
button.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
button.danger {
    color: var(--danger);
    border-color: var(--border-strong);
}
button.danger:hover:not(:disabled) { background: var(--danger-soft); border-color: var(--danger); }
button.ghost { border-color: transparent; background: transparent; }
button.ghost:hover:not(:disabled) { background: var(--surface-2); border-color: var(--border); }
button.sm { padding: 4px 9px; font-size: 12px; }

input, select, textarea {
    font-family: inherit;
    font-size: 13px;
    padding: 6px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    outline: none;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
    width: 100%;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(30, 79, 217, 0.15);
}
input[type="checkbox"], input[type="radio"] {
    width: auto;
    accent-color: var(--accent);
}
label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-soft);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.mono { font-family: var(--font-mono); font-size: 12px; }
.soft { color: var(--text-soft); }
.faint { color: var(--text-faint); }
.small { font-size: 12px; }
.xs { font-size: 11px; }
.center { text-align: center; }
.right { text-align: right; }

/* --- App shell --- */
.shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}
.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px 12px 20px 12px;
    position: sticky;
    top: 0;
    align-self: start;
    max-height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 0 8px;
}
.logo-mark {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent);
    display: grid;
    place-items: center;
    color: white;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.02em;
}
.logo-text {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.01em;
}
.logo-text small {
    display: block;
    font-weight: 400;
    color: var(--text-faint);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1px;
}

.identity {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 10px 12px;
}
.identity label {
    margin-bottom: 6px;
}
.identity .who {
    font-weight: 500;
    font-size: 13px;
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}
.identity .who small {
    color: var(--text-faint);
    font-weight: 400;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.nav-heading {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    font-weight: 600;
    padding: 12px 10px 4px 10px;
}
.nav-item {
    padding: 7px 10px;
    border-radius: var(--radius);
    color: var(--text-soft);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: background 0.1s ease, color 0.1s ease;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item .icon { width: 14px; height: 14px; opacity: 0.8; flex-shrink: 0; }

/* --- Main --- */
.main {
    padding: 28px 32px 60px 32px;
    min-width: 0;
}
.page-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.page-header h1 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.page-header .sub {
    color: var(--text-soft);
    font-size: 13px;
    margin-top: 2px;
}
.page-header .actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* --- Card --- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.card + .card { margin-top: 18px; }
.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.card-header h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}
.card-body { padding: 16px 18px; }
.card-body.tight { padding: 0; }

/* --- Grid --- */
.grid {
    display: grid;
    gap: 14px;
}
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) {
    .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

.field {
    display: flex;
    flex-direction: column;
}

/* --- Table --- */
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th, .table td {
    text-align: left;
    padding: 10px 18px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    vertical-align: top;
}
.table th {
    background: var(--surface-2);
    font-weight: 500;
    font-size: 11px;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-strong);
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }
.table td.actions {
    text-align: right;
    white-space: nowrap;
}
.table .row-clickable { cursor: pointer; }

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--surface-2);
    color: var(--text-soft);
    border: 1px solid var(--border);
}
.badge.ok { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge.warn { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* --- Info tiles for /me and settings --- */
.kv-list {
    display: grid;
    grid-template-columns: max-content 1fr;
    row-gap: 8px;
    column-gap: 18px;
    align-items: baseline;
}
.kv-list dt {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-faint);
    font-weight: 500;
}
.kv-list dd { margin: 0; font-size: 13px; }

/* --- Alert --- */
.alert {
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface-2);
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}
.alert.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.alert.success { background: var(--success-soft); color: var(--success); border-color: transparent; }

/* --- Empty state --- */
.empty {
    padding: 40px 24px;
    text-align: center;
    color: var(--text-faint);
}
.empty h3 {
    margin: 0 0 6px 0;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-soft);
}
.empty p { margin: 0; font-size: 13px; }

/* --- Skeleton --- */
.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 0%, #eef0f3 50%, var(--surface-2) 100%);
    background-size: 200% 100%;
    border-radius: var(--radius);
    animation: shimmer 1.4s infinite;
    height: 16px;
    display: block;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Modal --- */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    display: grid;
    place-items: center;
    z-index: 100;
    padding: 20px;
    animation: fadeIn 0.14s ease;
}
.modal {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.16s ease;
}
.modal.wide { max-width: 720px; }
.modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h2 { margin: 0; font-size: 15px; font-weight: 600; }
.modal-body {
    padding: 18px 20px;
    overflow-y: auto;
}
.modal-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: var(--surface-2);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Toast --- */
#toasts {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    pointer-events: none;
}
.toast {
    background: var(--text);
    color: white;
    padding: 10px 14px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: 13px;
    max-width: 380px;
    animation: slideUp 0.18s ease;
    pointer-events: auto;
}
.toast.error { background: var(--danger); }
.toast.success { background: var(--success); }

/* --- API status pill in header --- */
.api-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-faint);
    padding: 3px 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
}
.api-status .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-faint);
}
.api-status.up .dot { background: var(--success); }
.api-status.down .dot { background: var(--danger); }

/* --- Hours editor --- */
.hours-row {
    display: grid;
    grid-template-columns: 100px 1fr 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.hours-row:last-child { border-bottom: none; }
.hours-row label { margin-bottom: 0; }
.hours-row .closed-toggle {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 12px;
    color: var(--text-soft);
}

/* --- Shift templates --- */
.tmpl-block {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    background: var(--surface-2);
    margin-bottom: 10px;
}
.tmpl-block-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
}
.tmpl-block-header strong { font-size: 13px; }

/* --- Store detail tabs --- */
.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
}
.tab {
    padding: 8px 14px;
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* --- Breadcrumb --- */
.crumb {
    font-size: 12px;
    color: var(--text-faint);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.crumb a { color: var(--text-faint); }
.crumb a:hover { color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════════
   SCHEDULE BUILDER
   ═══════════════════════════════════════════════════════════════════════ */

.sched-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 14px;
}
.sched-toolbar-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-faint);
    font-weight: 600;
}
.sched-toolbar select {
    min-width: 180px;
}
.sched-weeknav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 16px;
    border-left: 1px solid var(--border);
    margin-left: 4px;
}
.sched-weeklabel {
    font-weight: 600;
    font-size: 14px;
    min-width: 180px;
    text-align: center;
    color: var(--text);
}
.sched-weeknav button {
    padding: 4px 10px;
    font-size: 15px;
}
button.btn-today {
    font-size: 12px;
    padding: 4px 10px;
    margin-left: 6px;
    font-weight: 500;
}
.sched-viewtoggle {
    display: inline-flex;
    background: var(--surface-2);
    border-radius: 8px;
    padding: 2px;
    border: 1px solid var(--border);
}
.sched-viewtoggle .viewtab {
    background: transparent;
    border: none;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-soft);
    border-radius: 6px;
    cursor: pointer;
}
.sched-viewtoggle .viewtab:hover {
    color: var(--text);
    background: transparent;
}
.sched-viewtoggle .viewtab.active {
    background: var(--surface);
    color: var(--accent);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.sched-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* --- KPI row / legend --- */
.sched-kpis {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.kpi {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 20px;
    border-right: 1px solid var(--border);
}
.kpi:last-of-type { border-right: none; padding-right: 0; }
.kpi-label {
    font-size: 10px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-faint);
    font-weight: 700;
}
.kpi-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
}
.kpi-value.muted { color: var(--text-faint); font-weight: 500; }
.kpi-cost {
    font-size: 13px;
    color: var(--text-faint);
    font-weight: 500;
    margin-left: 6px;
}
.kpi-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1;
}
.kpi-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 12px;
    font-weight: 500;
    line-height: 1.4;
    background: var(--surface-2);
    color: var(--text-soft);
}
.kpi-chip.ot {
    background: var(--warning-soft);
    color: var(--warning);
    font-weight: 600;
}
.sched-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-left: 20px;
    border-left: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-soft);
}
.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* --- Coverage banner --- */
.cov-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--warning-soft);
    border: 1px solid #ecd693;
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    color: var(--warning);
    font-size: 13px;
    font-weight: 500;
}
.cov-banner:hover { background: #fbeac4; }
.cov-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--warning);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.cov-text { flex: 1; }
.cov-chev { font-size: 12px; color: var(--warning); }
.cov-details {
    padding: 8px 14px;
    background: var(--warning-soft);
    border: 1px solid #ecd693;
    border-top: none;
    border-radius: 0 0 8px 8px;
    margin-top: -10px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--warning);
}
.cov-item { padding: 2px 0; }

/* --- Role grid --- */
.role-grid {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.rg-row {
    display: grid;
    grid-template-columns: 200px repeat(7, 1fr);
    border-bottom: 1px solid var(--border);
    min-height: 68px;
}
.rg-row:last-child { border-bottom: none; }
.rg-cell {
    border-right: 1px solid var(--border);
    padding: 8px;
    position: relative;
}
.rg-cell:last-child { border-right: none; }
.rg-row.rg-header {
    background: var(--surface-2);
    min-height: 44px;
    font-size: 12px;
    font-weight: 600;
}
.rg-head { padding: 8px 10px; }
.rg-role-cell.rg-head {
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-faint);
}
.rg-daycol.rg-head {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: center;
    justify-content: center;
}
.rg-daycol.today.rg-head { background: var(--accent-soft); color: var(--accent); }
.rg-dow { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.4px; }
.rg-dnum { font-size: 13px; font-weight: 600; color: var(--text); }
.rg-daycol.today .rg-dnum { color: var(--accent); }
.rg-hol { font-size: 10px; color: var(--warning); text-transform: uppercase; font-weight: 700; letter-spacing: 0.4px; }
.rg-daycol.holiday { background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(181,114,0,0.06) 6px 12px); }

.rg-role-cell {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: var(--surface-2);
}
.rg-role-swatch {
    width: 4px;
    height: 32px;
    border-radius: 2px;
    flex-shrink: 0;
    margin-top: 2px;
}
.rg-role-info { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.rg-role-name { font-size: 13px; font-weight: 600; color: var(--text); }
.rg-role-cov { font-size: 11px; color: var(--text-faint); }
.rg-role-cov.gap { color: var(--warning); font-weight: 600; }

.rg-daycol {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    min-height: 68px;
    cursor: pointer;
}
.rg-daycol:hover { background: var(--surface-2); }
.rg-daycol.today { background: rgba(30, 79, 217, 0.03); }
.rg-daycol.today:hover { background: var(--accent-soft); }

.rg-cov-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    line-height: 1.4;
}
.rg-cov-badge.ok { background: var(--success-soft); color: var(--success); }
.rg-cov-badge.short { background: var(--warning-soft); color: var(--warning); }

.rg-add {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    padding: 0;
    font-size: 15px;
    line-height: 1;
    border-radius: 50%;
    opacity: 0;
    background: var(--surface);
    color: var(--accent);
    border: 1px dashed var(--border-strong);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.12s;
}
.rg-daycol:hover .rg-add { opacity: 1; }
.rg-add:hover { background: var(--accent-soft); border-color: var(--accent); }

/* --- Shift pill (used in role grid) --- */
.shift-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 4px;
    background: rgba(0,0,0,0.03);
    border: 1px solid transparent;
    border-left: 3px solid #7986CB;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    font-size: 12px;
    line-height: 1.3;
    color: var(--text);
    width: 100%;
    overflow: hidden;
}
.shift-pill:hover { background: rgba(0,0,0,0.06); border-color: var(--border-strong); }
.shift-pill.draft { opacity: 0.85; border-left-style: dashed; }
.pill-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: white;
    font-size: 9px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pill-body {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}
.pill-name {
    font-weight: 600;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pill-time {
    font-size: 10px;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
}
.pill-draft {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 1px 4px;
    background: var(--surface-2);
    color: var(--text-faint);
    border-radius: 3px;
    font-weight: 700;
    margin-left: auto;
    flex-shrink: 0;
}

/* --- Shift requirement bar (role grid, above assignment pills) --- */
/* A slim staffing-requirement row — "need N people, 8-5". The N/M fill
   badge is green when covered, amber when short. Over-fill (e.g. 3/2)
   stays green silently, per Joe's product rule. */
.shift-req-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    background: rgba(0,0,0,0.02);
    border: 1px dashed var(--border-strong);
    border-left: 3px solid #7986CB;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    font-size: 11px;
    line-height: 1.2;
    color: var(--text);
    width: 100%;
    font-variant-numeric: tabular-nums;
    margin-bottom: 2px;
}
.shift-req-bar:hover { background: rgba(0,0,0,0.05); }
.shift-req-bar.draft { opacity: 0.85; }
.shift-req-bar .req-time { font-weight: 600; }
.shift-req-bar .req-fill {
    margin-left: auto;
    padding: 1px 6px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 10px;
}
.shift-req-bar .req-fill.ok { background: var(--success-soft); color: var(--success); }
.shift-req-bar .req-fill.short { background: var(--warning-soft); color: var(--warning); }

/* --- Time grid --- */
.time-grid {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}
.tg-row {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    border-bottom: 1px solid var(--border);
}
.tg-header {
    background: var(--surface-2);
    min-height: 44px;
    font-size: 12px;
    font-weight: 600;
}
.tg-cell {
    border-right: 1px solid var(--border);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
    align-items: center;
}
.tg-cell:last-child { border-right: none; }
.tg-daycol.today, .tg-day-col.today { background: rgba(30, 79, 217, 0.03); }
.tg-daycol.today.tg-head { background: var(--accent-soft); color: var(--accent); }
.tg-dow { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.4px; }
.tg-dnum { font-size: 13px; font-weight: 600; }
.tg-daycol.today .tg-dnum { color: var(--accent); }
.tg-hol { font-size: 10px; color: var(--warning); text-transform: uppercase; font-weight: 700; }
.tg-daycol.holiday { background: repeating-linear-gradient(45deg, transparent 0 6px, rgba(181,114,0,0.06) 6px 12px); }

.tg-body {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    position: relative;
}
.tg-time-col {
    border-right: 1px solid var(--border);
    background: var(--surface-2);
}
.tg-hour-cell {
    position: relative;
    border-bottom: 1px dashed var(--border);
}
.tg-hour-cell:last-child { border-bottom: none; }
.tg-hour-label {
    position: absolute;
    top: -7px;
    right: 6px;
    font-size: 10px;
    color: var(--text-faint);
    background: var(--surface-2);
    padding: 0 3px;
    font-variant-numeric: tabular-nums;
}
.tg-day-col {
    position: relative;
    border-right: 1px solid var(--border);
    overflow: hidden;
    cursor: crosshair;
}
.tg-day-col:last-child { border-right: none; }
.tg-hour-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    border-top: 1px dashed var(--border);
    pointer-events: none;
}
.tg-shift {
    position: absolute;
    left: 2px;
    right: 2px;
    padding: 4px 6px 4px 8px;
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
    border-left: 3px solid #7986CB;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    font-size: 11px;
    line-height: 1.25;
    color: var(--text);
    cursor: pointer;
    overflow: hidden;
    z-index: 2;
}
.tg-shift.draft { border-left-style: dashed; opacity: 0.9; }
.tg-shift:hover { box-shadow: 0 2px 6px rgba(0,0,0,0.12); z-index: 3; }
.tg-shift-header {
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
}
.tg-shift-avatar {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    font-size: 8px;
    color: white;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tg-shift-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tg-shift-time {
    font-size: 10px;
    color: var(--text-faint);
    font-variant-numeric: tabular-nums;
    margin-top: 1px;
}
.tg-drag-ghost {
    position: absolute;
    left: 2px;
    right: 2px;
    background: var(--accent-soft);
    border: 1.5px dashed var(--accent);
    border-radius: 4px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    pointer-events: none;
}

/* --- Schedule modal-specific styles --- */
.form-stack { display: flex; flex-direction: column; gap: 12px; }
.form-hint { font-size: 12px; color: var(--text-faint); margin-top: -6px; }
.field-label { font-size: 12px; font-weight: 600; color: var(--text-soft); margin-bottom: 4px; display: block; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
    padding: 4px 10px;
    font-size: 12px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text-soft);
    border-radius: 12px;
    cursor: pointer;
    font-weight: 500;
}
.chip:hover { background: var(--surface-2); }
.chip.active { font-weight: 600; }
.modal-btns { display: flex; gap: 8px; align-items: center; width: 100%; }
.copy-choices {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 8px;
}
.btn-choice {
    padding: 14px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    border-radius: 8px;
    cursor: pointer;
}
.btn-choice:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

/* --- Responsive --- */
@media (max-width: 900px) {
    .sched-toolbar { gap: 8px; }
    .sched-weeknav { padding-left: 0; border-left: none; margin-left: 0; width: 100%; justify-content: center; }
    .sched-weeklabel { min-width: 140px; font-size: 13px; }
    .sched-actions { width: 100%; }
    .sched-actions button { flex: 1; font-size: 12px; padding: 6px 8px; }
    .sched-viewtoggle { width: 100%; }
    .sched-viewtoggle .viewtab { flex: 1; }
    .rg-row { grid-template-columns: 120px repeat(7, minmax(70px, 1fr)); }
    .tg-row, .tg-body { grid-template-columns: 48px repeat(7, minmax(70px, 1fr)); }
    .role-grid, .time-grid { overflow-x: auto; }
    .sched-kpis { gap: 12px; }
    .kpi { padding-right: 12px; }
    .kpi-value { font-size: 16px; }
    .copy-choices { grid-template-columns: 1fr; }
}

/* ─── Settings panels (Timeclock / Breaks / Approvals) ─────────────────── */
.section-header {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}
.section-subhead {
    font-size: 13px;
    color: var(--text-soft);
    margin-bottom: 20px;
    line-height: 1.5;
}
.settings-section {
    padding: 16px 0;
    border-top: 1px solid var(--border);
}
.settings-section:first-of-type {
    border-top: none;
    padding-top: 0;
}
.settings-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 12px;
}
.settings-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.settings-row-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 2px;
}
.settings-row-help {
    font-size: 12px;
    color: var(--text-soft);
    line-height: 1.4;
}
.settings-row-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.field-help {
    font-size: 12px;
    color: var(--text-soft);
    margin-top: 4px;
    line-height: 1.4;
}
/* Toggle button (on/off pill) */
.toggle-btn {
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid var(--border);
    cursor: pointer;
    min-width: 56px;
    transition: all 0.15s ease;
}
.toggle-btn.on {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}
.toggle-btn.off {
    background: var(--surface);
    color: var(--text-soft);
}
.toggle-btn.on:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.toggle-btn.off:hover { color: var(--text); border-color: var(--text-soft); }

/* Break reasons */
.break-reason-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.break-reason-row {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
}
.break-reason-view {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
}
.break-reason-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--surface);
    font-size: 16px;
    flex-shrink: 0;
}
.break-reason-icon.paid { background: var(--accent-soft, rgba(59, 130, 246, 0.12)); color: var(--accent); }
.break-reason-icon.unpaid { background: var(--surface); color: var(--text-soft); }
.break-reason-info { flex: 1; min-width: 0; }
.break-reason-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}
.break-reason-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}
.break-reason-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.break-reason-edit {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* Pills for break-reason meta */
.pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.pill-paid {
    background: var(--accent-soft, rgba(59, 130, 246, 0.12));
    color: var(--accent);
}
.pill-unpaid {
    background: var(--surface);
    color: var(--text-soft);
    border: 1px solid var(--border);
}
.pill-muted {
    background: var(--surface);
    color: var(--text-soft);
    border: 1px solid var(--border);
}
/* Icon buttons (edit / delete) */
.icon-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-soft);
    cursor: pointer;
    font-size: 14px;
}
.icon-btn:hover {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}
.icon-btn.danger:hover {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: var(--danger);
}
/* Info banner (defaults notice) */
.info-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    margin-bottom: 16px;
    background: var(--accent-soft, rgba(59, 130, 246, 0.08));
    border: 1px solid var(--accent);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text);
}
button.primary.small,
button.secondary.small {
    padding: 6px 12px;
    font-size: 12px;
}
