/* ============================================================
   SUSCOM — Unified Design System  ·  v2  "Outlined Flat"
   Neutral, semi-flat, outline-first UI with a SUBTLE logo-red accent.
   Loaded last (after style.css) to fully override the INSPINIA base.

   Design language
   ---------------
   • Surfaces are white, separated by 1px hairline borders (the primary
     visual device) — not by shadows. Shadows are whisper-soft, used only
     for elevation on hover / overlays.
   • Geometry is calm: small consistent radii, no gradients.
   • Colour is mostly slate/neutral; the logo red appears sparingly as the
     single brand accent (primary CTA, active nav, links, focus rings).
   ============================================================ */

:root {
    /* Brand — Materialize primary (materialize-red · coral) */
    --su-red-50:  #fdeaea;
    --su-red-100: #fbd9da;
    --su-red-200: #f8c1c3;
    --su-red-300: #f3989b;
    --su-red-400: #ee6e73;   /* primary / brand — Materialize $primary-color */
    --su-red-500: #ea4c52;
    --su-red-600: #e51c23;   /* materialize-red base */
    --su-red-700: #c0181e;
    --su-red-800: #9e1419;
    --su-red-900: #7a0f13;

    --su-primary:       #ee6e73;
    --su-primary-hover: #e84a50;
    --su-primary-soft:  #fdeeef;
    --su-primary-line:  #f8c1c3;

    /* Neutrals — Slate */
    --su-slate-50:  #f8fafc;
    --su-slate-100: #f1f5f9;
    --su-slate-200: #e8edf2;
    --su-slate-300: #cbd5e1;
    --su-slate-400: #94a3b8;
    --su-slate-500: #64748b;
    --su-slate-600: #475569;
    --su-slate-700: #334155;
    --su-slate-800: #1e293b;
    --su-slate-900: #0f172a;

    /* Semantic */
    --su-ink:         #0f172a;   /* headings / primary text */
    --su-body:        #334155;   /* body text */
    --su-muted:       #64748b;   /* secondary text */
    --su-faint:       #94a3b8;   /* placeholders / hints */
    --su-line:        #e6eaf0;   /* hairline borders */
    --su-line-strong: #d7dee7;   /* stronger borders / inputs */
    --su-bg:          #f5f6f8;   /* app background */
    --su-surface:     #ffffff;   /* cards / panels */

    --su-success:    #16a34a;  --su-success-bg: #f0fdf4;  --su-success-line:#bbf7d0;
    --su-info:       #2563eb;  --su-info-bg:    #eff6ff;  --su-info-line:   #bfdbfe;
    --su-warning:    #d97706;  --su-warning-bg: #fffbeb;  --su-warning-line:#fde68a;
    --su-danger:     #dc2626;  --su-danger-bg:  #fef2f2;  --su-danger-line: #fecaca;

    /* Radius — semi-flat */
    --su-radius-xs: 5px;
    --su-radius-sm: 7px;
    --su-radius:    9px;
    --su-radius-lg: 12px;
    --su-radius-pill: 999px;

    /* Shadows — whisper soft (outline-first) */
    --su-shadow-xs: 0 1px 1px rgba(15, 23, 42, 0.03);
    --su-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
    --su-shadow:    0 6px 16px -8px rgba(15, 23, 42, 0.14);
    --su-shadow-md: 0 12px 28px -12px rgba(15, 23, 42, 0.18);
    --su-shadow-lg: 0 24px 48px -16px rgba(15, 23, 42, 0.22);

    --su-ring: 0 0 0 3px rgba(238, 110, 115, 0.22);

    --su-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --su-ease: cubic-bezier(0.4, 0, 0.2, 1);

    --su-gap: 18px;          /* floating-shell gutter — used for every edge so all panels align */
    --su-sidebar-w: 250px;
    --su-sidebar-mini: 72px;
    --su-topbar-h: 60px;
}

/* ============================================================
   APP SHELL  (full-height fixed sidebar + scrollable content)
   ============================================================ */
html, body {
    height: 100% !important;
    margin: 0;
    padding: 0;
    overflow: hidden !important;
    background: var(--su-bg) !important;
}
html body {
    font-family: var(--su-font) !important;
    color: var(--su-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    letter-spacing: -0.003em;
}

#wrapper {
    height: 100vh !important;
    width: 100% !important;
    position: relative;
    overflow: hidden !important;
    background: var(--su-bg);
}

