/* ============================================================
   SISIJE ONE — INSTITUTIONAL GEOMETRY v2
   Creative Direction: Premium Workforce Operating System
   
   What changed and why:
   
   TYPOGRAPHY: Inter → DM Sans (body) + DM Serif Display (display moments)
   DM Sans has optical precision Inter lacks. It sits with authority at
   small sizes and carries warmth that Inter's neutrality denies. DM Serif
   Display is reserved for institutional moments only — login headline,
   dashboard greeting. One serif occurrence per screen maximum. This is
   how luxury type systems work: restraint creates impact.
   
   COLOUR: Bronze deepened to #9B6F3F. Ink to #080C10. Sand warmer at #F0EBE1.
   The previous palette was correct in direction but timid in execution.
   These values have the same warmth but more gravity.
   
   SIDEBAR ACTIVE STATE: Replaced inset border with a filled low-contrast
   pill. The left-border slash reads as engineering. The pill reads as
   considered product design.
   
   SHADOW SYSTEM: Rebuilt with three distinct depth levels. Warm-tinted
   shadows (not neutral grey) create material coherence with the palette.
   
   SURFACES: Added --surface-elevated for modals/dropdowns. The z-axis
   now has four legible steps: bg → surface → surface-2 → elevated.
   
   SPACING: Sidebar width to 248px. Topbar to 60px. These are not
   arbitrary — they align to an 8pt grid and feel proportionally correct
   at 1440px viewport.
   
   LOGIN PANEL: Gradient replaced with a true deep ink background with
   a subtle warm noise texture via SVG filter. The h1 now renders in
   DM Serif Display. The form panel has increased breathing room.
   ============================================================ */


/* ── Design Tokens ─────────────────────────────────────────── */

:root {
    /* Layout */
    --sidebar-w: 248px;
    --topbar-h: 60px;
    /* Surfaces — four legible depth steps */
    --sidebar-bg: #0E1219;
    /* true ink */
    --sidebar-border: rgba(255, 255, 255, 0.07);
    --topbar-bg: rgba(253, 252, 250, 0.96);
    /* warm glass */
    --topbar-border: var(--border-color);
    --bg: var(--surface-app);
    /* warm sand */
    --surface: var(--surface-card);
    /* warm paper */
    --surface-2: var(--surface-inset);
    /* soft paper */
    --surface-elevated: var(--surface-card-raised);
    /* modals, dropdowns */
    --border: var(--divider);
    --border-light: rgba(14, 18, 25, 0.055);
    --border-strong: var(--divider-strong);
    /* Brand — deepened */
    --accent: var(--copper-500);
    /* deep bronze */
    --accent-hover: var(--copper-400);
    --accent-soft: var(--copper-tint-12);
    --accent-subtle: rgba(184, 115, 51, 0.06);
    --primary: var(--copper-500);
    /* deep slate */
    --primary-hover: var(--copper-400);
    --primary-soft: var(--copper-tint-12);
    /* Aliases */
    --blue: var(--primary);
    --blue-hover: var(--primary-hover);
    --blue-soft: var(--primary-soft);
    /* Sidebar states */
    --sidebar-active-bg: var(--copper-tint-12);
    --sidebar-active-bar: var(--accent);
    --sidebar-text: rgba(240, 235, 225, 0.72);
    --sidebar-text-hover: var(--offwhite-500);
    --sidebar-icon-size: 18px;
    /* Text */
    --text-primary: #0E1219;
    --text-secondary: rgba(14, 18, 25, 0.68);
    --text-muted: rgba(14, 18, 25, 0.46);
    /* Type */
    --font-sans: "Satoshi", "Satoshi Fallback", -apple-system, "Segoe UI", sans-serif;
    --font-serif: "Satoshi", "Satoshi Fallback", -apple-system, "Segoe UI", sans-serif;
    /* Radii — tighter, more architectural */
    --r-xs: 4px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 22px;
    /* Shadows — warm-tinted, three depth levels */
    --shadow-sm: var(--shadow-1);
    --shadow-md: var(--shadow-2);
    --shadow-lg: var(--shadow-3);
    --shadow-xl: var(--shadow-4);
    /* Motion */
    --ease: cubic-bezier(0.32, 0, 0.16, 1);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --duration: 0.16s;
    --duration-slow: 0.28s;
}

/* Module catalogue and operational health */
.module-health-header {
    align-items: flex-end;
    gap: 1rem;
}

