/*
|--------------------------------------------------------------------------
| UI theme — the Schedule module's design, applied app-wide
|--------------------------------------------------------------------------
|
| Loaded right after app.css (see Views/layouts/master.php). The Schedule
| module (schedule list, board, shift drawer, Time Off, Time Clock) was
| restyled by the designer with component-scoped rules; every other module
| still used the older base components. This file brings those shared base
| components (.btn, inputs, labels, badges, tables, pagination, icon
| buttons, tabs…) to the same look:
|
|   - pill buttons, 40px tall, regular weight, blue text on a light border
|   - 40px inputs with an 8px radius, 14px regular-weight labels
|   - bordered status chips
|   - round icon buttons
|
| Selectors are scoped to .main-content / modals so the guard mobile shell
| and the login page keep their own styles. The designer's component-scoped
| scheduler rules are more specific and still win where they exist.
*/

:root {
    --ui-control-h: 40px;
    --ui-control-h-sm: 34px;
    --ui-line: #dbdee0;          /* border of outline buttons on the board */
    --ui-input-line: #dfe5ed;    /* border of shift-drawer inputs          */
    --ui-input-text: #172033;
    --ui-label: #203040;
    --ui-muted: #64748b;
    --ui-icon: #3b9cf5;          /* "⋯" button colour on schedule cards     */
    --ui-radius-input: 8px;
    --ui-radius-card: 14px;
}

/* ---------------------------------------------------------------------
   Buttons
--------------------------------------------------------------------- */

.main-content .btn,
.modal-backdrop .btn,
.confirm-modal .btn {
    height: var(--ui-control-h);
    min-height: var(--ui-control-h);
    padding: 0 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 400;
    gap: 8px;
    line-height: 1;
}

.main-content .btn-sm,
.modal-backdrop .btn-sm,
.confirm-modal .btn-sm {
    height: var(--ui-control-h-sm);
    min-height: var(--ui-control-h-sm);
    padding: 0 14px;
    font-size: 13px;
}

.main-content .btn svg,
.modal-backdrop .btn svg,
.confirm-modal .btn svg {
    flex-shrink: 0;
}

.main-content .btn-primary,
.modal-backdrop .btn-primary,
.confirm-modal .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.main-content .btn-primary:hover,
.modal-backdrop .btn-primary:hover,
.confirm-modal .btn-primary:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.main-content .btn-outline,
.main-content .btn-soft,
.modal-backdrop .btn-outline,
.confirm-modal .btn-outline {
    background: #fff;
    border-color: var(--ui-line);
    color: var(--primary);
}

.main-content .btn-outline:hover,
.main-content .btn-soft:hover,
.modal-backdrop .btn-outline:hover,
.confirm-modal .btn-outline:hover {
    background: var(--primary-soft);
    border-color: #bfdbfe;
    color: var(--primary);
}

.main-content .btn-danger,
.modal-backdrop .btn-danger,
.confirm-modal .btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.main-content .btn-danger:hover,
.modal-backdrop .btn-danger:hover,
.confirm-modal .btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

.main-content .btn-outline-danger {
    background: #fff;
    border-color: #fecaca;
    color: var(--danger);
}

.main-content .btn-outline-danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.main-content .btn-success {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.main-content .form-actions .btn {
    min-width: 110px;
    height: var(--ui-control-h);
}

/* CSV / Excel / PDF export buttons above the data tables */
.main-content .export-btn {
    min-width: 0;
    height: var(--ui-control-h);
    padding: 0 18px;
    gap: 8px;
    border: 1px solid var(--ui-line);
    border-radius: 999px;
    background: #fff;
    color: var(--primary);
    font-size: 14px;
    font-weight: 400;
}

.main-content .export-btn:hover,
.main-content .export-btn.csv:hover,
.main-content .export-btn.xlsx:hover,
.main-content .export-btn.pdf:hover {
    background: var(--primary-soft);
    border-color: #bfdbfe;
    color: var(--primary);
}

/* Square edit / delete icons in table rows -> round, like the "⋯" card button */
.main-content .icon-action {
    width: 36px;
    height: 36px;
    border: 1px solid var(--ui-line);
    border-radius: 999px;
    background: #fff;
    color: var(--ui-icon);
}

.main-content .icon-action:hover {
    background: var(--primary-soft);
    border-color: #bfdbfe;
    color: var(--primary);
}

.main-content .icon-action.danger,
.main-content .icon-action.danger svg {
    color: #ef4444;
}

.main-content .icon-action.danger:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: var(--danger);
}

