/* =====================================================================
   GICA — Premium UI Theme
   Design system: blue · white · premium grey
   Built on Bootstrap 5.3 + Bootstrap Icons. AdminLTE-inspired sidebar.
   ===================================================================== */

:root {
    /* Brand */
    --gica-primary:        #1d4ed8;
    --gica-primary-600:    #1e40af;
    --gica-primary-700:    #1e3a8a;
    --gica-primary-50:     #eff6ff;
    --gica-primary-100:    #dbeafe;

    /* Greys (premium neutrals) */
    --gica-bg:             #f4f6fb;
    --gica-surface:        #ffffff;
    --gica-surface-alt:    #f8fafc;
    --gica-border:         #e6e9f2;
    --gica-border-strong:  #d4d9e6;

    --gica-text:           #0f172a;
    --gica-text-muted:     #64748b;
    --gica-text-dim:       #94a3b8;

    /* Sidebar */
    --gica-sidebar-bg:     #0f172a;
    --gica-sidebar-bg-2:   #111c33;
    --gica-sidebar-text:   #cbd5e1;
    --gica-sidebar-text-muted: #94a3b8;
    --gica-sidebar-active-bg: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    --gica-sidebar-hover:  rgba(255,255,255,.05);

    /* Status tones */
    --gica-success:        #16a34a;
    --gica-warning:        #f59e0b;
    --gica-danger:         #ef4444;
    --gica-info:           #0891b2;

    /* Shadows & radii */
    --gica-shadow-sm:      0 1px 2px rgba(15,23,42,.04);
    --gica-shadow:         0 6px 18px -8px rgba(15,23,42,.10), 0 2px 4px rgba(15,23,42,.04);
    --gica-shadow-lg:      0 20px 50px -20px rgba(15,23,42,.18);
    --gica-radius:         14px;
    --gica-radius-sm:      10px;

    --gica-sidebar-w:      268px;
    --gica-navbar-h:       64px;
    --gica-transition:     200ms cubic-bezier(.4,0,.2,1);

    --bs-primary: var(--gica-primary);
    --bs-primary-rgb: 29, 78, 216;
    --bs-link-color: var(--gica-primary);
    --bs-link-hover-color: var(--gica-primary-700);
    --bs-body-font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-color: var(--gica-text);
    --bs-body-bg: var(--gica-bg);
    --bs-border-color: var(--gica-border);
}

/* Dark mode */
[data-bs-theme="dark"] {
    --gica-bg:             #0a0f1d;
    --gica-surface:        #111827;
    --gica-surface-alt:    #0f172a;
    --gica-border:         #1f2937;
    --gica-border-strong:  #2a3447;

    --gica-text:           #e5e7eb;
    --gica-text-muted:     #94a3b8;
    --gica-text-dim:       #6b7280;

    --gica-sidebar-bg:     #060912;
    --gica-sidebar-bg-2:   #0c1224;
    --gica-sidebar-text:   #cbd5e1;
    --gica-sidebar-hover:  rgba(255,255,255,.04);

    --bs-body-color: var(--gica-text);
    --bs-body-bg: var(--gica-bg);
    --bs-border-color: var(--gica-border);
    color-scheme: dark;
}

/* Base */
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body { height: 100%; }
body.gica-body {
    background-color: var(--gica-bg);
    color: var(--gica-text);
    font-family: var(--bs-body-font-family);
    font-size: 14px;
    line-height: 1.55;
}
h1,h2,h3,h4,h5 { font-family: 'Plus Jakarta Sans', var(--bs-body-font-family); font-weight: 700; color: var(--gica-text); }
a { text-decoration: none; }
a:hover { text-decoration: none; }
::selection { background: var(--gica-primary-100); color: var(--gica-primary-700); }

/* =====================================================================
   LAYOUT — Sidebar + shell
   ===================================================================== */
.gica-shell {
    margin-left: var(--gica-sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--gica-transition);
}
.gica-content { flex: 1 1 auto; }

@media (max-width: 991.98px) {
    .gica-shell { margin-left: 0; }
}

/* Sidebar */
.gica-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--gica-sidebar-w);
    background: linear-gradient(180deg, var(--gica-sidebar-bg) 0%, var(--gica-sidebar-bg-2) 100%);
    color: var(--gica-sidebar-text);
    border-right: 1px solid rgba(255,255,255,.04);
    z-index: 1040;
    display: flex; flex-direction: column;
    transform: translateX(0);
    transition: transform var(--gica-transition);
    overflow: hidden;
}