.module-health-eyebrow {
    margin: 0 0 0.35rem;
    color: var(--accent, #a86b2a);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.module-health-generated {
    color: var(--text-muted, #697180);
    font-size: 0.82rem;
}

.module-health-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.module-health-stat {
    padding: 1rem 1.15rem;
    border: 1px solid rgba(15, 18, 22, 0.1);
    border-radius: 0.75rem;
    background: #fff;
}

.module-health-stat strong,
.module-health-stat span {
    display: block;
}

.module-health-stat strong { font-size: 1.6rem; }
.module-health-stat span { color: var(--text-muted, #697180); font-size: 0.82rem; }
.module-health-stat--alert strong { color: #a23b32; }

.module-health-card { margin-bottom: 1.25rem; }
.module-health-section-heading h2 { margin: 0; font-size: 1rem; }
.module-health-section-heading p { margin: 0.3rem 0 1rem; color: var(--text-muted, #697180); font-size: 0.86rem; }
.module-health-table { min-width: 760px; margin-bottom: 0; }
.module-health-table td small { display: block; color: var(--text-muted, #697180); }
.module-dependency { white-space: nowrap; }
.module-dependency--compatible::before { content: "✓ "; color: #17633a; font-weight: 700; }
.module-dependency--incompatible::before { content: "! "; color: #8b2f28; font-weight: 700; }

.module-health-badge {
    display: inline-flex;
    padding: 0.3rem 0.58rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.module-health--healthy { color: #17633a; background: #e5f5eb; }
.module-health--degraded { color: #8b2f28; background: #fbe8e6; }
.module-health--unknown { color: #66531b; background: #fff3cf; }
.module-health--disabled { color: #58606d; background: #eceff3; }
.module-health-empty,
.module-health-note { padding: 1rem; border-radius: 0.65rem; background: #fff; color: var(--text-muted, #697180); }
.module-health-note { border-left: 3px solid var(--accent, #a86b2a); }

@media (max-width: 767.98px) {
    .module-health-header { align-items: flex-start; }
    .module-health-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
    .module-health-summary { grid-template-columns: 1fr; }
}


/* ── Reset ──────────────────────────────────────────────────── */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "kern" 1, "liga" 1;
}


/* Headings: DM Sans by default. DM Serif reserved for .serif-moment only. */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-sans);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.015em;
}


/* The one serif class — use once per screen maximum */

.serif-moment {
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: -0.01em;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    color: var(--blue-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* ── App Shell ──────────────────────────────────────────────── */

.app-main {
    margin-left: var(--sidebar-w);
    margin-top: var(--topbar-h);
    padding: 2.25rem 2.5rem;
    min-height: calc(100vh - var(--topbar-h));
}


/* ── Sidebar ────────────────────────────────────────────────── */

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    z-index: 200;
    border-right: 1px solid var(--sidebar-border);
    transition: transform var(--duration-slow) var(--ease);
    overflow: hidden;
}


/* Brand / logo area */

.sidebar-brand {
    padding: 0 1.375rem;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.sidebar-logo-icon {
    width: 32px;
    height: 32px;
    background: var(--accent);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-on-accent);
    flex-shrink: 0;
    /* Micro-texture: subtle inner shadow to give depth */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

.sidebar-logo-icon-svg {
    width: 28px;
    height: 28px;
    display: block;
    color: var(--offwhite-500);
}

.sidebar-logo-text {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: -0.01em;
}

.sidebar-logo-text strong {
    font-weight: 700;
    color: var(--offwhite-500);
}


/* Nav list */

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.4rem 0 1.2rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.34);
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 6px 0.875rem;
}


/* Section labels */

.sidebar-section-label {
    font-family: var(--font-sans);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.22);
    padding: 1.35rem 0.625rem 0.45rem;
    margin: 0 !important;
}


/* Nav link */

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.82rem 1.05rem;
    border-radius: var(--r-sm);
    color: var(--sidebar-text);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 480;
    text-decoration: none;
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease), transform var(--duration) var(--ease);
    cursor: pointer;
    border: none;
    width: 100%;
    background: transparent;
    text-align: left;
    position: relative;
    letter-spacing: -0.005em;
}

.sidebar-link:hover {
    background: rgba(155, 111, 63, 0.08);
    color: var(--sidebar-text-hover);
}


/* Active state: filled pill — not a slash */

.sidebar-link.active {
    background: rgba(155, 111, 63, 0.08);
    color: rgba(240, 235, 225, 0.98);
    font-weight: 600;
}


/* Bronze dot indicator — precise and minimal */

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 18px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}

.sidebar-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--sidebar-icon-size);
    flex-shrink: 0;
    position: relative;
}


/* SVG icons */

.sidebar-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-right: 8px;
    flex: 0 0 22px;
}


/* SVG icons */

.sidebar-icon-svg {
    width: 18px;
    height: 18px;
    display: block;
    opacity: 0.9;
    transition: opacity var(--duration) var(--ease), transform var(--duration) var(--ease), color var(--duration) var(--ease);
    /* Ensure visibility on dark sidebar */
    color: rgba(240, 235, 225, 0.9);
    /* Force SVG icons to use stroke-based rendering */
    stroke: currentColor;
    fill: none;
    stroke-width: 1.6;
}


/* Ensure all inline SVG paths inherit stroke correctly */

.sidebar-icon-svg path,
.sidebar-icon-svg line,
.sidebar-icon-svg polyline,
.sidebar-icon-svg rect,
.sidebar-icon-svg circle {
    stroke: currentColor;
    fill: none;
}

.sidebar-link:hover .sidebar-icon-svg {
    opacity: 1;
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.sidebar-link.active .sidebar-icon-svg {
    opacity: 1;
}

.sidebar-link.active .sidebar-icon-svg {
    color: var(--offwhite-500);
}


/* Badge sits cleanly over icon */

.sidebar-icon .sidebar-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 10px;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--sidebar-bg);
    font-weight: 700;
}

.sidebar-label {
    flex: 1;
    white-space: nowrap;
}


/* Task badge on sidebar icon */

.sidebar-badge {
    position: absolute;
    top: -5px;
    right: -6px;
    background: var(--accent);
    color: var(--text-on-accent);
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    line-height: 1;
}


/* Chevron toggle */

#adminChevron {
    font-size: 10px;
    transition: transform var(--duration) var(--ease);
    opacity: 0.5;
}

#adminChevron.rotated {
    transform: rotate(90deg);
}


/* Sub-menu */

.sidebar-sub {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s var(--ease);
}

.sidebar-sub.open {
    max-height: 400px;
}

.sidebar-sub li {
    margin: 3px 0 3px 1.5rem;
}

.sidebar-sub-link {
    display: block;
    padding: 0.55rem 0.8rem;
    border-radius: var(--r-sm);
    color: rgba(255, 255, 255, 0.40);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: background var(--duration) var(--ease), color var(--duration) var(--ease), transform var(--duration) var(--ease);
    letter-spacing: -0.005em;
}

.sidebar-sub-link:hover,
.sidebar-sub-link.active {
    background: rgba(155, 111, 63, 0.07);
    color: rgba(255, 255, 255, 0.88);
}

.sidebar-sub-link:hover {
    transform: translateX(1px);
}


/* Sidebar footer — user avatar */

.sidebar-footer {
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--sidebar-border);
    flex-shrink: 0;
    position: relative;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.5rem 0.625rem;
    border-radius: var(--r-sm);
    transition: background var(--duration);
}

.sidebar-user:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sidebar-user-name {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.90);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.sidebar-user-role {
    display: block;
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.38);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
}


/* User dropdown from footer */

.sidebar-user-dropdown {
    bottom: 100%;
    top: auto;
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    margin-bottom: 0.5rem;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    background: var(--surface-elevated);
}


/* ── Top Bar ────────────────────────────────────────────────── */

.app-topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    height: var(--topbar-h);
    background: var(--topbar-bg);
    border-bottom: 1px solid var(--topbar-border);
    display: flex;
    align-items: center;
    padding: 0 2rem;
    gap: 1rem;
    z-index: 150;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.topbar-hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
}

.topbar-title {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.topbar-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--r-sm);
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 1rem;
    transition: background var(--duration), color var(--duration);
}

.topbar-icon-btn:hover {
    background: rgba(14, 18, 25, 0.06);
    color: var(--text-primary);
}

.topbar-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--accent);
    color: var(--text-on-accent);
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    pointer-events: none;
}


/* ── Notification Panel ─────────────────────────────────────── */

.notification-panel {
    width: 340px;
    padding: 0;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    background: var(--surface-elevated);
}

.notification-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    letter-spacing: -0.01em;
}

.notification-mark-all {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--blue);
}

.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.notification-empty i {
    font-size: 1.5rem;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background var(--duration);
}

.notification-item:hover {
    background: var(--surface-2);
}


/* ── Home Dashboard ─────────────────────────────────────────── */

