/* ============================================================
   Laravel HR + QuickBooks Desktop 2010
   Enterprise Web UI Styles
   ============================================================ */

:root {
    --sidebar-width: 260px;
    --sidebar-bg: linear-gradient(180deg, #1a365d 0%, #0f2744 100%);
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --qb-green: #2ca01c;
    --bg-body: #f1f5f9;
    --card-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --card-shadow-hover: 0 4px 12px rgba(0,0,0,.1);
    --radius: 0.75rem;
    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background: var(--bg-body);
    color: #1e293b;
    min-height: 100vh;
    margin: 0;
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }

/* ---------- Sidebar (accordion navigation) ---------- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    background: var(--sidebar-bg);
    color: #fff;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform .25s ease;
    -webkit-overflow-scrolling: touch;
}

.sidebar .brand {
    flex: 0 0 auto;
    padding: 1.25rem 1.25rem 1rem;
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.sidebar .brand small {
    display: block;
    font-weight: 400;
    font-size: .72rem;
    opacity: .65;
    margin-top: .2rem;
}

.sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: .6rem 0 .5rem;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.35) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.35);
    border-radius: 3px;
}

.sidebar .nav-link {
    color: rgba(255,255,255,.82);
    border-radius: .5rem;
    margin: .1rem .65rem;
    padding: .5rem .85rem;
    display: flex;
    align-items: center;
    gap: .65rem;
    font-size: .9rem;
    transition: background .15s ease, color .15s ease;
    white-space: nowrap;
}
.sidebar .nav-link i {
    width: 1.25rem;
    font-size: 1.05rem;
    opacity: .9;
    flex-shrink: 0;
}
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background: rgba(255,255,255,.12);
    color: #fff;
}
.sidebar .nav-link.active {
    background: rgba(37,99,235,.4);
    font-weight: 500;
}

/* Accordion group headers */
.nav-accordion {
    margin: .15rem 0;
}
.nav-accordion-btn {
    width: calc(100% - 1.3rem);
    margin: .1rem .65rem;
    padding: .55rem .85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    border: 0;
    border-radius: .5rem;
    background: transparent;
    color: rgba(255,255,255,.9);
    font-size: .88rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background .15s ease;
}
.nav-accordion-btn span {
    display: flex;
    align-items: center;
    gap: .65rem;
}
.nav-accordion-btn span i {
    width: 1.25rem;
    font-size: 1.05rem;
    opacity: .9;
}
.nav-accordion-btn .chev {
    font-size: .75rem;
    opacity: .7;
    transition: transform .2s ease;
}
.nav-accordion-btn:not(.collapsed) .chev {
    transform: rotate(180deg);
}
.nav-accordion-btn:hover,
.nav-accordion-btn:not(.collapsed) {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.nav-sub {
    padding: .15rem 0 .35rem .35rem;
}
.nav-sub .nav-link {
    font-size: .86rem;
    padding: .42rem .75rem .42rem 1.15rem;
    margin-left: .85rem;
    color: rgba(255,255,255,.75);
}
.nav-sub .nav-link.active {
    background: rgba(37,99,235,.4);
    color: #fff;
}

.nav-footer {
    margin-top: auto;
    padding-top: .5rem;
    border-top: 1px solid rgba(255,255,255,.1);
}
.tenant-label, .user-label {
    color: rgba(255,255,255,.55);
}

/* legacy section labels (unused) */
.sidebar .nav-section { display: none; }
.sidebar hr {
    border-color: rgba(255,255,255,.1);
    margin: .5rem 1rem;
}

/* ---------- Main content ---------- */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 1.5rem 1.75rem 2.5rem;
    min-height: 100vh;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: .75rem;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
}

.page-header .subtitle {
    color: #64748b;
    font-size: .9rem;
    margin: .15rem 0 0;
}

/* ---------- Cards ---------- */
.stat-card,
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    background: #fff;
    transition: box-shadow .2s ease;
}

.stat-card:hover {
    box-shadow: var(--card-shadow-hover);
}

.stat-card .card-body {
    padding: 1.25rem;
}

.stat-value {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
}