/* ---------------------------------------------------------------------
   Status chips (Active / Inactive / Approved / Pending…)
--------------------------------------------------------------------- */

.main-content .status-badge {
    gap: 6px;
    padding: 3px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

/* Numeric counts (Reports): centred */
.main-content .status-badge.is-count {
    min-width: 30px;
    justify-content: center;
    padding: 3px 9px;
}

.main-content .status-badge.success { background: #dcfce7; border-color: #bbf7d0; color: #15803d; }
.main-content .status-badge.muted   { background: #f1f5f9; border-color: #e2e8f0; color: #64748b; }
.main-content .status-badge.danger  { background: #fee2e2; border-color: #fecaca; color: #b91c1c; }
.main-content .status-badge.warning { background: #fef3c7; border-color: #fde68a; color: #92400e; }
.main-content .status-badge.info    { background: #dbeafe; border-color: #bfdbfe; color: #1d4ed8; }

/* ---------------------------------------------------------------------
   Data tables
--------------------------------------------------------------------- */

.main-content .table-search input {
    width: 260px;
    height: var(--ui-control-h);
    padding: 0 14px 0 38px;
    border: 1px solid var(--ui-input-line);
    border-radius: 10px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") 13px center / 16px no-repeat;
    color: var(--ui-input-text);
    font-size: 14px;
}

.main-content .custom-table-controls {
    color: var(--ui-muted);
    font-size: 14px;
}

.main-content .custom-table-controls select {
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--ui-input-line);
    border-radius: 10px;
    background-color: #fff;
    color: var(--ui-input-text);
    font-size: 14px;
}

.main-content .custom-table th {
    color: var(--ui-label);
    font-size: 14px;
    font-weight: 400;
}

.main-content .custom-table td {
    color: var(--ui-label);
}

/* AJAX list tables (Users, Sites, Zones, Roles…): dates / phones on one line;
   .table-wrap scrolls if needed */
.main-content .custom-table[data-custom-table] td {
    white-space: nowrap;
}

.main-content .custom-table-bottom {
    color: var(--ui-muted);
    font-size: 13px;
}

.main-content .custom-pagination {
    gap: 6px;
    align-items: center;
}

.main-content .custom-pagination button {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--ui-line);
    border-radius: 999px;
    background: #fff;
    color: var(--primary);
    font-size: 14px;
    font-weight: 400;
}

.main-content .custom-pagination button:hover:not(:disabled):not(.active) {
    background: var(--primary-soft);
    border-color: #bfdbfe;
}

.main-content .custom-pagination button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.main-content .custom-table-page-ellipsis {
    height: 36px;
}

/* Filter row above tables: searchable dropdowns and the date-range trigger */
.main-content .custom-table-controls.filters > label .search-select-picker {
    width: 180px;
}

.main-content .custom-table-controls .date-range-trigger,
.main-content .filter-bar .date-range-trigger {
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--ui-input-line);
    border-radius: 10px;
    color: var(--ui-input-text);
    font-size: 14px;
}

/* Live Monitoring zone / site filters: same label + control look as forms */
.main-content .monitoring-filter-group label {
    color: var(--ui-label);
    font-size: 14px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.main-content .monitoring-filter-group .search-select-picker .schedule-search-picker-trigger {
    min-height: var(--ui-control-h);
    height: var(--ui-control-h);
    font-size: 14px;
}

/* Compact filter controls above tables (Reports, Activity Log, Monitoring…) */
.main-content .filter-input,
.main-content .filter-select {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--ui-input-line);
    border-radius: 10px;
    color: var(--ui-input-text);
    font-size: 14px;
}

/* ---------------------------------------------------------------------
   Forms
--------------------------------------------------------------------- */

.main-content .form-group {
    gap: 6px;
}

.main-content .form-group label {
    color: var(--ui-label);
    font-size: 14px;
    font-weight: 400;
}

.main-content .form-group input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]),
.main-content .form-group select,
.main-content .form-group textarea {
    min-height: var(--ui-control-h);
    padding: 0 12px;
    border: 1px solid var(--ui-input-line);
    border-radius: var(--ui-radius-input);
    color: var(--ui-input-text);
    font-size: 14px;
}

.main-content .form-group textarea {
    padding: 10px 12px;
}

.main-content .form-group input:focus,
.main-content .form-group select:focus,
.main-content .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.main-content .form-section {
    border-top-color: #eef1f5;
}

.main-content .form-section h3,
.main-content .card-header h3 {
    color: var(--ui-label);
    font-size: 16px;
    font-weight: 600;
}

.main-content .form-actions {
    gap: 10px;
    border-top-color: #eef1f5;
}

/* Checkboxes / radios pick up the brand colour everywhere */
.main-content input[type="checkbox"],
.main-content input[type="radio"],
.modal-backdrop input[type="checkbox"] {
    accent-color: var(--primary);
}

.main-content .checkbox-label input[type="checkbox"],
.main-content .checkbox-card input {
    width: 18px;
    height: 18px;
}

.main-content .checkbox-card {
    min-height: var(--ui-control-h);
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--ui-input-line);
    border-radius: 10px;
    color: var(--ui-label);
    font-size: 14px;
    font-weight: 400;
}