.home-shell {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.home-shell>* {
    animation: home-fade-up 0.42s var(--ease) both;
}

.home-shell>*:nth-child(2) {
    animation-delay: 0.04s;
}

.home-shell>*:nth-child(3) {
    animation-delay: 0.08s;
}

.home-shell>*:nth-child(4) {
    animation-delay: 0.12s;
}

.home-notification {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    overflow-wrap: anywhere;
}

.home-notification-icon {
    font-size: 1.1rem;
}

.home-notification-message {
    min-width: 0;
}

.home-notification .btn-close {
    position: static;
    padding: 0.75rem;
}

.home-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.85rem 1.9rem;
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(253, 252, 250, 0.98));
    box-shadow: var(--shadow-sm);
}

.home-hero-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.home-avatar,
.home-initials {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    flex-shrink: 0;
}

.home-avatar {
    object-fit: cover;
    border: 1px solid var(--border);
}

.home-initials {
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.home-hero-copy h1 {
    margin: 0;
    font-size: 1.8rem;
    font-family: var(--font-serif);
    font-weight: 400;
    letter-spacing: -0.03em;
    line-height: 0.98;
}

.home-hero-copy p {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.84rem;
    line-height: 1.45;
}

.home-hero-date {
    color: var(--text-muted);
    font-size: 0.875rem;
    white-space: nowrap;
}

.home-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.2rem;
}

.dashboard-grid--masonry {
    grid-auto-rows: 8px;
    align-items: start;
}

.sidebar-icon-glyph {
    width: 1rem;
    text-align: center;
    font-size: 0.9rem;
    transition: transform 0.22s cubic-bezier(0.32, 0, 0.16, 1);
}

.sidebar-sub-link .sidebar-icon-glyph {
    width: 13px;
    margin-right: 7px;
    opacity: 0.7;
}

.sidebar-icon-glyph.rotated {
    transform: rotate(90deg);
}

.dashboard-widget {
    min-width: 0;
}

.dashboard-widget > .home-card,
.dashboard-widget > .home-section {
    height: 100%;
}

.dashboard-grid--masonry .dashboard-widget > .home-card,
.dashboard-grid--masonry .dashboard-widget > .home-section {
    height: auto;
}

.dashboard-widget--span-3 { grid-column: span 3; }
.dashboard-widget--span-6 { grid-column: span 6; }
.dashboard-widget--span-8 { grid-column: span 8; }
.dashboard-widget--span-12 { grid-column: span 12; }

.dashboard-state {
    padding: 2rem;
    border: 1px dashed var(--border);
    border-radius: var(--r-lg);
    background: var(--surface);
    text-align: center;
}

.dashboard-state h2 {
    margin: 0 0 0.45rem;
    font-size: 1rem;
}

.dashboard-state p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.home-card {
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform var(--duration-slow) var(--ease), box-shadow var(--duration-slow) var(--ease), border-color var(--duration) var(--ease);
}

