/*Write your custom css in this file.*/

/* =========================================================
   UI refresh: sidebar + dashboard (visual only)
   - Colors are tokens below; change them here to retheme.
   - Sidebar selectors keep the same specificity as the theme
     color files (assets/css/color/*.css), which load after this
     file, so a theme picked from the color changer still wins.
   ========================================================= */

:root {
    --bx-accent: #2563eb;
    --bx-accent-2: #0ea5e9;
    --bx-accent-soft: rgba(37, 99, 235, 0.1);

    --bx-page-bg: #f3f5f9;
    --bx-surface: #ffffff;
    --bx-border: #e7ebf2;
    --bx-ink: #0f172a;
    --bx-text: #475569;
    --bx-muted: #64748b;

    --bx-side-bg: #0d1a36;
    --bx-side-bg-2: #0a1429;
    --bx-side-text: rgba(214, 223, 240, 0.74);
    --bx-side-text-hover: #ffffff;
    --bx-side-hover: rgba(255, 255, 255, 0.07);
    --bx-side-line: rgba(255, 255, 255, 0.08);
    --bx-side-accent: #8fb0ff;
    --bx-side-active: rgba(110, 150, 255, 0.16);

    --bx-radius: 14px;
    --bx-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 2px 10px -4px rgba(16, 24, 40, 0.06);
    --bx-shadow-md: 0 2px 4px rgba(16, 24, 40, 0.04), 0 14px 28px -12px rgba(16, 24, 40, 0.16);

    --bx-hover: #f4f6fa;
    --bx-subtle: #f8fafc;
    --bx-track: #edf1f7;

    /* dashboard */
    --bx-figure-font: "Archivo", "Inter", sans-serif;
    --bx-console-bg: #0b1630;
    --bx-console-bg-2: #102043;
    --bx-console-line: rgba(255, 255, 255, 0.09);
    --bx-console-text: rgba(214, 223, 240, 0.72);
    --bx-live: #2dd4bf;
}

/* Figures face for the dashboard. Self-hosted, variable (weight 500-700,
   width 100-125%). Only used for numbers of 20px and up; Inter stays the UI face. */
@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 500 700;
    font-stretch: 100% 125%;
    font-display: swap;
    src: url("fonts/archivo/archivo-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Archivo";
    font-style: normal;
    font-weight: 500 700;
    font-stretch: 100% 125%;
    font-display: swap;
    src: url("fonts/archivo/archivo-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Page ---------- */

html,
body {
    background-color: var(--bx-page-bg);
}

/* ---------- Top bar ----------
   Groups instead of a row of identical icons:
   [menu] | shortcuts ...... search field, report, add | language, reminders, alerts | you
   Icons are 38px buttons centred in the 66px bar. Each li keeps the full
   bar height, so dropdowns still open from the bar's bottom edge. */

.navbar-custom {
    border-bottom: 1px solid var(--bx-border);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}

.navbar-custom .navbar-nav {
    align-items: center;
}

.navbar-custom .navbar-nav > .nav-item {
    display: flex;
    align-items: center;
    min-height: 66px;
    margin: 0 1px;
}

.navbar-custom .navbar-nav .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px !important;
    border-radius: 10px;
    color: #5b6b80;
    transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.navbar-custom .navbar-nav .nav-link .icon {
    width: 19px;
    height: 19px;
}

.navbar-custom .navbar-nav .nav-link:hover,
.navbar-custom .navbar-nav .nav-link:focus,
.navbar-custom .navbar-nav .nav-link.show {
    color: var(--bx-ink);
    background-color: var(--bx-hover);
}

.navbar-custom .navbar-nav .nav-link:focus-visible {
    outline: 2px solid var(--bx-accent);
    outline-offset: 1px;
}

/* short dividers between the groups */
.navbar-custom .sidebar-toggle-btn-li::after,
.navbar-custom #quick-add-button::after,
.navbar-custom .nav-item:has(> #user-dropdown)::before {
    content: "";
    width: 1px;
    height: 22px;
    background: var(--bx-border);
}

.navbar-custom .sidebar-toggle-btn-li::after,
.navbar-custom #quick-add-button::after {
    margin: 0 8px 0 9px;
}

.navbar-custom .nav-item:has(> #user-dropdown)::before {
    margin: 0 8px 0 7px;
}

/* counts sit on the button's corner */
.navbar-custom .nav-link .badge.up {
    position: absolute;
    top: 1px;
    right: 0;
    min-width: 17px;
    height: 17px;
    margin: 0;
    padding: 0 4px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
    line-height: 17px;
    box-shadow: 0 0 0 2px var(--bx-surface);
}

/* search: a field on wide screens (label and "/" hint live in includes/topbar.php) */
.topbar-search-text,
.topbar-search-key {
    display: none;
}

@media (min-width: 1200px) {
    .navbar-custom #topbar-search-btn .nav-link {
        justify-content: flex-start;
        gap: 10px;
        width: 240px;
        margin-right: 6px;
        padding: 0 7px 0 12px !important;
        color: var(--bx-muted);
        background-color: var(--bx-subtle);
        box-shadow: inset 0 0 0 1px var(--bx-border);
    }

    .navbar-custom #topbar-search-btn .nav-link:hover,
    .navbar-custom #topbar-search-btn .nav-link:focus {
        color: var(--bx-text);
        background-color: var(--bx-surface);
        box-shadow: inset 0 0 0 1px #cfd6e2;
    }

    .navbar-custom #topbar-search-btn .nav-link .icon {
        width: 17px;
        height: 17px;
    }

    .navbar-custom #topbar-search-btn .topbar-search-text {
        display: inline;
        font-size: 14px;
        font-weight: 400;
    }

    .navbar-custom #topbar-search-btn .topbar-search-key {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 22px;
        height: 22px;
        margin-left: auto;
        padding: 0 6px;
        border-radius: 6px;
        background: var(--bx-surface);
        box-shadow: inset 0 0 0 1px var(--bx-border), 0 1px 0 var(--bx-border);
        color: var(--bx-muted);
        font-family: inherit;
        font-size: 12px;
        font-weight: 500;
    }
}