.main-content .checkbox-card:hover {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.main-content .checkbox-card:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.main-content .checkbox-label {
    color: var(--ui-label);
    font-weight: 400;
}

/* ---------------------------------------------------------------------
   Tabs & side navigation (Reports tabs, Settings nav)
--------------------------------------------------------------------- */

.main-content .reports-tab {
    padding: 10px 14px;
    color: var(--ui-muted);
    font-size: 14px;
    font-weight: 400;
}

.main-content .reports-tab.is-active {
    color: var(--primary);
    font-weight: 700;
}

.main-content .settings-nav {
    border-radius: var(--ui-radius-card);
}

.main-content .settings-nav a {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--ui-label);
    font-size: 14px;
    font-weight: 400;
}

.main-content .settings-nav a.active {
    font-weight: 600;
}

/* ---------------------------------------------------------------------
   Cards
--------------------------------------------------------------------- */

.main-content .card,
.main-content .dashboard-widget-card {
    border-radius: var(--ui-radius-card);
}

/* ---------------------------------------------------------------------
   Login / forgot / reset password
--------------------------------------------------------------------- */

.login-card {
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.login-card .input-group label {
    color: var(--ui-label);
    font-size: 14px;
    font-weight: 400;
}

.login-card .input-group input {
    height: 44px;
    border: 1px solid var(--ui-input-line);
    border-radius: var(--ui-radius-input);
    color: var(--ui-input-text);
}

.login-card .login-btn {
    height: 44px;
    border-radius: 999px;
    font-weight: 400;
    font-size: 15px;
}

.login-card .login-btn:hover {
    background: #1d4ed8;
}

.login-card a {
    color: var(--primary);
}

/* =====================================================================
   App-wide standard (2026-10-20 design pass)
   One look for every admin page: same sidebar tiles, headers, forms,
   tables, buttons, chips and counts. The guard mobile shell keeps its
   own design (guard-ui/*.css) and is not touched here.
===================================================================== */

/* ---- Sidebar: every link gets the coloured tile, not only Operations ---- */
.sidebar .menu-section .nav-item {
    gap: 12px;
    min-height: 44px;
    padding: 6px 10px;
}
.sidebar .menu-section .nav-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--nav-tile, #64748b);
    color: #fff;
    flex-shrink: 0;
}
.sidebar .menu-section .nav-icon svg { width: 17px; height: 17px; stroke: currentColor; }
.sidebar .menu-section .nav-item.active .nav-icon { box-shadow: 0 0 0 2px rgba(255, 255, 255, .55); }
.sidebar .nav-item.nav-item--dashboard    { --nav-tile: #2563eb; }
.sidebar .nav-item.nav-item--monitoring   { --nav-tile: #ef4444; }
.sidebar .nav-item.nav-item--reports      { --nav-tile: #0891b2; }
.sidebar .nav-item.nav-item--activity-log { --nav-tile: #64748b; }
.sidebar .nav-item.nav-item--settings     { --nav-tile: #475569; }
.sidebar .nav-item.nav-item--api-tokens   { --nav-tile: #7c3aed; }
.sidebar .nav-item.nav-item--help         { --nav-tile: #0ea5e9; }
.sidebar .nav-item.nav-item--holidays     { --nav-tile: #e11d48; }
.sidebar.collapsed .menu-section .nav-item { padding: 6px; }

/* user card: long emails end in "..." instead of being cut by the border */
.sidebar-user { min-width: 0; }
.sidebar-user .sidebar-user-text { min-width: 0; flex: 1; }
.sidebar-user strong,
.sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar.collapsed .sidebar-user { justify-content: center; padding: 6px; background: transparent; border-color: transparent; }
.sidebar.collapsed .sidebar-user .sidebar-user-text { display: none; }

/* ---- Top bar ---- */
.topbar .header-icon { position: relative; overflow: visible; }
.topbar .icon-badge { top: -6px; right: -6px; box-shadow: 0 0 0 2px #fff; }
.topbar-left h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 768px) {
    .topbar h1 { font-size: 20px !important; }
    .topbar-left { flex: 1; min-width: 0; }
    .topbar-right { flex-shrink: 0; }
}

/* ---- Cards stacked on one page always have the same gap ---- */
.main-content > .page-card + .page-card { margin-top: 16px; }

/* ---- Page header buttons: "Add X  +" / "<-  Back to X" ---- */
.page-actions .btn.btn-icon-left { flex-direction: row; }

/* ---- Forms use the full card width (were capped at 900px) ---- */
.main-content .form-grid,
.main-content .checkbox-grid { max-width: none; }
.main-content .form-group > small,
.main-content .form-hint { display: block; color: var(--ui-muted); font-size: 12.5px; font-weight: 400; line-height: 1.45; }
.main-content .ui-hint-block { margin: -4px 0 16px; }
.main-content .form-group input::placeholder,
.main-content .form-group textarea::placeholder { text-transform: none; color: #94a3b8; }
.main-content input[type="color"] { width: 64px; height: var(--ui-control-h); padding: 4px; border: 1px solid var(--ui-input-line); border-radius: var(--ui-radius-input); background: #fff; }
.main-content .form-group input[type="file"] { padding: 7px 10px; border: 1px dashed var(--ui-input-line); border-radius: var(--ui-radius-input); background: #f8fafc; font-size: 13px; }

.ui-password-field { position: relative; }
.ui-password-field input { width: 100%; padding-right: 64px !important; }
.ui-password-toggle {
    position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
    border: 0; background: none; color: var(--primary); font-size: 13px; cursor: pointer; padding: 4px 6px;
}

/* sticky "Save" on long pages (Settings) */
.main-content .ui-sticky-actions {
    position: sticky; bottom: 0; z-index: 5;
    padding: 14px 0;
    background: rgba(255, 255, 255, .96); border-top: 1px solid #eef1f5;
}

/* ---- Export buttons: same file icon on every table (CSV / Excel / PDF) ---- */
.main-content .export-btn > svg { display: none; }
.main-content .export-btn::before {
    content: ""; width: 15px; height: 15px; flex-shrink: 0; background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.main-content a.export-btn { display: inline-flex; align-items: center; text-decoration: none; }

/* ---- Tables ---- */
.main-content .table-actions { flex-wrap: nowrap; }
.main-content .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ui-user-cell { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.to-reason-text { color: var(--ui-label); }
.main-content .btn.is-disabled { pointer-events: none; opacity: .45; }
.ui-mt-12 { margin-top: 12px; }

/* avatar colours (stable per person) instead of one blue for everyone */
.user-avatar.ui-avatar-tone-0 { background: #dbeafe; color: #1d4ed8; }
.user-avatar.ui-avatar-tone-1 { background: #ede9fe; color: #6d28d9; }
.user-avatar.ui-avatar-tone-2 { background: #dcfce7; color: #15803d; }
.user-avatar.ui-avatar-tone-3 { background: #fef3c7; color: #b45309; }
.user-avatar.ui-avatar-tone-4 { background: #fce7f3; color: #be185d; }
.user-avatar.ui-avatar-tone-5 { background: #cffafe; color: #0e7490; }

/* ---- Counts: grey when there is nothing to do, colour only when > 0 ---- */
.db-badge.is-zero { background: #eef2f6; color: #64748b; }
.ts-today-requests.is-zero { background: #f8fafc !important; border-color: #e2e8f0 !important; color: #64748b !important; }
.ts-today-requests.is-zero .ts-today-requests-count { background: #cbd5e1 !important; }

/* ---- Stat cards: the number is the headline, the label is small ---- */
.dashboard-stat-card .stat-body > span { font-size: 12px !important; font-weight: 600 !important; letter-spacing: .04em; color: var(--ui-muted) !important; }
.dashboard-stat-card .stat-body > strong { font-size: 28px !important; font-weight: 700 !important; line-height: 1.1 !important; margin: 2px 0 6px !important; color: #0f172a !important; }
.dashboard-stat-card .stat-body > small { font-weight: 400 !important; color: var(--ui-muted) !important; }

/* ---- Roles: compact permission groups with "All" ---- */
.main-content .permission-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.main-content .permission-groups .permission-group { margin: 0; padding: 12px; border: 1px solid #e6ebf1; border-radius: 12px; background: #fff; }
.main-content .permission-groups .permission-group-header { display: flex; align-items: center; justify-content: space-between; margin: -2px 0 10px; padding: 0; border: 0; background: none; font-weight: 600; color: var(--ui-label); }
.main-content .permission-groups .checkbox-grid { grid-template-columns: 1fr; gap: 8px; }
.permission-select-all { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; color: var(--ui-muted); cursor: pointer; }

/* ---- Activity Log toolbar ---- */
.actlog-card-standalone { border-radius: 16px !important; border-top: 1px solid #eceff3 !important; }
.actlog-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 4px; }
.actlog-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.actlog-filters .filter-input { width: 220px; }
.actlog-av-system { background: #eef2f6 !important; color: #475569 !important; }
.actlog-when { color: var(--ui-muted); white-space: nowrap; }

/* ---- Notifications list ---- */
.ui-list-card { background: #fff; border: 1px solid #eceff3; border-radius: var(--ui-radius-card); padding: 6px 20px 12px; }
.ui-list-card-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid #f1f4f8; }
.ui-notif-row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-bottom: 1px solid #f1f4f8; }
.ui-notif-row:last-of-type { border-bottom: 0; }
.ui-notif-icon { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; }
.ui-notif-icon svg { width: 18px; height: 18px; }
.ui-notif-icon.is-alert     { background: #fee2e2; color: #dc2626; }
.ui-notif-icon.is-clock     { background: #e0e7ff; color: #4f46e5; }
.ui-notif-icon.is-timeoff   { background: #dcfce7; color: #15803d; }
.ui-notif-icon.is-timesheet { background: #cffafe; color: #0e7490; }
.ui-notif-icon.is-shift     { background: #ffedd5; color: #c2410c; }
.ui-notif-copy { flex: 1; min-width: 0; }
.ui-notif-copy strong { display: block; color: #0f172a; font-size: 14px; }
.ui-notif-copy p { margin: 3px 0 4px; color: var(--ui-label); font-size: 14px; }
.ui-notif-copy small { color: var(--ui-muted); font-size: 12.5px; }
.ui-notif-new { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--primary); font-weight: 600; }
.ui-notif-new::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }

/* ---- Live Monitoring legend ---- */
.ui-map-legend { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-left: auto; padding-bottom: 10px; font-size: 13px; color: var(--ui-muted); }
.ui-map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ui-map-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.ui-map-updated { color: var(--ui-label); font-weight: 500; }

/* ---- Schedule board: today's column is highlighted on the week view ---- */
.schedule-calendar-date-header.today { background: #eff6ff !important; box-shadow: inset 0 -2px 0 var(--primary); }

@media (max-width: 768px) {
    .ui-map-legend { margin-left: 0; }
    .actlog-filters .filter-input { width: 100%; }
}

/* ---- follow-ups from the screenshot check ---- */
.actlog-toolbar { padding: 0 0 12px; }
.actlog-filters { flex-direction: row !important; align-items: center; }
.actlog-filters > input,
.actlog-filters > select { width: 200px !important; flex: 0 0 auto; margin: 0 !important; }
.page-card > .ui-list-card { border: 0; padding: 0; }
.ts-panel .custom-table td { white-space: nowrap; }
.ts-panel .custom-table td:nth-child(2),
.ts-panel .custom-table td:nth-child(6) { white-space: normal; min-width: 140px; }

@media (max-width: 768px) {
    .actlog-filters > input,
    .actlog-filters > select { width: 100% !important; }
}

/* follow-ups 2 */
.actlog-filters { flex-wrap: nowrap !important; justify-content: flex-end; }
.actlog-filters > input, .actlog-filters > select { height: 40px !important; }
.main-content .ui-sticky-actions { background: #fff !important; box-shadow: 0 -6px 16px rgba(15, 23, 42, .06); }
@media (max-width: 768px) { .actlog-filters { flex-wrap: wrap !important; } }

/* ---- Super Admin ---- */
.is-super-admin .sidebar .menu-section .nav-icon { --nav-tile: #7c3aed; }
.is-super-admin .sidebar .menu-section .nav-item.active .nav-icon { background: rgba(255,255,255,.18); }
.is-super-admin .dashboard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .is-super-admin .dashboard-grid { grid-template-columns: 1fr; } }
.is-super-admin .icon-actions > form:last-child { margin-left: 8px; padding-left: 10px; border-left: 1px solid #eef1f5; }
.sa-logout-btn { display: inline-flex; align-items: center; gap: 6px; }
.sa-logout-btn svg { width: 16px; height: 16px; stroke: currentColor; }
.main-content .form-group input:disabled, .main-content .form-group select:disabled { background: #f8fafc; color: #64748b; border-style: dashed; cursor: not-allowed; }

/* =====================================================================
   Schedule board - single shift drawer (add / edit)
===================================================================== */

/* Repeat options: same label + 40px control look as the Date / Start / End row */
.ui-repeat-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    margin: 8px 0 4px;
    padding: 12px 14px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #f8fbff;
}
.ui-repeat-panel[hidden],
.ui-repeat-panel [hidden] { display: none !important; }
.ui-repeat-panel .schedule-form-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 10px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    width: auto !important;
}
.ui-repeat-panel label {
    margin: 0 !important;
    color: #203040;
    font-size: 14px !important;
    font-weight: 400 !important;
    white-space: nowrap;
}
.ui-repeat-panel select,
.ui-repeat-panel input[type="date"] {
    height: 40px !important;
    min-height: 40px;
    min-width: 170px;
    padding: 0 12px !important;
    border: 1px solid #dfe5ed !important;
    border-radius: 8px !important;
    background-color: #fff;
    color: #172033;
    font-size: 14px !important;
}
.ui-repeat-panel select:focus,
.ui-repeat-panel input[type="date"]:focus { border-color: var(--primary) !important; outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235, .10); }

/* Section headings that sit in the 80px label column (Notes, Attachments) read like
   the other row labels: 14px regular, not an 18px heading spilling into the field */
.shift-notes .schedule-form-section-heading h3,
.shift-attachments .schedule-form-section-heading h3 {
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4;
    color: #203040;
}

/* Shift tags dropdown: small checkbox, tag icon and name in one left-aligned row */
.shift-tags-menu .shift-tags-option {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 8px 14px !important;
    cursor: pointer;
    color: #203040;
    font-size: 14px;
    text-align: left;
}
.shift-tags-menu .shift-tags-option[hidden] { display: none !important; }
.shift-tags-menu .shift-tags-option:hover { background: #f8fbff; }
.shift-tags-menu .shift-tags-option input[type="checkbox"] {
    flex: 0 0 16px;
    width: 16px !important;
    height: 16px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 4px;
    accent-color: var(--primary);
}
.shift-tags-menu .shift-tags-option svg { flex: 0 0 16px; width: 16px; height: 16px; color: #64748b; }
.shift-tags-menu .shift-tags-option span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Attachments: long file names end in "..." inside the drawer instead of
   stretching the row past its right edge */
.shift-attachments { grid-template-columns: 80px minmax(0, 1fr) !important; }
.shift-attachments .schedule-file-list,
.shift-attachments .schedule-existing-file-list {
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) !important;
}
.schedule-file-item {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.schedule-file-item-copy { flex: 1 1 auto; min-width: 0; }
.schedule-file-item-copy strong,
.schedule-file-item-copy a {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.schedule-file-item-remove { flex: 0 0 auto; }

/* repeat panel: "Repeats" and "Until" on their own rows so nothing overlaps in the narrow drawer */
.ui-repeat-panel { flex-direction: column; align-items: stretch !important; }
.ui-repeat-panel .schedule-form-group { width: 100% !important; }
.ui-repeat-panel .schedule-form-group::after, .ui-repeat-panel .schedule-form-group::before { display: none !important; }
.ui-repeat-panel label { flex: 0 0 64px; }
.ui-repeat-panel select, .ui-repeat-panel input[type="date"] { flex: 1 1 auto; min-width: 0 !important; width: auto !important; }

/* Schedules: multi-zone picker in the New / Edit schedule wizard */
.schedule-zone-list { max-height: 220px; overflow-y: auto; }
.schedule-zone-hint { margin-left: 6px; color: var(--ui-muted, #6b7280); font-size: 12px; font-weight: 400; }

/* ------------------------------------------------------------------
   Print: company header on paper, no app chrome (sidebar, menus, buttons)
   ------------------------------------------------------------------ */
.print-brand { display: none; }
@media print {
    @page { size: A4; margin: 14mm 12mm; }
    html, body { background: #fff !important; }
    .sidebar, .topbar, .toast-container, .print-hide, .bottom-nav,
    .btn, button, .page-actions, .table-export-actions, .custom-table-top,
    .custom-table-footer, .pagination, [data-table-limit] { display: none !important; }
    .main-content { margin: 0 !important; padding: 0 !important; width: 100% !important; }
    .page-card, .custom-table-wrapper { box-shadow: none !important; border: 0 !important; padding: 0 !important; }
    .print-brand {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
        padding-bottom: 10px;
        margin-bottom: 16px;
        border-bottom: 2px solid #1e3a5f;
        color: #111827;
    }
    .print-brand-co { display: flex; align-items: center; gap: 10px; }
    .print-brand-co img { max-width: 48px; max-height: 44px; }
    .print-brand strong { display: block; font-size: 15px; }
    .print-brand small { display: block; font-size: 10px; color: #6b7280; margin-top: 2px; }
    .print-brand-doc { text-align: right; }
    .print-brand-doc strong { color: #1e3a5f; }
    .custom-table-controls, .custom-table-info, .table-filters, .filter-bar { display: none !important; }
    .table-wrap, .table-responsive, .custom-table-wrapper { overflow: visible !important; }
    .custom-table, table { width: 100% !important; min-width: 0 !important; font-size: 11px !important; }
    .custom-table th, .custom-table td { padding: 6px 8px !important; }
    table.print-drop-last tr > *:last-child { display: none !important; }
    table { page-break-inside: auto; }
    tr { page-break-inside: avoid; }
    thead { display: table-header-group; }
    a { color: inherit !important; text-decoration: none !important; }
}

/* ------------------------------------------------------------------
   Holidays module (/holidays)
   ------------------------------------------------------------------ */
.hol-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hol-title { margin: 0; font-size: 18px; font-weight: 700; color: #111827; }
.hol-sub { margin: 4px 0 0; font-size: 13px; color: #6b7280; max-width: 640px; }
.hol-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hol-set-title { display: flex; align-items: center; gap: 12px; }
.hol-back { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid #e5e7eb; border-radius: 10px; color: #374151; text-decoration: none; font-size: 16px; }
.hol-back:hover { background: #f3f5f7; }
.hol-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: var(--hol-color, #e11d48); flex: 0 0 auto; }
.hol-swatch-lg { width: 18px; height: 18px; border-radius: 6px; }
.hol-set-name { display: inline-flex; align-items: center; gap: 10px; color: #111827; font-weight: 600; text-decoration: none; }
.hol-set-name:hover { color: #1d6fd1; }
.hol-panel { border: 1px solid #e5e7eb; border-radius: 14px; padding: 18px 20px; margin-bottom: 18px; background: #fafbfc; }
.hol-panel[hidden] { display: none; }
.hol-panel-title { margin: 0 0 12px; font-size: 15px; font-weight: 700; color: #111827; }
.hol-check { display: flex; align-items: center; gap: 8px; font-weight: 500; margin-top: 30px; }
.hol-check input { width: 16px; height: 16px; }
.hol-split { justify-content: space-between; }
.hol-split > span { display: inline-flex; gap: 8px; }
.btn-danger-outline { background: #fff; border: 1px solid #f3c4c4; color: #dc2626; }
.btn-danger-outline:hover { background: #fef2f2; }
.hol-yearbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.hol-years { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: #f3f4f6; flex-wrap: wrap; }
.hol-year { padding: 6px 14px; border-radius: 9px; color: #4b5563; font-size: 14px; font-weight: 600; text-decoration: none; }
.hol-year:hover { color: #111827; }
.hol-year.is-active { background: #fff; color: #111827; box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.hol-year-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hol-year-actions form { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
.hol-copy span { font-size: 13px; color: #4b5563; }
.hol-copy select { height: 38px; border: 1px solid #dbdee0; border-radius: 10px; padding: 0 10px; background: #fff; }
.hol-empty { display: flex; flex-direction: column; gap: 4px; padding: 28px; border: 1px dashed #d1d5db; border-radius: 14px; text-align: center; color: #6b7280; font-size: 14px; }
.hol-empty strong { color: #111827; }
.hol-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #eef2ff; color: #3730a3; font-size: 12px; font-weight: 600; }
.hol-tag-custom { background: #fef3c7; color: #92400e; }
.hol-row-actions { display: flex; gap: 6px; align-items: center; }
.hol-row-actions form { margin: 0; }
.hol-edit-row td { background: #f9fafb; }
.hol-inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hol-inline-form input { height: 36px; border: 1px solid #dbdee0; border-radius: 9px; padding: 0 10px; font: inherit; font-size: 14px; }
.hol-inline-form input[type="text"] { min-width: 240px; flex: 1 1 240px; }
.hol-note { margin: 12px 0 0; font-size: 12px; color: #9ca3af; }
.hol-zone-hint { margin-left: 6px; color: #6b7280; font-size: 12px; font-weight: 400; }

/* ------------------------------------------------------------------
   Schedule board: holiday days (display only)
   ------------------------------------------------------------------ */
.schedule-calendar-cell.is-holiday,
.schedule-month-cell.is-holiday,
.schedule-timeline-track.is-holiday {
    background-color: color-mix(in srgb, var(--holiday-color, #e11d48) 8%, #fff) !important;
}
.schedule-calendar-date-header.is-holiday { box-shadow: inset 0 3px 0 var(--holiday-color, #e11d48); background-color: color-mix(in srgb, var(--holiday-color, #e11d48) 10%, #fff); }
.schedule-holiday-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--holiday-color, #e11d48);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.schedule-month-cell .schedule-holiday-tag { margin: 2px 0 4px; }
.schedule-agenda-day-header .schedule-holiday-tag { margin: 2px 0 0; }

/* Settings: test email / test SMS row and the SMS event list */
.mail-test-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 10px; margin-top: 14px; }
.sms-test-actions input[type="text"] { flex: 1 1 220px; max-width: 280px; height: 40px; padding: 0 12px; border: 1px solid #dfe5ed; border-radius: 8px; background: #fff; font-size: 14px; }
.sms-event-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 0 26px; }
.sms-event-list .checkbox-label { font-weight: 400; }