.home-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.home-card-head,
.home-section-head {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-card-head h2,
.home-section-head h3 {
    margin: 0;
    font-size: 0.7rem;
    line-height: 1.3;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.home-card-body {
    padding: 1.2rem;
    flex: 1;
}

.home-card-foot {
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 0.7rem;
}

.home-info {
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-info li {
    display: flex;
    justify-content: space-between;
    gap: 0.9rem;
    border-bottom: 1px solid var(--border-light);
    padding: 0.7rem 0;
}

.home-info li:first-child {
    padding-top: 0;
}

.home-info li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.home-label {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.home-value {
    font-weight: 600;
    font-size: 0.87rem;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.7rem;
    margin-bottom: 0.9rem;
}

/* Training compliance module disclosure list */
.training-module-status {
    margin-bottom: .75rem;
    overflow: hidden;
    border: 1px solid var(--border-color, rgba(14, 18, 25, .09));
    border-radius: var(--radius-md, .5rem);
    background: var(--surface-card, #fdfcfa);
}

.training-module-status__summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 1.25rem;
    align-items: center;
    gap: 1.25rem;
    min-height: 4.25rem;
    padding: .9rem 1rem;
    cursor: pointer;
    list-style: none;
}

.training-module-status__identity {
    display: flex;
    align-items: baseline;
    min-width: 0;
    gap: .45rem;
}

.training-module-status__title {
    overflow: hidden;
    color: var(--text-primary, #0e1219);
    font-size: .92rem;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.training-module-status__version {
    flex: 0 0 auto;
    color: var(--text-tertiary, rgba(14, 18, 25, .46));
    font-size: .75rem;
    letter-spacing: .02em;
}

.training-module-status__count {
    justify-self: end;
    min-width: 5.25rem;
    padding: .35rem .65rem;
    border: 1px solid rgba(184, 115, 51, .22);
    border-radius: 999px;
    background: var(--accent-soft, rgba(184, 115, 51, .12));
    color: var(--text-accent, #a2632a);
    font-size: .72rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

.training-module-status__summary::-webkit-details-marker {
    display: none;
}

.training-module-status__summary::after {
    content: "›";
    justify-self: end;
    color: var(--text-tertiary, rgba(14, 18, 25, .46));
    font-size: 1.4rem;
    line-height: 1;
    transform: rotate(90deg);
    transition: transform .15s ease;
}

@media (max-width: 575.98px) {
    .training-module-status__summary {
        grid-template-columns: minmax(0, 1fr) auto 1rem;
        gap: .65rem;
    }

    .training-module-status__identity {
        align-items: flex-start;
        flex-direction: column;
        gap: .15rem;
    }

    .training-module-status__count {
        min-width: auto;
    }
}

.training-module-status[open] > .training-module-status__summary::after {
    transform: rotate(-90deg);
}

.training-module-status__summary:hover,
.training-module-status__summary:focus-visible {
    background: var(--surface-hover, rgba(14, 18, 25, .04));
}

.training-module-status__summary:focus-visible {
    outline: 2px solid var(--accent, #b87333);
    outline-offset: -2px;
}

.training-module-status__content {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--divider, rgba(14, 18, 25, .09));
}

.home-stats--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-stat {
    border: 1px solid var(--border-light);
    border-radius: var(--r-sm);
    padding: 0.9rem 0.7rem 0.8rem;
    text-align: center;
    background: var(--surface-2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.home-stat strong {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: -0.03em;
}

.home-stat span {
    color: var(--text-muted);
    font-size: 0.72rem;
    line-height: 1.35;
}

.home-progress {
    height: 4px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(8, 12, 16, 0.08);
    box-shadow: inset 0 1px 2px rgba(8, 12, 16, 0.08);
}

.home-progress>span {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: inherit;
}

.home-note {
    margin-top: 0.7rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.home-note--flush {
    margin-top: 0;
}

.home-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.home-list--spaced {
    margin-top: 0.9rem;
}

.home-item {
    border: 1px solid var(--border-light);
    border-radius: var(--r-sm);
    padding: 0.85rem 0.9rem;
    background: var(--surface-2);
}

.home-item--link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.home-item--link:hover {
    background: var(--surface-2);
    border-color: var(--border);
    color: inherit;
    transform: translateY(-1px);
}

.home-item--link:hover .home-item-title {
    color: var(--accent);
}

.home-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
}

.home-item-title {
    font-weight: 600;
    font-size: 0.87rem;
    margin: 0;
}

.home-item-title--truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-item-sub {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

.home-item-ext {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    flex-shrink: 0;
}

.home-section {
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.home-badge {
    border: 1px solid rgba(155, 111, 63, 0.2);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    color: var(--accent);
    background: var(--accent-soft);
    font-size: 0.72rem;
    font-weight: 700;
}

.home-row {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    transition: background var(--duration) var(--ease);
}

.home-row:hover {
    background: var(--surface-2);
}

.home-row:last-child {
    border-bottom: 0;
}

.home-row-user {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.home-row-meta {
    margin: 0.12rem 0 0;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}

@keyframes home-fade-up {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 720px) {
    .home-stats--four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-notification {
        align-items: start;
        gap: 0.625rem;
        padding: 0.875rem;
    }
    .home-notification .btn-close {
        margin-top: -0.25rem;
        margin-right: -0.25rem;
    }
    .home-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    .home-hero-date {
        white-space: normal;
    }
    .home-card-foot {
        flex-direction: column;
    }
    .dashboard-widget--span-3,
    .dashboard-widget--span-6,
    .dashboard-widget--span-8,
    .dashboard-widget--span-12 {
        grid-column: span 12;
    }
    .home-row > .d-flex {
        width: 100%;
    }
    .home-row > .d-flex .btn,
    .home-row > .d-flex form {
        flex: 1;
    }
    .home-row > .d-flex form .btn {
        width: 100%;
    }
}

@media (min-width: 721px) and (max-width: 1100px) {
    .dashboard-widget--span-3,
    .dashboard-widget--span-6 {
        grid-column: span 6;
    }
    .dashboard-widget--span-8,
    .dashboard-widget--span-12 {
        grid-column: span 12;
    }
}

.notification-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    margin-top: 5px;
}

.notification-title {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
    letter-spacing: -0.01em;
}

.notification-msg {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.45;
}


/* ── Mobile Overlay ─────────────────────────────────────────── */

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.40);
    z-index: 190;
    backdrop-filter: blur(3px);
}


/* ── Cards ──────────────────────────────────────────────────── */

.card,
.card-profile {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--duration-slow) var(--ease), transform var(--duration-slow) var(--ease);
}

.card:hover,
.card-profile:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-light);
    padding: 0 0 1rem 0;
    margin-bottom: 1rem;
}

.card-body {
    padding: 0;
}


/* Card headings */

.card h4,
.card h5,
.card-profile h4,
.card-profile h5 {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card h5 i,
.card-profile h5 i {
    color: var(--accent);
    font-size: 0.875rem;
}

hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 1rem 0;
}


/* ── Buttons ────────────────────────────────────────────────── */

.btn {
    font-family: var(--font-sans);
    font-weight: 600;
    border-radius: var(--r-sm);
    transition: all var(--duration) var(--ease);
    letter-spacing: -0.01em;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-on-accent);
    box-shadow: 0 1px 2px rgba(8, 12, 16, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(8, 12, 16, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--surface);
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn-outline-secondary {
    border-color: var(--border-strong);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.btn-sm {
    font-size: 0.8125rem;
    padding: 0.3125rem 0.75rem;
}


/* ── Forms ──────────────────────────────────────────────────── */

.form-control,
.form-select {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    padding: 0.5625rem 0.875rem;
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color var(--duration), box-shadow var(--duration);
    letter-spacing: -0.005em;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(25, 37, 53, 0.10);
    outline: none;
    background: var(--surface-elevated);
}

.form-label {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
    letter-spacing: -0.005em;
}

textarea.form-control {
    resize: vertical;
    min-height: 88px;
}


/* ── Dropdowns ──────────────────────────────────────────────── */

.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-xl);
    padding: 0.375rem;
    font-size: 0.875rem;
    background: var(--surface-elevated);
}

.dropdown-item {
    border-radius: var(--r-xs);
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-family: var(--font-sans);
    font-weight: 500;
    transition: background var(--duration), color var(--duration);
    letter-spacing: -0.005em;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--surface-2);
    color: var(--text-primary);
}

.dropdown-item.text-danger {
    color: var(--accent) !important;
}

.dropdown-item.text-danger:hover {
    background: var(--accent-subtle);
}

.dropdown-header {
    font-family: var(--font-sans);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.5rem 0.75rem 0.25rem;
}

.dropdown-divider {
    border-color: var(--border-light);
    margin: 0.375rem 0;
}


/* ── Avatar images ──────────────────────────────────────────── */

.sidebar-avatar,
.topbar-avatar,
.team-member-avatar {
    object-fit: cover;
    border-radius: 50%;
}

.profile-photo-wrapper img.rounded-circle,
img.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-md);
}

.avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}


/* ── Pagination ─────────────────────────────────────────────── */

.page-link {
    border-radius: var(--r-sm) !important;
    border: 1px solid var(--border);
    color: var(--blue);
    font-size: 0.8125rem;
    margin: 0 2px;
    font-family: var(--font-sans);
}

.page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
}


/* ── Utility / misc ─────────────────────────────────────────── */

.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--text-primary) !important;
}

.bg-light {
    background: var(--surface-2) !important;
}


/* Header toolbars */

.header-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    padding: 1rem 1.5rem;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}

.header-toolbar select,
.header-toolbar input {
    padding: 0.4375rem 0.75rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    font-size: 0.875rem;
    font-family: var(--font-sans);
    background: var(--surface);
    color: var(--text-primary);
}


/* Focus rings */

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: var(--r-sm);
}


/* Scrollbar */

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(14, 18, 25, 0.12);
    border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(14, 18, 25, 0.22);
}


/* ============================================================
   LOGIN PAGE — Architectural weight
   ============================================================ */

.login-page {
    margin: 0;
    min-height: 100vh;
    background: var(--surface-2);
    color: var(--text-primary);
}

.login-shell {
    max-width: 1080px;
    margin: 0 auto;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}


/* Brand panel: true ink, no gradient blur — gravity */

.login-brand-panel {
    background: var(--sidebar-bg);
    color: var(--offwhite-500);
    display: flex;
    align-items: center;
    padding: 3.5rem;
    position: relative;
    overflow: hidden;
}


/* Subtle warm tonal circle — texture, not decoration */

.login-brand-panel::before {
    content: '';
    position: absolute;
    width: 480px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(155, 111, 63, 0.12) 0%, transparent 70%);
    top: -120px;
    right: -160px;
    pointer-events: none;
}

.login-brand-panel::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(155, 111, 63, 0.07) 0%, transparent 70%);
    bottom: -80px;
    left: -60px;
    pointer-events: none;
}

.login-brand-content {
    position: relative;
    z-index: 1;
}