/* quick add: the one filled button in the bar */
.navbar-custom #quick-add-button .nav-link {
    min-width: 36px;
    width: 36px;
    height: 36px;
    padding: 0 !important;
    color: #fff !important; /* the dark theme colors every nav-link with !important */
    background-color: var(--bx-side-bg);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.12), 0 6px 12px -6px rgba(13, 26, 54, 0.55);
}

.navbar-custom #quick-add-button .nav-link:hover,
.navbar-custom #quick-add-button .nav-link:focus,
.navbar-custom #quick-add-button .nav-link.show {
    background-color: var(--bx-accent);
}

.navbar-custom #quick-add-button .nav-link .icon {
    width: 18px;
    height: 18px;
    stroke-width: 2.4;
}

/* you: avatar, name, chevron */
.navbar-custom .navbar-nav #user-dropdown {
    gap: 10px;
    height: 44px;
    padding: 0 10px 0 5px !important;
    border-radius: 999px;
}

.navbar-custom #user-dropdown .avatar-xs {
    width: 34px;
    height: 34px;
    margin: 0 !important;
}

.navbar-custom #user-dropdown .avatar img {
    width: 34px;
    height: 34px;
    object-fit: cover;
    box-shadow: 0 0 0 2px var(--bx-surface), 0 0 0 3px var(--bx-border);
}

.navbar-custom #user-dropdown .user-name {
    margin-left: 0 !important;
    color: var(--bx-ink);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.navbar-custom #user-dropdown .user-name::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 6px;
    vertical-align: -2px;
    background-color: currentColor;
    opacity: 0.45;
    -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.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat center / contain;
    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.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* the name is hidden on phones (app.all.css); keep the avatar round */
@media (max-width: 500px) {
    .navbar-custom .navbar-nav #user-dropdown {
        padding: 0 5px !important;
    }
}

/* ---------- Sidebar ----------
   Navy ground, quiet rows, one clear "you are here":
   - main item: lit row, accent icon, marker on the sidebar edge
   - sub page: white text and a dot on the guide line (li.current,
     set by the script in includes/left_menu.php); its parent dims
   Color selectors keep the specificity of the theme color files
   (assets/css/color/*.css load later), so a picked theme still wins.
   Under a theme the accent touches turn white (rule below). */

body[data-color]:not([data-color=""]):not([data-color="F2F2F2"]) {
    --bx-side-accent: #fff;
    --bx-side-active: rgba(255, 255, 255, 0.16);
    --bx-side-text: rgba(255, 255, 255, 0.85); /* only reaches the collapsed flyout; themes color the rest */
}

/* white logo strip on top (lines up with the top bar), deep navy menu below */
.sidebar {
    background: linear-gradient(to bottom, #fff 0, #fff 66px, var(--bx-side-bg-2) 66px);
    border-right: 0;
}

.sidebar-brand {
    background-color: #fff;
    border-bottom: 1px solid var(--bx-border);
}

.sidebar-scroll {
    background:
        radial-gradient(140% 55% at 0% 0%, rgba(37, 99, 235, 0.22) 0%, rgba(37, 99, 235, 0) 60%),
        linear-gradient(180deg, var(--bx-side-bg) 0%, var(--bx-side-bg-2) 100%);
}

.sidebar .sidebar-scroll {
    border-top-color: transparent !important;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
}

.sidebar-menu {
    padding: 14px 0 28px;
}

.sidebar-menu > li {
    margin: 2px 0;
}

/* rows */
.sidebar-menu li a {
    display: flex;
    align-items: center;
    min-height: 40px;
    margin: 0 12px;
    padding: 9px 14px;
    color: var(--bx-side-text);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.005em;
    transition: color 150ms ease, background-color 150ms ease;
}

.sidebar-menu li.expand > a {
    padding-right: 36px; /* room for the chevron */
}

.sidebar-menu li a .icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    opacity: 0.75;
    transition: opacity 150ms ease, color 150ms ease;
}

.sidebar-menu li a span {
    margin-left: 12px;
}

.sidebar-menu li a .menu-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-menu li a:active,
.sidebar-menu li a:hover,
.sidebar-menu li a:focus {
    color: var(--bx-side-text-hover);
    background-color: var(--bx-side-hover);
}

.sidebar-menu li a:hover .icon {
    opacity: 1;
}

.sidebar-menu li a:focus-visible {
    outline: 2px solid var(--bx-side-accent);
    outline-offset: -2px;
}

/* current section */
.sidebar-menu li.active > a {
    color: #fff !important;
    background-color: var(--bx-side-active);
    box-shadow: none;
}

.sidebar-menu li.active > a .icon {
    opacity: 1;
    color: var(--bx-side-accent);
}

.sidebar-menu li.active > a::after {
    content: "";
    position: absolute;
    top: 50%;
    left: -12px; /* flush with the sidebar edge */
    width: 3px;
    height: 20px;
    margin-top: -10px;
    border-radius: 0 3px 3px 0;
    background: var(--bx-side-accent);
}

/* on a sub page the sub item carries the highlight; the parent just stays open */
.sidebar-menu li.active:has(> ul > li.current) > a {
    background-color: transparent;
}

.sidebar-menu li.active:has(> ul > li.current) > a::after {
    display: none;
}

/* chevron (drawn by app.all.css), re-centred for the taller rows */
#sidebar-menu li.expand > a::before {
    top: 15px;
    right: 18px;
    opacity: 0.6;
}

#sidebar-menu li.expand.open > a::before {
    top: 18px;
}

/* badges */
.sidebar-menu .badge {
    float: none;
    min-width: 20px;
    margin: 0 0 0 auto !important;
    padding: 3px 6px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 14px;
    text-align: center;
}

/* submenu: a guide line under the parent icon instead of a heavy block */
.sidebar-menu li ul {
    margin-left: 0;
}

.sidebar-menu li.expand.open > ul {
    position: relative;
    padding: 2px 0 6px;
}

.sidebar-menu li.expand.open > ul::before {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 8px;
    left: 35px; /* centre of the parent icon */
    width: 1px;
    background: var(--bx-side-line);
}

.sidebar-menu li ul li a {
    min-height: 34px;
    padding: 7px 14px 7px 44px;
    color: var(--bx-side-text);
    font-size: 13.5px;
    font-weight: 400;
}

