@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --font-family: 'Plus Jakarta Sans', Arial, sans-serif;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eff6ff;
    --bg: #f5f7fa;
    --card: #ffffff;
    --border: #e4e9f0;
    --border-strong: #d5dde8;
    --text: #172033;
    --muted: #6b778c;
    --muted-light: #94a0b2;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, .04);
    --shadow-md: 0 10px 28px rgba(15, 23, 42, .08);
    --control-height: 36px;
    --control-height-lg: 40px;
    --sidebar-width: 248px;
    --sidebar-collapsed-width: 76px;
}

* { box-sizing: border-box; }
html { font-size: 14px; }
body {
    margin: 0;
    font-family: var(--font-family);
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
button, input, select, textarea, table { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { display: block; }
input::placeholder, textarea::placeholder { color: #a3adbb; }

/* Buttons */
.btn {
    height: var(--control-height);
    min-height: var(--control-height);
    padding: 0 13px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-sm { height: 32px; min-height: 32px; padding: 0 10px; border-radius: 7px; font-size: 12px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-outline, .btn-soft { background: #fff; border-color: var(--border-strong); color: #445066; }
.btn-outline:hover, .btn-soft:hover { background: #f8fafc; border-color: #bbc7d6; color: var(--text); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }

/* Login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(135deg, #eef4ff, #f8fafc); }
.login-card { width: 100%; max-width: 420px; background: #fff; padding: 30px; border-radius: 18px; box-shadow: 0 18px 44px rgba(15, 23, 42, .08); }
.login-logo { text-align: center; margin-bottom: 18px; }
.login-logo img { max-width: 84px; }
.login-card h2 { margin: 0 0 6px; text-align: center; font-size: 26px; }
.login-card p { margin: 0 0 22px; text-align: center; color: var(--muted); }
.input-group { margin-bottom: 14px; }
.input-group label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 13px; }
.input-group input { width: 100%; height: 44px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 0 12px; font-size: 14px; outline: none; }
.input-group input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.login-error { background: #fee2e2; color: #991b1b; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; }
.login-btn { width: 100%; height: 44px; border: 0; border-radius: var(--radius-sm); background: var(--primary); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; }
.login-btn:hover { background: var(--primary-hover); }

/* App layout */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); background: #fff; border-right: 1px solid var(--border); padding: 16px 14px; overflow-y: auto; z-index: 20; transition: .2s ease; }
.sidebar.collapsed { width: var(--sidebar-collapsed-width); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 0 4px 14px; margin-bottom: 14px; border-bottom: 1px solid #eef2f7; }
.sidebar-brand img { width: 34px; height: 34px; object-fit: contain; }
.brand-text h4 { margin: 0; font-size: 14px; font-weight: 800; }
.brand-text span { color: var(--muted); font-size: 12px; }
.sidebar-toggle { margin-left: auto; width: 30px; height: 30px; border: 0; border-radius: 7px; background: #f1f5f9; cursor: pointer; }
.menu-section { margin-bottom: 16px; }
.menu-title { margin: 0 0 6px 10px; font-size: 11px; font-weight: 800; color: #94a3b8; letter-spacing: .08em; }
.nav-item { display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 8px 10px; border-radius: var(--radius-sm); text-decoration: none; color: #334155; font-size: 13px; font-weight: 650; margin-bottom: 3px; }
.nav-item:hover { background: #f1f5f9; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-icon { width: 19px; height: 19px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-icon svg { width: 17px; height: 17px; stroke: currentColor; }
.sidebar-user { margin-top: 14px; background: #f8fafc; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px; display: flex; align-items: center; gap: 9px; }
.user-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.sidebar-user .user-avatar { width: 32px; height: 32px; font-size: 12px; }
.sidebar-user strong { display: block; font-size: 12px; }
.sidebar-user small { color: var(--muted); font-size: 11px; }
.sidebar.collapsed .brand-text, .sidebar.collapsed .menu-title, .sidebar.collapsed .menu-text, .sidebar.collapsed .sidebar-user div { display: none; }
.sidebar.collapsed .sidebar-brand { flex-direction: column; gap: 8px; padding: 0 0 14px; }
.sidebar.collapsed .sidebar-toggle { margin-left: 0; }
.sidebar.collapsed .nav-item, .sidebar.collapsed .sidebar-user { justify-content: center; }
.main-content { margin-left: var(--sidebar-width); padding: 16px; min-height: 100vh; transition: .2s ease; }
.main-content.expanded { margin-left: var(--sidebar-collapsed-width); }

/* Topbar and dropdown */
.topbar { min-height: 58px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 14px; margin-bottom: 14px; }
.topbar h1 { margin: 0; font-size: 17px; font-weight: 800; }
.topbar small { color: var(--muted); font-size: 12px; }
.topbar-right { display: flex; align-items: center; gap: 9px; }
.header-icon { position: relative; width: 34px; height: 34px; border: 1px solid var(--border); background: #fff; border-radius: var(--radius-sm); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: .15s ease; }
.header-icon.mobile-menu-btn { display: none; }
.header-icon:hover { background: #f8fafc; border-color: #dbe3ee; }
.header-icon svg { width: 17px; height: 17px; color: #475569; }
.icon-badge { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 4px; background: #ef4444; color: #fff; border-radius: 999px; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.dropdown { position: relative; }
.profile-button { border: 0; background: transparent; cursor: pointer; padding: 0; }
.dropdown-menu { position: absolute; top: 44px; right: 0; min-width: 240px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 7px 0; display: none; z-index: 999; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-header, .dropdown-footer { padding: 11px 14px; }
.dropdown-header { border-bottom: 1px solid #eef2f7; }
.dropdown-footer { border-top: 1px solid #eef2f7; }
.dropdown-header small { display: block; color: var(--muted); margin-top: 3px; }
.dropdown-item { display: block; padding: 9px 14px; text-decoration: none; color: #334155; font-size: 13px; }
.dropdown-item:hover { background: #f8fafc; }
.dropdown-item.danger { color: var(--danger); }
.dropdown-footer a { text-decoration: none; font-size: 13px; color: var(--primary); }
.dropdown hr { border: 0; border-top: 1px solid #eef2f7; margin: 6px 0; }

/* Page shell */
.page-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.page-header h2 { margin: 0 0 3px; font-size: 20px; font-weight: 800; color: var(--text); }
.page-header p { margin: 0; color: var(--muted); font-size: 13px; }
.page-header .btn { min-width: auto; height: 36px; font-size: 13px; flex-shrink: 0; }
.page-actions { display: flex; align-items: center; gap: 8px; }
.empty-state { min-height: 220px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--muted); border: 1px dashed #cbd5e1; border-radius: var(--radius-lg); background: #f8fafc; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.card-header h3 { margin: 0 0 4px; font-size: 16px; }
.card-header p { margin: 0; color: var(--muted); font-size: 12px; }

/* Tables */
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 850px; }
.data-table th { text-align: left; font-size: 12px; color: #64748b; padding: 10px 12px; border-bottom: 1px solid var(--border); background: #f8fafc; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #eef2f7; font-size: 13px; }
.table-user { display: flex; align-items: center; gap: 8px; }
.user-avatar.small { width: 30px; height: 30px; font-size: 12px; }
.status-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status-badge.success { background: #dcfce7; color: #15803d; }
.status-badge.muted { background: #f1f5f9; color: #64748b; }
.status-badge.danger { background: #fee2e2; color: #b91c1c; }
.status-badge.warning { background: #fef3c7; color: #92400e; }
.status-badge.info { background: #dbeafe; color: #1d4ed8; }

/* Shared utilities (used to replace one-off inline styles across modules) */
.text-muted { color: var(--muted); }
.text-sm { font-size: 12.5px; }

.alert-box { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 16px; }
.alert-box.success { background: #dcfce7; color: #15803d; }
.alert-box.danger { background: #fee2e2; color: #b91c1c; }

/* Compact filter-bar controls (search/select/date inputs used above data tables).
   Matches the existing .custom-table-controls select sizing (31px / 7px radius)
   already established by the Reports and Activity Log filter bars. */
.filter-input, .filter-select {
    height: 31px;
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 0 9px;
    font-size: 12.5px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: .15s ease;
}
.filter-input:focus, .filter-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }

.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.picker-empty-state { padding: 14px; font-size: 12px; color: var(--muted); }
.token-display { user-select: all; word-break: break-all; }
.form-section-spaced { margin-bottom: 24px; }
.checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; }
.btn-outline-danger { color: var(--danger); border-color: #fecaca; background: #fff; }
.btn-outline-danger:hover { background: #fef2f2; }
.action-cell { display: flex; gap: 6px; flex-wrap: wrap; }

/* Standalone pages outside the sidebar layout (Super Admin panel) */
.standalone-page { max-width: 700px; margin: 0 auto; padding: 32px 20px; }
.standalone-page.wide { max-width: 900px; }
.standalone-page.wider { max-width: 1100px; }

.superadmin-nav { background: #101728; border-bottom: 1px solid #1f2a40; }
.superadmin-nav-inner { max-width: 1100px; margin: 0 auto; padding: 0 20px; display: flex; gap: 4px; overflow-x: auto; }
.superadmin-nav-link { padding: 14px 14px; color: #94a3b8; text-decoration: none; font-size: 13px; font-weight: 650; border-bottom: 2px solid transparent; white-space: nowrap; }
.superadmin-nav-link:hover { color: #fff; }
.superadmin-nav-link.is-active { color: #fff; border-bottom-color: var(--primary); }

.superadmin-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; }
.superadmin-stat-card { text-align: center; padding: 18px 12px; }
.superadmin-stat-card strong { display: block; font-size: 26px; font-weight: 800; color: var(--text); }
.superadmin-stat-card span { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.superadmin-stat-card.is-warning strong { color: var(--danger); }

/* Reports tabs */
.reports-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.reports-tab { padding: 10px 16px; border: none; background: none; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.reports-tab:hover { color: var(--text); }
.reports-tab.is-active { color: var(--primary); border-bottom-color: var(--primary); }
.reports-panel { display: none; }
.reports-panel.is-active { display: block; }
.table-action { color: var(--primary); text-decoration: none; font-weight: 700; }
.table-action:hover { text-decoration: underline; }
.table-actions, .icon-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inline-delete-form { margin: 0; }
.icon-action { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: #475569; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; padding: 0; transition: .15s ease; }
.icon-action svg { width: 15px; height: 15px; }
.icon-action:hover { background: #eff6ff; color: var(--primary); border-color: #bfdbfe; }
.icon-action.danger:hover { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.custom-table-wrapper { width: 100%; }
.custom-table-top, .custom-table-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.custom-table-top { margin: 13px 0; }
.custom-table-top.wrap { flex-wrap: wrap; }
.custom-table-bottom { margin-top: 10px; color: #64748b; font-size: 12px; }
.table-export-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.export-btn { min-width: 76px; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); color: #334155; font-size: 12px; font-weight: 600; cursor: pointer; }
.export-btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.export-btn svg { width: 15px; height: 15px; }
.export-btn.csv:hover { color: #15803d; border-color: #15803d; }
.export-btn.xlsx:hover { color: #166534; border-color: #166534; }
.export-btn.pdf:hover { color: #dc2626; border-color: #dc2626; }
.table-search input { width: 250px; height: 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 11px; outline: none; font-size: 12px; }
.table-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.custom-table-controls { margin-bottom: 10px; color: #64748b; font-size: 12px; }
.custom-table-controls select { height: 31px; border: 1px solid var(--border); border-radius: 7px; padding: 0 7px; background: #fff; }
.custom-table-controls.filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.custom-table { width: 100%; min-width: 850px; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.custom-table th { text-align: left; background: #f8fafc; color: #475569; font-size: 12px; font-weight: 800; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.custom-table th[data-sort] { cursor: pointer; }
.custom-table th[data-sort]::after { content: '↕'; font-size: 11px; color: #94a3b8; margin-left: 6px; }
.custom-table td { padding: 10px 12px; border-bottom: 1px solid #eef2f7; font-size: 12px; vertical-align: middle; }
.custom-table tr:last-child td { border-bottom: 0; }
.custom-table tbody tr:hover { background: #f8fafc; }
.table-loading, .table-empty { text-align: center; color: #64748b; padding: 28px !important; }
.custom-pagination { display: flex; gap: 5px; flex-wrap: wrap; }
.custom-pagination button { min-width: 32px; height: 31px; border: 1px solid var(--border); background: #fff; border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 12px; }
.custom-pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.custom-pagination button:disabled { opacity: .5; cursor: not-allowed; }

/* Forms */
.app-form { margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; max-width: 900px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 12px; font-weight: 700; color: #48556a; }
.form-group input, .form-group select, .form-group textarea { width: 100%; min-height: var(--control-height-lg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 11px; font-size: 13px; color: var(--text); background: #fff; outline: none; transition: .15s ease; }
.form-group textarea { padding: 10px 11px; min-height: 82px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.form-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid #eef2f7; }
.form-section h3 { margin: 0 0 10px; font-size: 15px; color: var(--text); }
.checkbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; max-width: 900px; }
.checkbox-card { min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; cursor: pointer; font-size: 12px; font-weight: 600; color: #334155; transition: .15s ease; }
.checkbox-card:hover { border-color: var(--primary); background: #f8fbff; }
.checkbox-card input { width: 15px; height: 15px; accent-color: var(--primary); }
.checkbox-card small { display: block; color: var(--muted); margin-top: 3px; font-weight: 500; }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; margin-top: 20px; padding-top: 15px; border-top: 1px solid #eef2f7; }
.form-actions .btn { min-width: 100px; height: 36px; }
.form-errors { margin: 14px 0; padding: 11px 13px; border-radius: var(--radius-sm); background: #fee2e2; color: #991b1b; font-size: 13px; font-weight: 600; }
.form-errors div + div { margin-top: 5px; }
.permission-group { margin-bottom: 16px; }
.permission-group-header { margin-bottom: 9px; padding: 8px 11px; border-radius: var(--radius-sm); background: #f8fafc; border: 1px solid var(--border); font-size: 12px; font-weight: 800; color: #334155; }

/* Toasts and modal */
.toast-container { position: fixed; top: 16px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; width: min(340px, calc(100vw - 32px)); }
.toast { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 11px 13px; background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius-md); box-shadow: var(--shadow-md); animation: toastSlideIn .2s ease; }
.toast-message { font-size: 12px; font-weight: 600; line-height: 1.4; color: #334155; }
.toast-success { border-left-color: #22c55e; }
.toast-error { border-left-color: #ef4444; }
.toast-warning { border-left-color: #f59e0b; }
.toast-close { border: 0; background: none; cursor: pointer; font-size: 18px; color: #64748b; line-height: 1; }
.toast.hide { opacity: 0; transform: translateX(16px); transition: .2s; }
@keyframes toastSlideIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: translateX(0); } }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: none; align-items: center; justify-content: center; z-index: 99999; padding: 20px; }
.modal-backdrop.show { display: flex; }
.confirm-modal { width: 100%; max-width: 430px; background: #fff; border-radius: var(--radius-lg); overflow: hidden; animation: modalIn .18s ease; }
.confirm-modal-header, .confirm-modal-footer { padding: 15px 18px; }
.confirm-modal-body { padding: 0 18px 18px; }
.confirm-modal-body .modal-field {
    width: 100%;
    min-height: var(--control-height-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 11px;
    font-size: 13px;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: .15s ease;
}
.confirm-modal-body textarea.modal-field { min-height: 80px; padding: 9px 11px; }
.confirm-modal-body .modal-field:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.confirm-modal-footer { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid #e2e8f0; }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }

.dashboard-stat-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    height: 100%;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.dashboard-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #bfdbfe; }

.dashboard-stat-card .stat-icon {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dashboard-stat-card .stat-icon svg { width: 20px; height: 20px; stroke: currentColor; }

.stat-body { flex: 1; min-width: 0; }
.stat-body > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.stat-body > strong { display: block; margin-bottom: 5px; color: var(--text); font-size: 26px; font-weight: 800; line-height: 1; }
.stat-body > small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.35; }

.dashboard-stat-card.accent-blue .stat-icon { background: #eff6ff; color: #2563eb; }
.dashboard-stat-card.accent-indigo .stat-icon { background: #eef2ff; color: #4f46e5; }
.dashboard-stat-card.accent-teal .stat-icon { background: #ecfeff; color: #0891b2; }
.dashboard-stat-card.accent-amber .stat-icon { background: #fffbeb; color: #b45309; }
.dashboard-stat-card.accent-green .stat-icon { background: #f0fdf4; color: #15803d; }
.dashboard-stat-card.accent-purple .stat-icon { background: #faf5ff; color: #7e22ce; }

/* Dashboard: section headings */
.dashboard-section-title { display: flex; align-items: center; gap: 9px; margin: 26px 0 14px; }
.dashboard-section-title h3 { margin: 0; font-size: 14px; font-weight: 800; color: var(--text); letter-spacing: -.01em; }
.dashboard-section-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(to right, var(--border), transparent); }

/* Dashboard: attention / approvals row */
.dashboard-attention-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 8px; }
.dashboard-attention-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow-sm);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.dashboard-attention-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #fde68a; }
.dashboard-attention-card.is-zero:hover { border-color: #bbf7d0; }
.dashboard-attention-icon { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 12px; background: #fef3c7; color: #b45309; display: flex; align-items: center; justify-content: center; }
.dashboard-attention-card.is-zero .dashboard-attention-icon { background: #f0fdf4; color: #15803d; }
.dashboard-attention-icon svg { width: 20px; height: 20px; stroke: currentColor; }
.dashboard-attention-copy { min-width: 0; }
.dashboard-attention-copy strong { display: block; font-size: 24px; font-weight: 800; line-height: 1.15; color: var(--text); }
.dashboard-attention-icon { margin-top: 2px; }
.dashboard-attention-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 11.5px; font-weight: 600; line-height: 1.4; }
.dashboard-attention-copy span b { color: #92400e; font-weight: 700; }
.dashboard-attention-card.is-zero .dashboard-attention-copy span b { color: #166534; }

/* Dashboard: two-column widgets */
.dashboard-columns { display: grid; grid-template-columns: 1.1fr 1fr; gap: 18px; align-items: start; }
.dashboard-widget-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 6px 20px 10px; box-shadow: var(--shadow-sm); }
.dashboard-widget-card-header { display: flex; align-items: center; gap: 9px; padding: 14px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dashboard-widget-card-header .widget-icon { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.dashboard-widget-card-header .widget-icon svg { width: 16px; height: 16px; stroke: currentColor; }
.dashboard-widget-card-header h3 { margin: 0; font-size: 13.5px; font-weight: 800; color: var(--text); }
.dashboard-widget-empty { padding: 30px 4px; text-align: center; color: var(--muted-light); font-size: 12px; }

.dashboard-shift-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid #f1f5f9; }
.dashboard-shift-row:last-child { border-bottom: 0; padding-bottom: 6px; }
.dashboard-shift-row strong { display: block; font-size: 12.5px; font-weight: 700; color: var(--text); }
.dashboard-shift-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.dashboard-shift-time { flex: 0 0 auto; padding: 5px 11px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 700; white-space: nowrap; }

.dashboard-activity-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.dashboard-activity-row:last-child { border-bottom: 0; padding-bottom: 6px; }
.dashboard-activity-icon { flex: 0 0 30px; width: 30px; height: 30px; margin-top: 1px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: #f1f5f9; color: #64748b; }
.dashboard-activity-icon svg { width: 15px; height: 15px; stroke: currentColor; }
.dashboard-activity-icon.mod-timesheets { background: #eff6ff; color: #2563eb; }
.dashboard-activity-icon.mod-schedules { background: #faf5ff; color: #7e22ce; }
.dashboard-activity-icon.mod-users { background: #ecfeff; color: #0891b2; }
.dashboard-activity-copy { min-width: 0; padding-top: 1px; }
.dashboard-activity-copy p { margin: 0; font-size: 12.5px; color: var(--text); line-height: 1.4; }
.dashboard-activity-copy p strong { font-weight: 700; }
.dashboard-activity-copy small { display: block; margin-top: 3px; color: var(--muted-light); font-size: 11px; }

@media (max-width: 960px) {
    .dashboard-columns { grid-template-columns: 1fr; }
}
.module-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.module-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; color: var(--text); text-decoration: none; transition: .15s ease; }
.module-item:hover { background: #f8fafc; border-color: #bfdbfe; }
.module-item strong { display: block; margin-bottom: 4px; font-size: 14px; }
.module-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }

/* Schedule list */
.schedule-list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.schedule-search-form { display: flex; align-items: center; gap: 7px; width: 330px; }
.schedule-search-form input, .schedule-user-search { width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; color: var(--text); font-size: 12px; outline: none; }
.schedule-search-form input:focus, .schedule-user-search:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.schedule-tabs { display: flex; gap: 5px; }
.schedule-tabs a { display: inline-flex; align-items: center; justify-content: center; padding: 7px 13px; border-radius: var(--radius-sm); text-decoration: none; color: #475569; background: #f8fafc; border: 1px solid var(--border); font-size: 12px; font-weight: 700; }
.schedule-tabs a:hover { background: #eff6ff; }
.schedule-tabs a.active { color: #fff; background: var(--primary); border-color: var(--primary); }
.schedule-card-grid, .schedule-card-grid.premium { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.schedule-group-card.premium-card { position: relative; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: visible; box-shadow: var(--shadow-sm); transition: .15s ease; }
.schedule-group-card.premium-card:hover { border-color: #cbd5e1; box-shadow: var(--shadow-md); }
.premium-card-top { height: 4px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.premium-card-body { padding: 13px; }
.premium-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.premium-card-header h3 { margin: 0; color: #0f172a; font-size: 14px; line-height: 1.25; }
.premium-card-sub { margin-top: 3px; font-size: 11px; color: #64748b; font-weight: 700; letter-spacing: .04em; }
.premium-card-description { margin: 0 0 10px; color: #475569; font-size: 12px; line-height: 1.45; min-height: 34px; }
.premium-card-description.muted { color: #94a3b8; }
.premium-avatar-section { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 9px; background: #f8fafc; border-radius: var(--radius-sm); margin-bottom: 10px; }
.premium-avatar-section span { display: block; margin-bottom: 5px; font-size: 11px; color: #64748b; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.premium-avatar-section strong { display: block; color: #0f172a; font-size: 12px; }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack b { width: 25px; height: 25px; border-radius: 999px; background: #e0ecff; color: #1d4ed8; border: 2px solid #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; margin-left: -5px; }
.avatar-stack b:first-child { margin-left: 0; }
.avatar-stack small { color: #94a3b8; font-size: 11px; }
.premium-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.premium-stats div { background: #fff; border: 1px solid #eef2f7; border-radius: var(--radius-sm); padding: 8px 5px; text-align: center; }
.premium-stats strong { display: block; color: #0f172a; font-size: 15px; line-height: 1; }
.premium-stats span { display: block; margin-top: 3px; color: #64748b; font-size: 11px; font-weight: 700; }
.schedule-access-btn { width: 100%; height: 34px; border-radius: var(--radius-sm); font-size: 12px; }
.schedule-card-menu { position: relative; }
.schedule-menu-btn { width: 31px; height: 31px; border: 1px solid var(--border); background: #fff; border-radius: 7px; cursor: pointer; color: #64748b; display: inline-flex; align-items: center; justify-content: center; }
.schedule-menu-btn:hover { background: #f8fafc; color: #0f172a; }
.schedule-menu { position: absolute; top: 36px; right: 0; width: 170px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-md); display: none; z-index: 80; overflow: hidden; }
.schedule-menu.open { display: block; }
.schedule-menu a, .schedule-menu button { width: 100%; display: block; text-align: left; background: none; border: 0; padding: 9px 11px; cursor: pointer; text-decoration: none; color: #334155; font-size: 12px; }
.schedule-menu a:hover, .schedule-menu button:hover { background: #f8fafc; }
.schedule-menu form { margin: 0; }

/* Schedule group drawer/wizard */
.schedule-drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); opacity: 0; visibility: hidden; transition: .2s ease; z-index: 9998; }
.schedule-drawer-backdrop.show { opacity: 1; visibility: visible; }
.schedule-drawer { position: fixed; top: 0; right: -620px; width: 600px; max-width: 100%; height: 100%; background: #fff; z-index: 9999; transition: .25s ease; display: flex; flex-direction: column; box-shadow: -12px 0 36px rgba(15, 23, 42, .16); }
.schedule-drawer.open { right: 0; }
.schedule-drawer-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.schedule-drawer-header h3 { margin: 0; color: #0f172a; font-size: 16px; }
.schedule-drawer-header p { margin: 4px 0 0; color: #64748b; font-size: 12px; }
.schedule-drawer-close { width: 32px; height: 32px; border: 0; border-radius: 999px; cursor: pointer; font-size: 18px; background: #f1f5f9; color: #334155; }
.schedule-drawer-form { flex: 1; overflow: auto; padding: 15px 18px; }
.schedule-wizard-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; background: #f8fafc; padding: 5px; border-radius: var(--radius-sm); margin-bottom: 15px; }
.schedule-wizard-steps button { border: 0; background: transparent; color: #64748b; border-radius: 6px; height: 32px; font-size: 12px; font-weight: 800; cursor: pointer; }
.schedule-wizard-steps button.active { background: var(--primary); color: #fff; }
.schedule-wizard-panel { display: none; }
.schedule-wizard-panel.active { display: block; }
.schedule-picker-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-height: 330px; overflow: auto; padding-right: 3px; }
.schedule-user-search { margin-bottom: 10px; }
.schedule-summary-card { border: 1px solid var(--border); background: #f8fafc; border-radius: var(--radius-md); padding: 14px; }
.schedule-summary-card h3 { margin: 0 0 6px; color: #0f172a; font-size: 14px; }
.schedule-summary-card p { margin: 0 0 12px; color: #64748b; font-size: 12px; }
.schedule-drawer-actions { position: sticky; bottom: -15px; margin: 18px -18px -15px; padding: 10px 18px; background: #fff; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* Schedule board */
.schedule-board-page { width: 100%; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: visible; }
.schedule-board-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.schedule-board-heading, .schedule-board-name-line, .schedule-board-header-actions, .schedule-board-admins, .schedule-board-admin-stack { display: flex; align-items: center; }
.schedule-board-heading { gap: 8px; min-width: 0; }
.schedule-board-back, .schedule-board-mark, .schedule-toolbar-icon-btn { display: inline-flex; align-items: center; justify-content: center; }
.schedule-board-back { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 7px; color: #475569; }
.schedule-board-back svg { width: 15px; height: 15px; }
.schedule-board-mark { width: 34px; height: 34px; border-radius: 9px; color: var(--schedule-color); background: color-mix(in srgb, var(--schedule-color) 12%, white); }
.schedule-board-mark svg { width: 17px; height: 17px; }
.schedule-board-heading-text { min-width: 0; }
.schedule-board-name-line { gap: 6px; }
.schedule-board-name-line h1 { margin: 0; font-size: 15px; color: #0f172a; }
.schedule-board-code { padding: 3px 6px; border-radius: 999px; background: #f1f5f9; color: #64748b; font-size: 11px; font-weight: 800; }
.schedule-board-heading-text p { margin: 2px 0 0; color: #64748b; font-size: 11px; }
.schedule-board-header-actions { gap: 7px; }
.schedule-board-admins { gap: 7px; padding-right: 8px; border-right: 1px solid var(--border); }
.schedule-board-admin-stack { padding-left: 5px; }
.schedule-board-admin-avatar { width: 25px; height: 25px; margin-left: -5px; border: 2px solid #fff; border-radius: 50%; background: #dbeafe; color: #1d4ed8; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; }
.schedule-board-admin-avatar.more { background: #f1f5f9; color: #475569; }
.schedule-board-admins strong, .schedule-board-admins small { display: block; }
.schedule-board-admins strong { font-size: 12px; }
.schedule-board-admins small { color: #94a3b8; font-size: 11px; }
.schedule-board-toolbar { position: relative; display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); background: #fafbfd; }
.schedule-board-toolbar-left, .schedule-board-toolbar-right, .schedule-view-switcher, .schedule-week-navigation { display: flex; align-items: center; gap: 5px; }
.schedule-board-toolbar-right { justify-content: flex-end; flex-wrap: wrap; }
.schedule-view-switcher { padding: 3px; background: #eef2f7; border-radius: 7px; }
.schedule-view-switcher button { border: 0; background: transparent; padding: 5px 8px; border-radius: 5px; color: #64748b; font-size: 11px; font-weight: 700; cursor: pointer; }
.schedule-view-switcher button.active { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.schedule-toolbar-icon-btn, .schedule-today-btn, .schedule-period-label, .schedule-filter-control { height: 31px; border: 1px solid var(--border-strong); background: #fff; border-radius: 7px; color: #475569; cursor: pointer; }
.schedule-toolbar-icon-btn { width: 31px; }
.schedule-toolbar-icon-btn svg, .schedule-period-label svg, .schedule-filter-control svg { width: 14px; height: 14px; }
.schedule-today-btn { padding: 0 9px; font-size: 11px; font-weight: 700; }
.schedule-period-label { display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; font-size: 11px; font-weight: 700; }
.schedule-filter-control { min-width: 105px; max-width: 135px; display: flex; align-items: center; gap: 4px; padding: 0 7px; color: #64748b; }
.schedule-filter-control select { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: #334155; font-size: 11px; }
.schedule-period-picker, .schedule-add-menu, .schedule-board-actions-menu { position: absolute; display: none; z-index: 100; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-md); }
.schedule-period-picker.open, .schedule-add-menu.open, .schedule-board-actions-menu.open { display: block; }
.schedule-period-picker { top: 48px; left: 190px; padding: 10px; border-radius: var(--radius-sm); }
.schedule-period-field { margin-bottom: 8px; }
.schedule-period-field label { display: block; margin-bottom: 4px; color: #64748b; font-size: 11px; font-weight: 800; }
.schedule-period-field input { height: 32px; border: 1px solid var(--border-strong); border-radius: 7px; padding: 0 8px; font-size: 12px; }
.schedule-add-menu-wrap, .schedule-board-actions-menu-wrap { position: relative; }
.schedule-add-menu, .schedule-board-actions-menu { top: 37px; right: 0; border-radius: var(--radius-sm); }
.schedule-add-menu { width: 230px; padding: 5px; }
.schedule-add-menu button { width: 100%; display: flex; gap: 8px; align-items: center; padding: 8px; border: 0; border-radius: 7px; background: transparent; text-align: left; cursor: pointer; }
.schedule-add-menu button:hover, .schedule-board-actions-menu button:hover { background: #f1f5f9; }
.schedule-add-menu-icon { width: 28px; height: 28px; flex: 0 0 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: #eff6ff; color: var(--primary); }
.schedule-add-menu strong, .schedule-add-menu small { display: block; }
.schedule-add-menu strong { font-size: 12px; }
.schedule-add-menu small { margin-top: 1px; color: #94a3b8; font-size: 11px; }
.schedule-board-actions-menu { width: 175px; padding: 5px; }
.schedule-board-actions-menu button { width: 100%; padding: 8px 9px; border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer; font-size: 11px; }
.schedule-board-actions-menu button.danger { color: var(--danger); }
.schedule-calendar-shell { position: relative; width: 100%; min-height: 430px; overflow: hidden; }
.schedule-calendar-scroll { width: 100%; max-width: 100%; overflow-x: hidden; overflow-y: auto; }
.schedule-calendar-grid { --schedule-day-count: 7; width: 100%; min-width: 0; display: grid; grid-template-columns: minmax(140px, 180px) repeat(var(--schedule-day-count), minmax(0, 1fr)); }
.schedule-calendar-corner, .schedule-calendar-date-header, .schedule-calendar-row-label, .schedule-calendar-cell { border-right: 1px solid #e8edf3; border-bottom: 1px solid #e8edf3; }
.schedule-calendar-corner { position: sticky; top: 0; left: 0; z-index: 8; min-height: 62px; padding: 8px; background: #f8fafc; }
.schedule-calendar-user-search { display: flex; align-items: center; gap: 5px; height: 31px; padding: 0 7px; border: 1px solid var(--border-strong); border-radius: 7px; background: #fff; color: #94a3b8; }
.schedule-calendar-user-search svg { width: 13px; height: 13px; }
.schedule-calendar-user-search input { width: 100%; min-width: 0; flex: 1; border: 0; outline: 0; font-size: 11px; }
.schedule-calendar-date-header { position: sticky; top: 0; z-index: 7; min-height: 62px; padding: 7px; background: #f8fafc; }
.schedule-calendar-date-header.today { background: #eff6ff; }
.schedule-calendar-date-name { display: flex; align-items: center; justify-content: space-between; }
.schedule-calendar-date-name strong { color: #475569; font-size: 11px; text-transform: uppercase; }
.schedule-calendar-date-name span { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #0f172a; font-size: 11px; font-weight: 800; }
.schedule-calendar-date-header.today .schedule-calendar-date-name span { background: var(--primary); color: #fff; }
.schedule-calendar-date-meta { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.schedule-calendar-date-meta small { color: #94a3b8; font-size: 10px; }
.schedule-calendar-date-meta .open-count { color: var(--warning); }
.schedule-calendar-row-label { position: sticky; left: 0; z-index: 5; min-height: 78px; padding: 7px 8px; background: #fff; display: flex; align-items: center; gap: 7px; }
.schedule-calendar-row-label.info-row { background: #f8fafc; }
.schedule-calendar-row-label.unassigned-row { background: #fff7ed; }
.schedule-row-icon, .schedule-row-avatar { width: 27px; height: 27px; flex: 0 0 27px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; background: #eef2ff; color: #4f46e5; font-size: 11px; }
.schedule-row-avatar { border-radius: 50%; background: #dbeafe; color: #1d4ed8; font-weight: 900; }
.schedule-row-icon svg, .schedule-row-menu svg { width: 13px; height: 13px; }
.schedule-calendar-row-label strong, .schedule-calendar-row-label small { display: block; }
.schedule-calendar-row-label strong { font-size: 11px; }
.schedule-calendar-row-label small { margin-top: 1px; color: #94a3b8; font-size: 10px; }
.schedule-row-user-text { min-width: 0; flex: 1; }
.schedule-row-user-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-row-menu { border: 0; background: transparent; color: #94a3b8; cursor: pointer; }
.schedule-calendar-cell { position: relative; min-height: 78px; padding: 4px; background: #fff; }
.schedule-calendar-cell.info-cell { background: #f8fafc; }
.schedule-cell-add { width: 100%; min-height: 22px; border: 1px dashed transparent; background: transparent; border-radius: 5px; color: transparent; cursor: pointer; transition: .15s ease; }
.schedule-cell-add svg { width: 12px; height: 12px; }
.schedule-calendar-cell:hover .schedule-cell-add { border-color: #bfdbfe; background: #eff6ff; color: var(--primary); }
.schedule-grid-shift { width: 100%; display: block; margin-bottom: 4px; padding: 5px 6px; border: 0; border-left: 3px solid var(--shift-color); border-radius: 6px; background: color-mix(in srgb, var(--shift-color) 12%, white); text-align: left; color: #0f172a; cursor: pointer; overflow: hidden; }
.schedule-grid-shift.draft { border-style: dashed; opacity: .76; }
.schedule-shift-card-top, .schedule-shift-footer { display: flex; justify-content: space-between; gap: 3px; }
.schedule-shift-card-top strong { max-width: calc(100% - 15px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.schedule-shift-card-menu { color: #64748b; }
.schedule-shift-card-menu svg { width: 10px; height: 10px; }
.schedule-shift-time, .schedule-shift-site { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.schedule-shift-site { color: #64748b; }
.schedule-shift-footer { margin-top: 4px; }
.schedule-shift-footer small { padding: 1px 4px; border-radius: 999px; background: rgba(255,255,255,.68); color: #64748b; font-size: 10px; text-transform: capitalize; }
.schedule-unavailable-card { margin-bottom: 4px; padding: 5px; border-radius: 5px; background: #fee2e2; color: #991b1b; }
.schedule-unavailable-card strong, .schedule-unavailable-card span, .schedule-unavailable-card small { display: block; font-size: 10px; }
.schedule-info-line { padding: 4px 5px; border-radius: 5px; background: #fff; margin-bottom: 3px; }
.schedule-info-line span, .schedule-info-line small { display: block; }
.schedule-info-line span { font-size: 11px; font-weight: 700; }
.schedule-info-line small, .schedule-cell-muted { color: #94a3b8; font-size: 10px; }
.schedule-calendar-loading, .schedule-calendar-error { position: absolute; inset: 0; z-index: 20; background: rgba(255,255,255,.86); display: flex; align-items: center; justify-content: center; gap: 8px; }
.schedule-calendar-loading[hidden], .schedule-calendar-error[hidden] { display: none; }
.schedule-loading-spinner { width: 20px; height: 20px; border: 3px solid #dbeafe; border-top-color: var(--primary); border-radius: 50%; animation: scheduleSpin .7s linear infinite; }
@keyframes scheduleSpin { to { transform: rotate(360deg); } }
.schedule-board-page.sidebar-collapsed .schedule-calendar-grid { grid-template-columns: 48px repeat(var(--schedule-day-count), minmax(0, 1fr)); }
.schedule-board-page.sidebar-collapsed .schedule-calendar-user-search input, .schedule-board-page.sidebar-collapsed .schedule-calendar-row-label > div, .schedule-board-page.sidebar-collapsed .schedule-row-menu { display: none; }

/* Timeline (Gantt-style) view */
.schedule-timeline-shell { width: 100%; min-height: 430px; overflow: auto; }
.schedule-timeline-grid { --timeline-hour-width: 90px; --timeline-label-width: 200px; min-width: calc(var(--timeline-label-width) + var(--timeline-hour-width) * 24); }
.schedule-timeline-header { display: flex; position: sticky; top: 0; z-index: 6; background: #f8fafc; border-bottom: 1px solid #e8edf3; }
.schedule-timeline-header-corner { flex: 0 0 var(--timeline-label-width); position: sticky; left: 0; z-index: 7; padding: 10px 12px; background: #f8fafc; border-right: 1px solid #e8edf3; font-size: 11.5px; font-weight: 800; color: var(--text); display: flex; align-items: center; }
.schedule-timeline-hour { flex: 0 0 var(--timeline-hour-width); padding: 10px 0; text-align: center; font-size: 11px; font-weight: 700; color: #94a3b8; border-right: 1px solid #f1f5f9; }
.schedule-timeline-row { display: flex; border-bottom: 1px solid #e8edf3; }
.schedule-timeline-row-label { flex: 0 0 var(--timeline-label-width); position: sticky; left: 0; z-index: 4; padding: 10px 12px; background: #fff; border-right: 1px solid #e8edf3; display: flex; align-items: center; gap: 9px; }
.schedule-timeline-row-label.unassigned-row { background: #fff7ed; }
.schedule-timeline-row-label strong, .schedule-timeline-row-label small { display: block; }
.schedule-timeline-row-label strong { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-timeline-row-label small { margin-top: 1px; color: #94a3b8; font-size: 10px; }
.schedule-timeline-track {
    position: relative;
    flex: 0 0 calc(var(--timeline-hour-width) * 24);
    height: 68px;
    background-image: linear-gradient(to right, #f1f5f9 1px, transparent 1px);
    background-size: var(--timeline-hour-width) 100%;
    cursor: copy;
}
.schedule-timeline-now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: #ef4444; z-index: 2; pointer-events: none; }
.schedule-timeline-now-line::before { content: ''; position: absolute; top: -3px; left: -3px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; }
.schedule-timeline-bar {
    position: absolute;
    top: 9px;
    bottom: 9px;
    min-width: 26px;
    padding: 4px 10px;
    border: 0;
    border-radius: 8px;
    background: color-mix(in srgb, var(--bar-color, #2563eb) 88%, black 0%);
    color: #fff;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .18);
    transition: transform .12s ease, box-shadow .12s ease;
}
.schedule-timeline-bar:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(15, 23, 42, .24); z-index: 3; }
.schedule-timeline-bar.status-draft { opacity: .7; background: repeating-linear-gradient(45deg, var(--bar-color, #2563eb), var(--bar-color, #2563eb) 8px, color-mix(in srgb, var(--bar-color, #2563eb) 70%, black 0%) 8px, color-mix(in srgb, var(--bar-color, #2563eb) 70%, black 0%) 16px); }
.schedule-timeline-bar strong { display: block; font-size: 11px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-timeline-bar small { display: block; margin-top: 1px; font-size: 10px; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.schedule-board-page.sidebar-collapsed .schedule-calendar-row-label { justify-content: center; }

/* Schedule work drawers */
body.schedule-drawer-open { overflow: hidden; }
.schedule-work-drawer { position: fixed; top: 0; right: -530px; width: 510px; max-width: 100%; height: 100vh; z-index: 9999; display: flex; flex-direction: column; background: #fff; box-shadow: -10px 0 32px rgba(15, 23, 42, .16); transition: .22s ease; }
.schedule-work-drawer.wide { width: 610px; right: -630px; }
.schedule-work-drawer.open { right: 0; }
.schedule-work-drawer-header { display: flex; justify-content: space-between; align-items: flex-start; padding: 13px 15px; border-bottom: 1px solid var(--border); }
.schedule-drawer-eyebrow { display: block; margin-bottom: 2px; color: var(--primary); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.schedule-work-drawer-header h2 { margin: 0; font-size: 15px; }
.schedule-work-drawer-close { width: 31px; height: 31px; border: 0; border-radius: 50%; background: #f1f5f9; cursor: pointer; }
.schedule-work-drawer-close svg { width: 16px; height: 16px; }
.schedule-drawer-tabs { display: flex; gap: 16px; padding: 0 15px; border-bottom: 1px solid var(--border); }
.schedule-drawer-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 10px 0; background: transparent; color: #64748b; font-size: 12px; font-weight: 800; cursor: pointer; }
.schedule-drawer-tabs button.active { border-bottom-color: var(--primary); color: var(--primary); }
.schedule-shift-form, .schedule-manage-form { flex: 1; overflow-y: auto; }
.schedule-shift-tab-panel, .schedule-manage-panel { display: none; }
.schedule-shift-tab-panel.active, .schedule-manage-panel.active { display: block; }
.schedule-form-section { padding: 13px 15px; border-bottom: 1px solid #eef2f7; }
.schedule-form-section-heading { margin-bottom: 10px; }
.schedule-form-section-heading.with-action { display: flex; justify-content: space-between; gap: 10px; }
.schedule-form-section-heading h3 { margin: 0; font-size: 13px; }
.schedule-form-section-heading p { margin: 2px 0 0; color: #94a3b8; font-size: 11px; }
.schedule-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.schedule-form-group { min-width: 0; }
.schedule-form-group.full { grid-column: 1 / -1; }
.schedule-form-group label { display: block; margin-bottom: 4px; color: #48556a; font-size: 11px; font-weight: 700; }
.schedule-form-group input, .schedule-form-group select, .schedule-form-group textarea, .schedule-manage-search input, .schedule-template-search input { width: 100%; border: 1px solid var(--border-strong); border-radius: 7px; background: #fff; outline: none; }
.schedule-form-group input, .schedule-form-group select { height: 35px; padding: 0 9px; font-size: 12px; }
.schedule-form-group textarea { min-height: 66px; padding: 8px 9px; font-size: 12px; }

/* Search-select enhancement: keep the native <select> for form submission
   and validation, but visually replace it with a searchable picker. */
select.search-select-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.search-select-picker { width: 100%; }
.search-select-picker.is-disabled .schedule-search-picker-trigger { background: #f1f5f9; color: #94a3b8; cursor: not-allowed; }
.schedule-form-group .search-select-picker .schedule-search-picker-trigger { min-height: 35px; height: 35px; font-size: 12px; }
.schedule-input-suffix { display: flex; border: 1px solid var(--border-strong); border-radius: 7px; overflow: hidden; }
.schedule-input-suffix input { border: 0; border-radius: 0; }
.schedule-input-suffix span { display: inline-flex; align-items: center; padding: 0 8px; background: #f8fafc; color: #64748b; font-size: 11px; }
.schedule-switch-row { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 9px; border-radius: 8px; background: #f8fafc; }
.schedule-switch-row strong, .schedule-switch-row small { display: block; }
.schedule-switch-row strong { font-size: 12px; }
.schedule-switch-row small { margin-top: 2px; color: #94a3b8; font-size: 11px; }
.schedule-switch input { display: none; }
.schedule-switch span { width: 35px; height: 20px; display: block; border-radius: 999px; background: #cbd5e1; position: relative; cursor: pointer; }
.schedule-switch span::after { content: ''; position: absolute; width: 14px; height: 14px; top: 3px; left: 3px; border-radius: 50%; background: #fff; transition: .15s ease; }
.schedule-switch input:checked + span { background: var(--primary); }
.schedule-switch input:checked + span::after { left: 18px; }
.schedule-duration-summary { display: flex; justify-content: space-between; padding: 8px 9px; border-radius: 7px; background: #eff6ff; color: #1d4ed8; font-size: 11px; }
.schedule-color-palette { display: flex; flex-wrap: wrap; gap: 6px; }
.schedule-color-option { width: 20px; height: 20px; border: 2px solid transparent; border-radius: 50%; background: var(--option-color); cursor: pointer; }
.schedule-color-option.active { border-color: #0f172a; }
.schedule-assignment-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-bottom: 9px; }
.schedule-radio-card { display: flex; gap: 6px; padding: 8px; border: 1px solid var(--border-strong); border-radius: 7px; cursor: pointer; }
.schedule-radio-card.active { border-color: var(--primary); background: #eff6ff; }
.schedule-radio-card strong, .schedule-radio-card small { display: block; }
.schedule-radio-card strong { font-size: 11px; }
.schedule-radio-card small { margin-top: 2px; color: #94a3b8; font-size: 10px; }
.schedule-user-selector { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.schedule-user-selector-search, .schedule-manage-search, .schedule-template-search { display: flex; align-items: center; gap: 7px; padding: 7px; color: #94a3b8; }
.schedule-user-selector-search { border-bottom: 1px solid var(--border); }
.schedule-user-selector-search input, .schedule-manage-search input, .schedule-template-search input { height: 31px; padding: 0 8px; font-size: 11px; }
.schedule-user-selector-list { max-height: 210px; overflow-y: auto; }
.schedule-user-option { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.schedule-user-option:hover { background: #f8fafc; }
.schedule-user-option-avatar, .schedule-manage-avatar { width: 27px; height: 27px; flex: 0 0 27px; border-radius: 50%; background: #dbeafe; color: #1d4ed8; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; }
.schedule-user-option-avatar.open { background: #f1f5f9; color: #64748b; }
.schedule-user-option-content { flex: 1; min-width: 0; }
.schedule-user-option-content strong, .schedule-user-option-content small { display: block; }
.schedule-user-option-content strong { font-size: 11px; }
.schedule-user-option-content small { color: #94a3b8; font-size: 10px; }
.schedule-user-availability { padding: 2px 5px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: 10px; }
.schedule-user-availability.open { background: #fef3c7; color: #92400e; }
.schedule-assignment-warning, .schedule-inline-notice, .schedule-manage-notice { display: flex; gap: 7px; margin-top: 9px; padding: 9px; border-radius: 7px; background: #fef3c7; color: #92400e; font-size: 11px; }
.schedule-task-row, .schedule-multiple-date-row { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; }
.schedule-task-row input, .schedule-multiple-date-row input { flex: 1; height: 34px; border: 1px solid var(--border-strong); border-radius: 7px; padding: 0 8px; font-size: 11px; }
.schedule-task-remove, .schedule-date-remove { width: 31px; height: 31px; border: 0; border-radius: 7px; background: #fee2e2; color: var(--danger); cursor: pointer; }
.schedule-template-card { width: 100%; display: flex; gap: 8px; align-items: center; padding: 9px; margin-bottom: 7px; border: 1px solid var(--border); border-radius: 8px; background: #fff; text-align: left; cursor: pointer; }
.schedule-template-card:hover { border-color: #93c5fd; background: #eff6ff; }
.schedule-template-color { width: 6px; align-self: stretch; border-radius: 999px; }
.schedule-template-card strong, .schedule-template-card small { display: block; }
.schedule-template-card strong { font-size: 11px; }
.schedule-template-card small { margin-top: 2px; color: #94a3b8; font-size: 10px; }
.schedule-work-drawer-footer { position: sticky; bottom: 0; z-index: 4; display: flex; justify-content: space-between; gap: 8px; padding: 9px 15px; border-top: 1px solid var(--border); background: #fff; }
.schedule-work-drawer-footer-right, .schedule-manage-footer-summary { display: flex; gap: 7px; align-items: center; }
.schedule-manage-toolbar { display: flex; justify-content: space-between; gap: 9px; padding: 11px 15px 8px; }
.schedule-manage-search { flex: 1; padding: 0; }
.schedule-manage-count { text-align: right; }
.schedule-manage-count strong, .schedule-manage-count span { display: block; }
.schedule-manage-count span { color: #94a3b8; font-size: 11px; }
.schedule-manage-actions { display: flex; gap: 6px; padding: 0 15px 8px; }
.schedule-manage-list { padding: 0 15px 15px; }
.schedule-manage-option { display: flex; align-items: center; gap: 8px; padding: 8px; margin-bottom: 6px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.schedule-manage-option:has(input:checked) { border-color: #60a5fa; background: #eff6ff; }
.schedule-manage-option-content { flex: 1; min-width: 0; }
.schedule-manage-option-content strong, .schedule-manage-option-content small { display: block; }
.schedule-manage-option-content strong { font-size: 11px; }
.schedule-manage-option-content small { margin-top: 2px; color: #94a3b8; font-size: 10px; }
.schedule-selection-mark { opacity: 0; color: var(--primary); }
.schedule-manage-option:has(input:checked) .schedule-selection-mark { opacity: 1; }
.schedule-manage-site-mark { width: 29px; height: 29px; flex: 0 0 29px; border-radius: 7px; background: color-mix(in srgb, var(--site-color) 14%, white); color: var(--site-color); display: inline-flex; align-items: center; justify-content: center; }
.schedule-manage-footer-summary span { color: #64748b; font-size: 11px; }
.schedule-inline-empty { padding: 20px; text-align: center; color: #94a3b8; font-size: 12px; }

/* Responsive */
@media (max-width: 1200px) {
    .dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .schedule-board-toolbar { align-items: stretch; flex-direction: column; }
    .schedule-board-toolbar-left, .schedule-board-toolbar-right { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
    .schedule-filter-control { max-width: none; flex: 1; }
    .schedule-calendar-grid { grid-template-columns: minmax(125px, 155px) repeat(var(--schedule-day-count), minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); width: var(--sidebar-width); }
    .sidebar.open { transform: translateX(0); }
    .sidebar.collapsed { width: var(--sidebar-width); }
    .sidebar.collapsed .brand-text, .sidebar.collapsed .menu-title, .sidebar.collapsed .menu-text, .sidebar.collapsed .sidebar-user div { display: block; }
    .sidebar.collapsed .nav-item { justify-content: flex-start; }
    .main-content, .main-content.expanded { margin-left: 0; padding: 10px; }
    .header-icon.mobile-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
    .sidebar-toggle { display: none; }
    .page-card { padding: 12px; }
    .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .module-list { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .checkbox-grid { grid-template-columns: 1fr 1fr; }
    .schedule-board-header { align-items: flex-start; flex-direction: column; padding: 10px; }
    .schedule-board-header-actions { width: 100%; flex-wrap: wrap; }
    .schedule-calendar-scroll { overflow-x: auto; }
    .schedule-calendar-grid { min-width: 850px; grid-template-columns: 135px repeat(var(--schedule-day-count), minmax(95px, 1fr)); }
}
@media (max-width: 768px) {
    .page-header, .custom-table-top, .custom-table-bottom { flex-direction: column; align-items: stretch; }
    .page-actions, .page-actions .btn, .page-header .btn { width: 100%; }
    .table-search input { width: 100%; }
    .schedule-list-toolbar { flex-direction: column; align-items: stretch; }
    .schedule-search-form, .schedule-tabs { width: 100%; }
    .schedule-tabs a { flex: 1; }
    .schedule-card-grid, .schedule-card-grid.premium { grid-template-columns: 1fr; }
    .premium-avatar-section, .premium-stats, .schedule-picker-list { grid-template-columns: 1fr; }
    .schedule-drawer { width: 100%; right: -100%; }
    .schedule-wizard-steps { grid-template-columns: repeat(2, 1fr); }
    .schedule-work-drawer, .schedule-work-drawer.wide { width: 100%; right: -100%; }
    .schedule-form-grid, .schedule-assignment-mode { grid-template-columns: 1fr; }
    .schedule-form-group.full { grid-column: auto; }
    .schedule-work-drawer-footer { align-items: stretch; flex-direction: column; }
    .schedule-work-drawer-footer-right { width: 100%; }
    .schedule-work-drawer-footer-right .btn { flex: 1; }
    .schedule-manage-footer-summary { justify-content: center; }
}
@media (max-width: 600px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .checkbox-grid { grid-template-columns: 1fr; }
    .form-actions { flex-direction: column-reverse; align-items: stretch; }
    .form-actions .btn { width: 100%; }
    .schedule-board-admins { display: none; }
    .schedule-board-heading-text p { display: none; }
}

/* ========================================================================
   SCHEDULE BOARD TYPOGRAPHY CORRECTION
   Keeps the board compact, but improves readability and visual weight.
======================================================================== */

.schedule-board-page,
.schedule-board-page button,
.schedule-board-page input,
.schedule-board-page select,
.schedule-board-page textarea {
    font-weight: 500;
}

.schedule-board-name-line h1 {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.schedule-board-heading-text p {
    font-size: 12px;
    font-weight: 500;
}

.schedule-view-switcher button,
.schedule-today-btn,
.schedule-period-label,
.schedule-filter-control select,
.schedule-board-actions-menu button,
.schedule-add-menu strong {
    font-weight: 700;
}

.schedule-view-switcher button,
.schedule-today-btn,
.schedule-period-label,
.schedule-filter-control select {
    font-size: 12px;
}

.schedule-calendar-user-search input {
    font-size: 12px;
    font-weight: 500;
}

.schedule-calendar-date-name strong {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .035em;
}

.schedule-calendar-date-name span {
    font-size: 12px;
    font-weight: 800;
}

.schedule-calendar-date-meta small {
    font-size: 11px;
    font-weight: 600;
}

.schedule-calendar-row-label strong {
    font-size: 12px;
    font-weight: 750;
    color: #273449;
}

.schedule-calendar-row-label small {
    font-size: 11px;
    font-weight: 550;
    color: #7b8799;
}

.schedule-row-avatar {
    font-size: 12px;
    font-weight: 800;
}

.schedule-shift-card-top strong {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -0.005em;
}

.schedule-shift-time,
.schedule-shift-site {
    font-size: 11px;
    font-weight: 600;
}

.schedule-shift-site {
    color: #526078;
}

.schedule-shift-footer small {
    font-size: 10px;
    font-weight: 700;
}

.schedule-info-line span {
    font-size: 11px;
    font-weight: 700;
}

.schedule-info-line small,
.schedule-cell-muted,
.schedule-unavailable-card strong,
.schedule-unavailable-card span,
.schedule-unavailable-card small {
    font-size: 11px;
    font-weight: 600;
}

.schedule-cell-add {
    font-weight: 700;
}

@media (min-width: 1280px) {
    .schedule-calendar-date-name strong {
        font-size: 12px;
    }

    .schedule-calendar-date-name span {
        font-size: 12px;
    }

    .schedule-calendar-date-meta small {
        font-size: 8.5px;
    }

    .schedule-calendar-row-label strong {
        font-size: 10.5px;
    }

    .schedule-calendar-row-label small {
        font-size: 8.5px;
    }

    .schedule-shift-card-top strong {
        font-size: 9.5px;
    }

    .schedule-shift-time,
    .schedule-shift-site {
        font-size: 8.5px;
    }
}


/* ==========================================================================
   FRONTLINE SCHEDULER — SINGLE SHIFT BUILDER
   Paste at the absolute end of public/assets/css/app.css
   ========================================================================== */

/* Drawer sizing */
.schedule-shift-builder-drawer{
    width:min(720px,100vw);
    right:min(-740px,-100vw);
}

.schedule-shift-builder-drawer.open{
    right:0;
}

.schedule-shift-builder-drawer .schedule-shift-form{
    background:#fbfcfe;
}

/* Sections */
.schedule-shift-builder-drawer .schedule-form-section{
    padding:16px 18px;
    background:#fff;
    border-bottom:1px solid #edf1f6;
}

.schedule-shift-builder-drawer .schedule-form-section + .schedule-form-section{
    margin-top:8px;
}

.schedule-shift-builder-drawer .schedule-form-section-heading{
    margin-bottom:12px;
}

.schedule-shift-builder-drawer .schedule-form-section-heading h3{
    margin:0;
    font-size: 14px;
    line-height:1.3;
    font-weight:800;
    color:#172033;
}

.schedule-shift-builder-drawer .schedule-form-section-heading p{
    margin:3px 0 0;
    font-size: 12px;
    line-height:1.45;
    color:#7b8799;
}

.schedule-shift-builder-drawer .schedule-form-section-heading.with-action{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

/* Form controls */
.schedule-shift-builder-drawer .schedule-form-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
}

.schedule-shift-builder-drawer .schedule-form-group.full{
    grid-column:1/-1;
}

.schedule-shift-builder-drawer .schedule-form-group label{
    display:block;
    margin:0 0 5px;
    font-size: 12px;
    font-weight:750;
    color:#455166;
}

.schedule-shift-builder-drawer .schedule-form-group input,
.schedule-shift-builder-drawer .schedule-form-group select,
.schedule-shift-builder-drawer .schedule-form-group textarea{
    width:100%;
    border:1px solid #dfe5ed;
    border-radius:8px;
    background:#fff;
    color:#172033;
    outline:none;
    transition:border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.schedule-shift-builder-drawer .schedule-form-group input,
.schedule-shift-builder-drawer .schedule-form-group select{
    height:36px;
    padding:0 10px;
    font-size: 12px;
}

.schedule-shift-builder-drawer .schedule-form-group textarea{
    min-height:94px;
    padding:9px 10px;
    resize:vertical;
    font-size: 12px;
    line-height:1.5;
}

.schedule-shift-builder-drawer .schedule-form-group input:focus,
.schedule-shift-builder-drawer .schedule-form-group select:focus,
.schedule-shift-builder-drawer .schedule-form-group textarea:focus{
    border-color:#7aa7ff;
    box-shadow:0 0 0 3px rgba(37,99,235,.08);
}

.schedule-shift-builder-drawer .schedule-form-group input:disabled,
.schedule-shift-builder-drawer .schedule-form-group select:disabled{
    background:#f3f5f8;
    color:#9aa5b4;
    cursor:not-allowed;
}

/* Compact all-day row */
.schedule-switch-row.compact{
    margin:10px 0;
    padding:9px 10px;
    border:1px solid #e7ebf1;
    border-radius:9px;
    background:#f8fafc;
}

.schedule-switch-row.compact strong{
    font-size: 12px;
}

.schedule-switch-row.compact small{
    font-size: 11px;
}

/* Duration */
.schedule-shift-builder-drawer .schedule-duration-summary{
    margin-top:10px;
    padding:8px 10px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    border:1px solid #dbeafe;
    border-radius:8px;
    background:#f5f9ff;
    color:#1d4ed8;
    font-size: 12px;
}

.schedule-shift-builder-drawer .schedule-duration-summary strong{
    font-size: 12px;
    font-weight:800;
}

/* Search picker */
.schedule-search-picker{
    position:relative;
}

.schedule-search-picker-trigger{
    width:100%;
    min-height:38px;
    display:flex;
    align-items:center;
    gap:8px;
    padding:0 10px;
    border:1px solid #dfe5ed;
    border-radius:8px;
    background:#fff;
    color:#39465a;
    cursor:pointer;
    text-align:left;
}

.schedule-search-picker-trigger:hover{
    border-color:#c7d2e2;
    background:#fcfdff;
}

.schedule-picker-trigger-icon{
    width:26px;
    height:26px;
    flex:0 0 26px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:7px;
    background:#eff6ff;
    color:#2563eb;
}

.schedule-picker-trigger-text,
.schedule-search-picker-trigger > span:nth-child(2){
    flex:1;
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
    font-size: 12px;
    font-weight:650;
}

.schedule-search-picker-menu{
    position:absolute;
    top:calc(100% + 6px);
    left:0;
    right:0;
    z-index:60;
    display:none;
    max-height:300px;
    border:1px solid #e0e6ee;
    border-radius:10px;
    background:#fff;
    box-shadow:0 18px 45px rgba(15,23,42,.14);
    overflow:hidden;
}

.schedule-search-picker.open .schedule-search-picker-menu{
    display:block;
}

.schedule-search-picker-search{
    display:flex;
    align-items:center;
    gap:7px;
    padding:8px;
    border-bottom:1px solid #edf1f5;
    color:#94a0b1;
    background:#fbfcfe;
}

.schedule-search-picker-search input{
    width:100%;
    height:32px;
    border:1px solid #dfe5ed;
    border-radius:7px;
    padding:0 9px;
    outline:none;
    font-size: 12px;
    background:#fff;
}

.schedule-search-picker-options{
    max-height:240px;
    overflow:auto;
    padding:5px;
}

.schedule-search-picker-option{
    width:100%;
    display:flex;
    align-items:center;
    gap:9px;
    padding:8px;
    border:0;
    border-radius:8px;
    background:transparent;
    text-align:left;
    cursor:pointer;
}

.schedule-search-picker-option:hover{
    background:#f4f7fb;
}

.schedule-search-picker-option.selected{
    background:#eef5ff;
}

.schedule-search-picker-option[disabled],
.schedule-search-picker-option.is-unavailable{
    opacity:.55;
    cursor:not-allowed;
}

.schedule-picker-option-copy{
    flex:1;
    min-width:0;
}

.schedule-picker-option-copy strong,
.schedule-picker-option-copy small{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.schedule-picker-option-copy strong{
    font-size: 12px;
    color:#1d2738;
}

.schedule-picker-option-copy small{
    margin-top:2px;
    font-size: 11px;
    color:#8994a5;
}

.schedule-picker-check{
    opacity:0;
    color:#2563eb;
}

.schedule-search-picker-option.selected .schedule-picker-check{
    opacity:1;
}

.schedule-site-color-dot{
    width:10px;
    height:10px;
    flex:0 0 10px;
    border-radius:50%;
    background:var(--site-color,#64748b);
    box-shadow:0 0 0 3px color-mix(in srgb,var(--site-color,#64748b) 14%,white);
}

/* Selected site meta */
.schedule-selected-site-meta{
    margin-top:7px;
    padding:8px 9px;
    display:flex;
    align-items:center;
    gap:8px;
    border:1px solid #e7ecf2;
    border-radius:8px;
    background:#f8fafc;
}

.schedule-selected-site-meta strong,
.schedule-selected-site-meta small{
    display:block;
}

.schedule-selected-site-meta strong{
    font-size: 11px;
    color:#2c3749;
}

.schedule-selected-site-meta small{
    margin-top:2px;
    font-size: 11px;
    color:#8792a3;
}

/* Color dropdown */
.schedule-color-control{
    position:relative;
}

.schedule-selected-color-button{
    min-height:36px;
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:0 10px;
    border:1px solid #dfe5ed;
    border-radius:8px;
    background:#fff;
    color:#465267;
    cursor:pointer;
    font-size: 12px;
}

.schedule-selected-color-preview{
    width:16px;
    height:16px;
    border-radius:5px;
    background:var(--selected-color,#2563eb);
}

.schedule-color-dropdown{
    position:absolute;
    top:calc(100% + 6px);
    left:0;
    z-index:55;
    display:none;
    width:220px;
    padding:9px;
    border:1px solid #e2e7ee;
    border-radius:10px;
    background:#fff;
    box-shadow:0 16px 40px rgba(15,23,42,.14);
}

.schedule-color-control.open .schedule-color-dropdown{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}

/* Pills */
.schedule-pill-list,
.schedule-selected-user-pills{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
}

.schedule-tag-builder{
    border:1px solid #dfe5ed;
    border-radius:8px;
    padding:7px;
    background:#fff;
}

.schedule-tag-input-row{
    display:flex;
    align-items:center;
    gap:7px;
    color:#8f9aaa;
}

.schedule-tag-input-row input{
    flex:1;
    height:30px;
    border:0;
    outline:none;
    font-size: 12px;
}

.schedule-pill,
.schedule-user-pill{
    display:inline-flex;
    align-items:center;
    gap:5px;
    min-height:26px;
    padding:3px 7px;
    border-radius:999px;
    background:#eef4ff;
    color:#1e4fa8;
    font-size: 11px;
    font-weight:700;
}

.schedule-pill svg,
.schedule-user-pill svg{
    width:12px;
    height:12px;
}

.schedule-pill button,
.schedule-user-pill button{
    width:16px;
    height:16px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:0;
    border-radius:50%;
    background:transparent;
    color:inherit;
    cursor:pointer;
    padding:0;
}

.schedule-pill button:hover,
.schedule-user-pill button:hover{
    background:rgba(37,99,235,.12);
}

.schedule-selected-user-pills:empty{
    display:none;
}

/* User picker */
.schedule-user-picker-option .schedule-user-option-avatar{
    width:28px;
    height:28px;
    flex:0 0 28px;
    font-size: 11px;
}

.schedule-user-availability{
    min-width:62px;
    padding:3px 6px;
    border-radius:999px;
    text-align:center;
    font-size: 10px;
    font-weight:800;
}

.schedule-user-availability.pending{
    background:#f1f5f9;
    color:#64748b;
}

.schedule-user-availability.available{
    background:#dcfce7;
    color:#166534;
}

.schedule-user-availability.conflict{
    background:#fef3c7;
    color:#92400e;
}

.schedule-user-availability.unavailable{
    background:#fee2e2;
    color:#991b1b;
}

.schedule-user-picker-status{
    padding:7px 9px;
    border-bottom:1px solid #edf1f5;
    background:#f8fafc;
    color:#6b778a;
    font-size: 11px;
}

/* Break list */
.schedule-break-list{
    display:grid;
    gap:7px;
}

.schedule-break-item{
    display:flex;
    align-items:center;
    gap:9px;
    padding:8px 9px;
    border:1px solid #e6ebf1;
    border-radius:8px;
    background:#fbfcfe;
}

.schedule-break-item-icon{
    width:28px;
    height:28px;
    flex:0 0 28px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:7px;
    background:#f1f5f9;
    color:#64748b;
}

.schedule-break-item-copy{
    flex:1;
    min-width:0;
}

.schedule-break-item-copy strong,
.schedule-break-item-copy small{
    display:block;
}

.schedule-break-item-copy strong{
    font-size: 12px;
    color:#253044;
}

.schedule-break-item-copy small{
    margin-top:2px;
    font-size: 11px;
    color:#8893a3;
}

.schedule-break-item-actions{
    display:flex;
    gap:4px;
}

.schedule-break-item-actions button{
    width:27px;
    height:27px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:0;
    border-radius:7px;
    background:#fff;
    color:#64748b;
    cursor:pointer;
}

.schedule-break-item-actions button:hover{
    background:#eef2f7;
    color:#263246;
}

.schedule-inline-empty.compact{
    padding:12px;
    font-size: 11px;
}

/* Claim settings */
.schedule-checkbox-row{
    display:flex;
    align-items:flex-start;
    gap:9px;
    padding:10px;
    border:1px solid #e5eaf0;
    border-radius:9px;
    background:#fbfcfe;
    cursor:pointer;
}

.schedule-checkbox-row input{
    position:absolute;
    opacity:0;
    pointer-events:none;
}

.schedule-checkbox-indicator{
    width:18px;
    height:18px;
    flex:0 0 18px;
    margin-top:1px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid #cfd7e2;
    border-radius:5px;
    background:#fff;
    color:transparent;
}

.schedule-checkbox-row input:checked + .schedule-checkbox-indicator{
    border-color:#2563eb;
    background:#2563eb;
    color:#fff;
}

.schedule-checkbox-row strong,
.schedule-checkbox-row small{
    display:block;
}

.schedule-checkbox-row strong{
    font-size: 12px;
    color:#263246;
}

.schedule-checkbox-row small{
    margin-top:2px;
    font-size: 11px;
    color:#8691a2;
}

.schedule-claim-options{
    display:grid;
    gap:9px;
    margin-top:9px;
    padding-left:27px;
}

/* Shift claims list */
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: #128a3e; border-color: #128a3e; }

.schedule-claims-list{
    display:grid;
    gap:8px;
}

.schedule-claim-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:8px 10px;
    border:1px solid var(--border-strong, #e2e8f0);
    border-radius:8px;
    background:#f8fafc;
    font-size: 13px;
}

.schedule-claim-row.schedule-claim-self{
    background:#eff6ff;
    border-color:#bfdbfe;
}

.schedule-claim-user{
    font-weight:600;
    color:#1f2937;
}

.schedule-claim-status{
    text-transform:capitalize;
    color:#6b7280;
}

.schedule-claim-row.claim-status-approved .schedule-claim-status{ color:var(--success); }
.schedule-claim-row.claim-status-rejected .schedule-claim-status{ color:var(--danger); }
.schedule-claim-row.claim-status-withdrawn .schedule-claim-status{ color:#9ca3af; }

.schedule-claim-actions{
    display:flex;
    gap:6px;
}

/* File uploader */
.schedule-file-dropzone{
    min-height:118px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    padding:16px;
    border:1.5px dashed #cfd8e5;
    border-radius:10px;
    background:#fbfcfe;
    color:#6e7b8f;
    text-align:center;
    cursor:pointer;
}

.schedule-file-dropzone:hover,
.schedule-file-dropzone.is-dragover{
    border-color:#7aa7ff;
    background:#f3f8ff;
}

.schedule-file-dropzone input{
    display:none;
}

.schedule-file-dropzone-icon{
    width:36px;
    height:36px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    background:#eef5ff;
    color:#2563eb;
}

.schedule-file-dropzone strong{
    font-size: 12px;
    color:#334155;
}

.schedule-file-dropzone small{
    font-size: 11px;
    color:#8b96a6;
}

.schedule-file-list,
.schedule-existing-file-list{
    display:grid;
    gap:7px;
    margin-top:9px;
}

.schedule-file-item{
    display:flex;
    align-items:center;
    gap:8px;
    padding:8px;
    border:1px solid #e5eaf0;
    border-radius:8px;
    background:#fff;
}

.schedule-file-item-icon{
    width:30px;
    height:30px;
    flex:0 0 30px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:7px;
    background:#f1f5f9;
    color:#64748b;
}

.schedule-file-item-copy{
    flex:1;
    min-width:0;
}

.schedule-file-item-copy strong,
.schedule-file-item-copy small{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.schedule-file-item-copy strong{
    font-size: 11px;
    color:#2d394c;
}

.schedule-file-item-copy small{
    margin-top:2px;
    font-size: 10px;
    color:#8c97a7;
}

.schedule-file-item-remove{
    width:28px;
    height:28px;
    border:0;
    border-radius:7px;
    background:#fff1f2;
    color:#dc2626;
    cursor:pointer;
}

/* Break modal */
.schedule-modal-backdrop{
    position:fixed;
    inset:0;
    z-index:10010;
    background:rgba(15,23,42,.48);
}

.schedule-break-modal{
    position:fixed;
    left:50%;
    top:50%;
    z-index:10011;
    width:min(440px,calc(100vw - 28px));
    max-height:calc(100vh - 40px);
    display:none;
    transform:translate(-50%,-50%);
    border:1px solid #e3e8ef;
    border-radius:14px;
    background:#fff;
    box-shadow:0 24px 70px rgba(15,23,42,.24);
    overflow:auto;
}

.schedule-break-modal.open{
    display:block;
}

.schedule-break-modal-header{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    padding:14px 16px;
    border-bottom:1px solid #edf1f5;
}

.schedule-break-modal-header h3{
    margin:0;
    font-size: 14px;
    color:#1d2738;
}

.schedule-break-modal-header p{
    margin:3px 0 0;
    font-size: 11px;
    color:#8490a1;
}

.schedule-break-modal-body{
    padding:16px;
}

.schedule-break-modal-footer{
    display:flex;
    justify-content:flex-end;
    gap:8px;
    padding:11px 16px;
    border-top:1px solid #edf1f5;
    background:#fbfcfe;
}

.schedule-field-help{
    display:block;
    margin-top:4px;
    font-size: 11px;
    color:#929dab;
}

/* Task rows */
.schedule-shift-builder-drawer .schedule-task-row{
    padding:7px;
    border:1px solid #e5eaf0;
    border-radius:8px;
    background:#fff;
}

.schedule-shift-builder-drawer .schedule-task-row input{
    height:34px;
    font-size: 12px;
}

/* Footer */
.schedule-shift-builder-drawer .schedule-work-drawer-footer{
    padding:10px 14px;
    background:#fff;
    border-top:1px solid #e5eaf0;
}

.schedule-shift-builder-drawer .schedule-work-drawer-footer-right{
    gap:7px;
}

/* Utility */
[hidden]{
    display:none !important;
}

/* Responsive */
@media (max-width:760px){
    .schedule-shift-builder-drawer{
        width:100%;
        right:-100%;
    }

    .schedule-shift-builder-drawer .schedule-form-grid{
        grid-template-columns:1fr;
    }

    .schedule-shift-builder-drawer .schedule-form-group.full{
        grid-column:auto;
    }

    .schedule-search-picker-menu{
        position:fixed;
        left:12px;
        right:12px;
        top:auto;
        bottom:12px;
        max-height:60vh;
        border-radius:14px;
    }

    .schedule-color-dropdown{
        width:100%;
    }

    .schedule-claim-options{
        padding-left:0;
    }

    .schedule-shift-builder-drawer .schedule-work-drawer-footer{
        flex-direction:column;
        align-items:stretch;
    }

    .schedule-shift-builder-drawer .schedule-work-drawer-footer-right{
        width:100%;
    }

    .schedule-shift-builder-drawer .schedule-work-drawer-footer-right .btn{
        flex:1;
    }
}


/* Live Monitoring */
.monitoring-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.monitoring-map-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); height: 560px; }
.monitoring-map { width: 100%; height: 100%; min-height: 560px; background: #eef2f7; }
.monitoring-sidebar { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 6px 16px 12px; max-height: 560px; overflow-y: auto; }
.monitoring-sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.monitoring-sidebar-header h3 { margin: 0; font-size: 13.5px; font-weight: 800; }
.monitoring-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.monitoring-guard-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-bottom: 1px solid #f1f5f9; }
.monitoring-guard-item:last-child { border-bottom: 0; }
.monitoring-guard-dot { flex: 0 0 10px; width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.monitoring-guard-copy { min-width: 0; }
.monitoring-guard-copy strong { display: block; font-size: 12.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitoring-guard-copy small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.monitoring-guard-time { color: var(--muted-light) !important; }

@media (max-width: 960px) {
    .monitoring-layout { grid-template-columns: 1fr; }
    .monitoring-map-wrap { height: 380px; }
    .monitoring-map { min-height: 380px; }
}

/* Guard tracking status badge */
.guard-tracking-badge { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; font-size: 11.5px; font-weight: 700; margin-bottom: 14px; }
.guard-tracking-badge.tracking-inside { background: #f0fdf4; color: #15803d; }
.guard-tracking-badge.tracking-outside { background: #fef3c7; color: #92400e; }
.guard-tracking-badge.tracking-off { background: #f1f5f9; color: #64748b; }
.guard-tracking-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Notification dropdown items with unread state */
.dropdown-item.notification-item { display: block; padding: 10px 14px; white-space: normal; }
.dropdown-item.notification-item strong { display: block; font-size: 12px; }
.dropdown-item.notification-item small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }

/* Live Monitoring filter bar */
.monitoring-filter-bar { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; position: relative; z-index: 1000; }
.monitoring-filter-group { display: flex; flex-direction: column; gap: 5px; min-width: 200px; position: relative; z-index: 1000; }
.monitoring-filter-group label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.monitoring-filter-group .search-select-picker .schedule-search-picker-trigger { min-height: 36px; height: 36px; font-size: 12.5px; }
.timesheets-filter-picker { width: 220px; }
.timesheets-filter-picker .schedule-search-picker-trigger { min-height: 31px; height: 31px; font-size: 12.5px; padding: 0 9px; }
.monitoring-filter-group .schedule-search-picker-menu { z-index: 1001; }
.monitoring-guard-item { cursor: pointer; border-radius: 8px; padding-left: 8px; padding-right: 8px; margin: 0 -8px; transition: background-color .12s ease; }
.monitoring-guard-item:hover { background: #f8fafc; }
.monitoring-guard-item.is-active { background: var(--primary-soft); }