.login-brand-content h1 {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 400;
    color: var(--offwhite-500);
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.login-brand-mark {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(155, 111, 63, 0.12);
    border: 1px solid rgba(155, 111, 63, 0.28);
    margin-bottom: 2rem;
    color: rgba(240, 235, 225, 0.90);
}

.login-brand-mark svg {
    width: 26px;
    height: 26px;
    display: block;
}

.login-brand-tagline {
    margin-top: 0.75rem;
    margin-bottom: 1.25rem;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: -0.01em;
    color: rgba(240, 235, 225, 0.80);
}

.login-brand-kicker {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    display: block;
    margin-bottom: 1rem;
}

.login-brand-content p {
    color: rgba(255, 255, 255, 0.52);
    margin-bottom: 2rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    max-width: 340px;
}

.login-points {
    list-style: none;
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.login-points li {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.45);
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.5;
}

.login-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
}


/* Form panel */

.login-form-panel {
    background: var(--surface-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem;
    border-left: 1px solid var(--border);
}

.login-form-card {
    width: 100%;
    max-width: 360px;
}

.login-form-card h2 {
    font-family: var(--font-sans);
    font-size: 1.625rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    letter-spacing: -0.025em;
    color: var(--text-primary);
}

.login-form-card>p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

.login-form label {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 0.3125rem;
    letter-spacing: -0.005em;
}

.login-form input {
    width: 100%;
    padding: 0.6875rem 0.9375rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--r-sm);
    font-size: 0.9rem;
    font-family: var(--font-sans);
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color var(--duration), box-shadow var(--duration), background var(--duration);
    letter-spacing: -0.005em;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(25, 37, 53, 0.10);
    background: var(--surface-elevated);
}

.login-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: var(--text-on-accent);
    border: none;
    border-radius: var(--r-sm);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--duration), transform var(--duration), box-shadow var(--duration);
    margin-top: 0.375rem;
    letter-spacing: -0.01em;
    box-shadow: 0 1px 2px rgba(8, 12, 16, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.login-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(8, 12, 16, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.login-help {
    display: block;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-align: center;
    margin-top: 1.375rem;
}


/* ── Responsive ─────────────────────────────────────────────── */

@media (max-width: 900px) {
    .app-sidebar {
        transform: translateX(-100%);
    }
    .app-sidebar.sidebar-open {
        transform: translateX(0);
        box-shadow: var(--shadow-xl);
    }
    .sidebar-overlay.active {
        display: block;
    }
    .app-topbar {
        left: 0;
    }
    .app-main {
        margin-left: 0;
    }
    .topbar-hamburger {
        display: flex;
    }
    .login-shell {
        grid-template-columns: 1fr;
    }
    .login-brand-panel {
        display: none;
    }
}

@media (max-width: 640px) {
    .app-main {
        padding: 1.25rem 1rem;
    }
    .header-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
}


/* ============================================================
   GROUP A — Page component styles
   Dashboard · Profile · Tasks · Leave
   ============================================================ */


/* ── Page header (shared) ───────────────────────────────────── */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-title {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
    letter-spacing: -0.025em;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.page-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}


/* ── Dashboard greeting ─────────────────────────────────────── */

.dash-greeting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}


/* The single serif moment per screen — the greeting H1 */

.dash-greeting-text h1 {
    font-family: var(--font-serif);
    font-size: 1.875rem;
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
    line-height: 1.15;
}

.dash-greeting-text p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
    font-family: var(--font-sans);
}

.dash-greeting-avatar {
    display: block;
    flex-shrink: 0;
    border-radius: 50%;
    transition: opacity 0.15s;
}

.dash-greeting-avatar:hover {
    opacity: 0.85;
}


/* ── Dashboard two-column layout ────────────────────────────── */

.dash-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    align-items: start;
}

.dash-main {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.dash-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}


/* ── Dashboard cards ────────────────────────────────────────── */

.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 1.375rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--duration-slow) var(--ease);
}


/* Urgent cards: left bronze rule, not a thick bar */

.dash-card--urgent {
    border-left: 2px solid var(--accent);
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dash-card-title {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
}

.dash-card-title i {
    color: var(--accent);
    font-size: 0.875rem;
}

.dash-card-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}


/* Count badges */

.dash-count-badge {
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 100px;
    padding: 0.2em 0.65em;
    background: var(--surface-2);
    color: var(--text-muted);
    border: 1px solid var(--border);
    letter-spacing: 0;
}

.dash-count-badge--coral {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: rgba(155, 111, 63, 0.18);
}

.dash-count-badge--blue {
    background: var(--blue-soft);
    color: var(--blue);
    border-color: rgba(25, 37, 53, 0.14);
}


/* Empty states */

.dash-empty {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0;
}


/* ── Action list ────────────────────────────────────────────── */

.dash-action-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dash-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    gap: 1rem;
}

.dash-action-row:last-child {
    border-bottom: none;
}

.dash-action-row-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.dash-action-name {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.dash-action-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 1px;
}


/* ── Task stat tiles ────────────────────────────────────────── */

.task-stat-tiles {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.task-stat-tile {
    flex: 1;
    min-width: 100px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    box-shadow: var(--shadow-sm);
}

.task-stat-num {
    font-family: var(--font-sans);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.task-stat-num--coral {
    color: var(--accent);
}

.task-stat-num--amber {
    color: var(--warning-500);
}

.task-stat-num--green {
    color: var(--success-500);
}

.task-stat-num--blue {
    color: var(--blue);
}

.task-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
    letter-spacing: 0;
}


/* ── Full-page empty state ──────────────────────────────────── */

.empty-page-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5rem 2rem;
    text-align: center;
    color: var(--text-muted);
    gap: 0.75rem;
}

.empty-page-state i {
    font-size: 2.5rem;
    opacity: 0.2;
}

.empty-page-state h3 {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
    letter-spacing: -0.015em;
}

.empty-page-state p {
    font-size: 0.9rem;
    margin: 0;
    max-width: 320px;
}


/* ── Profile page ──────────────────────────────────────────── */

.profile-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-hero-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.profile-hero-avatar-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.profile-hero-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-md);
}

.profile-hero-avatar-edit {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-elevated);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform var(--duration), box-shadow var(--duration), color var(--duration);
    box-shadow: var(--shadow-sm);
}

.profile-hero-avatar-edit:hover {
    transform: translateY(-1px);
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.profile-hero-name {
    margin: 0 0 0.25rem;
    font-size: 2rem;
    line-height: 1.1;
}

.profile-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.profile-hero-tag {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.22rem 0.62rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--surface-2);
}

.profile-hero-tag--dept {
    background: var(--blue-soft);
    border-color: rgba(25, 37, 53, 0.14);
    color: var(--blue);
}

.profile-hero-tag--inactive {
    background: var(--accent-soft);
    border-color: rgba(155, 111, 63, 0.18);
    color: var(--accent);
}