.sidebar-menu li ul li a svg {
    display: none;
}

.sidebar-menu li ul li a span {
    margin-left: 0;
}

.sidebar-menu li ul li a:hover {
    color: var(--bx-side-text-hover);
    background-color: var(--bx-side-hover);
}

.sidebar-menu li ul li.current > a {
    color: #fff;
    font-weight: 500;
}

.sidebar-menu li ul li.current > a::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 20px; /* on the guide line */
    width: 7px;
    height: 7px;
    margin-top: -3.5px;
    border-radius: 50%;
    background: var(--bx-side-accent);
}

/* collapsed rail (desktop only; below 991px "toggled" means the drawer is open) */
@media (min-width: 991px) {
    .sidebar-toggled .sidebar-menu li a,
    .sidebar-toggled .sidebar-menu li.expand > a {
        padding: 11px 14px;
    }

    /* hover flyout: label row and sub items form one navy card */
    .sidebar-toggled .sidebar-menu li:hover {
        background-color: var(--bx-side-bg);
        border-radius: 12px;
        filter: drop-shadow(0 14px 24px rgba(4, 10, 24, 0.45));
    }

    .sidebar-toggled .sidebar-menu li.expand:hover {
        border-radius: 12px 12px 0 0;
    }

    .sidebar-toggled .sidebar-menu li:hover > a {
        width: auto;
        box-shadow: none !important;
    }

    .sidebar-toggled .sidebar-menu li ul {
        top: 100%;
        left: 0;
        width: 250px;
        padding: 2px 0 8px;
        background-color: inherit; /* the row's color, theme or navy */
        border: 0;
        border-radius: 0 0 12px 12px;
    }

    .sidebar-toggled .sidebar-menu li:hover ul {
        box-shadow: none;
    }

    .sidebar-toggled .sidebar-menu li.expand.open > ul::before {
        display: none;
    }

    .sidebar-toggled .sidebar-menu li ul li,
    .sidebar-toggled .sidebar-menu li ul:hover li {
        width: auto;
    }

    .sidebar-toggled .sidebar-menu li ul li:hover {
        background-color: transparent;
    }

    /* sub items line up with the label (icon column + 35px menu-text padding) */
    .sidebar-toggled .sidebar-menu li ul li a {
        margin: 0 12px;
        padding: 8px 14px 8px 67px;
        color: var(--bx-side-text) !important;
    }

    .sidebar-toggled .sidebar-menu li ul li a:hover,
    .sidebar-toggled .sidebar-menu li ul li.current > a {
        color: #fff !important;
        background-color: var(--bx-side-hover);
    }

    .sidebar-toggled .sidebar-menu li ul li.current > a::after {
        left: 53px;
    }
}

/* =========================================================
   Dashboard
   - Rows made only of KPI tiles fuse into one panel; the first
     such row on the page is the dark "today" console.
   - Every other widget is a flat, quiet card.
   - Figures use Archivo (wider, tabular); text stays Inter.
   ========================================================= */

/* ---------- Header ---------- */

.dashbaord-header-area {
    padding: 2px 0 4px;
}

.dashboard-view .dashbaord-header-area h4 {
    font-family: var(--bx-figure-font);
    font-stretch: 112%;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--bx-ink);
    letter-spacing: -0.015em;
}

.dashbaord-header-area .color-tag {
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.18);
}

.dashboard-view #dashboards-color-tags {
    display: inline-flex;
    align-items: center;
    background: var(--bx-surface);
    border: 1px solid var(--bx-border);
    border-radius: 999px;
    padding: 0 6px;
}

.dashboard-view #dashboards-color-tags .clickable {
    padding: 8px !important;
    margin-right: 0 !important;
}

.dashboard-view #dashboards-color-tags .color-tag.border-circle {
    box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--bx-accent);
}

.dashboard-view .dashboard-dropdown > .dropdown-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--bx-surface);
    border: 1px solid var(--bx-border);
    border-radius: 10px;
    transition: background-color 150ms ease, color 150ms ease;
}

.dashboard-view .dashboard-dropdown > .dropdown-toggle svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.dashboard-view .dashboard-dropdown > .dropdown-toggle:hover {
    color: var(--bx-accent);
    background: var(--bx-hover);
}

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

.dashboard-view .card {
    color: var(--bx-text);
    border: 1px solid var(--bx-border);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    transition: background-color 150ms ease;
}

/* vertical padding stays 12px: some widgets (sticky note, income vs expenses) use fixed heights */
.dashboard-view .card .card-header {
    background-color: transparent;
    border-color: var(--bx-border);
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bx-ink);
}

.dashboard-view .card .card-header:first-child {
    border-radius: 12px 12px 0 0;
}

.dashboard-view .card-footer {
    border-radius: 0 0 12px 12px;
}

/* header icon: quiet, so the title leads */
.dashboard-view .card .card-header > svg,
.dashboard-view .card .card-header > span > svg:first-child {
    width: 16px;
    height: 16px;
    color: #8a96a8;
    vertical-align: -3px;
}

/* header actions (… menu, collapse arrow) */
.dashboard-view .card-header .dropdown-toggle,
.dashboard-view .card-header .action-option {
    border-radius: 8px;
    transition: background-color 150ms ease;
}

.dashboard-view .card-header .dropdown-toggle:hover,
.dashboard-view .card-header .action-option:hover {
    background-color: var(--bx-hover);
}

/* ---------- KPI tiles ---------- */

/* icon chip + label + figure, left aligned (was icon left, number pinned far right) */
.dashboard-view .dashboard-icon-widget .card-body:has(> .widget-details) {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 96px;
    padding: 20px 22px;
}

.dashboard-view .dashboard-icon-widget .card-body:has(> .widget-details) > .widget-icon {
    float: none;
    flex: 0 0 auto;
}

.dashboard-view .dashboard-icon-widget .card-body > .widget-details {
    position: static;
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column-reverse; /* label above the figure */
    align-items: flex-start;
    text-align: left;
}

/* tinted chip; the glyph carries the color. --tile is set per bg-* class below.
   Chip and figure styles are global: client and lead pages use the same tiles. */