.stat-label {
    font-size: .8rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.stat-icon {
    font-size: 1.75rem;
    opacity: .45;
}

/* ---------- Tables ---------- */
.table-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    background: #fff;
}

.table-card .table {
    margin-bottom: 0;
}

.table-card thead th {
    background: #f8fafc;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
    padding: .85rem 1rem;
    white-space: nowrap;
}

.table-card tbody td {
    padding: .8rem 1rem;
    vertical-align: middle;
    border-color: #f1f5f9;
    font-size: .9rem;
}

.table-card tbody tr:hover {
    background: #f8fafc;
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: .5rem;
    font-weight: 500;
    font-size: .875rem;
    padding: .45rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-qb {
    background: var(--qb-green);
    border-color: var(--qb-green);
    color: #fff;
}

.btn-qb:hover {
    background: #249017;
    border-color: #249017;
    color: #fff;
}

.btn-sm {
    padding: .3rem .7rem;
    font-size: .8rem;
}

/* ---------- Badges / Status ---------- */
.badge {
    font-weight: 500;
    font-size: .72rem;
    padding: .35em .65em;
    border-radius: .35rem;
}

.badge-status-open { background: #dbeafe; color: #1e40af; }
.badge-status-draft { background: #f1f5f9; color: #475569; }
.badge-status-exported { background: #fef3c7; color: #92400e; }
.badge-status-imported { background: #d1fae5; color: #065f46; }
.badge-status-approved { background: #dcfce7; color: #166534; }
.badge-status-closed { background: #e2e8f0; color: #334155; }
.badge-status-pending { background: #fef9c3; color: #854d0e; }
.badge-status-active { background: #dcfce7; color: #166534; }
.badge-qb { background: var(--qb-green); color: #fff; }

/* ---------- Forms ---------- */
.form-control, .form-select {
    border-radius: .5rem;
    border-color: #cbd5e1;
    font-size: .9rem;
    padding: .5rem .85rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}

.form-label {
    font-weight: 500;
    font-size: .85rem;
    color: #334155;
    margin-bottom: .35rem;
}

/* ---------- Alerts ---------- */
.alert {
    border-radius: .6rem;
    border: none;
    font-size: .9rem;
}

/* ---------- Workflow steps ---------- */
.workflow-steps {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.workflow-steps li {
    background: #f1f5f9;
    border-radius: 2rem;
    padding: .4rem 1rem;
    font-size: .82rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: .4rem;
}

.workflow-steps li.active {
    background: #dbeafe;
    color: #1e40af;
    font-weight: 600;
}

.workflow-steps li.done {
    background: #dcfce7;
    color: #166534;
}

/* ---------- Login / Auth pages ---------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a365d 0%, #0f2744 50%, #1e3a5f 100%);
    padding: 1.5rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
    overflow: hidden;
}

.auth-card .auth-header {
    background: linear-gradient(135deg, #1a365d, #2563eb);
    color: #fff;
    padding: 1.75rem 1.5rem;
    text-align: center;
}

.auth-card .auth-header h1 {
    font-size: 1.35rem;
    margin: 0 0 .25rem;
    font-weight: 700;
}

.auth-card .auth-header p {
    margin: 0;
    opacity: .8;
    font-size: .85rem;
}

.auth-card .auth-body {
    padding: 1.75rem 1.5rem;
}

/* ---------- Installer ---------- */
.install-page {
    min-height: 100vh;
    background: var(--bg-body);
    padding: 2rem 1rem;
}

.install-card {
    max-width: 720px;
    margin: 0 auto;
    background: #fff;
    border-radius: 1rem;
    box-shadow: var(--card-shadow-hover);
    overflow: hidden;
}

.install-header {
    background: linear-gradient(135deg, #1a365d, #2563eb);
    color: #fff;
    padding: 1.75rem 2rem;
}

.install-body {
    padding: 2rem;
}

.install-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.install-step:last-child { border-bottom: none; }

.install-step .step-num {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}

.install-step.done .step-num {
    background: var(--success);
    color: #fff;
}

.install-step.active .step-num {
    background: var(--primary);
    color: #fff;
}

/* ---------- Empty state ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #94a3b8;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: .5;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: inline-flex !important;
    }
}

.sidebar-toggle {
    display: none;
}

/* ---------- Utility ---------- */
.text-qb { color: var(--qb-green); }
.bg-qb-soft { background: rgba(44,160,28,.1); }
.border-qb { border-color: var(--qb-green) !important; }

.avatar-sm {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 600;
    color: #475569;
}

.action-btns {
    display: flex;
    gap: .35rem;
    flex-wrap: wrap;
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1035;
}
.sidebar-overlay.show { display: block; }
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform .2s ease;
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
    }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0 !important; }
}
.sidebar .nav-link { cursor: pointer; position: relative; z-index: 1; }

.org-instance-bar { font-size: 0.8rem; }
.sidebar .brand small { display: block; font-size: 0.7rem; opacity: 0.85; margin-top: 2px; font-weight: 400; }

/* Org code + profile in page header center */
.page-header.page-header-with-org {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}
.page-header-with-org > div:first-child { justify-self: start; }
.page-header-center { justify-self: center; text-align: center; }
.page-header-actions { justify-self: end; }
.org-meta-chips .org-code-badge { font-weight: 600; letter-spacing: 0.03em; }
.org-meta-chips .org-profile-badge { font-weight: 500; }
@media (max-width: 768px) {
  .page-header.page-header-with-org {
    grid-template-columns: 1fr;
  }
  .page-header-center, .page-header-actions { justify-self: start; }
}


/* App top bar — org code + profile (all modules) */
.app-topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1rem;
  padding: 0.55rem 0.85rem;
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.app-topbar-left { justify-self: start; display: flex; align-items: center; gap: 0.5rem; }
.app-topbar-center { justify-self: center; }
.app-topbar-right { justify-self: end; display: flex; align-items: center; gap: 0.5rem; }
.app-topbar .org-meta-chips { margin: 0; }
.app-topbar .org-code-badge,
.app-topbar .org-profile-badge {
  font-weight: 600;
  letter-spacing: 0.02em;
  font-size: 0.78rem;
  padding: 0.35em 0.65em;
}
/* Page headers stay simple — no org chips injected into content */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.page-header.page-header-with-org {
  display: flex;
  grid-template-columns: unset;
}
.page-header-center { display: none !important; } /* legacy inject removed */
@media (max-width: 768px) {
  .app-topbar {
    grid-template-columns: auto 1fr auto;
  }
  .app-topbar-center { justify-self: end; }
  .app-topbar-right { display: none; }
}



/* ---------- Accent dashlets ---------- */
/*
 * Dashlet / portal solid hex palette
 * ---------------------------------
 * blue     #2563EB
 * cyan     #0891B2
 * teal     #0F766E
 * emerald  #059669
 * violet   #7C3AED
 * indigo   #4F46E5
 * amber    #D97706
 * rose     #E11D48
 * orange   #EA580C
 * slate    #475569
 * pink     #DB2777
 * sky      #0284C7
 * lime     #65A30D
 * fuchsia  #C026D3
 *
 * Portal heroes:
 * admin #5B21B6 · hr #1D4ED8 · finance #047857 · manager #3730A3
 * employee #0E7490 · logistics #C2410C · default #1E3A5F
 */
:root {
    --dash-blue: #2563EB;
    --dash-cyan: #0891B2;
    --dash-teal: #0F766E;
    --dash-emerald: #059669;
    --dash-violet: #7C3AED;
    --dash-indigo: #4F46E5;
    --dash-amber: #D97706;
    --dash-rose: #E11D48;
    --dash-orange: #EA580C;
    --dash-slate: #475569;
    --dash-pink: #DB2777;
    --dash-sky: #0284C7;
    --dash-lime: #65A30D;
    --dash-fuchsia: #C026D3;
    --hero-admin: #5B21B6;
    --hero-hr: #1D4ED8;
    --hero-finance: #047857;
    --hero-manager: #3730A3;
    --hero-employee: #0E7490;
    --hero-logistics: #C2410C;
    --hero-default: #1E3A5F;
}

.stat-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
}
.stat-card::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--dash-blue);
    border-radius: 4px 0 0 4px;
}
.stat-card .stat-value { color: var(--dash-blue); }
.stat-card.accent-blue::before { background: var(--dash-blue); }
.stat-card.accent-blue .stat-value { color: var(--dash-blue); }
.stat-card.accent-cyan::before { background: var(--dash-cyan); }
.stat-card.accent-cyan .stat-value { color: var(--dash-cyan); }
.stat-card.accent-teal::before { background: var(--dash-teal); }
.stat-card.accent-teal .stat-value { color: var(--dash-teal); }
.stat-card.accent-violet::before { background: var(--dash-violet); }
.stat-card.accent-violet .stat-value { color: var(--dash-violet); }
.stat-card.accent-indigo::before { background: var(--dash-indigo); }
.stat-card.accent-indigo .stat-value { color: var(--dash-indigo); }
.stat-card.accent-amber::before { background: var(--dash-amber); }
.stat-card.accent-amber .stat-value { color: var(--dash-amber); }
.stat-card.accent-emerald::before { background: var(--dash-emerald); }
.stat-card.accent-emerald .stat-value { color: var(--dash-emerald); }
.stat-card.accent-rose::before { background: var(--dash-rose); }
.stat-card.accent-rose .stat-value { color: var(--dash-rose); }
.stat-card.accent-orange::before { background: var(--dash-orange); }
.stat-card.accent-orange .stat-value { color: var(--dash-orange); }
.stat-card.accent-slate::before { background: var(--dash-slate); }
.stat-card.accent-slate .stat-value { color: var(--dash-slate); }
.stat-card.accent-pink::before { background: var(--dash-pink); }
.stat-card.accent-pink .stat-value { color: var(--dash-pink); }
.stat-card.accent-sky::before { background: var(--dash-sky); }
.stat-card.accent-sky .stat-value { color: var(--dash-sky); }
.stat-card .stat-icon { color: var(--dash-blue); opacity: .55; }
.module-dashlets .stat-card,
.row.g-3 > [class*="col"] > .stat-card {
    border-left: none;
}
.card.module-panel .card-header {
    border-bottom-color: rgba(37, 99, 235, 0.12);
}
.card.module-panel .card-header::after {
    content: none;
}


/* ── Portal heroes & solid dashlets (role portals) ─────────────── */
.portal-hero {
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .1);
}
.portal-hero::after { content: none; }
.portal-hero-admin { background: var(--hero-admin); }         /* #5B21B6 */
.portal-hero-hr { background: var(--hero-hr); }               /* #1D4ED8 */
.portal-hero-finance { background: var(--hero-finance); }     /* #047857 */
.portal-hero-manager { background: var(--hero-manager); }     /* #3730A3 */
.portal-hero-employee { background: var(--hero-employee); }   /* #0E7490 */
.portal-hero-logistics { background: var(--hero-logistics); } /* #C2410C */
.portal-hero-default { background: var(--hero-default); }     /* #1E3A5F */

.module-scheme-badge {
    display: inline-flex;
    align-items: center;
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.28);
    color: #fff;
}

/* Solid colour KPI dashlets — explicit hex via CSS variables */
.dashlet-gradient,
.dashlet-solid {
    border: 0;
    border-radius: .9rem;
    color: #fff;
    box-shadow: 0 2px 10px rgba(15, 23, 42, .1);
    transition: transform .15s ease, box-shadow .15s ease;
}
.dashlet-gradient:hover,
.dashlet-solid:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, .14);
}
.dashlet-gradient .card-body,
.dashlet-solid .card-body { padding: 1rem 1.1rem; }
.dashlet-gradient .dash-value,
.dashlet-solid .dash-value { font-size: 1.65rem; font-weight: 700; line-height: 1.15; }
.dashlet-gradient .dash-label,
.dashlet-solid .dash-label { font-size: .8rem; opacity: .95; font-weight: 600; }
.dashlet-gradient .dash-sub,
.dashlet-solid .dash-sub { font-size: .7rem; opacity: .8; }
.dashlet-gradient a.stretched-link::after,
.dashlet-solid a.stretched-link::after { z-index: 1; }

.dash-blue { background: var(--dash-blue); }       /* #2563EB */
.dash-cyan { background: var(--dash-cyan); }       /* #0891B2 */
.dash-teal { background: var(--dash-teal); }       /* #0F766E */
.dash-emerald { background: var(--dash-emerald); } /* #059669 */
.dash-violet { background: var(--dash-violet); }   /* #7C3AED */
.dash-indigo { background: var(--dash-indigo); }   /* #4F46E5 */
.dash-amber { background: var(--dash-amber); }     /* #D97706 */
.dash-rose { background: var(--dash-rose); }       /* #E11D48 */
.dash-orange { background: var(--dash-orange); }   /* #EA580C */
.dash-slate { background: var(--dash-slate); }     /* #475569 */
.dash-pink { background: var(--dash-pink); }       /* #DB2777 */
.dash-sky { background: var(--dash-sky); }         /* #0284C7 */
.dash-lime { background: var(--dash-lime); }       /* #65A30D */
.dash-fuchsia { background: var(--dash-fuchsia); } /* #C026D3 */

.tool-tile {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .7rem;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: .75rem;
    text-decoration: none;
    color: inherit;
    background: #fff;
    transition: border-color .15s, background .15s, box-shadow .15s;
    height: 100%;
}
.tool-tile:hover {
    border-color: rgba(37, 99, 235, .35);
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .06);
    color: inherit;
}
.tool-tile .tool-icon {
    width: 2rem;
    height: 2rem;
    border-radius: .55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: .95rem;
}
.tool-icon.blue { background: #DBEAFE; color: #2563EB; }
.tool-icon.cyan { background: #CFFAFE; color: #0891B2; }
.tool-icon.teal { background: #CCFBF1; color: #0F766E; }
.tool-icon.emerald { background: #D1FAE5; color: #059669; }
.tool-icon.violet { background: #EDE9FE; color: #7C3AED; }
.tool-icon.indigo { background: #E0E7FF; color: #4F46E5; }
.tool-icon.amber { background: #FEF3C7; color: #D97706; }
.tool-icon.rose { background: #FFE4E6; color: #E11D48; }
.tool-icon.orange { background: #FFEDD5; color: #EA580C; }
.tool-icon.slate { background: #F1F5F9; color: #475569; }
.tool-icon.pink { background: #FCE7F3; color: #DB2777; }
.tool-icon.sky { background: #E0F2FE; color: #0284C7; }
.tool-tile .tool-label { font-size: .8rem; font-weight: 600; }

.module-scheme-badge {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.3);
}

.app-version-footer {
  text-align: center;
  background: #0b3db8;
  color: #ffffff !important;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.7rem 1rem;
  margin-top: auto;
  letter-spacing: 0.02em;
}

.mui-card{background:#fff;border-radius:16px;border:1px solid rgba(15,23,42,.06);box-shadow:0 1px 2px rgba(15,23,42,.04),0 8px 24px rgba(15,23,42,.06);overflow:hidden;height:100%}
.mui-card-header{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem;padding:1rem 1.15rem .25rem}
.mui-card-title{font-weight:700;font-size:.95rem;color:#0f172a}
.mui-card-sub{font-size:.75rem;color:#64748b}
.mui-card-body{padding:.5rem 1rem 1.1rem}
.mui-chart-wrap{position:relative;width:100%;height:240px}
.mui-chart-square{height:220px}
.mui-kpi{border-radius:16px;padding:1rem 1.1rem;color:#fff;box-shadow:0 8px 20px rgba(15,23,42,.12);min-height:110px;display:flex;flex-direction:column;justify-content:space-between}
.mui-kpi .kpi-value{font-size:1.75rem;font-weight:800}
.mui-kpi .kpi-label{font-size:.8rem;font-weight:600}
.mui-kpi .kpi-sub{font-size:.7rem;opacity:.85}
.mui-kpi-blue{background:linear-gradient(135deg,#1d4ed8,#2563eb)}
.mui-kpi-teal{background:linear-gradient(135deg,#0f766e,#14b8a6)}
.mui-kpi-amber{background:linear-gradient(135deg,#b45309,#f59e0b)}
.mui-kpi-violet{background:linear-gradient(135deg,#6d28d9,#8b5cf6)}
.mui-kpi-rose{background:linear-gradient(135deg,#be123c,#fb7185)}
.mui-kpi-emerald{background:linear-gradient(135deg,#047857,#10b981)}
