/* WorkBuddy shared UI — mirrors HotelBuddy-WebApp's look so every page reads as one system.
   Keep this the single place for: page header, drawers, grid status colours, Radzen button sizing,
   notification stacking and the one base font/padding scale used everywhere. */

/* The signed-in app's working names map onto the brand tokens in workbuddy-theme.css, so the
   product has one palette: the accent here is the brand teal, not a separate blue. */
:root {
    --wb-text: var(--wb-ink);
    --wb-label: var(--wb-muted);
    --wb-border: var(--wb-line);
    --wb-bg: var(--wb-surface-soft);
    --wb-green: var(--wb-ok);
    --wb-red: var(--wb-stop);
    --wb-amber: var(--wb-warn);
    --wb-blue: var(--wb-teal-600);
    --wb-font-size: 14px;
}

body {
    font-size: var(--wb-font-size);
    color: var(--wb-text);
}

.wb-page {
    padding: 0;
    font-size: var(--wb-font-size);
}

/* ---------- Header: page name on the left, actions + badge on the right. One component, used by every page. ---------- */
.wb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0 12px 0;
    border-bottom: 1px solid var(--wb-border);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.wb-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.wb-header-title h1 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--wb-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wb-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wb-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.6;
    background: var(--wb-bg);
    color: var(--wb-label);
    border: 1px solid var(--wb-border);
}

.wb-badge-success { color: var(--wb-green); border-color: rgba(30, 142, 78, 0.3); background: rgba(30, 142, 78, 0.08); }
.wb-badge-warning { color: var(--wb-amber); border-color: rgba(184, 134, 11, 0.3); background: rgba(184, 134, 11, 0.08); }
.wb-badge-danger { color: var(--wb-red); border-color: rgba(192, 57, 43, 0.3); background: rgba(192, 57, 43, 0.08); }

/* ---------- Drawer shell (right-hand panel, used instead of full-page add/edit forms) ---------- */
.wb-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 1040;
}

.wb-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 480px;
    max-width: 100vw;
    background: #fff;
    box-shadow: -8px 0 24px rgba(15, 23, 42, 0.18);
    z-index: 1041;
    display: flex;
    flex-direction: column;
    font-size: var(--wb-font-size);
}

.wb-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--wb-border);
}

.wb-drawer-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--wb-text); }
.wb-drawer-subtitle { margin: 2px 0 0 0; font-size: 12px; color: var(--wb-label); }

.wb-drawer-close {
    border: none;
    background: transparent;
    color: var(--wb-label);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}
.wb-drawer-close:hover { color: var(--wb-text); }

.wb-drawer-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px 16px;
}

.wb-drawer-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--wb-border);
}

/* Drawer form fields: compact, consistent, no oversized bootstrap defaults */
.wb-drawer-body .wb-field { margin-bottom: 10px; }
.wb-field-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--wb-blue);
    text-decoration: underline;
}
.wb-drawer-body label { display: block; font-size: 12px; font-weight: 600; color: var(--wb-label); margin-bottom: 3px; }
.wb-drawer-body .form-control,
.wb-drawer-body .rz-textbox,
.wb-drawer-body select.form-control {
    font-size: var(--wb-font-size);
    padding: 5px 8px;
}

/* ---------- Plain detail sections (EmployeeDetails and similar single-record pages) ---------- */
.wb-subtle { color: var(--wb-label); font-size: 13px; }

.wb-card-block {
    background: #fff;
    border: 1px solid var(--wb-border);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.wb-card-block h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px 0; color: var(--wb-text); }
.wb-card-block p { margin: 0 0 6px 0; font-size: 13px; }

.wb-profile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px 24px;
}
.wb-profile-grid > div { font-size: 13px; }
@media (max-width: 760px) {
    .wb-profile-grid { grid-template-columns: repeat(2, 1fr); }
}

.wb-simple-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wb-simple-table th, .wb-simple-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--wb-border); }
.wb-simple-table th { color: var(--wb-label); font-weight: 600; font-size: 12px; }

/* ---------- Grid status text (coloured text, never a badge, inside Syncfusion grids) ---------- */
.wb-status { font-weight: 600; }
.wb-status-success { color: var(--wb-green); }
.wb-status-warning { color: var(--wb-amber); }
.wb-status-danger { color: var(--wb-red); }
.wb-status-muted { color: var(--wb-label); font-weight: 500; }

/* Every grid row is clickable: show it, and don't let Syncfusion's own row-select styling fight the pointer. */
.wb-grid .e-row { cursor: pointer; }
.wb-grid .e-row:hover { background: var(--wb-bg); }

/* Row action icon buttons (View/Edit/...) inside a grid's Actions column. */
.wb-grid-actions { display: flex; align-items: center; gap: 2px; }
.wb-grid-actions .rz-button { width: 30px; height: 30px; padding: 0; min-width: 30px; border-radius: 8px; }
/* Radzen's Light + Text style renders these icons almost white-grey; make them clearly readable. */
.wb-grid-actions .rz-button,
.wb-grid-actions .rz-button .rzi,
.wb-grid-actions .rz-button .rz-button-icon-left { color: #2f4a5f !important; opacity: 1 !important; }
.wb-grid-actions .rz-button:not(:disabled):hover { background: rgba(13, 148, 136, 0.14) !important; }
.wb-grid-actions .rz-button:not(:disabled):hover .rzi { color: var(--wb-teal-600) !important; }

/* Average, same-everywhere font + row height so pages look identical at 100% zoom */
.wb-grid,
.wb-grid .e-gridcontent,
.wb-grid .e-headercell,
.wb-grid .e-rowcell {
    font-size: var(--wb-font-size);
}
.wb-grid .e-rowcell { padding-top: 6px; padding-bottom: 6px; }

/* ---------- Top bar that holds the unit switcher, above every page's own content ---------- */
.wb-top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: var(--wb-navy-900);
}

/* ---------- Header organisation/unit switcher (MainLayout) ---------- */
.wb-switcher { position: relative; font-size: 13px; }

.wb-switcher-locked,
.wb-switcher-loading,
.wb-switcher-error,
.wb-switcher-none {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #e5e7eb;
}

.wb-switcher-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}
.wb-switcher-btn:hover { background: rgba(255, 255, 255, 0.16); }

.wb-switcher-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 260px;
    max-height: 320px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--wb-border);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    z-index: 1060;
    display: flex;
    flex-direction: column;
    padding: 4px;
}

.wb-switcher-item {
    text-align: left;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 13px;
    color: var(--wb-text);
    cursor: pointer;
}
.wb-switcher-item:hover { background: var(--wb-bg); }
.wb-switcher-item.active { background: rgba(29, 111, 184, 0.1); color: var(--wb-blue); font-weight: 600; }

/* ---------- Radzen buttons: default size/spacing used on every page ---------- */
.wb-header-actions .rz-button,
.wb-drawer-footer .rz-button {
    font-size: var(--wb-font-size);
}

/* Toasts (Radzen notifications) always sit above every drawer/overlay, so a message raised by an action
   inside a drawer is seen on top of it, never hidden behind it. */
.rz-notification { z-index: 5000 !important; }
.rz-notification .rz-notification-item { z-index: 5000; }

/* ---------- Login / two-factor / access-denied shell: no nav menu, just a centred card ---------- */
.wb-auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(900px 420px at 70% -10%, rgba(45, 212, 191, 0.18), transparent 60%),
        linear-gradient(160deg, var(--wb-navy-800) 0%, var(--wb-navy-900) 100%);
    padding: 24px 16px;
    font-size: var(--wb-font-size);
}

.wb-auth-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    padding: 28px 28px 24px 28px;
}

.wb-auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    text-decoration: none;
    color: inherit;
}

.wb-auth-logo { font-size: 22px; color: var(--wb-blue); }
.wb-auth-brand-name { font-size: 17px; font-weight: 700; color: var(--wb-text); }
.wb-auth-brand-tag { font-size: 11px; color: var(--wb-label); }

.wb-auth-card h1 { font-size: 16px; font-weight: 600; margin: 0 0 4px 0; color: var(--wb-text); }
.wb-auth-card p { font-size: 12px; color: var(--wb-label); margin: 0 0 14px 0; }

.wb-auth-card .wb-field { margin-bottom: 12px; }
.wb-auth-card label { display: block; font-size: 12px; font-weight: 600; color: var(--wb-label); margin-bottom: 4px; }
.wb-auth-card input.form-control,
.wb-auth-card input:not([type="submit"]) {
    width: 100%;
    box-sizing: border-box;
    font-size: var(--wb-font-size);
    padding: 8px 10px;
    border: 1px solid var(--wb-border);
    border-radius: 6px;
}

.wb-auth-card button[type="submit"],
.wb-auth-card .rz-button {
    width: 100%;
    margin-top: 4px;
}

.wb-auth-error {
    background: rgba(192, 57, 43, 0.08);
    border: 1px solid rgba(192, 57, 43, 0.3);
    color: var(--wb-red);
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
}

/* The app's base .notice style is green, which reads as success even for error text.
   Anything marked role="alert" is an error/warning, so always show it red, not green. */
.notice[role="alert"] {
    background: rgba(192, 57, 43, 0.08) !important;
    border-color: rgba(192, 57, 43, 0.3) !important;
    color: var(--wb-red) !important;
}
.notice[role="alert"] p,
.notice[role="alert"] strong {
    color: var(--wb-red) !important;
}

/* =====================================================================================
   Signed-in shell: sidebar
   ===================================================================================== */