.dashboard-icon-widget .widget-icon {
    --tile: var(--bx-accent);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bx-track) !important; /* browsers without color-mix() */
    background: color-mix(in srgb, var(--tile) 12%, transparent) !important;
    box-shadow: none;
}

.dashboard-icon-widget .widget-icon .icon {
    width: 22px;
    height: 22px;
    color: var(--tile);
}

.dashboard-icon-widget .widget-icon.bg-primary { --tile: #2563eb; }
.dashboard-icon-widget .widget-icon.bg-info { --tile: #0891b2; }
.dashboard-icon-widget .widget-icon.bg-success { --tile: #059669; }
.dashboard-icon-widget .widget-icon.bg-warning { --tile: #d97706; }
.dashboard-icon-widget .widget-icon.bg-danger { --tile: #dc2626; }
.dashboard-icon-widget .widget-icon.bg-coral { --tile: #e11d48; }
.dashboard-icon-widget .widget-icon.bg-orange { --tile: #ea580c; }

.dashboard-icon-widget .widget-details h1 {
    max-width: 100%;
    margin: 0 0 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: var(--bx-figure-font);
    font-stretch: 112%;
    font-size: 1.75rem;
    font-weight: 650;
    line-height: 1.1;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
    color: var(--bx-ink);
}

.dashboard-view .dashboard-icon-widget .widget-details h1 {
    margin: 4px 0 0;
}

.dashboard-icon-widget .widget-details span,
.dashboard-view .clock-in-out-card .widget-details .bg-transparent-white {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0;
    background: none !important; /* .bg-transparent-white paints a white pill with !important */
    border-radius: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--bx-muted);
}

.dashboard-view a.white-link {
    display: block;
    border-radius: 12px;
}

.dashboard-view a.white-link:hover > .card.dashboard-icon-widget {
    background-color: var(--bx-hover);
}

.dashboard-view a.white-link:focus-visible {
    outline: 2px solid var(--bx-accent);
    outline-offset: 2px;
}

/* clock in / out: status line above, button below */
.dashboard-view .clock-in-out-card .widget-details .btn {
    align-self: flex-start;
    margin-top: 8px;
    padding: 5px 12px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
}

.dashboard-view .clock-in-out-card .widget-details .bg-transparent-white {
    margin-top: 0 !important;
}

/* clocked in (the icon is bg-info only in that state): live dot */
.dashboard-view .clock-in-out-card .widget-icon.bg-info {
    --tile: #0d9488;
    position: relative;
}

.dashboard-view .clock-in-out-card .widget-icon.bg-info::after {
    content: "";
    position: absolute;
    top: -3px;
    right: -3px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--bx-live);
    box-shadow: 0 0 0 2px var(--bx-surface);
    animation: bx-live-pulse 2.4s ease-out infinite;
}

@keyframes bx-live-pulse {
    0% { box-shadow: 0 0 0 2px var(--bx-surface), 0 0 0 2px rgba(45, 212, 191, 0.55); }
    70% { box-shadow: 0 0 0 2px var(--bx-surface), 0 0 0 9px rgba(45, 212, 191, 0); }
    100% { box-shadow: 0 0 0 2px var(--bx-surface), 0 0 0 9px rgba(45, 212, 191, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-view .clock-in-out-card .widget-icon.bg-info::after {
        animation: none;
    }
}

/* last announcement (icon tile without a figure) */
.dashboard-view .dashboard-icon-widget .card-body:not(:has(> .widget-details)) {
    padding: 18px 22px;
    color: var(--bx-muted);
    font-size: 13px;
    font-weight: 500;
}

.dashboard-view .dashboard-icon-widget .card-body:not(:has(> .widget-details)) > svg {
    width: 16px;
    height: 16px;
    color: #8a96a8;
    vertical-align: -3px;
}

.dashboard-view .dashboard-icon-widget .card-body:not(:has(> .widget-details)) > .text-truncate {
    margin-top: 8px !important;
    font-size: 14px;
    font-weight: 600;
    color: var(--bx-ink);
}

/* ---------- Tile strip ----------
   A row holding nothing but KPI tiles becomes one panel. The dividers are
   outset shadows on each cell, clipped by the panel, so they follow any
   wrap: 4 across, 2x2 (768-1400px, see app.all.css) or stacked on phones. */

.dashboard-view .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) {
    --bs-gutter-x: 0;
    --bx-strip-line: var(--bx-border);
    margin: 0 0 20px;
    overflow: hidden;
    background: var(--bx-surface);
    border: 1px solid var(--bx-border);
    border-radius: var(--bx-radius);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.dashboard-view .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) > .widget-container {
    box-shadow: -1px 0 0 var(--bx-strip-line), 0 -1px 0 var(--bx-strip-line);
}

/* two tiles stacked in one column (custom dashboards) */
.dashboard-view .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) > .widget-container > * + * {
    box-shadow: 0 -1px 0 var(--bx-strip-line);
}

.dashboard-view .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) .card {
    height: 100%;
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.dashboard-view .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) a.white-link {
    border-radius: 0;
}

.dashboard-view .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) a.white-link:focus-visible {
    outline-offset: -3px;
}

.dashboard-view .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) a.white-link:hover > .card {
    background-color: rgba(37, 99, 235, 0.035);
}

/* ---------- Today console ----------
   The first widget row on the page (it follows the announcement row),
   when it is a tile strip. */

.dashboard-view > .row:not(.dashboards-row) + .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) {
    --bx-strip-line: var(--bx-console-line);
    --bx-surface: var(--bx-console-bg); /* ring around the live dot */
    background:
        radial-gradient(120% 160% at 0% 0%, rgba(37, 99, 235, 0.3) 0%, rgba(37, 99, 235, 0) 55%),
        linear-gradient(180deg, var(--bx-console-bg-2) 0%, var(--bx-console-bg) 100%);
    border-color: transparent;
    box-shadow: 0 14px 30px -18px rgba(11, 22, 48, 0.6);
}

.dashboard-view > .row:not(.dashboards-row) + .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) .card-body {
    padding: 22px 24px;
}

/* stacked on phones: keep the console short */
@media (max-width: 767px) {
    .dashboard-view .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) .dashboard-icon-widget .card-body {
        min-height: 0;
        padding: 16px 20px;
    }
}