#page-wrapper,
html body #page-wrapper,
#page-wrapper.gray-bg {
    position: fixed !important;
    top: 0; right: 0; bottom: 0;
    left: calc(var(--su-sidebar-w) + var(--su-gap));
    margin: 0 !important;
    width: auto !important;
    height: 100vh;
    background: var(--su-bg) !important;
    overflow-x: hidden;
    overflow-y: auto;
    transition: left .25s var(--su-ease);
    -webkit-overflow-scrolling: touch;
}

/* When no sidebar is rendered (e.g. password-change gate) */
#wrapper > #page-wrapper:first-child { left: 0; }

body.mini-navbar #page-wrapper,
html body.mini-navbar #page-wrapper {
    left: calc(var(--su-sidebar-mini) + var(--su-gap));
}

/* Content rhythm — same gutter as the floating shell so cards line up with the topbar */
.wrapper-content,
.wrapper.wrapper-content { padding: var(--su-gap) !important; }
.row { margin-left: -12px; margin-right: -12px; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5 {
    font-family: var(--su-font) !important;
    color: var(--su-ink);
    font-weight: 700;
    letter-spacing: -0.02em;
}
a { color: var(--su-primary); transition: color .18s var(--su-ease); }
a:hover { color: var(--su-primary-hover); text-decoration: none; }

.text-primary { color: var(--su-primary) !important; }
.text-success { color: var(--su-success) !important; }
.text-info    { color: var(--su-info) !important; }
.text-warning { color: var(--su-warning) !important; }
.text-danger  { color: var(--su-danger) !important; }
.text-muted   { color: var(--su-muted) !important; }
.font-bold, .font-weight-bold { font-weight: 600 !important; }
small, .small { font-size: 82%; }
::selection { background: var(--su-red-100); color: var(--su-red-800); }

/* The INSPINIA base ships a broken global rule: `img { width:200px; height:100px; margin:0 0 10px 30px; ... }`.
   Reset images to natural behaviour app-wide; individual components set their own dimensions. */
img {
    width: auto;
    height: auto;
    max-width: 100%;
    margin: 0;
    opacity: 1;
    overflow: visible;
    border-radius: 0;
    object-fit: fill;
    display: inline-block;
}

/* ============================================================
   SIDEBAR  (light, outlined)
   ============================================================ */
.su-sidebar {
    position: fixed;
    top: var(--su-gap); left: var(--su-gap);
    width: var(--su-sidebar-w);
    height: calc(100vh - var(--su-gap) * 2);
    background: var(--su-surface);
    border: 1px solid var(--su-line);
    border-radius: var(--su-radius-lg);
    box-shadow: var(--su-shadow);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: width .25s var(--su-ease), transform .25s var(--su-ease);
}
.su-sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: center;          /* logo centered */
    height: var(--su-topbar-h);
    min-height: var(--su-topbar-h);
    padding: 0 16px;
    border-bottom: 1px solid var(--su-line);
    flex-shrink: 0;
}
.su-sidebar__brand a { display: inline-flex; align-items: center; justify-content: center; }
.su-sidebar__brand img.su-logo-full { height: 28px; width: auto; max-width: 168px; object-fit: contain; }
.su-sidebar__brand img.su-logo-mini { height: 30px; width: auto; max-width: 38px; object-fit: contain; display: none; }

.su-nav {
    list-style: none;
    margin: 0;
    padding: 8px 10px 18px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
}
.su-nav__section {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--su-faint);
    padding: 14px 11px 5px;
}
.su-nav__item { margin: 1px 0; position: relative; }

.su-nav__link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 7px 11px;
    border-radius: var(--su-radius-xs);
    color: var(--su-slate-600);
    font-size: .855rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s var(--su-ease), color .15s var(--su-ease), border-color .15s var(--su-ease);
}
.su-nav__link:hover {
    background: var(--su-slate-50);
    color: var(--su-ink);
    text-decoration: none;
}
.su-nav__icon {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--su-slate-400);
    flex-shrink: 0;
    transition: color .15s var(--su-ease);
}
.su-nav__link:hover .su-nav__icon { color: var(--su-slate-600); }
.su-nav__label {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.su-nav__caret {
    font-size: 10px;
    color: var(--su-slate-400);
    transition: transform .2s var(--su-ease);
    flex-shrink: 0;
}
.su-nav__item.is-open > .su-nav__link .su-nav__caret { transform: rotate(90deg); }

/* Active item */
.su-nav__item.active > .su-nav__link,
.su-nav__link.active {
    background: var(--su-primary-soft);
    color: var(--su-primary);
    border-color: var(--su-primary-line);
    font-weight: 600;
}
.su-nav__item.active > .su-nav__link .su-nav__icon,
.su-nav__link.active .su-nav__icon { color: var(--su-primary); }

/* Left rail on active */
.su-nav__item.active > .su-nav__link::before {
    content: "";
    position: absolute;
    left: 0; top: 7px; bottom: 7px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--su-primary);
}