.profile-hero-manager {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.profile-tabs {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 1rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.profile-tabs::-webkit-scrollbar {
    display: none;
}

.profile-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.5rem 0.625rem;
    border-radius: var(--r-sm) var(--r-sm) 0 0;
    border: 1px solid transparent;
    border-bottom: none;
    white-space: nowrap;
}

.profile-tab.active {
    color: var(--text-primary);
    background: var(--surface);
    border-color: var(--border-light);
}

.profile-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    padding: 0 0.35rem;
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--text-on-accent);
    background: var(--accent);
}

.profile-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.25rem;
    align-items: start;
}

.profile-main,
.profile-sidebar {
    min-width: 0;
}

.profile-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.profile-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
}

.profile-info-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-muted);
}

.profile-info-value {
    font-size: 0.875rem;
    color: var(--text-primary);
}

.profile-report-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-light);
}

.profile-report-row:last-child {
    border-bottom: none;
}

.profile-report-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    margin-right: auto;
}

.profile-report-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.profile-report-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.profile-note {
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-light);
}

.profile-note:last-child {
    border-bottom: none;
}

.profile-note-content {
    margin: 0 0 0.2rem;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.profile-note-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.profile-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    text-align: center;
    color: var(--text-muted);
}


/* ── Responsive adjustments ─────────────────────────────────── */

@media (max-width: 1024px) {
    .dash-layout {
        grid-template-columns: 1fr;
    }
    .dash-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .profile-body {
        grid-template-columns: 1fr;
    }
    .profile-info-grid {
        grid-template-columns: 1fr;
    }
    .profile-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    .task-stat-tiles {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
    .dash-sidebar {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   GROUP B — Leave team tab styles
   ============================================================ */

.leave-team-section {
    border-bottom: 1px solid var(--border-light);
}

.leave-team-section:last-child {
    border-bottom: none;
}

.leave-team-section-label {
    font-family: var(--font-sans);
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.75rem 1.5rem 0.375rem;
}


/* ============================================================
   GROWTH OBJECTIVES
   ============================================================ */

.growth-obj-row {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
}

.growth-obj-row:last-child {
    border-bottom: none;
}

.growth-obj-body {
    flex: 1;
    min-width: 0;
}

.growth-obj-title {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    letter-spacing: -0.01em;
}

.growth-obj-meta {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.growth-obj-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.growth-obj-date--overdue {
    color: var(--accent);
    font-weight: 600;
}

.growth-obj-actions {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.growth-reject-form {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.growth-reject-input {
    width: 160px;
    font-size: 0.8125rem !important;
}

@media (max-width: 640px) {
    .growth-obj-row {
        flex-direction: column;
    }
    .growth-obj-actions {
        width: 100%;
    }
    .growth-reject-input {
        width: 100%;
    }
}


/* ============================================================
   SISIJE ONE — INSTITUTIONAL GEOMETRY (ICON + LOGIN POLISH)
   ============================================================ */


/* Login mark + tagline */

.login-brand-tagline {
    margin-top: 0;
    margin-bottom: 0;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: rgba(240, 235, 225, 0.80);
}


/* ============================================================
   SISIJE ONE — BRAND CONSISTENCY PATCH
   Targets Bootstrap utility classes used across all views.
   Does NOT override .card-header (already defined correctly
   in site.css). Only targets Bootstrap colour variants.
   ============================================================ */


/* ── Badge overrides ────────────────────────────────────────── */

.badge {
    font-family: var(--font-sans);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    border-radius: 100px;
    padding: 0.25em 0.65em;
}

.badge.bg-success,
.badge.bg-success.text-white {
    background-color: rgba(25, 37, 53, 0.10) !important;
    color: var(--primary) !important;
}

.badge.bg-warning,
.badge.bg-warning.text-dark {
    background-color: var(--accent-soft) !important;
    color: var(--accent) !important;
}

.badge.bg-danger,
.badge.bg-danger.text-white {
    background-color: rgba(155, 111, 63, 0.12) !important;
    color: var(--accent) !important;
}

.badge.bg-secondary,
.badge.bg-secondary.text-white {
    background-color: rgba(14, 18, 25, 0.07) !important;
    color: var(--text-muted) !important;
}

.badge.bg-info,
.badge.bg-info.text-dark,
.badge.bg-info.text-white {
    background-color: var(--primary-soft) !important;
    color: var(--primary) !important;
}

.badge.bg-primary,
.badge.bg-primary.text-white {
    background-color: var(--primary-soft) !important;
    color: var(--primary) !important;
}

.badge.bg-dark,
.badge.bg-dark.text-white {
    background-color: rgba(14, 18, 25, 0.12) !important;
    color: var(--text-secondary) !important;
}


/* Badge inside card-header count pill */

.card-header .badge.bg-white {
    background-color: var(--surface-2) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border);
}


/* ── Card header Bootstrap colour variants ONLY ─────────────── */


/* Only override the coloured Bootstrap variants (bg-success etc.)
   The base .card-header is already correct in site.css above.   */

.card-header.bg-white {
    background-color: var(--surface) !important;
    color: inherit !important;
}

.card-header.bg-success {
    background-color: var(--surface) !important;
    color: var(--text-muted) !important;
}

.card-header.bg-warning {
    background-color: var(--surface) !important;
    color: var(--text-muted) !important;
}

.card-header.bg-danger {
    background-color: var(--surface) !important;
    color: var(--text-muted) !important;
}

.card-header.bg-primary {
    background-color: var(--surface) !important;
    color: var(--text-muted) !important;
}

.card-header.bg-secondary {
    background-color: var(--surface) !important;
    color: var(--text-muted) !important;
}

.card-header.bg-info {
    background-color: var(--surface) !important;
    color: var(--text-muted) !important;
}

.card-header.bg-dark {
    background-color: var(--surface) !important;
    color: var(--text-muted) !important;
}


/* ── Table row tints ────────────────────────────────────────── */

.table-success,
.table-success>td,
.table-success>th {
    background-color: rgba(25, 37, 53, 0.04) !important;
}

.table-warning,
.table-warning>td,
.table-warning>th {
    background-color: rgba(155, 111, 63, 0.05) !important;
}

.table-danger,
.table-danger>td,
.table-danger>th {
    background-color: rgba(155, 111, 63, 0.08) !important;
}


/* ── Bootstrap progress bar ─────────────────────────────────── */

.progress {
    height: 6px;
    border-radius: 100px;
    background-color: var(--surface-inset);
    overflow: hidden;
}

.progress-bar {
    background-color: var(--accent) !important;
    font-size: 0;
    border-radius: 100px;
}


/* ── Stat number colour variants ────────────────────────────── */

.task-stat-num--green {
    color: var(--primary) !important;
}

.task-stat-num--amber {
    color: var(--accent) !important;
}

.dash-task-stat-num--green {
    color: var(--primary) !important;
}


/* ── Timesheet tab active state ─────────────────────────────── */

.timesheet-tab.active {
    color: var(--text-primary) !important;
    border-bottom-color: var(--accent) !important;
}


/* ── Bootstrap alerts ───────────────────────────────────────── */

/* Each status keeps its own hue: tint + 38% border + coloured label.
   The previous rules collapsed success/danger/warning onto two colours. */
.alert-success {
    background-color: var(--success-tint) !important;
    border-color: var(--success-border) !important;
    color: var(--success-500) !important;
}

.alert-danger {
    background-color: var(--error-tint) !important;
    border-color: var(--error-border) !important;
    color: var(--error-500) !important;
}

.alert-warning {
    background-color: var(--warning-tint) !important;
    border-color: var(--warning-border) !important;
    color: var(--warning-500) !important;
}

.alert-info {
    background-color: var(--info-tint) !important;
    border-color: var(--info-border) !important;
    color: var(--info-500) !important;
}

.alert-secondary {
    background-color: var(--surface-2) !important;
    border-color: var(--border) !important;
    color: var(--text-secondary) !important;
}


/* ── Table striping / hover / borders ───────────────────────── */

.table-striped>tbody>tr:nth-of-type(odd)>* {
    background-color: rgba(8, 12, 16, 0.02) !important;
    color: inherit;
}

.table-bordered> :not(caption)>*>* {
    border-color: var(--border-light) !important;
}

.table-hover>tbody>tr:hover>* {
    background-color: rgba(155, 111, 63, 0.04) !important;
    color: inherit;
}

.table-light,
thead.table-light>tr>th {
    background-color: var(--surface-2) !important;
    color: var(--text-muted) !important;
    border-color: var(--border-light) !important;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--border-light);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--text-primary);
}

.table th {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom-color: var(--border) !important;
}


/* ── bg-light utility ───────────────────────────────────────── */

.bg-light {
    background-color: var(--surface-2) !important;
}


/* ── Pending team badge ─────────────────────────────────────── */

.dash-count-badge--coral {
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
    border-color: rgba(155, 111, 63, 0.2) !important;
}


/* ============================================================
   GLOBAL BUTTON NORMALISATION
   Replaces all Bootstrap blue/green/red/yellow button variants
   with brand-consistent alternatives sitewide.
   ============================================================ */


/* btn-outline-primary → brand soft button */

.btn-outline-primary {
    background: var(--surface) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-strong) !important;
    box-shadow: var(--shadow-sm) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--surface-2) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-strong) !important;
    transform: translateY(-1px);
}