.dashboard-view > .row:not(.dashboards-row) + .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) .widget-icon {
    background: rgba(255, 255, 255, 0.07) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.dashboard-view > .row:not(.dashboards-row) + .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) .widget-icon .icon {
    color: color-mix(in srgb, var(--tile) 55%, #fff);
}

.dashboard-view > .row:not(.dashboards-row) + .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) .widget-details h1 {
    color: #fff;
    font-size: 1.9rem;
}

.dashboard-view > .row:not(.dashboards-row) + .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) .widget-details span,
.dashboard-view > .row:not(.dashboards-row) + .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) .clock-in-out-card .widget-details .bg-transparent-white {
    color: var(--bx-console-text);
}

.dashboard-view > .row:not(.dashboards-row) + .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) a.white-link:hover > .card {
    background-color: rgba(255, 255, 255, 0.04);
}

.dashboard-view > .row:not(.dashboards-row) + .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) a.white-link:focus-visible {
    outline-color: #fff;
}

/* clocked in: quiet "Clock out" */
.dashboard-view > .row:not(.dashboards-row) + .dashboards-row .clock-in-out-card .widget-details .btn {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: #fff !important;
}

.dashboard-view > .row:not(.dashboards-row) + .dashboards-row .clock-in-out-card .widget-details .btn:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.24);
}

/* clocked out: "Clock in" is the action of the day */
.dashboard-view > .row:not(.dashboards-row) + .dashboards-row .clock-in-out-card:has(.widget-icon.bg-coral) .widget-details .btn {
    background: #fff;
    border-color: #fff;
    color: var(--bx-console-bg) !important;
}

.dashboard-view > .row:not(.dashboards-row) + .dashboards-row .clock-in-out-card:has(.widget-icon.bg-coral) .widget-details .btn:hover {
    background: #e8eefb;
    border-color: #e8eefb;
}

.dashboard-view > .row:not(.dashboards-row) + .dashboards-row .clock-in-out-card .widget-details .btn svg {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
}

/* ---------- Widget internals ---------- */

/* dividers */
.dashboard-view .b-r,
.dashboard-view .b-r-2 {
    border-right-color: var(--bx-border);
}

.dashboard-view .b-b {
    border-bottom-color: var(--bx-border) !important;
}

.dashboard-view .card .border-bottom {
    border-bottom-color: var(--bx-border) !important;
}

/* stat strips (projects overview, team members overview ...) */
.dashboard-view .box-content > a {
    display: block;
    border-radius: 10px;
    margin: 0 4px;
    transition: background-color 150ms ease;
}

.dashboard-view .box-content > a:hover {
    background-color: var(--bx-hover);
}

.dashboard-view .box-content h3.strong,
.dashboard-view .box-content h4.strong,
.dashboard-view .card h3.strong {
    font-family: var(--bx-figure-font);
    font-stretch: 112%;
    font-size: 1.6rem;
    font-weight: 650;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.dashboard-view .box-content h3 + div,
.dashboard-view .box-content h4 + span,
.dashboard-view .box-content .progress + div {
    color: var(--bx-muted);
    font-size: 13px;
}

/* projects overview: the outlined pill becomes a plain meter */
.dashboard-view .project-overview-widget {
    padding: 26px 24px 30px;
}

.dashboard-view .project-overview-widget .progress-outline {
    padding: 0;
    border: 0;
    border-radius: 0;
}

.dashboard-view .project-overview-widget .progress-outline .progress {
    height: 30px;
    background-color: var(--bx-track);
    border-radius: 9px;
}

.dashboard-view .project-overview-widget .progress-outline .progress .progress-bar {
    background-color: rgba(5, 150, 105, 0.24) !important;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bx-ink) !important;
}

/* lists: invoice overview rows, status lists */
.dashboard-view .invoice-overview-widget-link > .d-flex {
    border-radius: 8px;
    font-variant-numeric: tabular-nums;
    transition: background-color 150ms ease;
}

.dashboard-view .invoice-overview-widget-link:hover > .d-flex {
    background-color: var(--bx-hover);
}

.dashboard-view .card .strong,
.dashboard-view .card .fw-bold {
    font-variant-numeric: tabular-nums;
}

.dashboard-view .card .color-tag.wh10 {
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.05);
}

/* links inside widgets */
.dashboard-view .card a.text-default {
    transition: color 150ms ease;
}

.dashboard-view .card a.text-default:hover {
    color: var(--bx-accent) !important;
}

/* progress bars */
.dashboard-view .progress {
    background-color: var(--bx-track);
    border-radius: 999px;
}

.dashboard-view .progress-bar {
    border-radius: 999px;
}

/* badges */
.dashboard-view .card .badge {
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.01em;
}

/* buttons */
.dashboard-view .card .btn-default {
    border-color: var(--bx-border);
    border-radius: 10px;
    font-weight: 500;
    transition: background-color 150ms ease, border-color 150ms ease;
}

.dashboard-view .card .btn-default:hover {
    background-color: var(--bx-hover);
    border-color: #d8dee9;
}

/* tables (my tasks, todo, ...) */
.dashboard-view .card table.dataTable thead th {
    background-color: var(--bx-subtle);
    color: var(--bx-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--bx-border) !important;
}

.dashboard-view .card table.dataTable tbody td {
    border-color: var(--bx-border);
}

.dashboard-view .card table.dataTable tbody tr:hover > td {
    background-color: var(--bx-hover);
}

/* sticky note: ruled paper; lines scroll with the text */
.dashboard-view .card:has(> #sticky-note-container) .card-header {
    background-color: #fff4c2;
    border-color: #f3e3a0;
}

.dashboard-view .sticky-note {
    display: block;
    padding: 6px 20px 12px;
    background-color: #fff9db;
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 27px, rgba(161, 128, 20, 0.16) 27px, rgba(161, 128, 20, 0.16) 28px);
    background-position: 0 6px;
    background-attachment: local;
    border-radius: 0 0 12px 12px;
    color: #3f3612;
    font-size: 14px;
    line-height: 28px;
    resize: none;
}

/* announcement on top */
.dashboard-view .widget-container > .alert {
    border-radius: 12px;
    border: 1px solid var(--bx-border);
    box-shadow: var(--bx-shadow-sm);
}