.shell > aside {
    width: 248px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    background: linear-gradient(180deg, var(--wb-navy-800), var(--wb-navy-900));
    color: #c6dde6;
}
.wb-side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 18px;
    text-decoration: none;
    color: #fff;
}
.wb-side-brand .wb-logo-mark { flex-shrink: 0; }
.wb-side-brand-name { font-size: 17px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; }
.wb-side-brand-tag { font-size: 10px; color: #7ea0b3; letter-spacing: .06em; line-height: 1.35; margin-top: 2px; }

.wb-side-nav { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; }
.wb-side-nav a, .wb-side-nav .wb-side-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    color: #b6cfda;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background .12s ease, color .12s ease, transform .12s ease;
}
.wb-side-nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.wb-side-nav a:active { transform: scale(.98); }
.wb-side-nav a.active {
    background: rgba(45, 212, 191, 0.16);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--wb-teal-400);
}
.wb-side-nav .rzi { font-size: 20px; opacity: .9; }
/* Sign out sits right under the last menu item, same spacing as the items above it. */
.wb-side-foot { margin-top: 4px; }

@media (max-width: 760px) {
    /* Phone: brand + a swipeable menu row on top (sticky), content below at full width. */
    .shell > aside { width: auto; height: auto; position: sticky; top: 0; z-index: 1030; padding: 8px 10px; flex-direction: row; align-items: center; gap: 8px; overflow: visible; }
    .wb-side-brand { padding: 0 4px 0 0; flex: 0 0 auto; }
    .wb-side-brand-tag { display: none; }
    .wb-side-brand-name { font-size: 15px; }
    .wb-side-nav { flex-direction: row; overflow-x: auto; flex: 1 1 auto; min-width: 0; gap: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .wb-side-nav::-webkit-scrollbar { display: none; }
    .wb-side-nav a, .wb-side-nav .wb-side-link { flex: 0 0 auto; white-space: nowrap; padding: 9px 10px; gap: 6px; font-size: 13px; }
    .wb-side-foot { margin: 0; flex: 0 0 auto; }
    .wb-top-bar { justify-content: stretch; padding: 6px 10px; }
    .wb-switcher { max-width: 100%; }
    .shell > main > article { padding: 12px 12px 40px; }
    .wb-drawer { width: 100vw; border-left: 0; }
    .wb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .wb-tiles, .wb-tiles-4 { grid-template-columns: 1fr; }
    .wb-two-col { grid-template-columns: 1fr; }
    .wb-grid, .wb-card-pad { overflow-x: auto; }
    /* iOS Safari zooms into inputs under 16px; keep forms readable without the page jumping. */
    input, select, textarea { font-size: 16px; }
}

/* =====================================================================================
   Buttons: visible response to a click (press, busy spinner)
   ===================================================================================== */
.rz-button, .wb-btn { transition: transform .1s ease, box-shadow .12s ease, background-color .12s ease, filter .12s ease; }
.rz-button:not(:disabled):hover { filter: brightness(1.04); }
.rz-button:not(:disabled):active, .wb-btn:not(:disabled):active { transform: scale(.96); }
.rz-button.rz-primary:not(.rz-button-text), .rz-button.rz-button-md.rz-primary { box-shadow: 0 4px 12px rgba(13, 148, 136, 0.22); }

/* Static (non-interactive) forms: script in App.razor adds .wb-busy to the clicked submit button. */
.wb-btn.wb-busy { pointer-events: none; opacity: .88; }
.wb-btn.wb-busy::before {
    content: "";
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    animation: wb-spin .7s linear infinite;
}
.wb-btn-light.wb-busy::before, .wb-btn-ghost.wb-busy::before { border-color: rgba(15, 34, 51, .25); border-top-color: var(--wb-teal-600); }
.wb-btn:disabled, .wb-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* =====================================================================================
   Loader
   ===================================================================================== */
.wb-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid rgba(13, 148, 136, .16);
    border-top-color: var(--wb-teal-500);
    animation: wb-spin .7s linear infinite;
    flex-shrink: 0;
}
.wb-loader { display: flex; align-items: center; gap: 12px; padding: 20px 4px; color: var(--wb-label); font-size: 13px; }
.wb-loader-center { flex-direction: column; justify-content: center; padding: 64px 0; gap: 14px; }
@keyframes wb-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wb-spinner, .wb-btn.wb-busy::before { animation-duration: 2s; } }

/* =====================================================================================
   Cards, forms
   ===================================================================================== */
.wb-card-block {
    background: #fff;
    border: 1px solid var(--wb-border);
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: 0 1px 2px rgba(4, 18, 31, 0.04);
}
.wb-card-block h3 { font-size: 14.5px; font-weight: 700; margin: 0 0 10px 0; color: var(--wb-text); }

.wb-form-section-head { margin-bottom: 12px; }
.wb-form-section-head h3 { margin: 0 0 2px; }
.wb-form-section-head p { margin: 0; }
.wb-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; }
.wb-field-wide { grid-column: 1 / -1; }
.wb-field label { display: block; font-size: 12px; font-weight: 600; color: var(--wb-label); margin-bottom: 5px; }
.wb-field .wb-hint { display: block; margin-top: 4px; font-size: 11.5px; color: var(--wb-label); }
.wb-check label, label.wb-check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; color: var(--wb-text); margin: 0; }

/* Scoped to our own field wrappers, so the Syncfusion grid's filter/pager inputs are untouched. */
.wb-field input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.wb-field select,
.wb-field textarea,
.wb-drawer-body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.wb-drawer-body select,
.wb-drawer-body textarea {
    width: 100%;
    padding: 9px 11px;
    font-size: 14px;
    font-family: inherit;
    color: var(--wb-text);
    background: #fff;
    border: 1px solid #cdd7df;
    border-radius: 8px;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.wb-field input:focus, .wb-field select:focus, .wb-field textarea:focus,
.wb-drawer-body input:focus, .wb-drawer-body select:focus, .wb-drawer-body textarea:focus {
    outline: none;
    border-color: var(--wb-teal-500);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.16);
}
.wb-field input[type="checkbox"], .wb-drawer-body input[type="checkbox"], .wb-check input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--wb-teal-600); }
.wb-field input:disabled, .wb-field select:disabled { background: var(--wb-bg); color: var(--wb-label); }

.wb-validation, .validation-message { color: var(--wb-red); font-size: 12.5px; }
ul.validation-errors { margin: 8px 0; padding-left: 18px; color: var(--wb-red); font-size: 12.5px; }
.wb-form-bar {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 0;
    margin-top: 4px;
    background: linear-gradient(180deg, rgba(245, 248, 250, 0), var(--wb-bg) 40%);
}

/* Detail lists (read-only records) */
.wb-dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 22px; margin: 0; }
.wb-dl > div { min-width: 0; }
.wb-dl dt { font-size: 11.5px; font-weight: 600; color: var(--wb-label); margin-bottom: 2px; }
.wb-dl dd { margin: 0; font-size: 14px; color: var(--wb-text); overflow-wrap: anywhere; }

/* =====================================================================================
   Tables (static pages; interactive pages use the Syncfusion grid)
   ===================================================================================== */
.wb-table-wrap { background: #fff; border: 1px solid var(--wb-border); border-radius: 12px; overflow: hidden; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(4, 18, 31, 0.04); }
.wb-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.wb-table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--wb-bg);
    border-bottom: 1px solid var(--wb-border);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--wb-label);
}
.wb-table td { padding: 11px 14px; border-bottom: 1px solid var(--wb-border); color: var(--wb-text); }
.wb-table tr:last-child td { border-bottom: none; }
.wb-table tr[data-href] { cursor: pointer; transition: background .1s ease; }
.wb-table tr[data-href]:hover { background: rgba(13, 148, 136, 0.06); }

/* Empty state */
.wb-empty { text-align: center; padding: 48px 16px; background: #fff; border: 1px dashed #cdd7df; border-radius: 12px; color: var(--wb-label); }
.wb-empty h3 { margin: 0 0 6px; font-size: 15px; color: var(--wb-text); }
.wb-empty p { margin: 0 0 14px; font-size: 13px; }

/* =====================================================================================
   Tiles (dashboard, administration)
   ===================================================================================== */
.wb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 4px; }
.wb-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 18px;
    background: #fff;
    border: 1px solid var(--wb-border);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(4, 18, 31, 0.04);
    text-decoration: none;
    color: var(--wb-text);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
a.wb-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(4, 18, 31, 0.09); border-color: rgba(13, 148, 136, .45); color: var(--wb-text); }
a.wb-tile:active { transform: translateY(0) scale(.99); }
.wb-tile-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(13, 148, 136, 0.1);
    color: var(--wb-teal-600);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}
