/* ==========================================================================
   KMRATA Admin Platform — Mid-2026 "Google Antigravity Premium" Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --font-family-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    /* Color Palette - Premium Tailored HSL Theme */
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    --primary-50: #eef2ff;
    
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
    
    --emerald-500: #10b981;
    --emerald-50: #ecfdf5;
    --amber-500: #f59e0b;
    --amber-50: #fffbeb;
    --rose-500: #f43f5e;
    --rose-50: #fff1f2;
    --cyan-500: #06b6d4;
    --cyan-50: #ecfeff;
    
    /* Shadows & Elevation */
    --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 2px 4px -1px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    
    /* Borders & Radius */
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-full: 9999px;
    
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-family-sans) !important;
    background-color: #f3f4f6 !important;
    color: var(--slate-800);
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Header & Sidebar Styling
   ========================================================================== */

.main-header {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: var(--shadow-sm);
}

.main-sidebar {
    background: linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%) !important;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.15) !important;
}

.brand-link {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 1.1rem 1.25rem !important;
}

.brand-text {
    font-weight: 800 !important;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-sidebar .nav-item .nav-link {
    border-radius: var(--border-radius-md) !important;
    margin: 3px 10px !important;
    font-weight: 500;
    font-size: 0.925rem;
    color: #94a3b8 !important;
    transition: var(--transition-smooth);
}

.nav-sidebar .nav-item .nav-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    transform: translateX(3px);
}

.nav-sidebar .nav-item .nav-link.active {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4) !important;
}

.nav-header {
    font-size: 0.75rem !important;
    letter-spacing: 0.1em !important;
    color: #64748b !important;
    font-weight: 700 !important;
    padding: 1.2rem 1.25rem 0.4rem !important;
}

/* ==========================================================================
   Cards & Surface Components
   ========================================================================== */

.card {
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: var(--border-radius-lg) !important;
    box-shadow: var(--shadow-md) !important;
    background: #ffffff;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg) !important;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid rgba(241, 245, 249, 1) !important;
    padding: 1.25rem 1.5rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.card-title {
    font-weight: 700 !important;
    color: var(--slate-900) !important;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    margin-bottom: 0 !important;
}

.card-header > .btn:first-of-type,
.card-header > a.btn:first-of-type,
.card-header > form:first-of-type,
.card-header .header-action-end {
    float: right;
    margin-left: auto !important;
}

.card-header > .btn,
.card-header > a.btn,
.card-header > form {
    float: right;
}

.card-body {
    padding: 1.5rem !important;
}

/* ==========================================================================
   KPI Metric Cards (Modern Mid-2026 Dashboard Widgets)
   ========================================================================== */

.kpi-card {
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow-md);
    transition: var(--transition-smooth);
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.kpi-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.kpi-title {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--slate-600);
}

.kpi-value {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-top: 0.25rem;
}

.kpi-trend {
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--border-radius-full);
    margin-top: 0.5rem;
}

/* Color Accent Variants */
.kpi-indigo .kpi-icon-wrapper { background: var(--primary-50); color: var(--primary-600); }
.kpi-emerald .kpi-icon-wrapper { background: var(--emerald-50); color: var(--emerald-500); }
.kpi-amber .kpi-icon-wrapper { background: var(--amber-50); color: var(--amber-500); }
.kpi-rose .kpi-icon-wrapper { background: var(--rose-50); color: var(--rose-500); }
.kpi-cyan .kpi-icon-wrapper { background: var(--cyan-50); color: var(--cyan-500); }

/* ==========================================================================
   Buttons & Interactive Elements
   ========================================================================== */

.btn {
    border-radius: var(--border-radius-md) !important;
    font-weight: 600 !important;
    padding: 0.55rem 1.25rem !important;
    transition: var(--transition-smooth) !important;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25) !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #2563eb 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35) !important;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25) !important;
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%) !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.25) !important;
}