/* =========================================================
   List pages + tables (all appTable / DataTables pages)
   Tints use rgba so the dark theme (1E202D) still reads well.
   ========================================================= */

/* page card */
.page-wrapper > .card,
.page-wrapper > .row > [class*="col-"] > .card {
    border: 1px solid var(--bx-border);
    border-radius: var(--bx-radius);
    box-shadow: var(--bx-shadow-sm);
}

.page-title {
    color: var(--bx-ink);
    border-bottom-color: var(--bx-border);
    border-radius: var(--bx-radius) var(--bx-radius) 0 0;
}

.page-title h1,
.page-title h4 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.page-title h4 {
    font-size: 1.15rem;
}

/* toolbar: filters + search */
.filter-section-container {
    padding: 12px 15px;
}

.filter-section-container .btn-default,
.datatable-tools .btn-default {
    border-color: var(--bx-border);
    border-radius: 10px;
    font-weight: 500;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.filter-section-container .btn-default:hover,
.datatable-tools .btn-default:hover {
    background-color: #f8fafc;
    border-color: #d8dee9;
    color: var(--bx-accent);
}

.filter-section-container .select2-choice,
.datatable-tools .select2-choice {
    border-color: var(--bx-border) !important;
    border-radius: 10px;
}

.dt-search input {
    border-color: var(--bx-border);
    border-radius: 10px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.dt-search input:focus {
    background-color: #fff;
    border-color: var(--bx-accent);
    box-shadow: 0 0 0 3px var(--bx-accent-soft);
}

/* header row */
table.dataTable thead th {
    background-color: rgba(15, 23, 42, 0.025);
    border-top: 1px solid var(--bx-border);
    border-bottom: 1px solid var(--bx-border) !important;
    color: var(--bx-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

table.dataTable thead th.dt-ordering-asc,
table.dataTable thead th.dt-ordering-desc {
    color: var(--bx-ink);
}

table.dataTable thead th.dt-orderable-asc:hover,
table.dataTable thead th.dt-orderable-desc:hover {
    color: var(--bx-ink);
}

/* body rows */
.dataTable:not(.js-selection-mode) tbody tr {
    border-color: var(--bx-border) !important;
}

.dataTable:not(.js-selection-mode) tbody tr:hover td {
    background: #f8fafc !important;
}

table.dataTable tbody td {
    vertical-align: middle;
}

/* column alignment: headings line up with their values.
   - Every heading keeps a 20px right gutter for the sort arrow; values in
     right-aligned and centred columns get the same gutter, so right edges
     and centres match (they were 10px apart).
   - app.all.css forces sortable number headings to the left while their
     values stay right-aligned; align them with the values again. */
table.dataTable tbody td.dt-type-numeric,
table.dataTable tbody td.dt-type-date,
table.dataTable tbody td.text-right,
table.dataTable tbody td.text-end,
table.dataTable tbody td.dt-right,
table.dataTable tbody td.dt-body-right,
table.dataTable tbody td.text-center {
    padding-right: 20px !important; /* app.all.css: td { padding: 10px !important } */
}

table.dataTable thead th.dt-orderable-asc.dt-type-numeric,
table.dataTable thead th.dt-orderable-desc.dt-type-numeric {
    text-align: right;
}

table.dataTable tbody .badge {
    border-radius: 6px;
    padding: 0.4em 0.65em;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* empty state */
table.dataTable td.dt-empty {
    padding: 36px 10px 32px !important;
    color: var(--bx-muted);
    font-weight: 500;
}

table.dataTable td.dt-empty::before {
    content: "";
    display: block;
    width: 44px;
    height: 44px;
    margin: 0 auto 10px;
    border-radius: 12px;
    background: var(--bx-accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 12 16 12 14 15 10 15 8 12 2 12'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E") no-repeat center;
}

/* footer: page size, info, pagination */
.dt-info {
    color: var(--bx-muted) !important;
    opacity: 1;
    font-size: 13px;
}

.dt-container .dt-paging .dt-paging-button .page-link {
    border-radius: 8px;
    min-width: 34px;
    text-align: center;
    transition: background-color 150ms ease, color 150ms ease;
}

.dt-container .dt-paging .dt-paging-button .page-link:hover {
    background: #f1f4f9;
    border-color: transparent;
    border-radius: 8px;
}

.dt-container .dt-paging .dt-paging-button.active .page-link {
    background: var(--bx-accent-soft);
    border-color: transparent;
    color: var(--bx-accent) !important;
    font-weight: 600;
    border-radius: 8px;
}

.dt-container .dt-paging .dt-paging-button.disabled .page-link {
    opacity: 0.45;
}

.dt-container .datatable-tools .mini-list-pagination-container {
    border-top-color: var(--bx-border);
}

/* =========================================================
   Global components (every page)
   ========================================================= */

/* Title Case for headings and navigation. Language strings are
   sentence case ("Incident reports"); this only changes how they
   are displayed ("Incident Reports"), not the text itself.
   Detail pages (.page-title.no-bg) show the record's own title
   (ticket subject, client name ...) and are left as typed. */
.page-title:not(.no-bg) h1,
.page-title:not(.no-bg) h4,
.tab-title h4,
.title-tab h4,
.card-header,
.modal-title,
.nav-tabs li a,
.sidebar-menu .menu-text,
.sidebar-menu li ul li a span,
.dashbaord-header-area h4,
.page-title .btn,
.tab-title .btn,
.title-button-group .btn,
.filter-section-container .btn,
.modal-footer .btn {
    text-transform: capitalize;
}

/* incident report details page shows the record title in a plain page-title */
.incident_reports-page .page-title:has(+ .container-fluid) h4 {
    text-transform: none;
}

/* cards */
.page-wrapper .card {
    border-color: var(--bx-border);
    border-radius: var(--bx-radius);
}

.page-wrapper .card .card-header:first-child {
    border-radius: var(--bx-radius) var(--bx-radius) 0 0;
}

.page-wrapper .card .card-header {
    border-color: var(--bx-border);
    font-weight: 600;
}

.page-wrapper .card-footer {
    border-radius: 0 0 var(--bx-radius) var(--bx-radius);
}

.tab-title {
    border-bottom-color: var(--bx-border);
}

.tab-title h4,
.title-tab h4 {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* buttons (btn-group corners are still handled by bootstrap) */
.btn {
    border-radius: 10px;
    font-weight: 500;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.btn-sm {
    border-radius: 8px;
}

.btn-default {
    border-color: var(--bx-border);
}

.btn-default:hover {
    background-color: #f8fafc;
    border-color: #d8dee9;
}

.btn-primary {
    background-color: var(--bx-accent);
    border-color: var(--bx-accent);
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.08), 0 4px 10px -4px rgba(37, 99, 235, 0.45);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
}

/* form fields */
.form-control,
.form-select {
    border-color: #dfe4ec;
    border-radius: 10px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bx-accent);
    box-shadow: 0 0 0 3px var(--bx-accent-soft);
}

.select2-container .select2-choice,
.select2-container-multi .select2-choices {
    border-radius: 10px;
}

/* dropdowns */
.dropdown-menu {
    border: 1px solid var(--bx-border);
    border-radius: 12px;
    box-shadow: var(--bx-shadow-md);
    padding: 6px;
}

.dropdown-item {
    border-radius: 8px;
}

.dropdown-item:active,
.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f1f4f9;
    color: var(--bx-ink);
}

/* modals */
.modal-content {
    border: 0;
    border-radius: 16px;
    box-shadow: 0 24px 48px -12px rgba(16, 24, 40, 0.28);
}

.modal-header {
    border-bottom-color: var(--bx-border);
}

.modal-title {
    font-weight: 600;
    letter-spacing: -0.01em;
}

.modal-footer {
    border-top-color: var(--bx-border);
}

/* tabs */
.nav-tabs li a:not(.active):hover {
    color: var(--bx-accent);
}

.nav-tabs li a.active {
    font-weight: 600;
}

.nav-tabs li a.active::after {
    background-color: var(--bx-accent);
    height: 2px;
    border-radius: 2px;
}

/* ---------- Dark theme (1E202D) compatibility ---------- */

/* tokens carry most of it: borders, hovers, tracks and text follow the theme */
body.color-1E202D {
    --bx-surface: #252932;
    --bx-border: #2f3541;
    --bx-ink: #d3d7e2;
    --bx-text: #898fa9;
    --bx-muted: #8a90a6;
    --bx-hover: #2c313b;
    --bx-subtle: #2a2e38;
    --bx-track: #2f3541;
    --bx-accent-soft: rgba(96, 140, 255, 0.14);
}

body.color-1E202D .dropdown-menu,
body.color-1E202D .page-wrapper .card,
body.color-1E202D .form-control {
    border-color: #2f3541;
}

body.color-1E202D .dropdown-item:hover,
body.color-1E202D .dropdown-item:focus,
body.color-1E202D .btn-default:hover {
    background-color: #2f3541;
    color: #ccc;
}

body.color-1E202D .dt-container .dt-paging .dt-paging-button .page-link:hover {
    background-color: #2f3541;
}

body.color-1E202D .dashboard-view .dashboard-icon-widget .widget-details h1 {
    color: var(--bx-ink) !important;
}

body.color-1E202D .dashboard-view #dashboards-color-tags .color-tag.border-circle {
    box-shadow: 0 0 0 2px var(--bx-surface), 0 0 0 4px var(--bx-accent);
}

/* the theme paints every card and card-body with !important */
body.color-1E202D .dashboard-view .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) .card {
    box-shadow: none !important;
}

body.color-1E202D .dashboard-view > .row:not(.dashboards-row) + .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) .card,
body.color-1E202D .dashboard-view > .row:not(.dashboards-row) + .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) .card-body {
    background-color: transparent !important;
}

body.color-1E202D .dashboard-view > .row:not(.dashboards-row) + .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) .widget-details h1 {
    color: #fff !important;
}