/* Desktop: collapsed sidebar (toggled by hamburger on >= 992px) */
@media (min-width: 992px) {
    body.gica-sidebar-collapsed .gica-sidebar { transform: translateX(-100%); }
    body.gica-sidebar-collapsed .gica-shell    { margin-left: 0; }
}

@media (max-width: 991.98px) {
    .gica-sidebar { transform: translateX(-100%); box-shadow: var(--gica-shadow-lg); }
    body.gica-sidebar-open .gica-sidebar { transform: translateX(0); }
    body.gica-sidebar-open .gica-sidebar-backdrop { opacity: 1; pointer-events: auto; }
}
.gica-sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(2,6,23,.5);
    opacity: 0; pointer-events: none; transition: opacity var(--gica-transition);
    z-index: 1039;
}

/* Brand */
.gica-brand {
    height: var(--gica-navbar-h);
    padding: 0 18px;
    display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    flex-shrink: 0;
}
.gica-brand-link { display: flex; align-items: center; gap: 12px; color: #fff; }
.gica-brand-link:hover { color: #fff; }
.gica-brand-mark {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: grid; place-items: center;
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    color: #fff;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 6px 16px -6px rgba(37,99,235,.6);
    overflow: hidden;
}
/* When the brand-mark holds the actual logo image, drop the gradient and let
   the white logo background sit cleanly on dark sidebar / auth panels. */
.gica-brand-mark:has(img) {
    background: #fff;
    padding: 3px;
    box-shadow: 0 4px 12px -4px rgba(0,0,0,.25), 0 0 0 1px rgba(255,255,255,.06);
}
.gica-brand-mark img {
    width: 100%; height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}
.gica-brand-mark-lg { width: 72px; height: 72px; border-radius: 16px; font-size: 26px; }
.gica-brand-mark-lg:has(img) { padding: 6px; }
.gica-brand-text strong { display: block; font-weight: 800; line-height: 1; letter-spacing: .02em; }
.gica-brand-text small { color: var(--gica-sidebar-text-muted); font-size: 11px; }
.gica-sidebar-close { color: #fff; }

/* User box */
.gica-userbox {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    flex-shrink: 0;
}
.gica-avatar {
    width: 40px; height: 40px; border-radius: 12px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #fff; font-weight: 700;
    display: grid; place-items: center;
    font-size: 14px;
    overflow: hidden; flex-shrink: 0;
}
.gica-avatar img { width: 100%; height: 100%; object-fit: cover; }
.gica-avatar-sm { width: 32px; height: 32px; font-size: 12px; border-radius: 10px; }
.gica-avatar-xl { width: 96px; height: 96px; border-radius: 24px; font-size: 32px; }
.gica-userbox-meta { min-width: 0; flex: 1; }
.gica-username { color: #fff; font-weight: 600; font-size: 13px; }
.gica-userrole { color: var(--gica-sidebar-text-muted); font-size: 11px; }

/* Nav */
.gica-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 8px 24px;
    /* Hide visual scrollbar, keep scroll behavior */
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE / legacy Edge */
}
.gica-nav::-webkit-scrollbar { width: 0; height: 0; display: none; } /* Chrome / Safari / Edge */

.gica-nav .nav-sidebar { gap: 2px; }
.gica-nav .nav-header {
    color: var(--gica-sidebar-text-muted);
    text-transform: uppercase;
    font-size: 10.5px; font-weight: 700; letter-spacing: .08em;
    padding: 16px 12px 6px;
}
.gica-nav .nav-link {
    color: var(--gica-sidebar-text);
    padding: 10px 12px;
    border-radius: 10px;
    display: flex; align-items: center; gap: 12px;
    font-weight: 500;
    font-size: 13.5px;
    transition: background var(--gica-transition), color var(--gica-transition);
}
.gica-nav .nav-link:hover { background: var(--gica-sidebar-hover); color: #fff; }
.gica-nav .nav-link.active {
    background: var(--gica-sidebar-active-bg);
    color: #fff;
    box-shadow: 0 6px 18px -8px rgba(37,99,235,.7);
}
.gica-nav .nav-icon {
    width: 22px; text-align: center; font-size: 17px; flex-shrink: 0;
}
.gica-nav .nav-link p { margin: 0; flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gica-nav .nav-link p .right {
    transition: transform var(--gica-transition);
    font-size: 12px;
}
.gica-nav .menu-open > .nav-link p .right { transform: rotate(-90deg); }
.gica-nav .nav-treeview {
    padding-left: 32px;
    display: none;
    margin-top: 2px;
}
.gica-nav .menu-open > .nav-treeview { display: block; }
.gica-nav .nav-treeview .nav-link {
    padding: 8px 12px;
    font-size: 13px;
    color: var(--gica-sidebar-text-muted);
}
.gica-nav .nav-treeview .nav-link:hover { color: #fff; background: transparent; }
.gica-nav .nav-treeview .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.06);
    box-shadow: none;
}

.gica-sidebar-footer {
    padding: 12px 18px;
    border-top: 1px solid rgba(255,255,255,.04);
    color: var(--gica-sidebar-text-muted);
    flex-shrink: 0;
}

/* =====================================================================
   NAVBAR (top)
   ===================================================================== */
.gica-navbar {
    height: var(--gica-navbar-h);
    background: var(--gica-surface);
    border-bottom: 1px solid var(--gica-border);
    padding: 0 16px 0 12px;
    display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 1030;
}
.gica-burger {
    width: 40px; height: 40px;
    border-radius: 10px;
    color: var(--gica-text);
    display: grid; place-items: center;
    font-size: 22px;
}
.gica-burger:hover { background: var(--gica-surface-alt); color: var(--gica-primary); }

.gica-search {
    flex: 0 1 380px;
    position: relative;
}
.gica-search > i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--gica-text-muted);
}
.gica-search input.form-control {
    padding-left: 36px; padding-right: 56px;
    background: var(--gica-surface-alt);
    border-color: transparent;
    border-radius: 10px;
    height: 40px;
    transition: all var(--gica-transition);
}
.gica-search input.form-control:focus {
    background: var(--gica-surface);
    border-color: var(--gica-primary);
    box-shadow: 0 0 0 3px rgba(29,78,216,.12);
}
.gica-kbd {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: var(--gica-surface);
    border: 1px solid var(--gica-border);
    color: var(--gica-text-muted);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 6px;
}

/* Search results dropdown */
.gica-search-results {
    position: absolute;
    top: calc(100% + 6px); left: 0; right: 0;
    background: var(--gica-surface);
    border: 1px solid var(--gica-border);
    border-radius: 12px;
    box-shadow: var(--gica-shadow-lg);
    max-height: 480px;
    overflow-y: auto;
    z-index: 1050;
    padding: 6px 0;
}
.gica-search-loading,
.gica-search-empty {
    padding: 18px 16px;
    color: var(--gica-text-muted);
    font-size: 13px;
    text-align: center;
}
.gica-search-loading i { animation: gica-spin 1s linear infinite; margin-right: 4px; }
@keyframes gica-spin { to { transform: rotate(360deg); } }

.gica-search-group + .gica-search-group { border-top: 1px solid var(--gica-border); margin-top: 4px; padding-top: 4px; }
.gica-search-group-label {
    padding: 8px 14px 4px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
    color: var(--gica-text-muted);
    display: flex; align-items: center; gap: 6px;
}
.gica-search-group-label i { color: var(--gica-primary); font-size: 13px; }

.gica-search-item {
    display: block;
    padding: 8px 14px;
    color: var(--gica-text);
    text-decoration: none;
    transition: background var(--gica-transition);
    border-left: 2px solid transparent;
}
.gica-search-item:hover,
.gica-search-item.active {
    background: var(--gica-surface-alt);
    border-left-color: var(--gica-primary);
    color: var(--gica-text);
}
.gica-search-item-title {
    font-weight: 600; font-size: 13.5px; color: var(--gica-text);
}
.gica-search-item-sub {
    color: var(--gica-text-muted); font-size: 12px; margin-top: 1px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gica-search-item mark {
    background: rgba(245,158,11,.25); color: inherit; padding: 0; border-radius: 2px;
}
.gica-search-footer {
    padding: 8px 14px; font-size: 11px; color: var(--gica-text-muted);
    border-top: 1px solid var(--gica-border); margin-top: 4px;
    text-align: center; background: var(--gica-surface-alt);
}

.gica-navbar-right { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.btn-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    color: var(--gica-text);
    display: inline-grid; place-items: center;
    font-size: 18px;
    position: relative;
    border: none;
    background: transparent;
}
.btn-icon:hover { background: var(--gica-surface-alt); color: var(--gica-primary); }
.gica-dot {
    position: absolute; top: 8px; right: 8px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--gica-danger);
    box-shadow: 0 0 0 2px var(--gica-surface);
}

.btn-user {
    min-height: 44px;
    padding: 4px 12px 4px 4px;
    border: none;
    background: transparent;
    color: var(--gica-text);
    border-radius: 10px;
    display: inline-flex; align-items: center;
    font-weight: 500; font-size: 13.5px;
}
.btn-user:hover { background: var(--gica-surface-alt); }
.gica-user-meta { line-height: 1.2; max-width: 180px; }
.gica-user-name { font-weight: 600; font-size: 13.5px; color: var(--gica-text);
                  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.gica-user-role { font-size: 11px; color: var(--gica-text-muted); margin-top: 1px;
                  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

[data-icon-light] { display: inline-block; }
[data-icon-dark] { display: none; }
[data-bs-theme="dark"] [data-icon-light] { display: none; }
[data-bs-theme="dark"] [data-icon-dark] { display: inline-block; }

/* Dropdowns */
.dropdown-menu {
    border: 1px solid var(--gica-border);
    border-radius: 12px;
    box-shadow: var(--gica-shadow-lg);
    padding: 6px;
    min-width: 220px;
}
.gica-dropdown-card { min-width: 320px; }
.dropdown-header {
    padding: 10px 12px;
    color: var(--gica-text);
    font-size: 13px;
    display: flex; justify-content: space-between; align-items: center;
}
.dropdown-item {
    border-radius: 8px;
    padding: 10px 12px;
    display: flex; align-items: center; gap: 10px;
    color: var(--gica-text);
    font-size: 13.5px;
}
.dropdown-item:hover { background: var(--gica-surface-alt); color: var(--gica-primary); }
.dropdown-item .text-muted { color: var(--gica-text-muted) !important; }
.dropdown-item small { color: var(--gica-text-muted); display: block; margin-top: 2px; }
.dropdown-item > i { font-size: 16px; flex-shrink: 0; }
.dropdown-divider { border-color: var(--gica-border); margin: 4px 0; }
.dropdown-footer { color: var(--gica-primary); font-weight: 500; }

/* =====================================================================
   PAGE HEADER + BREADCRUMB
   ===================================================================== */
.gica-page-header {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.gica-page-title {
    font-size: 24px; font-weight: 700; margin: 0 0 4px;
    color: var(--gica-text);
    letter-spacing: -0.01em;
}
.gica-breadcrumb {
    margin: 0; padding: 0;
    display: flex; gap: 6px; flex-wrap: wrap;
    font-size: 12.5px;
    list-style: none;
}
.gica-breadcrumb .breadcrumb-item { color: var(--gica-text-muted); }
.gica-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: '/'; color: var(--gica-text-dim); padding: 0 6px;
}
.gica-breadcrumb .breadcrumb-item.active { color: var(--gica-text); font-weight: 500; }
.gica-breadcrumb .breadcrumb-item a { color: var(--gica-text-muted); }
.gica-breadcrumb .breadcrumb-item a:hover { color: var(--gica-primary); }

/* =====================================================================
   CARDS
   ===================================================================== */
.gica-card {
    background: var(--gica-surface);
    border: 1px solid var(--gica-border);
    border-radius: var(--gica-radius);
    box-shadow: var(--gica-shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--gica-transition), border-color var(--gica-transition);
}
.gica-card:hover { box-shadow: var(--gica-shadow); }
.gica-card-head {
    padding: 18px 20px;
    border-bottom: 1px solid var(--gica-border);
    display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.gica-card-title { font-size: 15px; font-weight: 700; margin: 0; color: var(--gica-text); }
.gica-card-sub { color: var(--gica-text-muted); font-size: 12.5px; margin: 4px 0 0; }
.gica-card-body { padding: 20px; }
.gica-card-link {
    color: var(--gica-primary); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.gica-card-link:hover { color: var(--gica-primary-700); }

/* =====================================================================
   STATISTIC CARDS
   ===================================================================== */
.gica-stat {
    background: var(--gica-surface);
    border: 1px solid var(--gica-border);
    border-radius: var(--gica-radius);
    padding: 18px;
    display: flex; align-items: flex-start; gap: 14px;
    box-shadow: var(--gica-shadow-sm);
    position: relative;
    overflow: hidden;
    transition: transform var(--gica-transition), box-shadow var(--gica-transition);
}
.gica-stat::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background: var(--accent, var(--gica-primary));
}
.gica-stat:hover { transform: translateY(-2px); box-shadow: var(--gica-shadow); }
.gica-stat-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: color-mix(in srgb, var(--accent, var(--gica-primary)) 14%, transparent);
    color: var(--accent, var(--gica-primary));
    font-size: 20px;
    flex-shrink: 0;
}
.gica-stat-body { min-width: 0; flex: 1; }
.gica-stat-label { color: var(--gica-text-muted); font-size: 12px; font-weight: 500; }
.gica-stat-value { color: var(--gica-text); font-size: 22px; font-weight: 800; line-height: 1.1; margin-top: 2px; letter-spacing: -0.01em; }
.gica-stat-sub { color: var(--gica-text-muted); font-size: 11.5px; margin-top: 2px; }
.gica-stat-primary { --accent: var(--gica-primary); }
.gica-stat-info    { --accent: #06b6d4; }
.gica-stat-success { --accent: var(--gica-success); }
.gica-stat-warning { --accent: var(--gica-warning); }
.gica-stat-danger  { --accent: var(--gica-danger); }
.gica-stat-orange  { --accent: #f97316; }
.gica-stat-purple  { --accent: #a78bfa; }
.gica-stat-teal    { --accent: #14b8a6; }

/* =====================================================================
   HERO BANNER (Dashboard greeting)
   ===================================================================== */
.gica-hero {
    background: linear-gradient(135deg, #1d4ed8 0%, #4f46e5 60%, #7c3aed 100%);
    color: #fff;
    border-radius: 18px;
    padding: 26px 28px;
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    overflow: hidden;
    box-shadow: 0 24px 50px -25px rgba(29,78,216,.45);
    position: relative;
}
.gica-hero::before {
    content: ''; position: absolute; right: -60px; top: -80px;
    width: 260px; height: 260px; border-radius: 50%;
    background: rgba(255,255,255,.1);
}
.gica-hero::after {
    content: ''; position: absolute; right: 80px; bottom: -40px;
    width: 140px; height: 140px; border-radius: 50%;
    background: rgba(255,255,255,.06);
}
.gica-hero-eyebrow { font-size: 12.5px; opacity: .85; margin: 0 0 4px; letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
.gica-hero-title { font-size: 28px; font-weight: 800; margin: 0; color: #fff; letter-spacing: -0.02em; }
.gica-hero-sub { opacity: .9; margin: 4px 0 0; font-size: 13.5px; }
.gica-hero-illust {
    font-size: 64px;
    line-height: 1;
    opacity: .35;
    z-index: 1;
}

/* =====================================================================
   CHART, LIST, TIMELINE
   ===================================================================== */
.gica-chart-wrap { position: relative; height: 280px; }

.gica-list { list-style: none; margin: 0; padding: 0; }
.gica-list li {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 12px 20px;
    border-bottom: 1px solid var(--gica-border);
}
.gica-list li:last-child { border-bottom: 0; }
.gica-list-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--gica-primary-50); color: var(--gica-primary);
    display: grid; place-items: center; font-size: 16px; flex-shrink: 0;
}
.gica-list-body { min-width: 0; flex: 1; }
.gica-list-title { color: var(--gica-text); font-weight: 600; font-size: 13.5px; display: block; }
.gica-list-title:hover { color: var(--gica-primary); }

.gica-event-date {
    width: 50px; flex-shrink: 0;
    background: var(--gica-primary-50); color: var(--gica-primary);
    border-radius: 10px;
    text-align: center; padding: 6px 0;
}
.gica-event-day { display: block; font-size: 18px; font-weight: 800; line-height: 1; }
.gica-event-month { font-size: 10px; font-weight: 700; letter-spacing: .04em; }

.gica-timeline { list-style: none; margin: 0; padding: 16px 20px; }
.gica-timeline li {
    position: relative;
    padding-left: 22px;
    padding-bottom: 14px;
    border-left: 2px solid var(--gica-border);
}
.gica-timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.gica-timeline-dot {
    position: absolute; left: -7px; top: 4px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--gica-primary);
    box-shadow: 0 0 0 3px var(--gica-surface), 0 0 0 4px var(--gica-primary-100);
}

.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =====================================================================
   BADGES & BUTTONS
   ===================================================================== */
.gica-badge-soft {
    background: var(--gica-primary-50);
    color: var(--gica-primary-700);
    border: 1px solid var(--gica-primary-100);
    font-weight: 600; font-size: 11px;
    padding: 4px 8px; border-radius: 6px;
}
[data-bs-theme="dark"] .gica-badge-soft {
    background: rgba(29,78,216,.18); color: #93c5fd; border-color: rgba(147,197,253,.25);
}

.btn { font-weight: 500; border-radius: 10px; transition: all var(--gica-transition); }
.btn-lg { padding: .8rem 1.2rem; font-weight: 600; }
.btn-primary { background: var(--gica-primary); border-color: var(--gica-primary); }
.btn-primary:hover, .btn-primary:focus {
    background: var(--gica-primary-600); border-color: var(--gica-primary-600);
    box-shadow: 0 8px 20px -8px rgba(29,78,216,.5);
}
.btn-outline-primary { color: var(--gica-primary); border-color: var(--gica-primary); }
.btn-outline-primary:hover { background: var(--gica-primary); border-color: var(--gica-primary); }

/* Form */
.form-control, .form-select {
    border-radius: 10px;
    border-color: var(--gica-border);
    padding: .55rem .85rem;
    font-size: 14px;
    background: var(--gica-surface);
    color: var(--gica-text);
}
.form-control:focus, .form-select:focus {
    border-color: var(--gica-primary);
    box-shadow: 0 0 0 3px rgba(29,78,216,.12);
}
.input-group-lg .form-control, .input-group-lg .input-group-text { font-size: 15px; }
.input-group-text { background: var(--gica-surface-alt); border-color: var(--gica-border); color: var(--gica-text-muted); }
.form-label { font-weight: 500; font-size: 13px; color: var(--gica-text); margin-bottom: 6px; }
/* =====================================================================
   CHECKBOXES & RADIOS — make unchecked state clearly visible
   ===================================================================== */
.form-check-input {
    width: 18px; height: 18px;
    border: 1.5px solid #94a3b8;      /* slate-400 — visible on white */
    background-color: #fff;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.form-check-input:hover { border-color: var(--gica-primary); }
.form-check-input:focus {
    border-color: var(--gica-primary);
    box-shadow: 0 0 0 3px rgba(29,78,216,.2);
    outline: none;
}
.form-check-input:checked {
    background-color: var(--gica-primary);
    border-color: var(--gica-primary);
}
.form-check-input:indeterminate {
    background-color: var(--gica-primary);
    border-color: var(--gica-primary);
}
.form-check-input[type="checkbox"]:disabled {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    opacity: .65;
}
/* Switch variant (form-switch) — keep wider but with same strong border */
.form-switch .form-check-input { width: 2.5em; height: 1.25em; border-color: #94a3b8; }
[data-bs-theme="dark"] .form-check-input { border-color: #475569; background-color: #1e293b; }
[data-bs-theme="dark"] .form-check-input:hover { border-color: var(--gica-primary); }
[data-bs-theme="dark"] .form-check-input:disabled { background-color: #0f172a; border-color: #334155; }

/* Table-row checkbox: align center, slight emphasis */
table .form-check-input { vertical-align: middle; margin-top: 0; }
.gica-perm-check, .chk-row { width: 20px; height: 20px; }

/* Alerts */
.alert { border-radius: var(--gica-radius-sm); padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.alert > i:first-child { font-size: 18px; flex-shrink: 0; }
.alert .btn-close { margin-left: auto; }

/* =====================================================================
   AUTH PAGES
   ===================================================================== */
.gica-auth-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #eef2ff 0%, #f0f9ff 60%, #f5f3ff 100%);
    padding: 24px;
    display: grid; place-items: center;
    font-family: var(--bs-body-font-family);
    color: var(--gica-text);
}
.gica-auth-wrap { width: 100%; max-width: 1080px; }
.gica-auth-card {
    background: var(--gica-surface);
    border-radius: 24px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    box-shadow: 0 40px 80px -30px rgba(15,23,42,.20);
    border: 1px solid rgba(29,78,216,.08);
}
@media (max-width: 767.98px) {
    .gica-auth-card { grid-template-columns: 1fr; }
    .gica-auth-brand-side { display: none; }
}
.gica-auth-brand-side {
    background: linear-gradient(160deg, #1d4ed8 0%, #4f46e5 50%, #7c3aed 100%);
    color: #fff;
    padding: 48px 40px;
    display: flex; flex-direction: column; justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.gica-auth-brand-side::before {
    content: ''; position: absolute; right: -100px; top: -100px;
    width: 320px; height: 320px; border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.gica-auth-brand-side::after {
    content: ''; position: absolute; left: -60px; bottom: -120px;
    width: 240px; height: 240px; border-radius: 50%;
    background: rgba(255,255,255,.06);
}
.gica-auth-brand { position: relative; z-index: 1; }
.gica-auth-brand h2 { color: #fff; font-size: 28px; margin: 18px 0 10px; letter-spacing: -0.01em; line-height: 1.2; }
.gica-auth-brand p { color: rgba(255,255,255,.85); font-size: 14px; max-width: 360px; }
.gica-auth-bullets { position: relative; z-index: 1; display: grid; gap: 10px; margin-top: 24px; }
.gica-auth-bullets > div {
    background: rgba(255,255,255,.10);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    padding: 12px 14px;
    color: #fff;
    font-size: 13px;
    display: flex; align-items: center; gap: 10px;
}
.gica-auth-bullets i { font-size: 16px; }
.gica-auth-footer { position: relative; z-index: 1; color: rgba(255,255,255,.65); font-size: 11.5px; }

.gica-auth-form-side {
    padding: 48px 44px;
    background: var(--gica-surface);
    display: flex; flex-direction: column; justify-content: center;
}
.gica-auth-form { width: 100%; max-width: 380px; margin: 0 auto; }
.gica-demo-creds {
    background: var(--gica-surface-alt);
    border: 1px dashed var(--gica-border-strong);
    border-radius: 12px;
    padding: 12px 14px;
}
.gica-demo-cred {
    background: var(--gica-surface);
    border: 1px solid var(--gica-border);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all var(--gica-transition);
}
.gica-demo-cred:hover {
    border-color: var(--gica-primary);
    background: var(--gica-primary-50);
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.gica-footer {
    background: var(--gica-surface);
    border-top: 1px solid var(--gica-border);
    padding: 14px 20px;
    color: var(--gica-text-muted);
    font-size: 12.5px;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    margin-top: auto;
}

/* =====================================================================
   TABS
   ===================================================================== */
.gica-tabs.nav-tabs { border-bottom: 1px solid var(--gica-border); padding: 0 20px; }
.gica-tabs .nav-link {
    color: var(--gica-text-muted);
    border: none; border-bottom: 2px solid transparent;
    padding: 14px 16px;
    font-weight: 500; font-size: 13.5px;
    border-radius: 0;
}
.gica-tabs .nav-link:hover { color: var(--gica-primary); border-bottom-color: var(--gica-primary-100); }
.gica-tabs .nav-link.active {
    color: var(--gica-primary);
    background: transparent;
    border-bottom-color: var(--gica-primary);
}

/* =====================================================================
   TABLES (DataTables)
   ===================================================================== */
.dataTables_wrapper { padding: 16px 20px; }
table.dataTable thead th {
    font-weight: 600; font-size: 12px;
    color: var(--gica-text-muted);
    text-transform: uppercase; letter-spacing: .04em;
    border-bottom: 1px solid var(--gica-border) !important;
    padding: 12px 14px;
}
table.dataTable tbody td {
    padding: 14px;
    border-color: var(--gica-border) !important;
    color: var(--gica-text);
    font-size: 13.5px;
}
table.dataTable tbody tr:hover { background: var(--gica-surface-alt); }
.page-item.active .page-link { background: var(--gica-primary); border-color: var(--gica-primary); }
.page-link { color: var(--gica-primary); border-radius: 8px !important; margin: 0 2px; border-color: var(--gica-border); }

/* =====================================================================
   EMPTY STATE
   ===================================================================== */
.gica-empty {
    text-align: center; color: var(--gica-text-muted);
    padding: 32px 16px;
}
.gica-empty i {
    font-size: 38px; opacity: .35; display: block; margin-bottom: 8px;
}
.gica-empty p { margin: 0; font-size: 13.5px; }
.gica-empty-page {
    background: var(--gica-surface);
    border: 1px solid var(--gica-border);
    border-radius: var(--gica-radius);
    padding: 56px 24px;
    text-align: center;
}
.gica-empty-icon { font-size: 64px; color: var(--gica-primary); opacity: .85; margin-bottom: 12px; }
.gica-empty-title { font-size: 22px; font-weight: 700; margin: 8px 0 6px; color: var(--gica-text); }
.gica-empty-text { color: var(--gica-text-muted); max-width: 520px; margin: 0 auto 18px; font-size: 13.5px; }

/* =====================================================================
   ERROR PAGES
   ===================================================================== */
.gica-error-page {
    background: var(--gica-surface);
    border: 1px solid var(--gica-border);
    border-radius: var(--gica-radius);
    padding: 64px 24px;
    text-align: center;
}
.gica-error-illust { position: relative; display: inline-block; margin-bottom: 16px; }
.gica-error-code {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 110px; font-weight: 800; line-height: 1;
    color: transparent;
    background: linear-gradient(135deg, var(--gica-primary), #7c3aed);
    -webkit-background-clip: text; background-clip: text;
    letter-spacing: -0.04em;
}
.gica-error-illust i {
    position: absolute; right: -14px; top: -10px;
    font-size: 36px; color: var(--gica-primary);
    background: var(--gica-primary-50);
    border-radius: 12px;
    padding: 8px;
}
.gica-error-title { font-size: 24px; font-weight: 700; margin: 12px 0 6px; }
.gica-error-text { color: var(--gica-text-muted); margin-bottom: 20px; }

/* =====================================================================
   LOADING SKELETON
   ===================================================================== */
.skeleton {
    background: linear-gradient(90deg, var(--gica-border) 25%, var(--gica-border-strong) 37%, var(--gica-border) 63%);
    background-size: 400% 100%;
    border-radius: 8px;
    animation: gica-shimmer 1.4s ease infinite;
}
@keyframes gica-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* =====================================================================
   SELECT2 / DROPZONE — overrides for Bootstrap 5 theme
   ===================================================================== */
.select2-container--bootstrap-5 .select2-selection {
    border-color: var(--gica-border);
    border-radius: 10px;
}
.dropzone {
    border: 2px dashed var(--gica-border-strong);
    border-radius: var(--gica-radius);
    background: var(--gica-surface-alt);
    color: var(--gica-text-muted);
    transition: border-color var(--gica-transition), background var(--gica-transition);
}
.dropzone:hover, .dropzone.dz-drag-hover {
    border-color: var(--gica-primary);
    background: var(--gica-primary-50);
}

/* =====================================================================
   PRINT — clean PDF output for reports / invoices
   ===================================================================== */
@media print {
    body, .gica-body { background: #fff !important; }
    .gica-sidebar, .gica-navbar, .gica-footer,
    .gica-page-actions, .gica-card-head .btn,
    .nav-tabs, form.gica-card,
    button, .btn, .dataTables_wrapper .dataTables_paginate,
    .dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info {
        display: none !important;
    }
    .gica-shell { margin-left: 0 !important; }
    .gica-content > .container-fluid { padding: 0 !important; }
    .gica-card { box-shadow: none !important; border: 1px solid #ccc !important; page-break-inside: avoid; }
    .gica-stat { box-shadow: none !important; border: 1px solid #ccc !important; }
    .gica-page-header { margin-bottom: 16px !important; }
    .table { font-size: 11px !important; }
    .gica-chart-wrap { height: 220px !important; }
    a { color: #0f172a !important; text-decoration: none !important; }
    .badge { border: 1px solid currentColor !important; }
}

/* =====================================================================
   RESPONSIVE TWEAKS
   ===================================================================== */
@media (max-width: 575.98px) {
    .gica-hero { padding: 20px; flex-direction: column; align-items: flex-start; }
    .gica-hero-title { font-size: 22px; }
    .gica-page-title { font-size: 20px; }
    .gica-stat-value { font-size: 18px; }
    .gica-auth-form-side { padding: 28px 22px; }
}