.btn-secondary {
    background: var(--slate-100) !important;
    color: var(--slate-700) !important;
    border: 1px solid rgba(226, 232, 240, 1) !important;
}

.btn-secondary:hover {
    background: var(--slate-200) !important;
    color: var(--slate-900) !important;
}

/* ==========================================================================
   Form Controls
   ========================================================================== */

.form-control, .form-select, select.form-control {
    border-radius: var(--border-radius-md) !important;
    border: 1.5px solid #cbd5e1 !important;
    padding: 0.6rem 0.9rem !important;
    font-size: 0.95rem;
    color: var(--slate-800);
    transition: var(--transition-smooth);
    background-color: #ffffff;
}

.form-control:focus, select.form-control:focus {
    border-color: var(--primary-600) !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15) !important;
    background-color: #ffffff !important;
}

.form-label {
    font-size: 0.875rem;
    color: var(--slate-700);
    margin-bottom: 0.4rem;
}

/* ==========================================================================
   Tables & Data Grid
   ========================================================================== */

.table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.table th {
    background-color: var(--slate-50) !important;
    color: var(--slate-600) !important;
    font-weight: 700 !important;
    font-size: 0.8rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 0.9rem 1.25rem !important;
}

.table td {
    padding: 1rem 1.25rem !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 0.925rem;
    color: var(--slate-800);
}

.table tbody tr {
    transition: var(--transition-smooth);
}

.table tbody tr:hover {
    background-color: rgba(248, 250, 252, 0.9) !important;
}

/* ==========================================================================
   Badges (Soft Tint Pill Badges)
   ========================================================================== */

.badge {
    padding: 0.45em 0.85em !important;
    font-weight: 700 !important;
    border-radius: var(--border-radius-full) !important;
    font-size: 0.775rem !important;
    letter-spacing: 0.02em;
}

.badge-primary { background: var(--primary-50) !important; color: var(--primary-600) !important; }
.badge-success { background: var(--emerald-50) !important; color: var(--emerald-500) !important; }
.badge-warning { background: var(--amber-50) !important; color: var(--amber-500) !important; }
.badge-danger { background: var(--rose-50) !important; color: var(--rose-500) !important; }
.badge-info { background: var(--cyan-50) !important; color: var(--cyan-500) !important; }
.badge-secondary { background: var(--slate-100) !important; color: var(--slate-600) !important; }

/* ==========================================================================
   Micro-animations & Custom Utilities
   ========================================================================== */

.hover-lift {
    transition: var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-2px);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

/* ==========================================================================
   UPLIFT v2 — Design-System Consistency Layer
   Harmonises every stock AdminLTE component with the KMRATA design tokens
   so cards, tables, forms, alerts, pagination and small-boxes look like
   one professional product instead of mixed Bootstrap leftovers.
   ========================================================================== */

/* ---- Page headings (consistent across dashboard + module pages) ---- */
.page-heading,
.content-header h1,
.content-header h2 {
    font-weight: 800 !important;
    letter-spacing: -0.025em;
    color: var(--slate-900);
}

.page-subheading {
    color: var(--slate-600);
    font-size: 0.925rem;
}

/* ---- Neutralise AdminLTE card-outline (colored top borders) ---- */
.card.card-outline {
    border-top: 1px solid rgba(226, 232, 240, 0.8) !important;
    box-shadow: var(--shadow-md) !important;
    position: relative;
}

.card.card-outline::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    background: linear-gradient(90deg, var(--primary-600), #3b82f6);
}