body.color-1E202D .dashboard-view > .row:not(.dashboards-row) + .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) .widget-details span,
body.color-1E202D .dashboard-view > .row:not(.dashboards-row) + .dashboards-row:has(.widget-icon):not(:has(.card:not(.dashboard-icon-widget))) .widget-details .bg-transparent-white {
    color: var(--bx-console-text) !important;
}

body.color-1E202D .dashboard-view .sticky-note {
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 27px, rgba(255, 255, 255, 0.05) 27px, rgba(255, 255, 255, 0.05) 28px);
}

/* ---------- Sign in (signin/index.php + its three forms) ----------
   Split shell: a navy "today" panel drawn as this week's calendar
   columns (today's column lit, like the sidebar's active row), and a
   plain white form column. Below 992px the panel becomes a top band. */

.signin-page {
    background-color: var(--bx-surface);
}

.signin-shell {
    position: fixed;
    inset: 0;
    overflow-y: auto;
    display: grid;
    grid-template-columns: clamp(380px, 40vw, 600px) minmax(0, 1fr);
}

/* panel */
.signin-aside {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 36px 40px 132px;
    overflow: hidden;
    background-color: var(--bx-console-bg);
    color: #fff;
}

/* an uploaded sign-in background is multiplied into the navy as texture instead of replacing it */
.signin-aside.has-photo {
    background-image: var(--signin-photo);
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
}

.signin-week {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    margin: 0;
    padding: 0;
    list-style: none;
}

.signin-week li {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding-bottom: 40px;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(214, 223, 240, 0.4);
    font-size: 12px;
    font-weight: 500;
}

.signin-week li:first-child {
    border-inline-start: 0;
}

.signin-week b {
    font-family: var(--bx-figure-font);
    font-stretch: 112%;
    font-size: 16px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: rgba(214, 223, 240, 0.56);
}

.signin-week li.is-today {
    position: relative;
    background-color: rgba(110, 150, 255, 0.09);
    color: var(--bx-side-accent);
}

.signin-week li.is-today b {
    color: #fff;
}

.signin-week li.is-today::after {
    content: "";
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    height: 3px;
    background-color: var(--bx-side-accent);
}

.signin-brand,
.signin-today {
    position: relative;
}

.signin-brand {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #fff;
}

.signin-today {
    margin-top: auto;
}

.signin-today[hidden] {
    display: none;
}

.signin-today-day {
    margin-bottom: 6px;
    font-size: 16px;
    font-weight: 500;
    color: var(--bx-console-text);
}