/* btn-outline-warning → muted accent */

.btn-outline-warning {
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(155, 111, 63, 0.25) !important;
}

.btn-outline-warning:hover {
    background: var(--accent) !important;
    color: var(--surface) !important;
    border-color: var(--accent) !important;
}


/* btn-outline-danger → muted danger */

.btn-outline-danger {
    background: rgba(155, 111, 63, 0.08) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(155, 111, 63, 0.25) !important;
}

.btn-outline-danger:hover {
    background: var(--accent) !important;
    color: var(--surface) !important;
    border-color: var(--accent) !important;
}


/* btn-warning → muted accent surface */

.btn-warning {
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
    border: 1px solid rgba(155, 111, 63, 0.25) !important;
    box-shadow: none !important;
}

.btn-warning:hover {
    background: var(--accent) !important;
    color: var(--surface) !important;
}


/* btn-link → subtle text link, no blue */

.btn-link {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--text-accent) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.btn-link:hover {
    color: var(--accent-hover) !important;
}


/* ── Page header pattern ─────────────────────────────────────
   For views that use a bare <h2> at the top, give them
   consistent spacing. Doesn't override .page-header class.     */

.app-main>h2:first-child,
.app-main>.container>h2:first-child {
    font-family: var(--font-serif);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
}


/* ── Admin panel & generic table pages ───────────────────────
   Wrap plain tables that aren't inside .card in a surface shell */

.table-responsive:not(.card *):not(.card-profile *) {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}


/* ── Pending-section (Dashboard.cshtml legacy) ───────────────
   Neutralise the coloured gradient header bands               */

.pending-section {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--r-lg) !important;
    box-shadow: var(--shadow-sm) !important;
}

.pending-section .ph {
    background: var(--surface-2) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border) !important;
    font-family: var(--font-sans) !important;
    font-size: 0.8125rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
}


/* ── Inline stat colours (Dashboard legacy) ─────────────────
   Hardcoded green/red/purple stat numbers → brand colours     */

.val[style*="#ef4444"],
.val[style*="color:var(--error-500)"] {
    color: var(--accent) !important;
}

.val[style*="#22c55e"],
.val[style*="color:var(--success-500)"] {
    color: var(--primary) !important;
}

.val[style*="#f59e0b"],
.val[style*="color:var(--warning-500)"] {
    color: var(--accent) !important;
}


/* ── team card (bg-light rounded border) ────────────────────
   Direct reports card in Dashboard                            */

.d-flex.align-items-center.gap-3.p-3.border.rounded-3.bg-light {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    border-radius: var(--r-md) !important;
}


/* ── Progress bars (Dashboard db-card legacy) ───────────────*/

.prog-bar-wrap {
    height: 5px;
    background: var(--border-light);
    border-radius: 100px;
    overflow: hidden;
    margin: 8px 0 4px;
}

.prog-bar-fill {
    height: 100%;
    background: var(--accent) !important;
    border-radius: 100px;
}


/* ── Dashboard db-card header icon ──────────────────────────
   Replace coloured icon boxes with neutral surface squares   */

.db-card-header .icon {
    width: 28px;
    height: 28px;
    border-radius: var(--r-sm);
    background: var(--surface-2) !important;
    color: var(--accent) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    flex-shrink: 0;
}


/* ── Onboarding template table — emoji column headers ───────
   Give emoji-labelled <th> cells consistent small-caps style  */

.table th[title] {
    font-size: 0.6875rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}


/* ── task-stat-num--blue → use primary colour ───────────────*/

.task-stat-num--blue {
    color: var(--primary) !important;
}


/* ── form-select & form-control — normalise focus ring ──────*/

.form-control:focus,
.form-select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(155, 111, 63, 0.12) !important;
}


/* ============================================================
   GLOBAL BUTTON PALETTE NORMALISATION
   Every Bootstrap colour variant → brand palette
   Covers: Admin, Leave, Onboarding, Workflows, Objectives
   ============================================================ */


/* btn-success → primary ink (confirm/approve/activate) */

.btn-success {
    background: var(--primary) !important;
    color: var(--text-on-accent) !important;
    border-color: var(--primary) !important;
    box-shadow: none !important;
}

.btn-success:hover,
.btn-success:focus {
    background: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
    color: var(--text-on-accent) !important;
}