.card.card-outline.card-success::before { background: linear-gradient(90deg, #10b981, #059669); }
.card.card-outline.card-warning::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.card.card-outline.card-danger::before  { background: linear-gradient(90deg, #f43f5e, #e11d48); }
.card.card-outline.card-info::before    { background: linear-gradient(90deg, #06b6d4, #0284c7); }

/* ---- small-box (Reports) — modern card with tinted icon chip ---- */
.small-box {
    border-radius: var(--border-radius-lg) !important;
    box-shadow: var(--shadow-md) !important;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: #ffffff !important;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.small-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl) !important;
}

.small-box .inner h3 {
    color: var(--slate-900);
    font-weight: 800;
    font-size: 2rem;
    letter-spacing: -0.03em;
}

.small-box .inner p {
    color: var(--slate-600);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.small-box > .icon {
    font-size: 3rem;
    color: rgba(79, 70, 229, 0.12) !important;
    top: 8px;
}

.small-box.bg-info > .icon { color: rgba(6, 182, 212, 0.16) !important; }
.small-box.bg-success > .icon { color: rgba(16, 185, 129, 0.16) !important; }
.small-box.bg-warning > .icon { color: rgba(245, 158, 11, 0.16) !important; }
.small-box.bg-danger > .icon { color: rgba(244, 63, 94, 0.16) !important; }
.small-box.bg-primary > .icon { color: rgba(79, 70, 229, 0.16) !important; }

.small-box .inner,
.small-box h3,
.small-box p {
    color: var(--slate-900);
}

.small-box-footer {
    background: transparent !important;
    border-top: 1px solid #f1f5f9 !important;
    color: var(--primary-600) !important;
    font-weight: 600;
    padding: 0.75rem 1rem !important;
    transition: var(--transition-smooth);
}

.small-box-footer:hover {
    background: var(--primary-50) !important;
    color: var(--primary-700) !important;
}

/* ---- Alerts — soft tints, rounded, layered ---- */
.alert {
    border: none !important;
    border-radius: var(--border-radius-md) !important;
    box-shadow: var(--shadow-sm);
    font-size: 0.925rem;
    padding: 0.9rem 1.1rem;
}

.alert-success { background: var(--emerald-50) !important; color: #065f46 !important; }
.alert-danger  { background: var(--rose-50) !important; color: #9f1239 !important; }
.alert-warning { background: var(--amber-50) !important; color: #92400e !important; }
.alert-info    { background: var(--cyan-50) !important; color: #155e75 !important; }

.alert .close { opacity: 0.5; }
.alert .close:hover { opacity: 0.9; }

/* ---- Callouts ---- */
.callout {
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-left: 4px solid var(--primary-600);
    background: #ffffff;
}

/* ---- Pagination — pill style matching badges ---- */
.pagination {
    gap: 4px;
}

.pagination .page-item .page-link {
    border-radius: var(--border-radius-full) !important;
    border: 1px solid #e2e8f0 !important;
    color: var(--slate-600) !important;
    font-weight: 600;
    font-size: 0.875rem;
    min-width: 38px;
    text-align: center;
    margin: 0;
    transition: var(--transition-smooth);
}

.pagination .page-item .page-link:hover {
    background: var(--primary-50) !important;
    border-color: var(--primary-600) !important;
    color: var(--primary-700) !important;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-600), #3b82f6) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.pagination .page-item.disabled .page-link {
    background: var(--slate-50) !important;
    color: #cbd5e1 !important;
}

/* ---- Modals ---- */
.modal-content {
    border: none !important;
    border-radius: var(--border-radius-lg) !important;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.1rem 1.4rem;
}

.modal-header .modal-title {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--slate-900);
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1rem 1.4rem;
}

/* ---- Dropdowns ---- */
.dropdown-menu {
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: var(--border-radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0.4rem;
}

.dropdown-item {
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.9rem;
    color: var(--slate-700);
    transition: var(--transition-smooth);
}

.dropdown-item:hover {
    background: var(--primary-50);
    color: var(--primary-700);
}

.dropdown-item.text-danger:hover { background: var(--rose-50); color: var(--rose-500); }

/* ---- Nav tabs — clean underline style ---- */
.nav-tabs {
    border-bottom: 1px solid #e2e8f0;
}

.nav-tabs .nav-link {
    border: none !important;
    color: var(--slate-600);
    font-weight: 600;
    font-size: 0.925rem;
    padding: 0.7rem 1.1rem;
    position: relative;
    transition: var(--transition-smooth);
}

.nav-tabs .nav-link::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(90deg, var(--primary-600), #3b82f6);
    opacity: 0;
    transition: var(--transition-smooth);
}

.nav-tabs .nav-link:hover { color: var(--primary-700); }
.nav-tabs .nav-link.active { color: var(--primary-600); }
.nav-tabs .nav-link.active::after { opacity: 1; }

/* ---- Checkbox / radio accent ---- */
.custom-control-input:checked ~ .custom-control-label::before,
.form-check-input:checked {
    background-color: var(--primary-600) !important;
    border-color: var(--primary-600) !important;
}

.form-check-input {
    accent-color: var(--primary-600);
}

/* ---- Buttons — consistent sizes & icons ---- */
.btn {
    border-radius: var(--border-radius-md) !important;
}

.btn.btn-sm {
    padding: 0.4rem 0.85rem !important;
    font-size: 0.83rem;
    border-radius: var(--border-radius-sm) !important;
}

.btn.btn-xs {
    padding: 0.25rem 0.6rem !important;
    font-size: 0.75rem;
    border-radius: var(--border-radius-sm) !important;
}

.btn-outline-primary {
    border: 1.5px solid var(--primary-600) !important;
    color: var(--primary-600) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--primary-600) !important;
    color: #fff !important;
}

.btn-outline-danger {
    border: 1.5px solid var(--rose-500) !important;
    color: var(--rose-500) !important;
    background: transparent !important;
}

.btn-outline-danger:hover {
    background: var(--rose-500) !important;
    color: #fff !important;
}

/* Table row action buttons — quiet outline icon buttons */
.table .btn-action {
    padding: 0.32rem 0.6rem !important;
    border-radius: var(--border-radius-sm) !important;
    font-size: 0.8rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: var(--slate-600);
    transition: var(--transition-smooth);
}

.table .btn-action:hover {
    border-color: var(--primary-600);
    color: var(--primary-600);
    background: var(--primary-50);
    transform: translateY(-1px);
}

.table .btn-action.btn-action-danger:hover {
    border-color: var(--rose-500);
    color: var(--rose-500);
    background: var(--rose-50);
}

/* ---- Progress bars (Reports) ---- */
.progress {
    border-radius: var(--border-radius-full);
    background: var(--slate-100);
    height: 8px;
}

.progress-bar {
    border-radius: var(--border-radius-full);
    background: linear-gradient(90deg, var(--primary-600), #3b82f6);
}

/* ---- Breadcrumbs ---- */
.breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    font-size: 0.85rem;
}

.breadcrumb a { color: var(--primary-600); font-weight: 600; }
.breadcrumb-item.active { color: var(--slate-600); }
.breadcrumb-item + .breadcrumb-item::before { color: #94a3b8; }

/* ---- Navbar polish ---- */
.main-header .navbar-nav .nav-link {
    color: var(--slate-700) !important;
}

.main-header .user-menu .dropdown-toggle::after { display: none; }

.main-header .user-panel .info a {
    font-weight: 600;
    color: var(--slate-800);
}

/* ---- Sidebar brand mark (logo dot) ---- */
.brand-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-link::before {
    content: "";
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: var(--border-radius-sm);
    background: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.45);
}

/* ---- Selection + scrollbar ---- */
::selection {
    background: var(--primary-600);
    color: #ffffff;
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--border-radius-full);
}
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ---- Flash alert entrance ---- */
.alert:not(.no-anim) {
    animation: alertIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes alertIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Table responsive rounding ---- */
.table-responsive {
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

/* ---- Verified badge chip (certificates/verify) ---- */
.verification-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-full);
    font-weight: 700;
    font-size: 0.85rem;
}

/* ---- Subtle page fade-in for content transitions ---- */
.content-wrapper .content {
    animation: pageIn 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---- Print: clean certificate/table output ---- */
@media print {
    body, .content-wrapper, .main-sidebar, .main-header, .main-footer { background: #fff !important; }
    .main-sidebar, .main-header, .btn, .pagination, .nav-tabs, form, .card-header .btn { display: none !important; }
    .content-wrapper { margin-left: 0 !important; }
    .card { box-shadow: none !important; border: 1px solid #e2e8f0 !important; }
    .table th { background: #f8fafc !important; }
    a[href]::after { content: "" !important; }
}

/* ---- Responsive tweaks ---- */
@media (max-width: 991.98px) {
    .kpi-card { padding: 1.1rem; }
    .kpi-value { font-size: 1.7rem; }
    .small-box .inner h3 { font-size: 1.6rem; }
    .card-body { padding: 1.1rem !important; }
}

@media (max-width: 767.98px) {
    .table th, .table td { padding: 0.75rem 0.85rem !important; }
    .card-header { padding: 1rem 1.1rem !important; }
}

/* ---- Centered card headers (public verify pages) ---- */
.card-header.text-center {
    display: flex !important;
    justify-content: center;
    text-align: center;
}

/* ==========================================================================
   ROUND 6 — Brand tokenization + WCAG AA contrast pass
   ========================================================================== */

/* Darker accent tokens for AA-compliant text-on-tint */
:root {
    --emerald-700: #047857;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --rose-700: #be123c;
    --cyan-700: #0e7490;
}

/* Text utilities: Bootstrap blue -> brand indigo; dark 700 tints for AA */
.text-primary { color: var(--primary-600) !important; }
.text-success { color: var(--emerald-700) !important; }
.text-warning { color: var(--amber-700) !important; }
.text-danger  { color: var(--rose-700) !important; }
.text-info    { color: var(--cyan-700) !important; }

/* Status badges: keep the soft tint, darken the text to 700/800 (AA 4.5:1) */
.badge-success { color: var(--emerald-700) !important; }
.badge-warning { color: var(--amber-800) !important; }
.badge-danger  { color: var(--rose-700) !important; }
.badge-info    { color: var(--cyan-700) !important; }

/* Warning buttons: dark amber text (white-on-amber was ~2.1:1) */
.btn-warning {
    color: #78350f !important;
}
.btn-warning:hover,
.btn-warning:focus {
    color: #451a03 !important;
}

/* ---- Sidebar nav icons must stay bright on the dark sidebar (the 700-tint
   text-* overrides above are for light surfaces and would otherwise dim them) ---- */
.sidebar-dark-primary .nav-icon.text-success,
.sidebar-dark-primary .nav-icon.text-warning,
.sidebar-dark-primary .nav-icon.text-danger,
.sidebar-dark-primary .nav-icon.text-info {
    color: #ffc107 !important; /* warm amber reads on the dark slate sidebar */
}
.sidebar-dark-primary .nav-icon.text-success { color: #4ade80 !important; }
.sidebar-dark-primary .nav-icon.text-danger  { color: #f87171 !important; }
.sidebar-dark-primary .nav-icon.text-info    { color: #67e8f9 !important; }

/* ==========================================================================
   IN-APP USER GUIDE — AADMS-inspired guide UI, mapped to KMRATA tokens
   (gradient hero, pill TOC, numbered step lists, icon chips, video containers,
   tip boxes, RBAC table). Admin guide = indigo; Member guide = emerald.
   ========================================================================== */
.guide-hero {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 45%, #C7D2FE 100%);
    border: 1px solid #A5B4FC;
    border-radius: var(--radius-lg);
    padding: 30px 28px;
    color: var(--slate-900);
    margin-bottom: 22px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.10);
}
.guide-hero.guide-hero-member {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 45%, #A7F3D0 100%);
    border-color: #6EE7B7;
    color: #064E3B;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.10);
}
.guide-hero h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; color: var(--primary-700); }
.guide-hero-member h1 { color: #065F46; }
.guide-hero p { font-size: 14px; margin: 0; font-weight: 500; max-width: 680px; line-height: 1.6; }

.guide-toc {
    background: #EEF2FF;
    border: 1px solid #C7D2FE;
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 22px;
}
.guide-toc.guide-toc-member { background: #ECFDF5; border-color: #A7F3D0; }
.guide-toc-title {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--primary-600); margin-bottom: 10px;
}
.guide-toc-member .guide-toc-title { color: #047857; }
.guide-toc a {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--primary-600);
    text-decoration: none; padding: 5px 12px; border-radius: 999px;
    background: #fff; border: 1px solid #E0E7FF; margin: 0 6px 6px 0;
    transition: all 0.15s ease;
}
.guide-toc a:hover { background: #E0E7FF; color: var(--primary-700); border-color: #A5B4FC; }
.guide-toc-member a { color: #047857; border-color: #D1FAE5; }
.guide-toc-member a:hover { background: #D1FAE5; color: #065F46; border-color: #6EE7B7; }

.guide-section { margin-bottom: 26px; scroll-margin-top: 76px; }
.guide-section-title {
    font-size: 17px; font-weight: 800; color: var(--slate-900);
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.guide-section-title .sec-icon {
    width: 34px; height: 34px; border-radius: 10px;
    background: #E0E7FF; color: var(--primary-600);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0; border: 1px solid #C7D2FE;
}
.guide-member .guide-section-title .sec-icon { background: #D1FAE5; color: #047857; border-color: #A7F3D0; }
.guide-lead { font-size: 13.5px; color: var(--slate-600); margin-bottom: 14px; line-height: 1.6; }

.guide-steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.guide-steps li {
    position: relative; padding: 12px 14px 12px 52px; margin-bottom: 9px;
    background: #fff; border: 1px solid #E0E7FF;
    border-radius: var(--radius-md); font-size: 13.5px; color: var(--slate-800); line-height: 1.55;
}
.guide-member .guide-steps li { border-color: #D1FAE5; }
.guide-steps li::before {
    counter-increment: step; content: counter(step);
    position: absolute; left: 14px; top: 12px;
    width: 26px; height: 26px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-600), #3b82f6);
    color: #fff; font-size: 12px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.guide-member .guide-steps li::before { background: linear-gradient(135deg, #059669, #10b981); }

.guide-tip {
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary-600);
    background: #EEF2FF; padding: 12px 14px; font-size: 13px;
    color: var(--slate-700); margin: 12px 0; line-height: 1.55;
}
.guide-tip.guide-tip-warn { border-left-color: #f59e0b; background: #FFFBEB; color: #78350F; }
.guide-tip.guide-tip-member { border-left-color: #10b981; background: #ECFDF5; color: #065F46; }

.video-container {
    border-radius: var(--radius-lg); overflow: hidden;
    border: 1px solid #E0E7FF; box-shadow: var(--shadow-sm);
    margin-bottom: 20px; background: #0f172a;
}
.video-container video { width: 100%; height: auto; display: block; }
.video-placeholder {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #94a3b8; text-align: center; padding: 46px 20px;
}
.video-placeholder i { font-size: 40px; color: #6366f1; margin-bottom: 10px; }
.video-placeholder h4 { color: #e2e8f0; font-weight: 700; margin: 0 0 4px; }
.video-placeholder p { margin: 0; font-size: 13px; max-width: 520px; margin-left: auto; margin-right: auto; }

.guide-table { font-size: 13px; }
.guide-table th { background: #EEF2FF; color: var(--slate-900); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: 0.05em; }
.guide-table td { vertical-align: middle; }
.guide-table .fa-check { color: #10b981; }
.guide-table .fa-minus { color: #cbd5e1; }