.signin-today-date {
    font-family: var(--bx-figure-font);
    font-stretch: 112%;
    font-size: clamp(44px, 4.4vw, 68px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.015em;
    color: #fff;
}

.signin-today-time {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    font-family: var(--bx-figure-font);
    font-size: 17px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--bx-console-text);
}

.signin-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--bx-live);
    box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.16);
}

/* form column */
.signin-main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--bx-surface);
}

.signin-page .form-signin {
    width: 100%;
    max-width: 448px;
    margin: auto;
    padding: 56px 24px;
}

/* app.all.css makes the footer absolute on phones; keep it at the bottom of the form column */
.signin-page .footer {
    position: static;
    border-top-color: var(--bx-border);
    color: var(--bx-muted);
    font-size: 13px;
}

.signin-logo {
    display: block;
    max-width: 180px;
    max-height: 40px;
    margin-bottom: 36px;
}

.signin-title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--bx-ink);
}

.signin-intro {
    margin: 0 0 32px;
    font-size: 14.5px;
    line-height: 1.55;
    color: var(--bx-muted);
}

.signin-form .form-group {
    margin-bottom: 20px;
}

.signin-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13.5px;
    font-weight: 500;
    color: #334155;
}

.signin-page .signin-form .form-control {
    height: 46px;
    padding: 0 14px;
    border: 1px solid #d5dce6;
    background-color: var(--bx-surface);
    color: var(--bx-ink);
    font-size: 15px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.signin-page .signin-form .form-control:hover {
    border-color: #b9c3d2;
}

.signin-page .signin-form .form-control:focus {
    border-color: var(--bx-accent);
    background-color: var(--bx-surface);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.signin-page .signin-form .has-error .form-control {
    border-color: #dc2626;
    color: var(--bx-ink);
}

.signin-page .signin-form .has-error .form-control:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.14);
}

.signin-page .signin-form .has-error .help-block {
    margin: 7px 0 0;
    font-size: 13px;
    color: #dc2626;
}

/* label and "Forgot password?" share a row; the link sits after the field in the DOM */
.signin-password-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
}

.signin-password-group > .signin-label {
    grid-row: 1;
    grid-column: 1;
}

.signin-password-group > .signin-forgot {
    grid-row: 1;
    grid-column: 2;
    margin-bottom: 7px;
    font-size: 13.5px;
    font-weight: 500;
}

.signin-password-group > .signin-password {
    grid-row: 2;
    grid-column: 1 / -1;
}

.signin-password {
    position: relative;
}

.signin-page .signin-form .signin-password .form-control {
    padding-inline-end: 48px;
}

.signin-reveal {
    position: absolute;
    top: 5px;
    inset-inline-end: 5px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--bx-muted);
}

.signin-reveal:hover {
    background-color: var(--bx-hover);
    color: var(--bx-ink);
}

.signin-reveal .signin-reveal-hide,
.signin-reveal.is-revealed .signin-reveal-show {
    display: none;
}

.signin-reveal.is-revealed .signin-reveal-hide {
    display: block;
}

.signin-page a {
    color: var(--bx-accent);
    text-decoration: none;
}

.signin-page a:hover {
    color: #1d4ed8;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.signin-page a:focus-visible,
.signin-reveal:focus-visible {
    outline: 2px solid var(--bx-accent);
    outline-offset: 2px;
    border-radius: 6px;
}

.signin-page .signin-submit {
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: none;
}

.signin-page .signin-submit:focus-visible {
    box-shadow: 0 0 0 2px var(--bx-surface), 0 0 0 4px var(--bx-accent);
}

/* server-side errors (wrong password etc.) */
.signin-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background-color: #fef2f2;
    color: #b91c1c;
    font-size: 13.5px;
    line-height: 1.45;
}

.signin-alert svg {
    flex: none;
    margin-top: 1px;
}

/* ajax result on the reset forms, tinted like the error box above */
.signin-body .app-alert {
    margin-bottom: 22px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background-color: #fef2f2;
    color: #b91c1c;
    font-size: 13.5px;
    line-height: 1.45;
}

.signin-body .app-alert.alert-success {
    border-color: #a7f3d0;
    background-color: #ecfdf5;
    color: #047857;
}

.signin-body .app-alert .btn-close {
    filter: none;
    opacity: 0.45;
    transform: scale(0.8);
}

.signin-body .app-alert-message {
    max-width: none;
}

/* plugin sign-in methods (passkey): their <hr> becomes an "or" divider.
   flow-root keeps the hr's margin inside, so the label's top matches the line */
.signin-extension {
    position: relative;
    display: flow-root;
}

.signin-extension hr {
    margin: 28px 0 24px;
    border: 0;
    border-top: 1px solid var(--bx-border);
    opacity: 1;
}

.signin-extension:has(> hr:first-child)::before {
    content: attr(data-or-label);
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0 12px;
    background-color: var(--bx-surface);
    color: var(--bx-muted);
    font-size: 13px;
}

.signin-extension .form-group {
    margin-bottom: 0;
}

.signin-extension .btn-default {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    border: 1px solid #d5dce6;
    border-radius: 10px;
    background-color: var(--bx-surface);
    color: var(--bx-ink);
    font-size: 14.5px;
    font-weight: 500;
}

.signin-extension .btn-default:hover {
    border-color: #b9c3d2;
    background-color: var(--bx-subtle);
}

.signin-alt {
    margin: 32px 0 0;
    font-size: 14px;
    color: var(--bx-muted);
}

.signin-alt a {
    font-weight: 500;
}

@media (max-width: 991.98px) {
    .signin-shell {
        grid-template-columns: minmax(0, 1fr);
        align-content: start;
    }

    .signin-aside {
        position: static;
        height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 18px 24px;
    }

    .signin-week,
    .signin-today-day {
        display: none;
    }

    .signin-today {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-top: 0;
    }

    .signin-today-date {
        font-size: 15px;
        letter-spacing: 0;
    }

    .signin-today-time {
        margin-top: 0;
        font-size: 14px;
    }

    .signin-main {
        min-height: 0;
    }

    .signin-page .form-signin {
        margin: 0 auto;
        padding: 44px 20px 48px;
    }
}