.wb-tile-icon .rzi { font-size: 22px; }
.wb-tile h2 { margin: 0; font-size: 15px; font-weight: 700; }
.wb-tile p { margin: 0; font-size: 13px; color: var(--wb-label); line-height: 1.5; flex: 1 1 auto; }
.wb-tile-foot { margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--wb-teal-600); }
.wb-tile-off { background: var(--wb-bg); box-shadow: none; cursor: not-allowed; }
.wb-tile-off .wb-tile-icon { background: #e4eaef; color: #8aa0b0; }
.wb-tile-off h2 { color: #6d8294; }
.wb-tile-off .wb-tile-foot { color: #8aa0b0; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: 11px; }

.wb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 14px; }
.wb-stat-card { background: #fff; border: 1px solid var(--wb-border); border-radius: 12px; padding: 14px 16px; }
.wb-stat-card span { display: block; font-size: 11.5px; font-weight: 600; color: var(--wb-label); margin-bottom: 4px; }
.wb-stat-card b { font-size: 18px; }

/* Welcome banner on the dashboard */
.wb-welcome {
    background: radial-gradient(700px 260px at 90% -20%, rgba(45, 212, 191, .22), transparent 60%), linear-gradient(150deg, var(--wb-navy-700), var(--wb-navy-900));
    color: #e9f3f7;
    border-radius: 14px;
    padding: 24px 26px;
    margin-bottom: 18px;
}
.wb-welcome h2 { margin: 0 0 6px; font-size: 21px; color: #fff; }
.wb-welcome p { margin: 0; color: #a9c7d4; font-size: 14px; }
.wb-section-title { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--wb-label); margin: 22px 0 10px; }

/* Plain link-buttons in a header's action slot */
.wb-header-actions a.wb-btn { white-space: nowrap; }

@media (max-width: 860px) {
    .wb-form-grid { grid-template-columns: 1fr; }
    .wb-dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Drawer: always white, whatever sits behind it (the app's sidebar is navy) */
.wb-drawer { background: #fff; color: var(--wb-text); border-left: 1px solid var(--wb-border); }
.wb-drawer-header { background: #fff; }
.wb-drawer-body { background: #fff; }
.wb-drawer-footer { background: #fff; }

/* Checklist of things still to do */
.wb-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wb-checklist li { position: relative; padding: 10px 12px 10px 34px; border: 1px solid rgba(183, 121, 31, .28); border-radius: 8px; background: rgba(183, 121, 31, .06); font-size: 13.5px; color: var(--wb-text); }
.wb-checklist li::before { content: "!"; position: absolute; left: 10px; top: 9px; width: 18px; height: 18px; border-radius: 999px; background: var(--wb-amber); color: #fff; font-size: 12px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }

/* Syncfusion grids: header and pager in the brand's light surface */
.wb-grid.e-grid { border-color: var(--wb-border); border-radius: 12px; overflow: hidden; box-shadow: 0 1px 2px rgba(4, 18, 31, 0.04); }
.wb-grid .e-gridheader, .wb-grid .e-headercell { background: var(--wb-bg); }
.wb-grid .e-headercelldiv .e-headertext { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--wb-label); }
.wb-grid .e-pager { background: #fff; border-top-color: var(--wb-border); }
.wb-grid .e-pager .e-currentitem { background: var(--wb-teal-600); border-color: var(--wb-teal-600); }
.wb-grid .e-toolbar { background: #fff; }

/* Four short tiles fit on one row instead of leaving a lone tile on a second line. */
.wb-tiles-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ---- Attendance screens: tabs, filter bar, chips, section cards ---- */
.wb-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--wb-border); margin-bottom: 14px; flex-wrap: wrap; }
.wb-tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 10px 14px; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--wb-label); cursor: pointer; margin-bottom: -1px; }
.wb-tab:hover { color: var(--wb-text); }
.wb-tab.is-active { color: var(--wb-teal-700, #0f766e); border-bottom-color: var(--wb-teal-700, #0f766e); }
.wb-filter-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; background: #fff; border: 1px solid var(--wb-border); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.wb-filter-bar label { display: grid; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--wb-label); }
.wb-filter-bar input, .wb-filter-bar select { height: 34px; border: 1px solid #cdd7df; border-radius: 8px; padding: 0 10px; background: #fff; color: var(--wb-text); font: inherit; font-size: 13.5px; }
.wb-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.wb-pill { border: 1px solid var(--wb-border); background: #fff; color: var(--wb-text); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.wb-pill b { margin-left: 6px; }
.wb-pill.is-active { background: var(--wb-navy-900, #0b2a3c); border-color: var(--wb-navy-900, #0b2a3c); color: #fff; }
.wb-two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; margin-bottom: 14px; }
.wb-card-pad { background: #fff; border: 1px solid var(--wb-border); border-radius: 12px; padding: 14px 16px; }
.wb-card-pad h3 { margin: 0 0 10px; font-size: 14px; }
.wb-card-pad ul { list-style: none; margin: 0; padding: 0; }
.wb-card-pad li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--wb-border); font-size: 13.5px; }
.wb-card-pad li:last-child { border-bottom: none; }
.wb-link-card { text-decoration: none; color: inherit; display: block; }
.wb-link-card:hover { border-color: var(--wb-teal-700, #0f766e); }
.wb-num { text-align: right; font-variant-numeric: tabular-nums; }
.wb-error-banner { background: #fdecea; border: 1px solid #f5c2bd; color: #8a1f17; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; }
.wb-table td.wb-actions { white-space: nowrap; text-align: right; }
.wb-table td.wb-actions .rz-button + .rz-button { margin-left: 6px; }

/* Filter pills sit in one row (the older .wb-chips on the public pages is a vertical list, so these use their own name). */
.wb-pills { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; max-width: none; }
.wb-pill { flex: 0 0 auto; width: auto; display: inline-flex; align-items: center; }
.wb-pill:hover:not(.is-active):not(:disabled) { border-color: var(--wb-teal-700, #0f766e); }
.wb-pill:disabled { opacity: .6; cursor: default; }
/* Number columns line up with their headers. */
.wb-table th.wb-num, .wb-table td.wb-num { text-align: right; white-space: nowrap; }
.wb-table th, .wb-table td { vertical-align: middle; }
/* Bulk import (template, upload, result) */
.wb-import-step { display: grid; grid-template-columns: 30px 1fr; gap: 4px 12px; margin-bottom: 18px; }
.wb-import-step > .wb-step-no { width: 28px; height: 28px; border-radius: 50%; background: var(--wb-teal-700, #0f766e); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.wb-import-step h4 { margin: 4px 0 0; font-size: 14px; }
.wb-import-step p { margin: 0 0 8px; font-size: 13px; color: var(--wb-label); }
.wb-import-step > div { grid-column: 2; }
.wb-upload-area { border: 2px dashed #cdd7df; border-radius: 12px; background: #fafcfd; padding: 14px; }
.wb-import-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.wb-import-stat { background: #fff; border: 1px solid var(--wb-border); border-radius: 10px; padding: 8px 14px; font-size: 13px; }
.wb-import-stat b { font-size: 16px; margin-right: 4px; }

/* ---- Detail drawers: key figures, tabs, panels ---- */
.wb-row-click { cursor: pointer; }
.wb-table tr.wb-row-click:hover { background: rgba(13, 148, 136, 0.06); }
.wb-dtiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.wb-dtile { background: #fff; border: 1px solid var(--wb-border); border-radius: 12px; padding: 10px 12px; }
.wb-dtile span { display: block; font-size: 11px; font-weight: 600; color: var(--wb-label); margin-bottom: 3px; }
.wb-dtile b { font-size: 15px; }
.wb-dtabs { margin-bottom: 12px; }
.wb-tab-count { display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 6px; border-radius: 999px; background: #e6edf2; color: var(--wb-label); font-size: 11px; line-height: 18px; text-align: center; }
.wb-dpanel .wb-table-wrap { margin-bottom: 10px; }
.wb-dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px 18px; margin: 0 0 14px; }
.wb-dl-grid > div { border-bottom: 1px solid var(--wb-border); padding-bottom: 6px; }
.wb-dl-grid dt { font-size: 11px; font-weight: 600; color: var(--wb-label); margin-bottom: 2px; }
.wb-dl-grid dd { margin: 0; font-size: 13.5px; color: var(--wb-text); word-break: break-word; }
.wb-dpanel h4 { margin: 14px 0 8px; font-size: 13px; }
.wb-timeline { list-style: none; margin: 0; padding: 0; }
.wb-timeline li { border-left: 2px solid var(--wb-border); padding: 2px 0 12px 14px; margin-left: 6px; position: relative; font-size: 13.5px; }
.wb-timeline li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--wb-teal-700, #0f766e); }
.wb-timeline small { display: block; color: var(--wb-label); }

/* ---- My attendance: one big button, thumb-friendly ---- */
.wb-my { max-width: none; }
.wb-my-grid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.wb-my-grid .wb-mark-card { margin-bottom: 0; position: sticky; top: 16px; }
.wb-my-side > .wb-section-title:first-child { margin-top: 0; }
.wb-my-links { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
@media (max-width: 860px) { .wb-my-grid { grid-template-columns: 1fr; } .wb-my-grid .wb-mark-card { position: static; margin-bottom: 18px; } }
.wb-mark-card { background: #fff; border: 1px solid var(--wb-border); border-radius: 18px; padding: 22px 18px 20px; text-align: center; margin-bottom: 18px; box-shadow: 0 6px 24px rgba(4, 18, 31, 0.06); }
.wb-mark-hello { margin: 0; font-size: 18px; font-weight: 700; color: var(--wb-text); }
.wb-mark-now { margin: 2px 0 18px; font-size: 13px; color: var(--wb-label); }
.wb-mark-btn {
    width: 120px; height: 120px; border-radius: 50%; border: 0; color: #fff; font: inherit; font-size: 15px; font-weight: 700;
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
    box-shadow: 0 14px 34px rgba(13, 148, 136, 0.35); transition: transform .12s ease, box-shadow .12s ease; -webkit-tap-highlight-color: transparent;
}
.wb-mark-btn .rzi { font-size: 28px; }
.wb-mark-btn.is-in { background: linear-gradient(150deg, #14b8a6, #0d9488); }
.wb-mark-btn.is-out { background: linear-gradient(150deg, #1e3a5f, #0b2a3c); box-shadow: 0 14px 34px rgba(11, 42, 60, 0.35); }
.wb-mark-btn:active:not(:disabled) { transform: scale(0.96); }
.wb-mark-btn.is-busy, .wb-mark-btn:disabled { opacity: .85; cursor: progress; }
.wb-mark-btn .wb-spinner { width: 30px; height: 30px; border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
.wb-mark-btn span:last-child { font-size: 15px; font-weight: 600; max-width: 150px; line-height: 1.25; }
.wb-mark-state { margin: 16px 0 0; font-size: 14px; color: var(--wb-text); }
.wb-mark-hint { margin: 10px 0 0; font-size: 12.5px; color: var(--wb-label); display: flex; gap: 6px; justify-content: center; align-items: flex-start; text-align: left; }
.wb-mark-blocked { background: #fff7e6; border: 1px solid #f1d9a6; border-radius: 12px; padding: 14px; text-align: left; color: #6b4a06; }
.wb-mark-blocked p { margin: 6px 0 0; font-size: 13.5px; }
.wb-note-banner { display: flex; gap: 10px; align-items: flex-start; text-align: left; background: #fff8e6; border: 1px solid #f1dca0; color: #7a5a06; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; line-height: 1.45; }
.wb-note-banner .rzi { font-size: 20px; flex: 0 0 auto; color: #b8860b; }
.wb-ok-banner { background: #e8f6ef; border: 1px solid #b9e4cd; color: #14633d; border-radius: 10px; padding: 10px 14px; font-size: 13.5px; }
.wb-punch-list { list-style: none; margin: 0 0 18px; padding: 0; background: #fff; border: 1px solid var(--wb-border); border-radius: 12px; }
.wb-punch-list li { display: grid; grid-template-columns: 70px 1fr; gap: 2px 10px; padding: 10px 14px; border-bottom: 1px solid var(--wb-border); font-size: 14px; }
.wb-punch-list li:last-child { border-bottom: 0; }
.wb-punch-list small { grid-column: 2; color: var(--wb-label); }
.wb-my-links { display: grid; gap: 10px; margin-top: 18px; }
.wb-my-links .wb-btn { justify-content: center; }

.wb-mark-cta { display: flex; align-items: center; gap: 14px; background: linear-gradient(150deg, #14b8a6, #0d9488); color: #fff; text-decoration: none; border-radius: 16px; padding: 16px 18px; margin-bottom: 18px; box-shadow: 0 10px 26px rgba(13, 148, 136, 0.3); }
.wb-mark-cta .rzi { font-size: 34px; }
.wb-mark-cta b { display: block; font-size: 16px; }
.wb-mark-cta small { display: block; font-size: 12.5px; opacity: .9; }

/* ---------- Punch map ---------- */
.wb-map { width: 100%; border: 1px solid var(--wb-border); border-radius: 12px; overflow: hidden; margin-top: 8px; }
.wb-map-pin { width: 28px; height: 28px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 13px; }
.wb-map-pin > span { transform: rotate(45deg); }
.wb-map-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12px; color: #5b6573; }
.wb-map-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; background: #1d6fb8; }
.wb-map-legend .g::before { background: #1e8e4e; } .wb-map-legend .r::before { background: #c0392b; } .wb-map-legend .a::before { background: #b8860b; }
.wb-map-title { font-size: 13px; font-weight: 700; margin: 16px 0 0; color: #1f2937; }
/* Check-in photos in the employee drawer */
.wb-punch-photo { padding: 0; border: 1px solid #d1d5db; border-radius: 6px; background: none; cursor: zoom-in; line-height: 0; }
.wb-punch-photo img { width: 44px; height: 44px; object-fit: cover; border-radius: 5px; }
.wb-punch-photo-large { margin: 12px 0 0; display: grid; gap: 8px; justify-items: start; }
.wb-punch-photo-large img { max-width: 100%; max-height: 420px; border-radius: 8px; border: 1px solid #d1d5db; }
.wb-map-fallback { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.wb-map-fallback li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }

/* ---------- Profile and header user chip ---------- */
.wb-user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(255,255,255,.08); color: #e6f2f6; text-decoration: none; font-size: 13px; }
.wb-user-chip:hover { background: rgba(255,255,255,.16); color: #fff; }
.wb-user-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-avatar { display: inline-flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(150deg, #14b8a6, #0d9488); color: #fff; font-weight: 800; font-size: 24px; flex: 0 0 auto; }
.wb-avatar-sm { width: 28px; height: 28px; font-size: 13px; }
.wb-profile-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: #fff; border: 1px solid var(--wb-border); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; }
.wb-profile-hero h2 { margin: 0; font-size: 20px; color: #1f2937; }
.wb-profile-hero p { margin: 2px 0 0; font-size: 13.5px; color: #5b6573; }
.wb-profile-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) { .wb-user-name { display: none; } .wb-profile-actions { margin-left: 0; } }

/* Label / value rows: one fixed label column, values line up underneath each other. */
.wb-kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 16px; margin: 0 0 12px; align-items: baseline; }
.wb-kv dt { margin: 0; font-size: 12.5px; font-weight: 600; color: #5b6573; }
.wb-kv dd { margin: 0; font-size: 14px; color: #1f2937; overflow-wrap: anywhere; }
@media (max-width: 420px) { .wb-kv { grid-template-columns: 1fr; gap: 2px 0; } .wb-kv dd { margin-bottom: 8px; } }

/* Clickable table rows open a details drawer. */
.wb-table tr.wb-row-click { cursor: pointer; }
.wb-table tr.wb-row-click:hover td { background: var(--wb-row-hover, rgba(14, 124, 134, .06)); }
.wb-dl.wb-dl-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 14px; }
.wb-drawer-sub { margin: 16px 0 6px; font-size: 13px; font-weight: 700; color: var(--wb-label); text-transform: none; }
.wb-quote { margin: 0; padding: 10px 12px; border-left: 3px solid var(--wb-primary, #0E7C86); background: var(--wb-surface-2, rgba(0, 0, 0, .03)); border-radius: 0 10px 10px 0; overflow-wrap: anywhere; }
.wb-table-compact th, .wb-table-compact td { padding: 6px 8px; font-size: 13px; }
.wb-steps-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: 13.5px; }

/* Settings tab: one row per switch */
.wb-switch-list { display: grid; gap: 4px; margin: 6px 0 14px; max-width: 760px; }
.wb-switch-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border: 1px solid var(--wb-border); border-radius: 10px; background: #fff; cursor: pointer; }
.wb-switch-row:hover { background: var(--wb-bg); }
.wb-switch-sub { display: grid; gap: 6px; margin: -2px 0 2px 42px; font-size: 13px; }
.wb-switch-sub label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.wb-switch-sub input { margin-top: 2px; accent-color: var(--wb-teal-600); }
.wb-switch-row input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--wb-teal-600); flex: 0 0 auto; }
.wb-switch-row b { display: block; font-size: 14px; color: #1f2937; }
.wb-switch-row small { display: block; font-size: 12.5px; color: #5b6573; margin-top: 2px; }
.wb-switch-note { margin-top: 12px; }
.wb-switch-group { margin: 18px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5b6573; }

/* On-duty check-in box on My attendance */
.wb-duty-box { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--wb-border); text-align: left; display: grid; gap: 8px; }
.wb-duty-box h3 { margin: 0; font-size: 14px; color: #1f2937; }
.wb-duty-box p { margin: 0; font-size: 12.5px; }
.wb-duty-box .wb-btn { justify-content: center; }

/* Shifts (Attendance setup > Work hours) */
.wb-shift-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Radzen's Light + Outlined renders text and border almost white; make those buttons readable. */
html body .rz-button.rz-light.rz-variant-outlined { color: #0f2233 !important; border-color: #b9c6d1 !important; background: #fff !important; --rz-text-color: #0f2233; }
html body .rz-button.rz-light.rz-variant-outlined:hover:not(.rz-state-disabled) { background: #f1f5f8 !important; }
html body .rz-button.rz-light.rz-variant-outlined .rz-button-icon-left, html body .rz-button.rz-light.rz-variant-outlined .rz-button-text { color: #0f2233 !important; opacity: 1 !important; }
html body .rz-button.rz-light.rz-variant-outlined .rz-button-icon-left { color: #0d9488 !important; }
.wb-shift-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.wb-shift-note { background: #fff7e6; border: 1px solid #f1d9a8; color: #b8860b; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin: 0 0 12px; }
.wb-shift-note-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.wb-noshift-table { width: 100%; border-collapse: collapse; margin-top: 10px; background: #fff; color: #1f2937; border-radius: 6px; overflow: hidden; }
.wb-noshift-table th, .wb-noshift-table td { padding: 6px 10px; border-bottom: 1px solid #f1e4c6; text-align: left; font-size: 13px; }
.wb-noshift-table th { font-weight: 600; color: #6b5a2e; background: #fffaf0; }
.wb-noshift-table select { width: 100%; max-width: 280px; padding: 4px 6px; border: 1px solid #d1d5db; border-radius: 6px; }
.wb-shift-pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: #e8f5f2; color: #0f766e; }
.wb-shift-pill-none { background: #fff7e6; color: #b8860b; }
.wb-shift-section { margin-top: 18px; }
.wb-shift-section h4 { margin: 0 0 8px; font-size: 14px; color: #1f2937; }
.wb-shift-candidates { max-height: 240px; overflow: auto; border: 1px solid var(--wb-border); border-radius: 8px; margin-bottom: 10px; background: #fff; }
.wb-shift-candidate { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1px solid var(--wb-border); cursor: pointer; font-size: 13.5px; color: #1f2937; }
.wb-shift-candidate:last-child { border-bottom: 0; }
.wb-shift-candidate small { color: #5b6573; margin-left: 4px; }
.wb-shift-candidate em { margin-left: auto; font-style: normal; color: #5b6573; font-size: 12px; }
.wb-role-option { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; color: #1f2937; font-weight: 400; cursor: pointer; }

/* Report Station menu group and submenu */
.wb-side-nav .wb-nav-group { width: 100%; background: none; border: 0; text-align: left; cursor: pointer; font-family: inherit; }
.wb-side-nav .wb-nav-group:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.wb-side-nav .wb-nav-group .wb-nav-caret { margin-left: auto; transition: transform .15s ease; }
.wb-side-nav .wb-nav-group.is-open .wb-nav-caret { transform: rotate(180deg); }
.wb-nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 0 0 4px 14px; padding-left: 8px; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.wb-nav-sub a { padding: 8px 10px !important; font-size: 13.5px !important; }
@media (max-width: 760px) { .wb-nav-sub { flex-direction: row; margin: 0; padding: 0; border: 0; } }

/* Report Station pages */
.wb-report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.wb-report-head h2 { margin: 0 0 2px; font-size: 18px; color: #1f2937; }
.wb-report-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 10px 0 12px; }
.wb-report-filter label { display: flex; flex-direction: column; font-size: 12px; font-weight: 600; color: #5b6573; gap: 4px; }
.wb-report-filter input[type="date"] { padding: 7px 10px; border: 1px solid var(--wb-border); border-radius: 8px; background: #fff; color: #1f2937; }
.wb-report-quick { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.wb-report-tabs { margin-bottom: 10px; }
.wb-report-totals { display: flex; flex-wrap: wrap; gap: 4px 20px; padding: 9px 14px; background: #f4f7fa; border: 1px solid var(--wb-border); border-top: 0; border-radius: 0 0 10px 10px; font-size: 13px; color: #1f2937; }
.wb-report-totals b { font-weight: 700; }
.wb-report-fields { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.wb-report-fields dt { font-size: 12px; font-weight: 600; color: #5b6573; }
.wb-report-fields dd { margin: 2px 0 0; color: #1f2937; font-size: 14px; }
.wb-report-sub { margin: 18px 0 8px; font-size: 14px; color: #1f2937; }
.wb-tile-green b { color: #1e8e4e; } .wb-tile-red b { color: #c0392b; } .wb-tile-amber b { color: #b8860b; }
.wb-stat-card.wb-link-card { text-align: left; cursor: pointer; font-family: inherit; }
.wb-report-grid .e-row.wb-row-red td { background: #fdecea !important; }
.wb-report-grid .e-row.wb-row-yellow td { background: #fff7e0 !important; }
.wb-report-grid .e-row.wb-row-green td { background: #e8f6ee !important; }
.wb-report-grid .e-row.wb-row-click { cursor: pointer; }
.wb-table tr.wb-row-red td { background: #fdecea; } .wb-table tr.wb-row-yellow td { background: #fff7e0; }
@media (max-width: 760px) { .wb-report-quick { margin-left: 0; } .wb-report-fields { grid-template-columns: 1fr; } }
.wb-report-filter2 { padding-top: 0; }
.wb-report-filter2 .wb-grow { flex: 1 1 320px; min-width: 240px; }

/* WorkBuddy logo (replaces the "W" tile). On the dark sidebar it sits on a white rounded tile so the dark blue stays readable. */
.wb-logo-img { display: block; height: 40px; width: auto; flex-shrink: 0; border-radius: 9px; object-fit: contain; }
.wb-side-brand .wb-logo-img { background: #fff; padding: 2px 5px; }
.wb-auth-brand .wb-logo-img { height: 46px; }
@media (max-width: 760px) { .wb-side-brand .wb-logo-img { height: 32px; } }

/* Link to the PolarBear Tech website */
.wb-ext-link { color: inherit; text-decoration: underline; text-decoration-color: rgba(127, 160, 179, .5); text-underline-offset: 2px; }
.wb-ext-link:hover { text-decoration-color: currentColor; }
.wb-auth-site { text-align: center; margin: 14px 0 0; font-size: 12px; color: var(--wb-label); }

/* =====================================================================================
   Top bar (light): menu button, where you are, date, bell, unit switcher, user menu
   ===================================================================================== */
.wb-top-bar { background: #fff; border-bottom: 1px solid var(--wb-border); justify-content: flex-start; gap: 12px; padding: 8px 18px; position: sticky; top: 0; z-index: 30; }
.wb-top-spacer { flex: 1 1 auto; }
.wb-burger { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--wb-border); border-radius: 10px; background: #fff; color: #1f2937; cursor: pointer; flex: 0 0 auto; }
.wb-burger:hover { background: #f1f5f9; }
.wb-burger .rzi { font-size: 22px; }
html.wb-nav-collapsed .shell > aside { display: none; }

.wb-crumb { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14.5px; color: #1f2937; white-space: nowrap; overflow: hidden; }
.wb-crumb-up { color: #5b6573; }
.wb-crumb-sep { color: #9aa5b1; }
.wb-crumb-here { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.wb-top-date { font-size: 12.5px; color: #5b6573; white-space: nowrap; padding: 0 4px; }

/* unit switcher on the light bar: organisation small and grey, unit bold */
.wb-switcher { font-size: 13px; }
.wb-top-bar .wb-switcher-locked, .wb-top-bar .wb-switcher-loading, .wb-top-bar .wb-switcher-error, .wb-top-bar .wb-switcher-none,
.wb-top-bar .wb-switcher-btn { background: #fff; border: 1px solid var(--wb-border); color: #1f2937; border-radius: 10px; padding: 5px 12px; min-height: 40px; }
.wb-top-bar .wb-switcher-locked { display: inline-flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.wb-top-bar .wb-switcher-btn:hover { background: #f1f5f9; }
.wb-switcher-btn { text-align: left; }
.wb-sw-org { display: block; font-size: 10.5px; line-height: 1.2; color: #5b6573; letter-spacing: .02em; }
.wb-sw-unit { display: block; font-size: 13.5px; line-height: 1.25; font-weight: 700; color: #1f2937; }
.wb-switcher-btn { gap: 10px; }
.wb-switcher-btn .wb-sw-org, .wb-switcher-btn .wb-sw-unit { max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-switcher-btn > span:not(.wb-sw-caret):not(.wb-sw-org):not(.wb-sw-unit) { display: block; }
.wb-switcher-btn { flex-wrap: nowrap; }
.wb-sw-caret { color: #5b6573; font-size: 12px; margin-left: 2px; }
.wb-switcher-menu { z-index: 1050; background: #fff; border: 1px solid var(--wb-border); border-radius: 12px; box-shadow: 0 12px 30px rgba(15, 23, 42, .16); padding: 6px; min-width: 300px; }
.wb-switcher-search { width: 100%; padding: 8px 10px; margin-bottom: 6px; border: 1px solid var(--wb-border); border-radius: 8px; font-size: 13px; color: #1f2937; background: #fff; }
.wb-switcher-item { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; align-items: center; text-align: left; padding: 8px 10px; border-radius: 8px; color: #1f2937; }
.wb-sw-item-org { grid-column: 1; font-size: 10.5px; color: #5b6573; }
.wb-sw-item-unit { grid-column: 1; font-size: 13.5px; font-weight: 600; }
.wb-sw-tick { grid-column: 2; grid-row: 1 / span 2; color: var(--wb-blue); font-weight: 800; }

/* click-away layer behind the open switcher and user menus */
.wb-click-away { position: fixed; inset: 0; z-index: 1040; background: transparent; }

/* user menu */
.wb-user { position: relative; }
.wb-top-bar .wb-user-chip { background: #fff; border: 1px solid var(--wb-border); color: #1f2937; border-radius: 999px; min-height: 40px; padding: 4px 12px 4px 4px; cursor: pointer; font-family: inherit; }
.wb-top-bar .wb-user-chip:hover { background: #f1f5f9; color: #1f2937; }
.wb-user-caret { color: #5b6573; font-size: 11px; }
.wb-user-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 1050; min-width: 230px; background: #fff; border: 1px solid var(--wb-border); border-radius: 12px; box-shadow: 0 12px 30px rgba(15, 23, 42, .16); padding: 6px; }
.wb-user-menu-who { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--wb-border); margin-bottom: 4px; }
.wb-user-menu-who b { color: #1f2937; font-size: 14px; }
.wb-user-menu-who span { color: #5b6573; font-size: 12px; word-break: break-all; }
.wb-user-menu a, .wb-user-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 8px; color: #1f2937; font-size: 13.5px; text-decoration: none; text-align: left; cursor: pointer; font-family: inherit; }
.wb-user-menu a:hover, .wb-user-menu button:hover { background: #f1f5f9; }
.wb-user-menu .rzi { font-size: 19px; color: #5b6573; }

@media (max-width: 900px) { .wb-top-date { display: none; } }
@media (max-width: 760px) {
    .wb-top-bar { padding: 6px 10px; gap: 8px; }
    .wb-crumb-up, .wb-crumb-sep { display: none; }
    .wb-sw-org { display: none; }
    .wb-top-bar .wb-switcher-btn, .wb-top-bar .wb-switcher-locked { min-height: 38px; }
    .wb-switcher-btn .wb-sw-unit { max-width: 120px; }
    .wb-switcher-menu { min-width: 240px; }
}

/* organisation above the unit name inside the switcher button */
.wb-sw-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }

/* =====================================================================================
   Top-bar search
   ===================================================================================== */
.wb-search { position: relative; display: flex; align-items: center; }
.wb-search-toggle { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--wb-border); border-radius: 10px; background: #fff; color: #1f2937; cursor: pointer; }
.wb-search-box { display: flex; align-items: center; gap: 8px; width: 240px; padding: 0 12px; height: 40px; background: #f1f5f9; border: 1px solid var(--wb-border); border-radius: 999px; color: #5b6573; transition: width .15s ease, background .15s ease; }
.wb-search-box:focus-within { width: 360px; background: #fff; border-color: #94a3b8; box-shadow: 0 0 0 3px rgba(148, 163, 184, .25); }
.wb-search-box input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 13.5px; color: #1f2937; font-family: inherit; }
.wb-search-box input::-webkit-search-cancel-button { display: none; }
.wb-search-hint { font-family: inherit; font-size: 10.5px; color: #5b6573; background: #fff; border: 1px solid var(--wb-border); border-radius: 5px; padding: 1px 6px; }
.wb-search-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 420px; max-height: 70vh; overflow-y: auto; z-index: 1050; background: #fff; border: 1px solid var(--wb-border); border-radius: 14px; box-shadow: 0 14px 34px rgba(15, 23, 42, .18); padding: 6px; }
.wb-search-section { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #5b6573; }
.wb-search-empty { padding: 12px; font-size: 13px; color: #5b6573; }
.wb-search-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: #1f2937; text-decoration: none; }
.wb-search-item.is-active, .wb-search-item:hover { background: #eaf2fb; color: #1f2937; }
.wb-search-item-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: #f1f5f9; color: #1d6fb8; flex: 0 0 auto; }
.wb-search-item-icon .rzi { font-size: 19px; }
.wb-search-item-text { display: flex; flex-direction: column; min-width: 0; }
.wb-search-item-text b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-search-item-text small { font-size: 11.5px; color: #5b6573; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .wb-search-box { width: 180px; } .wb-search-box:focus-within { width: 260px; } }
@media (max-width: 760px) {
    .wb-search-toggle { display: inline-flex; }
    .wb-search-box { display: none; }
    .wb-search.is-open .wb-search-box { display: flex; position: fixed; top: 0; left: 0; right: 0; width: auto; height: 52px; border-radius: 0; z-index: 1060; padding: 0 14px; background: #fff; border: 0; border-bottom: 1px solid var(--wb-border); }
    .wb-search.is-open .wb-search-box:focus-within { width: auto; box-shadow: none; }
    .wb-search.is-open .wb-search-menu { position: fixed; top: 56px; left: 8px; right: 8px; width: auto; }
}
.wb-top-bar .wb-switcher-locked, .wb-top-bar .wb-switcher-btn { justify-content: center; }
.wb-sw-item-unit { grid-row: auto; }
.wb-bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 10px; background: #f1f5f8; border: 1px solid #b9c6d1; border-radius: 8px; }

/* Attendance setup > Attendance methods */
.wb-method-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin: 14px 0 16px; }
.wb-method-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 14px 12px; border: 1.5px solid var(--wb-border); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.wb-method-card:hover:not(.is-locked) { border-color: var(--wb-teal-400); box-shadow: 0 2px 10px rgba(11, 42, 60, .06); }
.wb-method-card:focus-within { outline: 2px solid var(--wb-teal-400); outline-offset: 2px; }
.wb-method-card.is-on { border-color: var(--wb-teal-600); background: rgba(13, 148, 136, .05); }
.wb-method-card.is-locked { cursor: default; }
.wb-method-card.is-soon { background: var(--wb-surface-soft, #f6f7f9); border-style: dashed; opacity: .85; }
.wb-method-card > input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.wb-method-icon { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--wb-bg, #f1f5f9); color: var(--wb-navy-700, #164863); }
.wb-method-card.is-on .wb-method-icon { background: var(--wb-teal-600); color: #fff; }
.wb-method-text { display: grid; gap: 4px; padding-right: 22px; }
.wb-method-title { font-size: 14.5px; font-weight: 700; color: #1f2937; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wb-method-text small { font-size: 12.5px; color: #5b6573; line-height: 1.45; }
.wb-method-tick { position: absolute; top: 10px; right: 10px; color: var(--wb-teal-600); }
.wb-badge-soon { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; background: #eef2ff; color: #4338ca; }
.wb-callout { margin: 4px 0 14px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(13, 148, 136, .3); background: rgba(13, 148, 136, .06); font-size: 13px; line-height: 1.5; color: #1f2937; max-width: 860px; }
.wb-callout.is-warn { border-color: rgba(184, 134, 11, .35); background: rgba(184, 134, 11, .08); }
.wb-section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.wb-stat-pill { flex: 0 0 auto; font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--wb-bg, #f1f5f9); color: var(--wb-navy-700, #164863); }
.wb-switch-row.is-static { cursor: default; }
.wb-switch-row.is-static:hover { background: #fff; }
.wb-switch-dot { margin-top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; flex: 0 0 auto; }
.wb-switch-dot.is-on { background: var(--wb-teal-600); }
@media (max-width: 760px) { .wb-method-grid { grid-template-columns: 1fr; } }
.wb-nowrap { white-space: nowrap; }

/* Duty places: a warning note in the request detail */
.notice.is-warn { border-color: rgba(184, 134, 11, .35); background: rgba(184, 134, 11, .1); color: #5f4608; }
.wb-row-muted { opacity: .6; }

/* Field visits (Attendance > Field visits) */
.wb-visits { display: grid; gap: 14px; }
.wb-vis-bar-top { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; }
.wb-vis-presets { display: inline-flex; gap: 6px; padding: 4px; border-radius: 12px; background: var(--wb-bg, #f1f5f9); }
.wb-vis-preset { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 700; font-size: 13px; color: #4a5866; cursor: pointer; }
.wb-vis-preset.is-active { background: #fff; color: var(--wb-navy-900, #0b2a3c); box-shadow: 0 1px 4px rgba(11, 42, 60, .12); }
.wb-vis-dates, .wb-vis-selects { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.wb-vis-dates label { display: grid; gap: 3px; font-size: 12px; font-weight: 700; color: #4a5866; }
.wb-vis-selects select { min-width: 150px; }
.wb-vis-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.wb-vis-kpi { display: grid; gap: 4px; text-align: left; padding: 14px 16px; border-radius: 14px; background: #fff; border: 1px solid var(--wb-border, #e2e8f0); }
.wb-vis-kpi span { font-size: 12px; font-weight: 700; color: #5b6573; }
.wb-vis-kpi b { font-size: 24px; color: #14212b; }
button.wb-vis-kpi { cursor: pointer; font: inherit; }
.wb-vis-kpi.is-warn { border-color: rgba(184, 134, 11, .35); background: rgba(184, 134, 11, .06); }
.wb-vis-kpi.is-warn.is-on { box-shadow: 0 0 0 2px rgba(184, 134, 11, .45); }
.wb-vis-kpi.is-bad { border-color: rgba(192, 57, 43, .35); background: rgba(192, 57, 43, .05); }
.wb-vis-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr); gap: 14px; align-items: start; }
.wb-vis-main h3 .wb-subtle { font-size: 12.5px; font-weight: 500; margin-left: 8px; }
.wb-vis-row-flag td:first-child { box-shadow: inset 3px 0 0 #b8860b; }
.wb-vis-far { font-size: 12px; font-weight: 600; color: #8a6508; }
.wb-vis-sidetabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--wb-bg, #f1f5f9); margin-bottom: 12px; }
.wb-vis-sidetabs button { border: 0; background: transparent; padding: 8px; border-radius: 9px; font-weight: 700; font-size: 13px; color: #4a5866; cursor: pointer; }
.wb-vis-sidetabs button.is-active { background: #fff; color: var(--wb-navy-900, #0b2a3c); box-shadow: 0 1px 4px rgba(11, 42, 60, .12); }
.wb-vis-groups { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wb-vis-group { width: 100%; display: grid; gap: 5px; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--wb-border, #e2e8f0); background: #fff; font: inherit; cursor: pointer; }
.wb-vis-group:hover:not(:disabled) { border-color: var(--wb-teal-400, #2dd4bf); }
.wb-vis-group-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.wb-vis-group-head span { color: #5b6573; font-size: 12.5px; white-space: nowrap; }
.wb-vis-meter { height: 6px; border-radius: 99px; background: var(--wb-bg, #f1f5f9); overflow: hidden; display: block; }
.wb-vis-meter i { display: block; height: 100%; border-radius: 99px; background: var(--wb-teal-600, #0d9488); }
@media (max-width: 1000px) { .wb-vis-grid { grid-template-columns: 1fr; } }

/* ---- Dashboard: today's status bar and the people behind each tile ---- */
.wb-daybar { background: #fff; border: 1px solid var(--wb-border); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.wb-daybar-track { display: flex; gap: 3px; height: 14px; border-radius: 8px; overflow: hidden; }
.wb-daybar-seg { border: 0; padding: 0; flex-basis: 0; min-width: 6px; cursor: pointer; transition: filter .15s; }
.wb-daybar-seg:hover, .wb-daybar-seg:focus-visible { filter: brightness(.88); outline: none; }
.wb-daybar-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; }
.wb-daybar-key { border: 0; background: transparent; padding: 2px 0; font: inherit; font-size: 12.5px; color: #4a5866; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.wb-daybar-key b { color: var(--wb-text, #0f2233); }
.wb-daybar-key:hover { color: var(--wb-text, #0f2233); }
.wb-daybar-key i, .wb-daybar-seg { background: #94a3b8; }
.wb-daybar-key i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.is-ok { background: #1e8e4e !important; } .is-warn { background: #d99a1c !important; } .is-info { background: #1d6fb8 !important; }
.is-leave { background: #7c5cc4 !important; } .is-bad { background: #c0392b !important; } .is-muted { background: #94a3b8 !important; } .is-off { background: #cbd5e1 !important; }
.wb-stat-card.wb-link-card { transition: box-shadow .15s, transform .15s, border-color .15s; }
.wb-stat-card.wb-link-card:hover, .wb-stat-card.wb-link-card:focus-visible { box-shadow: 0 4px 14px rgba(11, 42, 60, .1); border-color: #b9c7d3; transform: translateY(-1px); outline: none; }
.wb-dash-search { width: 100%; margin-bottom: 10px; }
.wb-dash-none { padding: 18px 4px; }
.wb-dash-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wb-dash-person { width: 100%; display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid transparent; background: transparent; border-radius: 10px; padding: 8px 8px; font: inherit; cursor: pointer; }
.wb-dash-person:hover, .wb-dash-person:focus-visible { background: #f1f5f9; border-color: #e3e9ee; outline: none; }
.wb-dash-avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #e0f2f1; color: #0d6b63; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.wb-dash-tx { flex: 1 1 auto; min-width: 0; display: grid; }
.wb-dash-tx b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-dash-tx .wb-subtle { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Route maps and the route drawer ---- */
.wb-map-legend .m::before { background: #6b7280; } .wb-map-legend .k::before { background: #0f2233; }
.wb-route-empty { padding: 18px; border: 1px dashed var(--wb-border); border-radius: 12px; color: #5b6573; text-align: center; }
.wb-route-svg { width: 100%; height: auto; display: block; margin-top: 8px; }
.wb-route-svg-bg { fill: #eef3f7; }
.wb-route-svg-line { fill: none; stroke: #1d6fb8; stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; stroke-opacity: .85; }
.wb-route-svg-pin { stroke: #fff; stroke-width: 2; }
.wb-route-svg-no { fill: #fff; font: 800 12px system-ui, sans-serif; }
.wb-route-days { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.wb-route-days input { max-width: 170px; }
.wb-route-kpis { margin-bottom: 10px; }
.wb-route-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 2px; }
.wb-route-list li { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid #eef2f5; }
.wb-route-no { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 12px; background: #6b7280; }
.wb-route-no-check_in { background: #1e8e4e; } .wb-route-no-visit { background: #1d6fb8; } .wb-route-no-check_out { background: #0f2233; } .wb-route-no.is-new { background: #b8860b; }
.wb-route-tx { flex: 1 1 auto; min-width: 0; display: grid; font-size: 13.5px; }
.wb-route-km { flex: none; font-size: 12.5px; font-weight: 700; color: #1d6fb8; }
.wb-vis-group-li { display: flex; align-items: center; gap: 8px; }
.wb-vis-group-li .wb-vis-group { flex: 1 1 auto; min-width: 0; }
.wb-vis-routebtn { flex: none; }
.wb-route-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- Roster grid ---------- */
.wb-ro-range { font-weight: 700; padding: 0 6px; white-space: nowrap; }
.wb-ro-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; font-size: 12px; font-weight: 700; }
.wb-ro-legend span { padding: 3px 10px; border-radius: 999px; }
.wb-ro-search { max-width: 320px; }
.wb-ro-scroll { overflow: auto; max-height: 70vh; border: 1px solid var(--wb-border); border-radius: 12px; background: var(--wb-surface, #fff); }
.wb-ro { border-collapse: separate; border-spacing: 0; font-size: 12px; min-width: 100%; }
.wb-ro th, .wb-ro td { padding: 6px 4px; text-align: center; min-width: 46px; border-bottom: 1px solid var(--wb-border); }
.wb-ro thead th { position: sticky; top: 0; z-index: 2; background: var(--wb-surface, #fff); font-weight: 700; color: var(--wb-label); }
.wb-ro thead th small { display: block; font-size: 10px; font-weight: 600; }
.wb-ro thead th.is-sun { color: var(--wb-red); }
.wb-ro thead th.is-today { background: var(--wb-bg); color: var(--wb-blue); }
.wb-ro-who { position: sticky; left: 0; z-index: 1; min-width: 170px !important; max-width: 220px; text-align: left !important; background: var(--wb-surface, #fff); }
.wb-ro thead .wb-ro-who { z-index: 3; }
.wb-ro-who strong, .wb-ro-who small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-ro-who small { font-weight: 500; color: var(--wb-label); }
.wb-ro td span { display: inline-block; min-width: 40px; padding: 4px 2px; border-radius: 8px; font-weight: 700; }
.wb-ro .k-WORK, .wb-ro-legend .k-WORK { color: #0e7a4f; } .wb-ro .k-WORK span, .wb-ro-legend .k-WORK { background: #e2f6ec; }
.wb-ro .k-OFF, .wb-ro-legend .k-OFF { color: #5b6472; } .wb-ro .k-OFF span, .wb-ro-legend .k-OFF { background: #eef0f3; }
.wb-ro .k-HOLIDAY, .wb-ro-legend .k-HOLIDAY { color: #8a5a00; } .wb-ro .k-HOLIDAY span, .wb-ro-legend .k-HOLIDAY { background: #fdf0d2; }
.wb-ro .k-LEAVE, .wb-ro-legend .k-LEAVE { color: #7a2fb0; } .wb-ro .k-LEAVE span, .wb-ro-legend .k-LEAVE { background: #f1e5fa; }
.wb-ro .k-DUTY, .wb-ro-legend .k-DUTY { color: #1e5fd0; } .wb-ro .k-DUTY span, .wb-ro-legend .k-DUTY { background: #e1ecfd; }
.wb-ro .k-NONE, .wb-ro-legend .k-NONE { color: #9aa1ab; }
.wb-ro-count { display: inline-block; min-width: 20px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: var(--wb-bg); font-size: 11px; }

/* ---------- Announcements ---------- */
.wb-an-list { display: grid; gap: 12px; max-width: 860px; }
.wb-an { border: 1px solid var(--wb-border); border-radius: 14px; padding: 14px 16px; background: var(--wb-surface, #fff); }
.wb-an.is-pinned { border-left: 4px solid var(--wb-blue); }
.wb-an.is-expired { opacity: .6; }
.wb-an header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.wb-an h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 6px; }
.wb-an p { white-space: pre-wrap; margin: 6px 0 8px; }

/* ---------- Birthdays ---------- */
.wb-ce-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 12px; }
.wb-ce { display: flex; align-items: center; gap: 12px; border: 1px solid var(--wb-border); border-radius: 14px; padding: 12px 14px; background: var(--wb-surface, #fff); }
.wb-ce.is-today { border-color: var(--wb-green); box-shadow: 0 0 0 2px rgba(14, 122, 79, .12); }
.wb-ce-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--wb-bg); color: var(--wb-blue); }
.wb-ce div { flex: 1; min-width: 0; }
.wb-ce strong, .wb-ce span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-ce span { color: var(--wb-label); font-size: 13px; }
.wb-ce b { font-size: 12px; white-space: nowrap; }

/* ---------- Checklists ---------- */
.wb-cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.wb-cl-card { border: 1px solid var(--wb-border); border-radius: 14px; padding: 14px; background: var(--wb-surface, #fff); }
.wb-cl-card header { display: flex; justify-content: space-between; align-items: center; }
.wb-cl-bar { height: 6px; border-radius: 999px; background: var(--wb-bg); margin: 10px 0; overflow: hidden; }
.wb-cl-bar i { display: block; height: 100%; background: var(--wb-green); }
.wb-cl-card ul { list-style: none; margin: 0; padding: 0; }
.wb-cl-card li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--wb-border); }
.wb-cl-card li label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.wb-cl-card li.is-done span { text-decoration: line-through; color: var(--wb-label); }
.wb-cl-card li small { white-space: nowrap; color: var(--wb-label); }
.wb-cl-card li.is-late small { color: var(--wb-red); font-weight: 700; }
.wb-cl-add { display: flex; gap: 6px; margin-top: 10px; }
.wb-cl-h { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--wb-label); }
.wb-cl-tpl { display: grid; grid-template-columns: 1fr 72px auto; gap: 6px; margin-bottom: 6px; }

/* ---------- Leave: several people ---------- */
.wb-adj-mode { margin-bottom: 12px; }
.wb-adj-list { max-height: 260px; overflow: auto; border: 1px solid var(--wb-border); border-radius: 10px; padding: 6px 10px; }
.wb-adj-list label { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-weight: 500; }
.wb-adj-list small { color: var(--wb-label); }

/* Geofence picker (work locations) */
.wb-geofence { margin: 4px 0 14px; }
.wb-geofence .wb-route-svg { max-width: 320px; }
.wb-geo-hint { font-size: 12px; color: #5b6573; margin-top: 4px; }
.wb-geofence-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: #5b6573; }
.wb-geo-chip { border: 1px solid var(--wb-border); background: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12px; cursor: pointer; color: #1f2937; }
.wb-geo-chip.on { background: #1d6fb8; border-color: #1d6fb8; color: #fff; }
.wb-geofence-checkins { margin-top: 8px; font-size: 13px; color: #1f2937; }
.wb-absent-order { margin: 6px 0 8px; padding-left: 22px; }
.wb-absent-order li { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.wb-absent-order li > span { min-width: 200px; }
.wb-absent-review { border: 1px solid var(--wb-border); border-radius: 12px; padding: 12px; margin: 8px 0 14px; }

/* =====================================================================================
   Shared grid look: gridlines + Excel-style funnel filter (wb-grid-filter.js)
   One set of rules for every grid: Syncfusion grids (.wb-grid) and plain data tables.
   ===================================================================================== */
:root { --wb-grid-line: #d3dce4; --wb-grid-funnel: #6b7c8b; --wb-grid-funnel-on: var(--wb-teal-600, #0d9488); }

/* Plain HTML tables: horizontal + vertical lines on every cell. */
.wb-table th, .wb-table td,
.wb-simple-table th, .wb-simple-table td,
.wb-noshift-table th, .wb-noshift-table td,
.wb-ro th, .wb-ro td {
    border-bottom: 1px solid var(--wb-grid-line);
    border-right: 1px solid var(--wb-grid-line);
}
.wb-table th:last-child, .wb-table td:last-child,
.wb-simple-table th:last-child, .wb-simple-table td:last-child,
.wb-noshift-table th:last-child, .wb-noshift-table td:last-child,
.wb-ro th:last-child, .wb-ro td:last-child { border-right: none; }
.wb-table thead th, .wb-simple-table thead th, .wb-noshift-table thead th { border-bottom-color: #b9c6d1; }
.wb-table tr:last-child td { border-bottom: none; }
.wb-table-wrap, .wb-ro-scroll { max-width: 100%; overflow-x: auto; }

/* Syncfusion grids: explicit lines, so the theme's pale default cannot hide them. */
.wb-grid.e-grid .e-headercell,
.wb-grid.e-grid .e-rowcell,
.wb-grid.e-grid .e-detailheadercell { border-color: var(--wb-grid-line); }
.wb-grid.e-grid.e-gridlines .e-headercell,
.wb-grid.e-grid.e-gridlines .e-rowcell { border-right: 1px solid var(--wb-grid-line); border-bottom: 1px solid var(--wb-grid-line); }
.wb-grid.e-grid .e-gridheader { border-bottom: 1px solid #b9c6d1; }
.wb-grid.e-grid .e-headercell.e-lastcell, .wb-grid.e-grid .e-rowcell:last-child { border-right: none; }
/* Same funnel on Syncfusion headers as on plain tables. */
.wb-grid .e-filtermenudiv.e-icons { color: var(--wb-grid-funnel); }
.wb-grid .e-filtered, .wb-grid .e-filtered::before { color: var(--wb-grid-funnel-on); }

/* Plain tables: funnel drawn on the header cell (a pseudo-element, so Blazor's markup is untouched). */
[data-wb-hide] { display: none !important; }
table[data-wb-gf] th[data-wb-gf-col] { position: relative; padding-right: 32px; }
table[data-wb-gf] th[data-wb-gf-col]::after {
    content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
    background: var(--wb-grid-funnel); opacity: .75; border-radius: 3px;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M1 2h14l-5.5 6.5V14l-3-1.7V8.5z'/></svg>") center / contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M1 2h14l-5.5 6.5V14l-3-1.7V8.5z'/></svg>") center / contain no-repeat;
    pointer-events: none; transition: opacity .1s ease, background .1s ease;
}
table[data-wb-gf] th.wb-gf-hot { cursor: pointer; }
table[data-wb-gf] th.wb-gf-hot::after, table[data-wb-gf] th[data-wb-gf-col]:focus-visible::after { opacity: 1; background: var(--wb-grid-funnel-on); }
table[data-wb-gf] th[data-wb-gf-on]::after { opacity: 1; background: var(--wb-grid-funnel-on); }
table[data-wb-gf] th[data-wb-gf-col]:focus-visible { outline: 2px solid var(--wb-grid-funnel-on); outline-offset: -2px; }
table[data-wb-gf] th.wb-num[data-wb-gf-col] { padding-right: 32px; }

/* Filter popup + "Reset all" chip (rendered on <body>). */
.wb-gf-pop {
    position: fixed; z-index: 3000; width: min(300px, calc(100vw - 16px)); max-height: min(520px, calc(100vh - 16px));
    display: flex; flex-direction: column; gap: 8px; padding: 12px; box-sizing: border-box;
    background: #fff; border: 1px solid var(--wb-border); border-radius: 10px; box-shadow: 0 10px 30px rgba(4, 18, 31, .18);
    font-size: 13px; color: var(--wb-text);
}
.wb-gf-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wb-gf-type { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--wb-label); background: var(--wb-bg); border-radius: 999px; padding: 1px 8px; }
.wb-gf-cond { display: grid; gap: 6px; }
.wb-gf-pop select, .wb-gf-pop input[type=text], .wb-gf-pop input[type=number], .wb-gf-pop input[type=date], .wb-gf-pop input[type=search] {
    width: 100%; box-sizing: border-box; padding: 5px 8px; font-size: 13px; border: 1px solid #c3cfda; border-radius: 6px; background: #fff;
}
.wb-gf-pop [hidden] { display: none !important; }
.wb-gf-all, .wb-gf-item { display: flex; align-items: center; gap: 6px; margin: 0; padding: 2px 4px; cursor: pointer; font-weight: 400; }
.wb-gf-all { border-bottom: 1px solid var(--wb-border); padding-bottom: 6px; font-weight: 600; }
.wb-gf-item:hover { background: var(--wb-bg); border-radius: 4px; }
.wb-gf-item span { overflow-wrap: anywhere; }
.wb-gf-list { overflow-y: auto; min-height: 60px; max-height: 220px; border: 1px solid var(--wb-border); border-radius: 6px; padding: 4px; }
.wb-gf-more { padding: 6px 4px; color: var(--wb-label); font-size: 12px; }
.wb-gf-foot { display: flex; align-items: center; gap: 8px; }
.wb-gf-btn { padding: 5px 14px; border-radius: 6px; border: 1px solid #c3cfda; background: #fff; font-size: 13px; cursor: pointer; }
.wb-gf-btn.wb-gf-apply { background: var(--wb-teal-600, #0d9488); border-color: var(--wb-teal-600, #0d9488); color: #fff; font-weight: 600; }
.wb-gf-link { margin-left: auto; border: 0; background: none; color: var(--wb-teal-600, #0d9488); cursor: pointer; font-size: 12.5px; padding: 0; }
.wb-gf-link:hover { text-decoration: underline; }
.wb-gf-chip {
    position: absolute; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 3px 4px 3px 10px;
    background: #fff; border: 1px solid var(--wb-border); border-radius: 999px; font-size: 12px; color: var(--wb-label); box-shadow: 0 1px 2px rgba(4, 18, 31, .06);
}
.wb-gf-chip-reset { border: 0; background: rgba(13, 148, 136, .12); color: var(--wb-teal-600, #0d9488); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.wb-gf-chip-reset:hover { background: rgba(13, 148, 136, .22); }
@media (max-width: 640px) { .wb-gf-chip { position: fixed; right: 8px; left: auto !important; top: auto !important; bottom: 8px; } }

/* Column resizing: plain tables (wb-grid-filter.js) and Syncfusion headers share the same affordance. */
table[data-wb-gf] th.wb-gf-rs, .wb-grid .e-rhandler { cursor: col-resize; }
table[data-wb-gf] th[data-wb-rs] { overflow: hidden; text-overflow: ellipsis; }
table[data-wb-gf] th[data-wb-rs]:hover { box-shadow: inset -3px 0 0 rgba(13, 148, 136, .35); }
table[data-wb-gf][style*="table-layout"] td { overflow-wrap: anywhere; }
body.wb-gf-resizing, body.wb-gf-resizing * { cursor: col-resize !important; user-select: none !important; }
.wb-grid .e-rhandler:hover, .wb-grid .e-rhandler.e-rresizer { background: rgba(13, 148, 136, .5); }
table[data-wb-gf] th[data-wb-rs] { box-sizing: border-box; }
.wb-stat-card .wb-stat-sub { display: block; margin-top: 2px; font-size: 11.5px; font-style: normal; font-weight: 600; color: var(--wb-warning, #b45309); }
/* Roster: explainer, One day / Two weeks, readable cells */
.wb-ro-intro { margin: -4px 0 14px; padding: 10px 14px; border-radius: 12px; background: var(--wb-bg); font-size: 13px; color: var(--wb-label); line-height: 1.5; }
.wb-ro-intro b { color: var(--wb-text, #1f2937); }
.wb-ro-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.wb-ro-tools .wb-ro-search { margin: 0; }
.wb-ro-views { display: flex; gap: 6px; }
.wb-ro-days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; }
.wb-ro-daychip { flex: none; display: grid; justify-items: center; min-width: 52px; padding: 6px 8px; border: 1px solid var(--wb-border); border-radius: 12px; background: var(--wb-surface, #fff); cursor: pointer; line-height: 1.15; }
.wb-ro-daychip small { font-size: 10.5px; font-weight: 600; color: var(--wb-label); }
.wb-ro-daychip b { font-size: 16px; }
.wb-ro-daychip.is-today small { color: var(--wb-blue); }
.wb-ro-daychip.is-active { background: var(--wb-blue, #1d6fb8); border-color: var(--wb-blue, #1d6fb8); color: #fff; }
.wb-ro-daychip.is-active small { color: #fff; }
.wb-ro-dayhead { margin: 4px 0 10px; font-size: 15px; }
.wb-ro-groups { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.wb-ro-group { border: 1px solid var(--wb-border); border-radius: 12px; background: var(--wb-surface, #fff); overflow: hidden; }
.wb-ro-group header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 12px; font-size: 13px; }
.wb-ro-group header small { flex-basis: 100%; font-size: 11.5px; color: var(--wb-label); }
.wb-ro-group.k-WORK header { background: #e2f6ec; color: #0e7a4f; } .wb-ro-group.k-OFF header { background: #eef0f3; color: #5b6472; }
.wb-ro-group.k-LEAVE header { background: #f1e5fa; color: #7a2fb0; } .wb-ro-group.k-DUTY header { background: #e1ecfd; color: #1e5fd0; }
.wb-ro-group.k-HOLIDAY header { background: #fdf0d2; color: #8a5a00; } .wb-ro-group.k-NONE header { background: #fdecea; color: #b42318; }
.wb-ro-group ul { list-style: none; margin: 0; padding: 4px 12px 8px; }
.wb-ro-group li { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid #eef2f5; font-size: 13px; }
.wb-ro-group li:last-child { border-bottom: 0; }
.wb-ro-group li small { color: var(--wb-label); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-ro td .wb-ro-time { display: grid; line-height: 1.15; padding: 3px 2px; }
.wb-ro td .wb-ro-time b { font-size: 11.5px; } .wb-ro td .wb-ro-time small { font-size: 10.5px; font-weight: 600; opacity: .8; }
.wb-ro th, .wb-ro td { min-width: 58px; }
