/* ================================================================
   ProjectL ISP Management System — Custom Design System v2.0
   Font      : Inter (Google Fonts)
   Primary   : Brand Red  #8C0000
   Sidebar   : Dark Navy  #0f172a
   Background: Slate      #f1f5f9
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&display=swap');

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DESIGN TOKENS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
    /* Brand */
    --brand:           #8C0000;
    --brand-dark:      #6A0000;
    --brand-hover:     #a50000;
    --brand-soft:      rgba(140,0,0,0.09);
    --brand-soft-md:   rgba(140,0,0,0.15);
    --brand-blue:      #1B3A9E;

    /* Sidebar */
    --sb-width:        260px;
    --sb-bg:           #0f172a;
    --sb-surface:      #1e293b;
    --sb-text:         rgba(203,213,225,0.78);
    --sb-text-hover:   #f1f5f9;
    --sb-title:        rgba(148,163,184,0.50);
    --sb-active-bg:    rgba(140,0,0,0.20);
    --sb-active-bar:   #8C0000;
    --sb-divider:      rgba(255,255,255,0.06);
    --sb-icon:         rgba(148,163,184,0.65);
    --sb-icon-hover:   rgba(226,232,240,0.92);

    /* Topbar */
    --tb-height:       62px;
    --tb-bg:           #ffffff;
    --tb-border:       #e2e8f0;
    --tb-shadow:       0 1px 0 #e2e8f0, 0 2px 8px rgba(15,23,42,0.04);

    /* Layout */
    --page-bg:         #f1f5f9;

    /* Cards */
    --card-radius:     10px;
    --card-shadow:     0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
    --card-shadow-lg:  0 4px 16px rgba(15,23,42,0.10), 0 2px 6px rgba(15,23,42,0.06);

    /* Semantic */
    --c-success:       #10b981;
    --c-success-soft:  rgba(16,185,129,0.10);
    --c-warning:       #f59e0b;
    --c-warning-soft:  rgba(245,158,11,0.10);
    --c-danger:        #ef4444;
    --c-danger-soft:   rgba(239,68,68,0.10);
    --c-info:          #3b82f6;
    --c-info-soft:     rgba(59,130,246,0.10);
    --c-secondary:     #64748b;
    --c-secondary-soft:rgba(100,116,139,0.10);

    /* Text */
    --tx-primary:      #0f172a;
    --tx-secondary:    #475569;
    --tx-muted:        #94a3b8;
    --tx-light:        #cbd5e1;

    /* Inputs */
    --in-border:       #d1d5db;
    --in-radius:       7px;

    /* Transitions */
    --tr:              180ms cubic-bezier(0.4,0,0.2,1);
    --tr-s:            280ms cubic-bezier(0.4,0,0.2,1);

    /* Legacy aliases (used in guest layout inline styles) */
    --projectl-red:        #8C0000;
    --projectl-red-dark:   #6A0000;
    --projectl-red-light:  #a80000;
    --projectl-blue:       #1B3A9E;
    --projectl-blue-dark:  #122880;
    --projectl-blue-light: #2548C2;
    --isp-primary:         #8C0000;
    --isp-success:         #10b981;
    --isp-danger:          #ef4444;
    --isp-warning:         #f59e0b;
    --isp-info:            #3b82f6;

    /* Bootstrap 5 primary override → brand red */
    --bs-primary:      #8C0000;
    --bs-primary-rgb:  140,0,0;
    --bs-link-color:         #8C0000;
    --bs-link-color-rgb:     140,0,0;
    --bs-link-hover-color:   #6A0000;
    --bs-focus-ring-color:   rgba(140,0,0,0.25);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BASE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI',
                 'Helvetica Neue', Arial, sans-serif;
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.65;
    color: var(--tx-primary);
    background: var(--page-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a { color: var(--brand); text-decoration: none; transition: color var(--tr); }
a:hover { color: var(--brand-hover); }

h1,h2,h3,h4,h5,h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--tx-primary);
    margin-bottom: .375rem;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PRELOADER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
#preloader {
    position: fixed; inset: 0; z-index: 9999;
    background: var(--sb-bg);
    display: flex; align-items: center; justify-content: center;
    transition: opacity .35s ease;
}
#status { display: flex; align-items: center; justify-content: center; }
#preloader .spinner-border {
    width: 2.5rem; height: 2.5rem;
    border-width: 3px;
    border-color: var(--brand) var(--brand) transparent transparent;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   LAYOUT WRAPPER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.wrapper { display: flex; min-height: 100vh; }