/* Submenu */
.su-submenu {
    list-style: none;
    margin: 1px 0 3px 19px;
    padding: 2px 0 2px 12px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .25s var(--su-ease), opacity .2s var(--su-ease);
    border-left: 1px solid var(--su-line);
}
.su-submenu.show { max-height: 1400px; opacity: 1; }
.su-submenu .su-nav__link { padding: 6px 11px; font-size: .8rem; color: var(--su-slate-500); }
.su-submenu .su-nav__icon { font-size: 12px; width: 15px; }
.su-submenu .su-nav__link.active,
.su-submenu .su-nav__item.active > .su-nav__link {
    background: var(--su-primary-soft);
    color: var(--su-primary);
    border-color: transparent;
    font-weight: 600;
}
.su-submenu .su-nav__item.active > .su-nav__link::before { display: none; }

/* Collapsed (mini) sidebar */
body.mini-navbar .su-sidebar { width: var(--su-sidebar-mini); }
body.mini-navbar .su-sidebar__brand { justify-content: center; padding: 0; }
body.mini-navbar .su-sidebar__brand img.su-logo-full { display: none; }
body.mini-navbar .su-sidebar__brand img.su-logo-mini { display: inline-block; height: 30px; width: auto; max-width: 40px; }
body.mini-navbar .su-nav { padding: 8px 8px 18px; }
body.mini-navbar .su-nav__section { text-align: center; padding: 12px 0 5px; font-size: 0; }
body.mini-navbar .su-nav__label,
body.mini-navbar .su-nav__caret { display: none; }
body.mini-navbar .su-nav__link { justify-content: center; padding: 9px 0; gap: 0; }
body.mini-navbar .su-nav__icon { width: auto; font-size: 15px; }
body.mini-navbar .su-submenu { display: none; }
body.mini-navbar .su-nav__item.active > .su-nav__link::before { display: none; }

/* Sidebar scrollbar */
.su-nav::-webkit-scrollbar { width: 8px; }
.su-nav::-webkit-scrollbar-thumb { background: var(--su-slate-200); border-radius: 999px; }
.su-nav::-webkit-scrollbar-thumb:hover { background: var(--su-slate-300); }

/* ============================================================
   TOPBAR  (flat, outlined)
   ============================================================ */
/* Sticky frame that masks the top gutter as content scrolls beneath the floating bar */
.su-topbar-wrap {
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: var(--su-gap) var(--su-gap) 0 var(--su-gap);
    background: var(--su-bg);
}
.su-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: var(--su-topbar-h);
    padding: 0 16px;
    background: var(--su-surface);
    border: 1px solid var(--su-line);
    border-radius: var(--su-radius-lg);
    box-shadow: var(--su-shadow);
}
.su-topbar__left, .su-topbar__right { display: flex; align-items: center; gap: 14px; }
.su-topbar__welcome { font-size: .9rem; color: var(--su-muted); line-height: 1.2; }
.su-topbar__welcome strong { color: var(--su-ink); font-weight: 600; text-transform: capitalize; }

.su-icon-btn {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--su-line-strong);
    border-radius: var(--su-radius-sm);
    background: var(--su-surface);
    color: var(--su-slate-600);
    font-size: 15px;
    cursor: pointer;
    transition: all .15s var(--su-ease);
}
.su-icon-btn:hover {
    background: var(--su-slate-50);
    color: var(--su-ink);
    border-color: var(--su-slate-300);
    text-decoration: none;
}

/* Topbar controls — one shared height so the toggle, Contact button and profile sit on a single baseline */
.su-topbar .su-icon-btn { width: 42px; height: 42px; }
.su-topbar > .su-topbar__right .btn { height: 42px; }