.btn-success:disabled {
    background: var(--surface-2) !important;
    color: var(--text-muted) !important;
    border-color: var(--border) !important;
}


/* btn-outline-success → ink outline (approve/assign/start onboarding) */

.btn-outline-success {
    background: transparent !important;
    color: var(--primary) !important;
    border: 1px solid var(--primary) !important;
}

.btn-outline-success:hover,
.btn-outline-success:focus {
    background: var(--primary) !important;
    color: var(--text-on-accent) !important;
    border-color: var(--primary) !important;
}


/* btn-danger → accent bronze (destructive confirm: delete/reset) */

.btn-danger {
    background: var(--accent) !important;
    color: var(--text-on-accent) !important;
    border-color: var(--accent) !important;
    box-shadow: none !important;
}

.btn-danger:hover,
.btn-danger:focus {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    color: var(--text-on-accent) !important;
}


/* btn-info / btn-outline-info → neutral surface */

.btn-info {
    background: var(--surface-2) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(15, 18, 22, 0.18) !important;
    box-shadow: none !important;
}

.btn-info:hover,
.btn-info:focus {
    background: var(--surface) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.btn-outline-info {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border: 1px solid rgba(15, 18, 22, 0.18) !important;
}

.btn-outline-info:hover,
.btn-outline-info:focus {
    background: var(--surface-2) !important;
    color: var(--text-primary) !important;
    border-color: var(--primary) !important;
}


/* Growth page: Complete / Reopen / Delete — scoped for white-card context */

.growth-obj-actions .btn-outline-success {
    background: transparent !important;
    color: var(--primary) !important;
    border-color: rgba(28, 42, 58, 0.35) !important;
}

.growth-obj-actions .btn-outline-success:hover {
    background: var(--primary) !important;
    color: var(--text-on-accent) !important;
    border-color: var(--primary) !important;
}


/* "Reopen" — soft bronze, lighter touch */

.growth-obj-actions .btn-outline-warning {
    background: transparent !important;
    color: var(--accent) !important;
    border-color: rgba(162, 122, 78, 0.35) !important;
}

.growth-obj-actions .btn-outline-warning:hover {
    background: var(--accent) !important;
    color: var(--text-on-accent) !important;
    border-color: var(--accent) !important;
}

.growth-obj-actions .btn-outline-secondary {
    background: transparent !important;
    color: var(--text-muted) !important;
    border-color: rgba(15, 18, 22, 0.20) !important;
}

.growth-obj-actions .btn-outline-secondary:hover {
    background: rgba(220, 38, 38, 0.06) !important;
    color: var(--error-500) !important;
    border-color: rgba(220, 38, 38, 0.30) !important;
}

/* Restricted onboarding shell: deliberately excludes all application navigation. */
.onboarding-restricted-header {
    min-height: 78px;
    padding: 0.85rem clamp(1rem, 4vw, 3.5rem);
    background: #0e1219;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 3px solid var(--accent, #ed7709);
    box-shadow: 0 4px 18px rgba(14, 18, 25, 0.18);
}

.onboarding-restricted-header span {
    display: block;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.8rem;
}

.onboarding-restricted-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.onboarding-restricted-brand strong {
    display: block;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1.1;
    letter-spacing: 0.14em;
}

.onboarding-restricted-brand img {
    width: 46px;
    height: 46px;
}

.onboarding-restricted-kicker {
    margin-left: auto;
    margin-right: 0.5rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(237, 119, 9, 0.45);
    border-radius: 999px;
    color: #f2c397;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.onboarding-restricted-main {
    width: min(960px, calc(100% - 2rem));
    margin: 0 auto;
    padding: clamp(1rem, 4vw, 3rem) 0;
    font-size: 1rem;
    line-height: 1.55;
}

/* The restricted journey is a reading and completion experience, not a dense
   administration screen. Keep its essential text comfortably legible. */
.onboarding-restricted-main .small,
.onboarding-restricted-main small,
.onboarding-restricted-main .form-text,
.onboarding-restricted-main .page-subtitle {
    font-size: 0.875rem !important;
    line-height: 1.45;
}

.onboarding-restricted-main .card-header,
.onboarding-restricted-main .form-label,
.onboarding-restricted-main dt,
.onboarding-restricted-main dd,
.onboarding-restricted-main .table,
.onboarding-restricted-main .form-control,
.onboarding-restricted-main .form-select,
.onboarding-restricted-main textarea,
.onboarding-restricted-main .btn {
    font-size: 0.9375rem;
}

.onboarding-restricted-main .form-control,
.onboarding-restricted-main .form-select,
.onboarding-restricted-main .btn {
    min-height: 42px;
}

.onboarding-restricted-main .badge {
    font-size: 0.75rem;
    line-height: 1.25;
    padding: 0.35rem 0.55rem;
}

.onboarding-support {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--border, #d9dee8);
    border-radius: 0.5rem;
    color: var(--text-muted, #5f6877);
    background: #fff;
}

.setup-kicker {
    margin: 0 0 0.35rem;
    color: var(--accent);
    font-size: var(--fs-overline);
    font-weight: 700;
    letter-spacing: var(--ls-overline);
    text-transform: uppercase;
}

.setup-progress-summary {
    min-width: 88px;
    text-align: right;
}

.setup-progress-summary strong,
.setup-progress-summary span {
    display: block;
}

.setup-progress-summary strong { font-size: 1.5rem; }
.setup-progress-summary span { color: var(--text-muted); font-size: 0.875rem; }
.setup-progress { height: 8px; }

.setup-section-grid {
    display: grid;
    gap: 0.75rem;
}

.setup-section-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.125rem;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #d9dee8);
    border-radius: var(--r-lg, 0.75rem);
}

.setup-section-card.is-current {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(155, 111, 63, 0.10);
}

.setup-section-number {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--surface-2, #f4f1eb);
    color: var(--text-secondary);
    font-weight: 700;
}

.setup-section-copy h2 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
}

.setup-status { font-size: 0.8125rem; font-weight: 600; }
.setup-status--complete { color: var(--success-600, #15803d); }
.setup-status--progress { color: var(--accent); }
.setup-status--optional,
.setup-status--pending { color: var(--text-muted); }
.setup-status--attention { color: var(--error-500, #dc2626); }

@media (max-width: 575.98px) {
    .setup-section-card { grid-template-columns: auto minmax(0, 1fr); }
    .setup-section-card form { grid-column: 1 / -1; }
    .setup-section-card .btn { width: 100%; }
}

@media (max-width: 575.98px) {
    .onboarding-restricted-header {
        min-height: 70px;
    }

    .onboarding-restricted-brand img {
        width: 38px;
        height: 38px;
    }

    .onboarding-restricted-kicker {
        display: none;
    }

    .onboarding-restricted-header span {
        display: block;
        margin-left: 0;
        font-size: 0.8rem;
    }
}