/* Mobile overlay */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 998;
    background: rgba(15,23,42,.55);
    backdrop-filter: blur(2px);
    animation: fadeIn var(--tr) forwards;
}
body.sidebar-mobile-open .sidebar-overlay { display: block; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SIDEBAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.leftside-menu {
    width: var(--sb-width);
    min-height: 100vh;
    background: var(--sb-bg);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    transition: transform var(--tr-s), width var(--tr-s);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.08) transparent;
}
.leftside-menu::-webkit-scrollbar { width: 3px; }
.leftside-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.1); border-radius: 2px;
}

/* ── Logo ── */
.leftside-menu .logo,
.leftside-menu a.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem;
    height: var(--tb-height);
    min-height: var(--tb-height);
    border-bottom: 1px solid var(--sb-divider);
    text-decoration: none;
    flex-shrink: 0;
    background: transparent !important;
}
.leftside-menu .logo-lg img  { display: block; max-height: 38px; }
.leftside-menu .logo-sm img  { display: none;  max-height: 30px; }

/* ── User block ── */
.leftbar-user {
    padding: .875rem 1.25rem .75rem;
    border-bottom: 1px solid var(--sb-divider);
    flex-shrink: 0;
}
.leftbar-user a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    gap: .375rem;
}
.leftbar-user img {
    width: 44px; height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.15);
    object-fit: cover;
    flex-shrink: 0;
}
.leftbar-user-name {
    display: block;
    color: #fff;
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .01em;
}

/* ── Nav list ── */
.side-nav {
    list-style: none;
    padding: .625rem 0 2rem;
    margin: 0;
    flex: 1;
}

.side-nav-title {
    padding: .875rem 1.25rem .25rem;
    font-size: .625rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--sb-title);
    pointer-events: none;
    user-select: none;
}

.side-nav-item {
    position: relative;
    margin: 1px .5rem;
}

.side-nav-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .46rem .875rem;
    color: var(--sb-text);
    border-radius: 7px;
    font-size: .8125rem;
    font-weight: 450;
    text-decoration: none;
    transition: background var(--tr), color var(--tr);
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.4;
}
.side-nav-link > i,
.side-nav-link > [class*="uil-"],
.side-nav-link > [class*="mdi-"] {
    font-size: 1.0625rem;
    color: var(--sb-icon);
    transition: color var(--tr);
    flex-shrink: 0;
    width: 1.25rem;
    text-align: center;
    line-height: 1;
}
.side-nav-link:hover {
    background: rgba(255,255,255,.055);
    color: var(--sb-text-hover);
}
.side-nav-link:hover > i,
.side-nav-link:hover > [class*="uil-"],
.side-nav-link:hover > [class*="mdi-"] { color: var(--sb-icon-hover); }

/* Menu arrow chevron */
.menu-arrow {
    margin-left: auto;
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--tr);
}
.menu-arrow::after {
    content: '';
    display: block;
    width: .375rem; height: .375rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    opacity: .55;
    margin-top: 2px;
}
.side-nav-link[aria-expanded="true"] .menu-arrow { transform: rotate(90deg); }

/* ── Active state ── */
.side-nav-item.menuitem-active > .side-nav-link {
    background: var(--sb-active-bg);
    color: #fff;
}
.side-nav-item.menuitem-active > .side-nav-link::before {
    content: '';
    position: absolute;
    left: 0; top: 5px; bottom: 5px;
    width: 3px;
    background: var(--sb-active-bar);
    border-radius: 0 3px 3px 0;
}
.side-nav-item.menuitem-active > .side-nav-link > i,
.side-nav-item.menuitem-active > .side-nav-link > [class*="uil-"],
.side-nav-item.menuitem-active > .side-nav-link > [class*="mdi-"] {
    color: rgba(255,100,100,.9);
}