/* Profile chip */
.su-profile {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 12px 0 5px;
    margin: 0;
    border: 1px solid var(--su-line);
    border-radius: var(--su-radius-pill);
    background: var(--su-surface);
    cursor: pointer;
    font-family: var(--su-font);
    line-height: 1;
    transition: background .15s var(--su-ease), border-color .15s var(--su-ease);
}
.su-profile:hover,
.su-profile[aria-expanded="true"] {
    border-color: var(--su-slate-300);
    background: var(--su-slate-50);
    text-decoration: none;
}
.su-profile:focus { outline: none; box-shadow: var(--su-ring); }
.su-profile__avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid var(--su-line);
    background: var(--su-slate-100);
    display: block;
}
.su-profile__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.su-profile__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    line-height: 1.2;
    text-align: left;
}
.su-profile__name {
    font-size: .85rem; font-weight: 600; color: var(--su-ink);
    max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.su-profile__role {
    font-size: .72rem; color: var(--su-muted); font-weight: 500;
    max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.su-profile__caret { font-size: 12px; color: var(--su-slate-400); margin-left: 2px; transition: transform .2s var(--su-ease); }
.su-profile[aria-expanded="true"] .su-profile__caret { transform: rotate(180deg); }

/* Profile dropdown menu */
.su-profile-menu { min-width: 252px; }
.su-profile-menu__head { display: flex; align-items: center; gap: 12px; padding: 8px 10px 12px; }
.su-profile-menu__avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
    border: 1px solid var(--su-line);
    background: var(--su-slate-100);
}
.su-profile-menu__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.su-profile-menu__info { min-width: 0; }
.su-profile-menu__name { font-size: .9rem; font-weight: 700; color: var(--su-ink); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.su-profile-menu__mail { font-size: .76rem; color: var(--su-muted); line-height: 1.3; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   FOOTER
   ============================================================ */
.su-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px var(--su-gap) var(--su-gap);
    color: var(--su-muted);
    font-size: .82rem;
    background: transparent;
}
.su-footer a { color: var(--su-primary); font-weight: 500; }

/* ============================================================
   CARDS  (INSPINIA .ibox + generic .su-card)
   ============================================================ */
.ibox, .su-card {
    background: var(--su-surface);
    border: 1px solid var(--su-line);
    border-radius: var(--su-radius-lg);
    box-shadow: none;
    margin-bottom: 22px;
    overflow: hidden;
    transition: box-shadow .2s var(--su-ease), border-color .2s var(--su-ease);
}
.ibox:hover, .su-card:hover { box-shadow: var(--su-shadow-sm); border-color: var(--su-line-strong); }

.ibox-title {
    background: var(--su-surface);
    border: none;
    border-bottom: 1px solid var(--su-line);
    border-radius: 0;
    padding: 16px 20px;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.ibox-title h5 {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: .98rem; font-weight: 700; color: var(--su-ink);
    line-height: 1.3; float: none; margin: 0;
}
.ibox-title h5 > i, .ibox-title h5 .fa { color: var(--su-primary); font-size: .95rem; }
.ibox-title .label { float: none; }
.ibox-tools { display: inline-flex; align-items: center; gap: 8px; float: none; position: static; }
.ibox-tools a { color: var(--su-muted); }
.ibox-tools .btn { margin: 0 !important; }

.ibox-content { background: var(--su-surface); border: none; padding: 20px; }
.ibox-content.no-padding { padding: 0; }

/* Section page header */
.su-page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.su-page-head .su-title { font-size: 1.45rem; font-weight: 800; color: var(--su-ink); margin: 0; letter-spacing: -0.025em; }
.su-page-head .su-sub { color: var(--su-muted); font-size: .9rem; margin: 4px 0 0; }

/* INSPINIA page heading rows */
.page-heading, .row.wrapper.border-bottom.white-bg.page-heading {
    background: var(--su-surface);
    border-bottom: 1px solid var(--su-line) !important;
    padding: 18px 26px;
}
.page-heading h2 { font-size: 1.3rem; }
.breadcrumb { background: transparent; padding: 0; margin: 6px 0 0; font-size: .82rem; }
.breadcrumb > li + li:before { color: var(--su-faint); }
.breadcrumb a { color: var(--su-muted); }
.breadcrumb .active { color: var(--su-ink); }

/* ============================================================
   BUTTONS  (flat, no gradients)
   ============================================================ */
.btn {
    font-family: var(--su-font);
    font-weight: 600;
    font-size: .85rem;
    border-radius: var(--su-radius-sm);
    padding: .5rem 1rem;
    border: 1px solid transparent;
    transition: all .15s var(--su-ease);
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    line-height: 1.2;
    cursor: pointer;
}
.btn:focus, .btn.focus { box-shadow: var(--su-ring); outline: none; }
.btn i { font-size: .9em; }
.btn-xs { padding: .25rem .55rem; font-size: .74rem; }
.btn-sm { padding: .35rem .7rem; font-size: .78rem; border-radius: var(--su-radius-xs); }
.btn-lg { padding: .7rem 1.4rem; font-size: .95rem; border-radius: var(--su-radius); }
.btn-rounded { border-radius: var(--su-radius-pill); }
.btn-block { display: flex; width: 100%; }

.btn-primary { background: var(--su-primary); border-color: var(--su-primary); color: #fff; }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active,
.open .dropdown-toggle.btn-primary {
    background: var(--su-primary-hover) !important; border-color: var(--su-primary-hover) !important;
    color: #fff !important;
}

.btn-success { background: var(--su-success); border-color: var(--su-success); color: #fff; }
.btn-success:hover, .btn-success:focus, .btn-success:active { background: #15803d !important; border-color: #15803d !important; color: #fff !important; }

.btn-info { background: var(--su-info); border-color: var(--su-info); color: #fff; }
.btn-info:hover, .btn-info:focus, .btn-info:active { background: #1d4ed8 !important; border-color: #1d4ed8 !important; color: #fff !important; }

.btn-warning { background: var(--su-warning); border-color: var(--su-warning); color: #fff; }
.btn-warning:hover, .btn-warning:focus, .btn-warning:active { background: #b45309 !important; border-color: #b45309 !important; color: #fff !important; }

.btn-danger { background: var(--su-danger); border-color: var(--su-danger); color: #fff; }
.btn-danger:hover, .btn-danger:focus, .btn-danger:active { background: #b91c1c !important; border-color: #b91c1c !important; color: #fff !important; }

/* Neutral / outlined workhorse buttons */
.btn-white, .btn-default, .btn-secondary {
    background: var(--su-surface);
    border: 1px solid var(--su-line-strong);
    color: var(--su-slate-700);
}
.btn-white:hover, .btn-default:hover, .btn-secondary:hover,
.btn-white:focus, .btn-default:focus, .btn-secondary:focus,
.btn-white:active, .btn-default:active, .btn-secondary:active {
    background: var(--su-slate-50) !important;
    border-color: var(--su-slate-300) !important;
    color: var(--su-ink) !important;
}

/* Outline variants */
.btn-outline-primary { background: transparent; border: 1px solid var(--su-primary-line); color: var(--su-primary); }
.btn-outline-primary:hover { background: var(--su-primary); border-color: var(--su-primary); color: #fff; }
.btn-outline-danger { background: transparent; border: 1px solid var(--su-danger-line); color: var(--su-danger); }
.btn-outline-danger:hover { background: var(--su-danger); border-color: var(--su-danger); color: #fff; }
.btn-outline-secondary { background: transparent; border: 1px solid var(--su-line-strong); color: var(--su-slate-600); }
.btn-outline-secondary:hover { background: var(--su-slate-50); color: var(--su-ink); }

.btn-link { color: var(--su-primary); box-shadow: none; border: none; background: none; }
.btn-link:hover { color: var(--su-primary-hover); }

/* Soft tinted action buttons (use .btn .btn-soft-*) */
.btn-soft-primary { background: var(--su-primary-soft); color: var(--su-primary); border-color: var(--su-primary-line); }
.btn-soft-primary:hover { background: var(--su-primary); color: #fff; border-color: var(--su-primary); }
.btn-soft-danger { background: var(--su-danger-bg); color: var(--su-danger); border-color: var(--su-danger-line); }
.btn-soft-danger:hover { background: var(--su-danger); color: #fff; border-color: var(--su-danger); }

/* ============================================================
   FORMS
   ============================================================ */
label, .control-label { color: var(--su-slate-700); font-weight: 600; font-size: .84rem; margin-bottom: .4rem; }
.form-group { margin-bottom: 1.1rem; }

.form-control, .custom-select, select.form-control, textarea.form-control {
    border: 1px solid var(--su-line-strong);
    border-radius: var(--su-radius-sm);
    padding: .55rem .8rem;
    height: auto;
    min-height: 42px;
    font-size: .9rem;
    color: var(--su-ink);
    background-color: var(--su-surface);
    box-shadow: none;
    transition: border-color .15s var(--su-ease), box-shadow .15s var(--su-ease);
}
.form-control::placeholder { color: var(--su-faint); }
.form-control:focus, .custom-select:focus, select.form-control:focus, textarea.form-control:focus {
    border-color: var(--su-red-400);
    box-shadow: var(--su-ring);
    background-color: var(--su-surface);
    outline: none;
}
.form-control[readonly], .form-control:disabled { background: var(--su-slate-50); color: var(--su-muted); }
textarea.form-control { min-height: 96px; }
.form-control.is-invalid, .form-control.error { border-color: var(--su-danger); }
.invalid-feedback, .form-text.text-danger, .help-block.text-danger { color: var(--su-danger) !important; font-size: .8rem; }
.form-control-sm { min-height: 34px; padding: .3rem .6rem; font-size: .82rem; }

.input-group-text, .input-group-addon {
    background: var(--su-slate-50);
    border: 1px solid var(--su-line-strong);
    color: var(--su-muted);
    border-radius: var(--su-radius-sm);
}
.custom-control-input:checked ~ .custom-control-label::before { background-color: var(--su-primary); border-color: var(--su-primary); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--su-primary); }

/* Select2 */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border: 1px solid var(--su-line-strong) !important;
    border-radius: var(--su-radius-sm) !important;
    min-height: 42px;
    box-shadow: none;
}
.select2-container--default .select2-selection--single { padding: 5px 6px; }
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--su-ink); line-height: 30px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 40px; }
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--su-red-400) !important;
    box-shadow: var(--su-ring) !important;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--su-primary-soft);
    border: 1px solid var(--su-primary-line);
    color: var(--su-red-800);
    border-radius: var(--su-radius-xs);
    padding: 2px 8px;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--su-primary); }
.select2-dropdown { border-color: var(--su-line-strong); border-radius: var(--su-radius-sm); box-shadow: var(--su-shadow-md); }

/* ============================================================
   TABLES
   ============================================================ */
.table { color: var(--su-body); margin-bottom: 0; background: var(--su-surface); }
.table > thead > tr > th, .table thead th {
    background: var(--su-slate-50);
    color: var(--su-slate-500);
    font-weight: 700;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .045em;
    border-bottom: 1px solid var(--su-line-strong) !important;
    border-top: none !important;
    padding: 13px 16px;
    vertical-align: middle;
}
.table > tbody > tr > td, .table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-top: 1px solid var(--su-line);
    font-size: .87rem;
    color: var(--su-body);
}
.table-hover > tbody > tr:hover { background: var(--su-primary-soft) !important; }
.table-striped > tbody > tr:nth-of-type(odd) { background: var(--su-slate-50); }
.table-bordered, .table-bordered td, .table-bordered th { border-color: var(--su-line) !important; }
.table.dataTable { border-collapse: separate !important; border-spacing: 0; }

/* DataTables chrome */
.dataTables_wrapper { padding-top: 4px; }
.dataTables_wrapper .dataTables_filter input {
    border: 1px solid var(--su-line-strong) !important;
    border-radius: var(--su-radius-sm) !important;
    padding: .5rem .8rem !important;
    min-width: 220px;
    box-shadow: none;
}
.dataTables_wrapper .dataTables_filter input:focus { border-color: var(--su-red-400) !important; box-shadow: var(--su-ring) !important; outline: none; }
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: var(--su-radius-xs) !important;
    border: 1px solid var(--su-line-strong) !important;
    color: var(--su-slate-600) !important;
    padding: .42rem .75rem !important;
    margin: 0 2px !important;
    background: var(--su-surface) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--su-slate-50) !important; border-color: var(--su-slate-300) !important; color: var(--su-ink) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--su-primary) !important; border-color: var(--su-primary) !important; color: #fff !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled { color: var(--su-faint) !important; background: var(--su-slate-50) !important; }
table.dataTable thead .sorting:after, table.dataTable thead .sorting_asc:after, table.dataTable thead .sorting_desc:after { color: var(--su-slate-400); }
.html5buttons .dt-button, .dt-buttons .btn {
    border-radius: var(--su-radius-xs) !important;
    background: var(--su-surface) !important;
    border: 1px solid var(--su-line-strong) !important;
    color: var(--su-slate-700) !important;
    font-weight: 600;
    box-shadow: none !important;
    padding: .4rem .8rem !important;
    margin: 0 3px 0 0 !important;
}
.html5buttons .dt-button:hover, .dt-buttons .btn:hover { background: var(--su-slate-50) !important; border-color: var(--su-slate-300) !important; color: var(--su-ink) !important; }

/* ============================================================
   BADGES / LABELS / PILLS
   ============================================================ */
.badge, .label {
    font-weight: 600; font-size: .7rem; padding: .35em .7em;
    border-radius: var(--su-radius-pill); letter-spacing: .01em;
}
.badge-primary, .label-primary { background: var(--su-primary); color: #fff; }
.label-success, .badge-success { background: var(--su-success); color: #fff; }
.label-info, .badge-info { background: var(--su-info); color: #fff; }
.label-warning, .badge-warning { background: var(--su-warning); color: #fff; }
.label-danger, .badge-danger { background: var(--su-danger); color: #fff; }

/* Soft outlined status pills */
.su-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--su-radius-pill); font-size: .73rem; font-weight: 600; border: 1px solid transparent; }
.su-pill-success { background: var(--su-success-bg); color: #15803d; border-color: var(--su-success-line); }
.su-pill-info    { background: var(--su-info-bg); color: var(--su-info); border-color: var(--su-info-line); }
.su-pill-warning { background: var(--su-warning-bg); color: #b45309; border-color: var(--su-warning-line); }
.su-pill-danger  { background: var(--su-danger-bg); color: var(--su-danger); border-color: var(--su-danger-line); }
.su-pill-muted   { background: var(--su-slate-100); color: var(--su-slate-600); border-color: var(--su-line-strong); }

/* ============================================================
   ALERTS  (soft tints + accent rail)
   ============================================================ */
.alert {
    border: 1px solid transparent;
    border-radius: var(--su-radius);
    padding: 13px 16px 13px 18px;
    border-left-width: 4px;
    font-size: .88rem;
    box-shadow: none;
}
.alert strong { font-weight: 700; }
.alert-success { background: var(--su-success-bg); border-color: var(--su-success-line); border-left-color: var(--su-success); color: #166534; }
.alert-danger  { background: var(--su-danger-bg); border-color: var(--su-danger-line); border-left-color: var(--su-danger); color: #991b1b; }
.alert-info    { background: var(--su-info-bg); border-color: var(--su-info-line); border-left-color: var(--su-info); color: #1e40af; }
.alert-warning { background: var(--su-warning-bg); border-color: var(--su-warning-line); border-left-color: var(--su-warning); color: #92400e; }
.alert .close { color: inherit; opacity: .5; text-shadow: none; }
.alert .close:hover { opacity: 1; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-content { border: 1px solid var(--su-line); border-radius: var(--su-radius-lg); box-shadow: var(--su-shadow-lg); overflow: hidden; }
.modal-header { border-bottom: 1px solid var(--su-line); padding: 17px 22px; background: var(--su-surface); }
.modal-title { font-weight: 700; color: var(--su-ink); }
.modal-body { padding: 22px; }
.modal-footer { border-top: 1px solid var(--su-line); padding: 15px 22px; }
.modal-backdrop.show { opacity: .4; }

/* ============================================================
   PAGINATION (Laravel / Bootstrap)
   ============================================================ */
.pagination { gap: 4px; }
.pagination .page-link {
    border: 1px solid var(--su-line-strong);
    color: var(--su-slate-600);
    border-radius: var(--su-radius-xs) !important;
    margin: 0; padding: .5rem .8rem;
}
.pagination .page-link:hover { background: var(--su-slate-50); color: var(--su-ink); }
.pagination .page-item.active .page-link { background: var(--su-primary); border-color: var(--su-primary); color: #fff; }
.pagination .page-item.disabled .page-link { color: var(--su-faint); }

/* ============================================================
   DROPDOWNS
   ============================================================ */
.dropdown-menu {
    border: 1px solid var(--su-line);
    border-radius: var(--su-radius);
    box-shadow: var(--su-shadow-md);
    padding: 6px;
    font-size: .87rem;
}
.dropdown-item { border-radius: var(--su-radius-xs); padding: .55rem .8rem; color: var(--su-slate-700); font-weight: 500; display: flex; align-items: center; gap: .55rem; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--su-primary-soft); color: var(--su-primary); }
.dropdown-item.active, .dropdown-item:active { background: var(--su-primary); color: #fff; }
.dropdown-item i { width: 16px; text-align: center; color: var(--su-slate-400); }
.dropdown-item:hover i { color: var(--su-primary); }
.dropdown-divider { margin: 6px 4px; border-color: var(--su-line); }

/* ============================================================
   TABS / PROGRESS / TOOLTIP / MISC
   ============================================================ */
.nav-tabs { border-bottom: 1px solid var(--su-line); }
.nav-tabs .nav-link { border: none; color: var(--su-muted); font-weight: 600; padding: .7rem 1rem; border-bottom: 2px solid transparent; }
.nav-tabs .nav-link:hover { color: var(--su-ink); border-bottom-color: var(--su-line-strong); }
.nav-tabs .nav-link.active { color: var(--su-primary); background: transparent; border-bottom: 2px solid var(--su-primary); }

.progress { height: 8px; border-radius: var(--su-radius-pill); background: var(--su-slate-100); }
.progress-bar { background: var(--su-primary); border-radius: var(--su-radius-pill); }

.tooltip-inner { background: var(--su-slate-900); border-radius: var(--su-radius-sm); font-size: .76rem; padding: 6px 10px; }
.tooltip.bs-tooltip-right .arrow::before { border-right-color: var(--su-slate-900); }
.tooltip.bs-tooltip-top .arrow::before { border-top-color: var(--su-slate-900); }

/* Content-area scrollbar */
#page-wrapper::-webkit-scrollbar { width: 11px; height: 11px; }
#page-wrapper::-webkit-scrollbar-track { background: transparent; }
#page-wrapper::-webkit-scrollbar-thumb { background: var(--su-slate-300); border-radius: 999px; border: 3px solid var(--su-bg); }
#page-wrapper::-webkit-scrollbar-thumb:hover { background: var(--su-slate-400); }

.animated.fadeInRight, .animated.fadeIn { animation-duration: .35s; }

/* Empty state */
.su-empty { text-align: center; padding: 48px 20px; color: var(--su-muted); }
.su-empty i { font-size: 2.2rem; color: var(--su-slate-300); margin-bottom: 12px; display: block; }

/* Stat / KPI card */
.su-stat { display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.su-stat__icon { width: 46px; height: 46px; border-radius: var(--su-radius); display: inline-flex; align-items: center; justify-content: center; font-size: 19px; background: var(--su-primary-soft); color: var(--su-primary); border: 1px solid var(--su-primary-line); flex-shrink: 0; }
.su-stat__value { font-size: 1.6rem; font-weight: 800; color: var(--su-ink); line-height: 1.1; letter-spacing: -0.02em; }
.su-stat__label { font-size: .78rem; color: var(--su-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; margin-top: 2px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    /* Full-height slide-in drawer on mobile (not floating) */
    .su-sidebar {
        top: 0; left: 0; height: 100vh;
        width: var(--su-sidebar-w);
        border-radius: 0;
        border: none; border-right: 1px solid var(--su-line);
        transform: translateX(-100%);
        transition: transform .25s var(--su-ease);
        z-index: 1055;
    }
    body.sidebar-open .su-sidebar { transform: translateX(0); box-shadow: var(--su-shadow-lg); }
    body.mini-navbar .su-sidebar { width: var(--su-sidebar-w); }
    body.mini-navbar .su-sidebar__brand img.su-logo-full { display: inline-block; }
    body.mini-navbar .su-sidebar__brand img.su-logo-mini { display: none; }
    body.mini-navbar .su-nav__label, body.mini-navbar .su-nav__caret { display: inline; }
    body.mini-navbar .su-nav__link { justify-content: flex-start; padding: 10px 12px; gap: 12px; }
    body.mini-navbar .su-submenu { display: block; }

    #page-wrapper, html body #page-wrapper, body.mini-navbar #page-wrapper { left: 0 !important; }

    .su-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 1050; opacity: 0; pointer-events: none; transition: opacity .25s var(--su-ease); }
    body.sidebar-open .su-backdrop { opacity: 1; pointer-events: auto; }

    .su-topbar-wrap { padding: 12px 12px 0; }
    .wrapper-content, .wrapper.wrapper-content { padding: 14px 12px !important; }
    .su-topbar { padding: 0 12px; }
    .su-topbar__welcome { display: none; }
    .su-profile__meta { display: none; }
    .su-profile { padding: 0 8px 0 5px; }
}