/* ── Sub-level ── */
.side-nav-second-level {
    list-style: none;
    padding: .25rem 0 .375rem 2.625rem;
    margin: 0;
}
.side-nav-second-level li { margin: 1px 0; }
.side-nav-second-level li a {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .3125rem .625rem;
    color: var(--sb-text);
    font-size: .78rem;
    font-weight: 400;
    border-radius: 5px;
    text-decoration: none;
    transition: background var(--tr), color var(--tr);
    line-height: 1.4;
}
.side-nav-second-level li a:hover {
    background: rgba(255,255,255,.05);
    color: var(--sb-text-hover);
}
.side-nav-second-level li a > i,
.side-nav-second-level li a > [class*="uil-"] {
    font-size: .875rem;
    width: .875rem;
    text-align: center;
    opacity: .6;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   SIDEBAR COLLAPSE (desktop)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
body.sidebar-collapsed .leftside-menu  { width: 68px; }
body.sidebar-collapsed .leftside-menu .logo-lg  { display: none !important; }
body.sidebar-collapsed .leftside-menu .logo-sm  { display: block !important; }
body.sidebar-collapsed .leftside-menu .leftbar-user-name,
body.sidebar-collapsed .leftside-menu .side-nav-title,
body.sidebar-collapsed .leftside-menu .side-nav-link span:not(.menu-arrow),
body.sidebar-collapsed .leftside-menu .menu-arrow,
body.sidebar-collapsed .leftside-menu .side-nav-second-level { display: none !important; }
body.sidebar-collapsed .leftside-menu .leftbar-user a { align-items: center; }
body.sidebar-collapsed .leftside-menu .leftbar-user img { margin: 0 auto; }
body.sidebar-collapsed .leftside-menu .side-nav-link {
    justify-content: center;
    padding: .5rem;
}
body.sidebar-collapsed .leftside-menu .side-nav-link > i,
body.sidebar-collapsed .leftside-menu .side-nav-link > [class*="uil-"] {
    width: auto;
    font-size: 1.125rem;
}
body.sidebar-collapsed .leftside-menu .side-nav-item { margin: 2px .25rem; }
body.sidebar-collapsed .content-page {
    margin-left: 68px;
    width: calc(100% - 68px);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CONTENT AREA
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.content-page {
    margin-left: var(--sb-width);
    width: calc(100% - var(--sb-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--tr-s), width var(--tr-s);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MOBILE SIDEBAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 991.98px) {
    .leftside-menu {
        transform: translateX(-100%);
        width: var(--sb-width) !important;
        z-index: 1001;
        box-shadow: 4px 0 28px rgba(0,0,0,.28);
    }
    body.sidebar-mobile-open .leftside-menu { transform: translateX(0); }
    .content-page {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TOPBAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.navbar-custom {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--tb-bg);
    border-bottom: 1px solid var(--tb-border);
    box-shadow: var(--tb-shadow);
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--tb-height);
    padding: 0 1.5rem;
    gap: .625rem;
}

/* Mobile logo */
.logo-topbar { display: none; }
.logo-topbar a { display: flex; align-items: center; }
.logo-topbar img { max-height: 34px; }
@media (max-width: 991.98px) { .logo-topbar { display: flex; align-items: center; } }

/* Toggle button */
.button-toggle-menu {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--tx-secondary);
    font-size: 1.3125rem;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: background var(--tr), color var(--tr);
    line-height: 1;
}
.button-toggle-menu:hover { background: var(--brand-soft); color: var(--brand); }
.button-toggle-menu i { display: flex; }

/* Inline search */
.app-search { flex: 0 1 320px; }
.app-search form { display: flex; }
.app-search .input-group {
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid var(--in-border);
    background: #f8fafc;
    transition: border-color var(--tr), box-shadow var(--tr);
}
.app-search .input-group:focus-within {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
    background: #fff;
}
.app-search .form-control {
    background: transparent;
    border: none;
    font-size: .8125rem;
    padding: .4375rem .75rem;
    color: var(--tx-primary);
    box-shadow: none !important;
    min-width: 0;
}
.app-search .form-control::placeholder { color: var(--tx-muted); }
.app-search .search-icon {
    display: flex; align-items: center;
    padding: 0 .5rem;
    color: var(--tx-muted);
    font-size: 1rem;
    pointer-events: none;
}
.app-search .input-group-text.btn {
    border: none; border-radius: 0;
    padding: 0 .875rem;
    font-size: .75rem; font-weight: 500;
    background: var(--brand); color: #fff;
}
.app-search .input-group-text.btn:hover { background: var(--brand-dark); }

/* Topbar right menu */
.topbar-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0; padding: 0;
    gap: .0625rem;
}
.topbar-menu > li { position: relative; }
.topbar-menu .nav-link {
    display: flex;
    align-items: center;
    padding: .4375rem .5rem;
    color: var(--tx-secondary);
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--tr), color var(--tr);
}
.topbar-menu .nav-link:hover { background: #f1f5f9; color: var(--brand); }
.topbar-menu .nav-link.dropdown-toggle::after { display: none; }
.topbar-menu .nav-link.arrow-none::after { display: none; }

/* Notification badge dot */
.notification-list { position: relative; }
.noti-icon-badge {
    position: absolute;
    top: 6px; right: 7px;
    width: 8px; height: 8px;
    background: var(--c-danger);
    border-radius: 50%;
    border: 2px solid var(--tb-bg);
}

/* User avatar button */
.nav-user { gap: .5rem; }
.account-user-avatar img {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    object-fit: cover;
}
.nav-user h5 {
    font-size: .8rem; font-weight: 600;
    color: var(--tx-primary); margin: 0; line-height: 1.2;
}
.nav-user h6 {
    font-size: .6875rem; font-weight: 400;
    color: var(--tx-muted); margin: 0; line-height: 1.2;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   DROPDOWN MENUS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.dropdown-menu {
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(15,23,42,.12), 0 2px 8px rgba(15,23,42,.06);
    padding: .3125rem;
    min-width: 11rem;
    background: #fff;
    z-index: 1050;
}
.dropdown-menu-animated {
    animation: slideDown .18s cubic-bezier(0.4,0,0.2,1);
    transform-origin: top right;
}
.dropdown-item {
    padding: .4375rem .75rem;
    font-size: .8125rem;
    border-radius: 6px;
    color: var(--tx-primary);
    display: flex;
    align-items: center;
    gap: .5rem;
    transition: background var(--tr), color var(--tr);
    line-height: 1.4;
    white-space: normal;
}
.dropdown-item:hover { background: #f1f5f9 !important; color: var(--brand); }
.dropdown-item i,
.dropdown-item [class*="mdi-"],
.dropdown-item [class*="uil-"] {
    font-size: .9375rem;
    width: 1.125rem;
    color: var(--tx-muted);
    flex-shrink: 0;
}
.dropdown-item:hover i { color: var(--brand); }
.dropdown-item.text-danger       { color: var(--c-danger) !important; }
.dropdown-item.text-danger:hover { background: var(--c-danger-soft) !important; }
.dropdown-item.text-danger i     { color: var(--c-danger) !important; }
.dropdown-item.text-center { justify-content: center; }
.dropdown-divider { margin: .25rem 0; border-color: #e2e8f0; }

.dropdown-header { padding: .625rem .875rem 0; font-size: .6875rem;
    font-weight: 600; text-transform: uppercase; letter-spacing: .07em;
    color: var(--tx-muted); }
.dropdown-header.noti-title {
    padding: .625rem .875rem;
    font-size: .875rem; font-weight: 600; text-transform: none;
    letter-spacing: normal; color: var(--tx-primary);
    border-bottom: 1px solid #e2e8f0;
}
.dropdown-header.noti-title h6 { font-size: .875rem; font-weight: 600; margin: 0; }
.dropdown-header.noti-title small { font-size: .75rem; }

/* Large dropdown panels */
.dropdown-lg { min-width: 22rem; }
.profile-dropdown { min-width: 13rem; }

/* Apps quick-access grid items */
.dropdown-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    padding: .625rem .5rem;
    border-radius: 8px;
    color: var(--tx-secondary);
    font-size: .72rem;
    transition: background var(--tr), color var(--tr);
    text-align: center;
    text-decoration: none;
    line-height: 1.3;
}
.dropdown-icon-item:hover { background: #f1f5f9; color: var(--brand); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NOTIFICATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.notify-item { border-radius: 8px; overflow: hidden; }
.notify-item.unread-noti { background: #f8fafc; }
.notify-item.read-noti { background: transparent; }

.notify-icon {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    border-radius: 8px; flex-shrink: 0; color: #fff;
    font-size: .9375rem; line-height: 1;
}
.notify-icon.bg-success { background: var(--c-success) !important; }
.notify-icon.bg-danger  { background: var(--c-danger)  !important; }
.notify-icon.bg-warning { background: var(--c-warning) !important; }
.notify-icon.bg-info    { background: var(--c-info)    !important; }

.noti-item-title    { font-size: .8125rem; font-weight: 600; }
.noti-item-subtitle { font-size: .75rem; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PAGE CONTENT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.content { flex: 1; padding-bottom: 2rem; }
.content > .container-fluid { padding: 1.5rem 1.75rem; }

/* Breadcrumb / page title bar */
.page-title-box {
    padding: .625rem 0 1.125rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.page-title {
    font-size: 1.0625rem; font-weight: 700;
    color: var(--tx-primary); margin: 0;
}
.page-title-right .breadcrumb {
    font-size: .78rem; margin: 0; padding: 0;
    background: transparent;
}
.page-title-right .breadcrumb-item + .breadcrumb-item::before {
    content: '/'; color: var(--tx-muted); padding: 0 .4rem;
}
.page-title-right .breadcrumb-item a { color: var(--tx-muted); }
.page-title-right .breadcrumb-item a:hover { color: var(--brand); }
.page-title-right .breadcrumb-item.active { color: var(--tx-secondary); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FOOTER
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.footer {
    padding: .9375rem 1.75rem;
    border-top: 1px solid var(--tb-border);
    background: #fff;
    font-size: .78rem;
    color: var(--tx-muted);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   CARDS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card {
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--card-radius) !important;
    box-shadow: var(--card-shadow) !important;
    background: #fff !important;
    margin-bottom: 1.5rem;
    transition: box-shadow var(--tr);
}
.card:hover { box-shadow: var(--card-shadow-lg) !important; }

.card-header {
    padding: .875rem 1.125rem !important;
    background: transparent !important;
    border-bottom: 1px solid #e2e8f0 !important;
    border-radius: var(--card-radius) var(--card-radius) 0 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
}
.card-header .header-title {
    font-size: .9375rem; font-weight: 600;
    color: var(--tx-primary); margin: 0;
}
.card-body { padding: 1.125rem !important; }
.card-footer {
    padding: .75rem 1.125rem !important;
    background: #f8fafc !important;
    border-top: 1px solid #e2e8f0 !important;
    border-radius: 0 0 var(--card-radius) var(--card-radius) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TABLES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.table { font-size: .8125rem; color: var(--tx-primary); margin-bottom: 0; }
.table thead th {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--tx-muted);
    padding: .5625rem .875rem;
    border-bottom: 2px solid #e2e8f0 !important;
    white-space: nowrap;
    background: #f8fafc;
    vertical-align: middle;
}
.table tbody td {
    padding: .5625rem .875rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9 !important;
    color: var(--tx-primary);
}
.table tbody tr:last-child td { border-bottom: none !important; }
.table-hover tbody tr:hover > td { background: #fafbfc; }
.table-light thead th  { background: #f1f5f9 !important; }
.table-centered th,
.table-centered td { text-align: center; }
.table-centered th:first-child,
.table-centered td:first-child { text-align: left; }
.table-sm th, .table-sm td    { padding: .3125rem .6875rem !important; }
.table-borderless td,
.table-borderless th          { border: none !important; }
.table-nowrap th,
.table-nowrap td              { white-space: nowrap; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BUTTONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.btn {
    font-size: .8125rem; font-weight: 500;
    border-radius: 7px;
    padding: .4375rem .875rem;
    transition: all var(--tr);
    display: inline-flex; align-items: center; gap: .25rem;
    line-height: 1.4; cursor: pointer;
    border-width: 1px;
}
.btn-sm  { font-size: .75rem;  padding: .3rem .6875rem; border-radius: 6px; }
.btn-lg  { font-size: .9375rem; padding: .625rem 1.25rem; border-radius: 8px; }
.btn-xs  { font-size: .6875rem; padding: .1875rem .5rem; border-radius: 4px; }
.btn i, .btn [class*="mdi-"], .btn [class*="uil-"] { font-size: 1em; line-height: 1; }

/* Primaries */
.btn-primary   { background: var(--brand);      border-color: var(--brand);      color: #fff; }
.btn-primary:hover, .btn-primary:focus {
    background: var(--brand-dark); border-color: var(--brand-dark);
    color: #fff; box-shadow: 0 4px 12px rgba(140,0,0,.28);
}
.btn-danger    { background: var(--c-danger);    border-color: var(--c-danger);    color: #fff; }
.btn-danger:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn-success   { background: var(--c-success);   border-color: var(--c-success);   color: #fff; }
.btn-success:hover { background: #059669; border-color: #059669; color: #fff; }
.btn-warning   { background: var(--c-warning);   border-color: var(--c-warning);   color: #fff; }
.btn-warning:hover { background: #d97706; border-color: #d97706; color: #fff; }
.btn-info      { background: var(--c-info);      border-color: var(--c-info);      color: #fff; }
.btn-info:hover { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn-secondary { background: var(--c-secondary); border-color: var(--c-secondary); color: #fff; }
.btn-secondary:hover { background: #475569; border-color: #475569; color: #fff; }
.btn-light     { background: #f1f5f9; border-color: #e2e8f0; color: var(--tx-secondary); }
.btn-light:hover { background: #e2e8f0; border-color: #d1d5db; color: var(--tx-primary); }

/* Outline */
.btn-outline-primary { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-outline-primary:hover { background: var(--brand); color: #fff; }
.btn-outline-secondary { border-color: #d1d5db; color: var(--tx-secondary); background: transparent; }
.btn-outline-secondary:hover { background: #f1f5f9; color: var(--tx-primary); }

/* Soft variants */
.btn-soft-primary   { background: var(--brand-soft);      border-color: transparent; color: var(--brand); }
.btn-soft-primary:hover   { background: var(--brand);      color: #fff; }
.btn-soft-success   { background: var(--c-success-soft);   border-color: transparent; color: #065f46; }
.btn-soft-success:hover   { background: var(--c-success);  color: #fff; }
.btn-soft-danger    { background: var(--c-danger-soft);    border-color: transparent; color: #991b1b; }
.btn-soft-danger:hover    { background: var(--c-danger);   color: #fff; }
.btn-soft-warning   { background: var(--c-warning-soft);   border-color: transparent; color: #92400e; }
.btn-soft-warning:hover   { background: var(--c-warning);  color: #fff; }
.btn-soft-info      { background: var(--c-info-soft);      border-color: transparent; color: #1d4ed8; }
.btn-soft-info:hover      { background: var(--c-info);     color: #fff; }
.btn-soft-secondary { background: var(--c-secondary-soft); border-color: transparent; color: #334155; }
.btn-soft-secondary:hover { background: var(--c-secondary); color: #fff; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   BADGES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.badge {
    font-size: .6875rem; font-weight: 500;
    padding: .1875rem .5rem;
    border-radius: 4px;
    letter-spacing: .02em;
    display: inline-flex; align-items: center; gap: .2rem;
}
.badge.fs-6 { font-size: 1rem !important; padding: .3125rem .625rem; }

/* Solid badges */
.bg-primary   { background: var(--brand)       !important; color: #fff !important; }
.bg-success   { background: var(--c-success)   !important; color: #fff !important; }
.bg-danger    { background: var(--c-danger)     !important; color: #fff !important; }
.bg-warning   { background: var(--c-warning)    !important; color: #fff !important; }
.bg-info      { background: var(--c-info)       !important; color: #fff !important; }
.bg-secondary { background: var(--c-secondary)  !important; color: #fff !important; }
.bg-light     { background: #f1f5f9 !important; color: var(--tx-secondary) !important; }
.bg-dark      { background: var(--tx-primary)   !important; color: #fff !important; }
.bg-muted     { background: #94a3b8 !important; color: #fff !important; }

/* Soft badges */
.bg-soft-primary   { background: var(--brand-soft)        !important; color: var(--brand)    !important; }
.bg-soft-success   { background: var(--c-success-soft)    !important; color: #047857         !important; }
.bg-soft-danger    { background: var(--c-danger-soft)     !important; color: #991b1b         !important; }
.bg-soft-warning   { background: var(--c-warning-soft)    !important; color: #92400e         !important; }
.bg-soft-info      { background: var(--c-info-soft)       !important; color: #1d4ed8         !important; }
.bg-soft-secondary { background: var(--c-secondary-soft)  !important; color: #334155         !important; }

/* Text colors */
.text-primary   { color: var(--brand)       !important; }
.text-success   { color: var(--c-success)   !important; }
.text-danger    { color: var(--c-danger)    !important; }
.text-warning   { color: var(--c-warning)   !important; }
.text-info      { color: var(--c-info)      !important; }
.text-muted     { color: var(--tx-muted)    !important; }
.text-secondary { color: var(--c-secondary) !important; }
.text-dark      { color: var(--tx-primary)  !important; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FORMS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.form-control, .form-select {
    font-size: .8125rem;
    border: 1.5px solid var(--in-border);
    border-radius: var(--in-radius);
    padding: .4375rem .75rem;
    color: var(--tx-primary);
    background: #fff;
    line-height: 1.5;
    transition: border-color var(--tr), box-shadow var(--tr);
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-soft);
    outline: none;
    background: #fff;
}
.form-control::placeholder { color: var(--tx-muted); font-size: .8125rem; }
.form-control-sm, .form-select-sm { font-size: .75rem; padding: .3rem .625rem; }
.form-label { font-size: .8125rem; font-weight: 500; color: var(--tx-secondary); margin-bottom: .3125rem; }
.form-text { font-size: .75rem; color: var(--tx-muted); }

.input-group-text {
    font-size: .8125rem;
    background: #f8fafc;
    border: 1.5px solid var(--in-border);
    color: var(--tx-muted);
    padding: .4375rem .75rem;
}
.input-group > :not(:first-child) { border-left: 0 !important; }
.input-group > :not(:last-child)  { border-right: 0 !important; }

/* Validation */
.is-invalid { border-color: var(--c-danger) !important; }
.is-invalid:focus { box-shadow: 0 0 0 3px var(--c-danger-soft) !important; border-color: var(--c-danger) !important; }
.invalid-feedback { font-size: .75rem; color: var(--c-danger); }
.is-valid { border-color: var(--c-success) !important; }
.valid-feedback { font-size: .75rem; color: var(--c-success); }

.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--brand-soft); border-color: var(--brand); }

/* Textarea */
textarea.form-control { resize: vertical; min-height: 80px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ALERTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.alert {
    border-radius: 8px;
    border: none;
    border-left: 4px solid;
    font-size: .8125rem;
    padding: .75rem 1rem;
    display: flex; align-items: flex-start; gap: .5rem;
}
.alert i, .alert [class*="mdi-"] { flex-shrink: 0; font-size: 1rem; margin-top: .05rem; }
.alert-success { background: var(--c-success-soft); border-color: var(--c-success); color: #065f46; }
.alert-danger  { background: var(--c-danger-soft);  border-color: var(--c-danger);  color: #7f1d1d; }
.alert-warning { background: var(--c-warning-soft); border-color: var(--c-warning); color: #78350f; }
.alert-info    { background: var(--c-info-soft);    border-color: var(--c-info);    color: #1e3a8a; }
.alert-dismissible .btn-close { padding: .75rem 1rem; margin-left: auto; align-self: flex-start; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   AVATAR
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.avatar-xs { width: 28px; height: 28px; flex-shrink: 0; }
.avatar-sm { width: 40px; height: 40px; flex-shrink: 0; }
.avatar-md { width: 52px; height: 52px; flex-shrink: 0; }
.avatar-lg { width: 64px; height: 64px; flex-shrink: 0; }
.avatar-title {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    border-radius: 8px;
    font-size: 1.0625rem; font-weight: 600; color: #fff;
    line-height: 1;
}
.avatar-xs .avatar-title { font-size: .75rem; border-radius: 5px; }
.avatar-sm .avatar-title { font-size: .9375rem; border-radius: 7px; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PAGINATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.pagination { gap: .125rem; flex-wrap: wrap; }
.page-link {
    font-size: .78rem;
    border-radius: 6px !important;
    border: 1.5px solid #e2e8f0;
    color: var(--tx-secondary);
    padding: .3125rem .625rem;
    min-width: 34px; text-align: center;
    display: flex; align-items: center; justify-content: center;
    transition: all var(--tr);
    background: #fff;
}
.page-link:hover { background: #f1f5f9; border-color: #d1d5db; color: var(--brand); }
.page-item.active .page-link {
    background: var(--brand); border-color: var(--brand); color: #fff;
}
.page-item.disabled .page-link { opacity: .4; pointer-events: none; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MODALS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.modal-content {
    border-radius: 12px; border: none;
    box-shadow: 0 20px 60px rgba(15,23,42,.2);
}
.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 1.25rem;
    border-radius: 12px 12px 0 0;
}
.modal-header .modal-title { font-size: .9375rem; font-weight: 600; }
.modal-footer { border-top: 1px solid #e2e8f0; padding: .875rem 1.25rem; }
.modal-body { padding: 1.25rem; }
.btn-close { opacity: .45; transition: opacity var(--tr); }
.btn-close:hover { opacity: 1; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PROGRESS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.progress { height: 5px; border-radius: 3px; background: #e2e8f0; }
.progress-bar { border-radius: 3px; background: var(--brand); transition: width .5s ease; }
.progress-bar.bg-success { background: var(--c-success) !important; }
.progress-bar.bg-warning { background: var(--c-warning) !important; }
.progress-bar.bg-danger  { background: var(--c-danger)  !important; }
.progress-bar.bg-info    { background: var(--c-info)    !important; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   NAV TABS / PILLS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.nav-tabs {
    border-bottom: 2px solid #e2e8f0;
    gap: .125rem;
}
.nav-tabs .nav-link {
    font-size: .8125rem; font-weight: 500;
    border: none; border-radius: 0;
    padding: .625rem 1rem;
    color: var(--tx-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color var(--tr), border-color var(--tr);
    background: transparent;
}
.nav-tabs .nav-link:hover { color: var(--brand); border-bottom-color: var(--brand-soft-md); }
.nav-tabs .nav-link.active {
    color: var(--brand); border-bottom-color: var(--brand);
    background: transparent; font-weight: 600;
}
.nav-pills .nav-link {
    font-size: .8125rem; font-weight: 500;
    border-radius: 7px;
    color: var(--tx-secondary);
    padding: .4375rem .875rem;
    transition: all var(--tr);
}
.nav-pills .nav-link:hover { background: #f1f5f9; color: var(--brand); }
.nav-pills .nav-link.active {
    background: var(--brand); color: #fff;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   FONT SIZE UTILITIES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.font-10 { font-size: .625rem    !important; }
.font-11 { font-size: .6875rem   !important; }
.font-12 { font-size: .75rem     !important; }
.font-13 { font-size: .8125rem   !important; }
.font-14 { font-size: .875rem    !important; }
.font-15 { font-size: .9375rem   !important; }
.font-16 { font-size: 1rem       !important; }
.font-18 { font-size: 1.125rem   !important; }
.font-20 { font-size: 1.25rem    !important; }
.font-22 { font-size: 1.375rem   !important; }
.font-24 { font-size: 1.5rem     !important; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   MISC UTILITIES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.text-overflow  { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.min-width-0    { min-width: 0; }
.fw-semibold    { font-weight: 600 !important; }
.fw-medium      { font-weight: 500 !important; }
.border-dashed  { border-style: dashed !important; }
.arrow-none::after, .arrow-none::before { display: none !important; }
.border-3 { border-width: 3px !important; }

/* Simplebar (scrollable panels) */
.simplebar-scrollbar::before { background: rgba(0,0,0,.2); border-radius: 3px; }

/* Rounded circle override */
.rounded-circle { border-radius: 50% !important; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   STAT WIDGET CARDS (dashboard)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.card .card-body.py-3.d-flex h4 {
    font-size: 1.4375rem; font-weight: 700; margin: 0; line-height: 1.1;
}
.card .card-body.py-3.d-flex p { font-size: .75rem; margin: 0; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   KANBAN / SCHEDULE COLUMNS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.kanban-col { min-height: 160px; }
.kanban-col .card { transition: box-shadow var(--tr), transform var(--tr); }
.kanban-col .card:hover { transform: translateY(-1px); }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TIMELINE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
    content: ''; position: absolute; left: .5rem; top: 0; bottom: 0;
    width: 2px; background: #e2e8f0; border-radius: 1px;
}
.timeline-item { position: relative; margin-bottom: 1.25rem; }
.timeline-icon {
    position: absolute; left: -2rem;
    width: 1rem; height: 1rem; margin-top: .125rem;
    border-radius: 50%; border: 2px solid #fff;
    background: var(--brand);
    box-shadow: 0 0 0 2px var(--brand-soft);
}
.timeline-content { font-size: .8125rem; }

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   PRINT
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media print {
    .leftside-menu, .navbar-custom, .footer,
    .button-toggle-menu, .no-print { display: none !important; }
    .content-page { margin-left: 0 !important; width: 100% !important; }
    .content > .container-fluid { padding: 0; }
    .card { box-shadow: none !important; border: 1px solid #ccc !important; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   RESPONSIVE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@media (max-width: 767.98px) {
    .content > .container-fluid { padding: 1rem; }
    .topbar  { padding: 0 1rem; }
    .footer  { padding: .875rem 1rem; }
    .page-title-box { flex-direction: column; align-items: flex-start; gap: .375rem; padding: .5rem 0 1rem; }
    .dropdown-lg { min-width: min(22rem, calc(100vw - 1.5rem)); }
    .card-body { padding: .875rem !important; }
    .card-header { padding: .75rem .875rem !important; }
}
@media (max-width: 575.98px) {
    .table-responsive { font-size: .78rem; }
    .btn { font-size: .78rem; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ANIMATIONS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);  }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes pulse {
    0%,100% { transform: scale(1); }
    50%      { transform: scale(1.05); }
}
