/* ═══════════════════════════════════════════════════════════════════
   AISDO IMS — Mobile-First Design System v2.0
   Bootstrap 5 Extension | Inter + Outfit Fonts
   ═══════════════════════════════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ── CSS Custom Properties ── */
:root {
    /* Brand Colors */
    --ims-primary:        #4f46e5;
    --ims-primary-rgb:    79, 70, 229;
    --ims-primary-dark:   #3730a3;
    --ims-primary-light:  #818cf8;
    --ims-primary-glow:   rgba(79, 70, 229, 0.25);
    --ims-secondary:      #0ea5e9;
    --ims-secondary-rgb:  14, 165, 233;
    --ims-success:        #10b981;
    --ims-success-rgb:    16, 185, 129;
    --ims-warning:        #f59e0b;
    --ims-warning-rgb:    245, 158, 11;
    --ims-danger:         #ef4444;
    --ims-danger-rgb:     239, 68, 68;
    --ims-info:           #06b6d4;
    --ims-info-rgb:       6, 182, 212;

    /* Surfaces */
    --ims-bg:             #f1f5f9;
    --ims-surface:        #ffffff;
    --ims-surface-alt:    #f8fafc;
    --ims-surface-glass:  rgba(255, 255, 255, 0.85);
    --ims-border:         #e2e8f0;
    --ims-border-subtle:  rgba(226, 232, 240, 0.6);

    /* Text */
    --ims-text:           #1e293b;
    --ims-text-muted:     #64748b;
    --ims-text-light:     #94a3b8;

    /* Sidebar */
    --ims-sidebar-bg:     linear-gradient(180deg, #1a1f36 0%, #1e293b 40%, #0f172a 100%);
    --ims-sidebar-text:   #cbd5e1;
    --ims-sidebar-active: var(--ims-primary);
    --ims-sidebar-width:  260px;

    /* Spacing & Shape */
    --ims-radius:         0.5rem;
    --ims-radius-lg:      0.875rem;
    --ims-radius-xl:      1.25rem;
    --ims-shadow:         0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
    --ims-shadow-md:      0 4px 20px rgba(0,0,0,.10);
    --ims-shadow-lg:      0 10px 40px rgba(0,0,0,.14);
    --ims-shadow-glow:    0 0 20px var(--ims-primary-glow);
    --ims-transition:     all 0.22s cubic-bezier(.4,0,.2,1);
    --ims-transition-slow: all 0.4s cubic-bezier(.4,0,.2,1);

    /* Typography */
    --font-primary:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display:       'Outfit', 'Inter', sans-serif;

    /* Bottom Nav Height */
    --bottom-nav-h:       64px;
}

/* ═══════════════════════════════════════════════════════════════════
   BASE RESET & GLOBALS
   ═══════════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-primary);
    background: var(--ims-bg);
    color: var(--ims-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    overflow-x: clip;
    width: 100%;
}

a {
    color: var(--ims-primary);
    text-decoration: none;
    transition: var(--ims-transition);
}
a:hover { color: var(--ims-primary-dark); }

/* ═══════════════════════════════════════════════════════════════════
   PAGE TRANSITION (fade-in on load)
   ═══════════════════════════════════════════════════════════════════ */
.ims-content {
    animation: ims-fade-in 0.25s ease-out;
}

@keyframes ims-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Modals & Backdrops - guaranteed above all page elements */
.modal {
    z-index: 1065 !important;
}
.modal-backdrop {
    z-index: 1060 !important;
}

/* ═══════════════════════════════════════════════════════════════════
   PANEL LAYOUT
   ═══════════════════════════════════════════════════════════════════ */
.ims-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ═══════════════════════════════════════════════════════════════════
   SIDEBAR — Glassmorphism Dark
   ═══════════════════════════════════════════════════════════════════ */
.ims-sidebar {
    width: var(--ims-sidebar-width);
    background: var(--ims-sidebar-bg);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.32s cubic-bezier(.4,0,.2,1);
    box-shadow: 4px 0 24px rgba(0,0,0,.18);

    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.1) transparent;
}
.ims-sidebar::-webkit-scrollbar { width: 4px; }
.ims-sidebar::-webkit-scrollbar-track { background: transparent; }
.ims-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 4px; }

/* Brand / Logo area */
.ims-sidebar-brand {
    padding: 1.35rem 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    position: sticky;
    top: 0;
    background: rgba(15,23,42,.85);
    backdrop-filter: blur(12px);
    z-index: 1;
}

.ims-sidebar-brand h5 {
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.2px;
}

.ims-sidebar-brand small {
    color: var(--ims-text-light);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 500;
}

.ims-sidebar-brand .brand-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--ims-primary) 0%, #7c3aed 100%);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800; font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(79,70,229,.45);
}

/* Nav items */
.ims-sidebar-nav { padding: 0.5rem 0 1rem; }

.ims-sidebar-label {
    padding: 0.9rem 1.5rem 0.3rem;
    color: rgba(148,163,184,.55);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
    margin-top: 0.25rem;
}

.ims-sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1.5rem;
    color: var(--ims-sidebar-text);
    font-size: 0.875rem;
    font-weight: 400;
    transition: var(--ims-transition);
    border-left: 3px solid transparent;
    border-radius: 0;
    min-height: 44px; /* touch target */
    position: relative;
}

.ims-sidebar-link:hover {
    background: rgba(255,255,255,.05);
    color: #fff;
    border-left-color: rgba(255,255,255,.2);
}

.ims-sidebar-link.active {
    background: linear-gradient(90deg, rgba(79,70,229,.18) 0%, transparent 100%);
    color: #a5b4fc;
    border-left-color: var(--ims-primary-light);
    font-weight: 500;
}

.ims-sidebar-link.active::after {
    content: '';
    position: absolute;
    right: 0; top: 25%; bottom: 25%;
    width: 3px;
    background: var(--ims-primary-light);
    border-radius: 3px 0 0 3px;
}

.ims-sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    opacity: 0.75;
    flex-shrink: 0;
}
.ims-sidebar-link.active i { opacity: 1; }

/* Submenu indented links */
.ims-sidebar-nav .ps-3 .ims-sidebar-link {
    padding-left: 1.25rem;
    font-size: 0.835rem;
    border-left: none;
    border-radius: 6px;
    margin: 1px 0.5rem;
}
.ims-sidebar-nav .ps-3 .ims-sidebar-link.active {
    background: rgba(79,70,229,.15);
    color: var(--ims-primary-light);
}
.ims-sidebar-nav .ps-3 .ims-sidebar-link.active::after { display: none; }

.ims-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: clip;
}

.ims-main {
    margin-left: var(--ims-sidebar-width);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    overflow-x: clip;
}

/* ═══════════════════════════════════════════════════════════════════
   TOP NAVBAR
   ═══════════════════════════════════════════════════════════════════ */
.ims-topbar {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ims-border-subtle);
    padding: 0.7rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 1px 12px rgba(0,0,0,.06);
    min-height: 60px;
}

.ims-topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ims-topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ims-sidebar-toggle {
    display: none;
    border: none;
    background: var(--ims-surface-alt);
    font-size: 1.2rem;
    color: var(--ims-text);
    cursor: pointer;
    padding: 0.4rem 0.5rem;
    border-radius: var(--ims-radius);
    transition: var(--ims-transition);
    min-width: 40px; min-height: 40px;
    display: none;
    align-items: center; justify-content: center;
}
.ims-sidebar-toggle:hover { background: var(--ims-border); }

/* Breadcrumb */
.ims-breadcrumb {
    padding: 0; margin: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.82rem;
}
.ims-breadcrumb li + li::before {
    content: '/';
    color: var(--ims-text-light);
    margin-right: 0.35rem;
}
.ims-breadcrumb a { color: var(--ims-text-muted); }
.ims-breadcrumb a:hover { color: var(--ims-primary); }
.ims-breadcrumb .active { color: var(--ims-text); font-weight: 500; }

/* ── Notification Bell Dropdown ── */
#adminNotificationDropdown::after {
    display: none !important;
}
.ims-topbar-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--ims-transition);
}
.ims-topbar-icon-btn:hover {
    background: var(--ims-surface-alt);
    color: var(--ims-primary) !important;
}

/* ── User Avatar / Dropdown ── */
.ims-user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--ims-radius-lg);
    transition: var(--ims-transition);
}
.ims-user-menu:hover { background: var(--ims-surface-alt); }

.ims-user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ims-primary) 0%, #7c3aed 100%);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 0.85rem;
    box-shadow: 0 2px 8px var(--ims-primary-glow);
    overflow: hidden;
    flex-shrink: 0;
}

.ims-user-info { line-height: 1.2; }
.ims-user-info .name  { font-size: 0.85rem; font-weight: 600; }
.ims-user-info .role  { font-size: 0.68rem; color: var(--ims-text-muted); text-transform: capitalize; }

/* Sidebar Overlay (mobile) */
.ims-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1035;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.ims-sidebar-overlay.show { display: block; }

/* ═══════════════════════════════════════════════════════════════════
   PAGE CONTENT
   ═══════════════════════════════════════════════════════════════════ */
.ims-content {
    padding: 1.5rem;
    flex: 1;
    width: 100%;
    min-width: 0;
}

.ims-page-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--ims-text);
    letter-spacing: -0.3px;
}

/* ═══════════════════════════════════════════════════════════════════
   STAT CARDS — Premium with animations
   ═══════════════════════════════════════════════════════════════════ */
.stat-card {
    background: var(--ims-surface);
    border-radius: var(--ims-radius-xl);
    padding: 1.35rem 1.5rem;
    box-shadow: var(--ims-shadow);
    transition: var(--ims-transition);
    border: 1px solid var(--ims-border-subtle);
    position: relative;
    overflow: hidden;
    animation: ims-fade-in 0.4s ease both;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ims-shadow-md);
}

.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--ims-radius-lg);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.3rem;
    letter-spacing: -0.5px;
}

.stat-card .stat-label {
    font-size: 0.76rem;
    color: var(--ims-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-decoration {
    position: absolute;
    top: -20px; right: -20px;
    width: 110px; height: 110px;
    border-radius: 50%;
    opacity: 0.07;
}

/* Stat variants */
.stat-primary   .stat-icon { background: linear-gradient(135deg, rgba(var(--ims-primary-rgb),.15) 0%, rgba(var(--ims-primary-rgb),.08) 100%); color: var(--ims-primary); }
.stat-primary   .stat-value { color: var(--ims-primary-dark); }
.stat-primary   .stat-decoration { background: var(--ims-primary); }
.stat-success   .stat-icon { background: linear-gradient(135deg, rgba(var(--ims-success-rgb),.15) 0%, rgba(var(--ims-success-rgb),.08) 100%); color: var(--ims-success); }
.stat-success   .stat-value { color: #065f46; }
.stat-success   .stat-decoration { background: var(--ims-success); }
.stat-warning   .stat-icon { background: linear-gradient(135deg, rgba(var(--ims-warning-rgb),.15) 0%, rgba(var(--ims-warning-rgb),.08) 100%); color: var(--ims-warning); }
.stat-warning   .stat-value { color: #92400e; }
.stat-warning   .stat-decoration { background: var(--ims-warning); }
.stat-danger    .stat-icon { background: linear-gradient(135deg, rgba(var(--ims-danger-rgb),.15) 0%, rgba(var(--ims-danger-rgb),.08) 100%); color: var(--ims-danger); }
.stat-danger    .stat-value { color: #991b1b; }
.stat-danger    .stat-decoration { background: var(--ims-danger); }
.stat-info      .stat-icon { background: linear-gradient(135deg, rgba(var(--ims-info-rgb),.15) 0%, rgba(var(--ims-info-rgb),.08) 100%); color: var(--ims-info); }
.stat-info      .stat-value { color: #155e75; }
.stat-info      .stat-decoration { background: var(--ims-info); }
.stat-secondary .stat-icon { background: linear-gradient(135deg, rgba(var(--ims-secondary-rgb),.15) 0%, rgba(var(--ims-secondary-rgb),.08) 100%); color: var(--ims-secondary); }
.stat-secondary .stat-value { color: #0c4a6e; }
.stat-secondary .stat-decoration { background: var(--ims-secondary); }

/* Counter animation target */
.ims-counter { display: inline-block; }

/* ═══════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════ */
.ims-card {
    background: var(--ims-surface);
    border-radius: var(--ims-radius-lg);
    border: 1px solid var(--ims-border-subtle);
    box-shadow: var(--ims-shadow);
    overflow: hidden;
    transition: var(--ims-transition);
}
.ims-card:hover { box-shadow: var(--ims-shadow-md); }

.ims-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--ims-border-subtle);
    background: linear-gradient(135deg, var(--ims-surface-alt) 0%, var(--ims-surface) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ims-card-header h5 { margin: 0; font-weight: 600; font-size: 0.95rem; }
.ims-card-body { padding: 1.5rem; }

/* ═══════════════════════════════════════════════════════════════════
   TABLES — with mobile stacking
   ═══════════════════════════════════════════════════════════════════ */
.ims-table {
    width: 100%;
    border-collapse: collapse;
}
.ims-table th {
    background: var(--ims-surface-alt);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--ims-text-muted);
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--ims-border);
    white-space: nowrap;
}
.ims-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--ims-border-subtle);
    font-size: 0.875rem;
    vertical-align: middle;
}
.ims-table tbody tr {
    transition: background 0.15s ease;
}
.ims-table tbody tr:hover { background: rgba(var(--ims-primary-rgb),.03); }
.ims-table tbody tr:last-child td { border-bottom: none; }

/* ═══════════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════════ */
.ims-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.ims-badge-success { background: rgba(var(--ims-success-rgb),.12); color: #059669; }
.ims-badge-warning { background: rgba(var(--ims-warning-rgb),.12); color: #d97706; }
.ims-badge-danger  { background: rgba(var(--ims-danger-rgb),.12);  color: #dc2626; }
.ims-badge-info    { background: rgba(var(--ims-info-rgb),.12);    color: #0891b2; }
.ims-badge-primary { background: rgba(var(--ims-primary-rgb),.12); color: var(--ims-primary); }

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════ */
.btn-ims {
    font-family: var(--font-primary);
    font-weight: 500;
    border-radius: var(--ims-radius);
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    transition: var(--ims-transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 40px;
    white-space: nowrap;
}
.btn-ims-primary {
    background: linear-gradient(135deg, var(--ims-primary) 0%, #7c3aed 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--ims-primary-rgb),.3);
}
.btn-ims-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(var(--ims-primary-rgb),.4);
    color: #fff;
}
.btn-ims-outline {
    background: transparent;
    border: 1px solid var(--ims-border);
    color: var(--ims-text);
}
.btn-ims-outline:hover {
    border-color: var(--ims-primary);
    color: var(--ims-primary);
    background: rgba(var(--ims-primary-rgb),.04);
}

/* ═══════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════ */
.ims-form-control {
    font-family: var(--font-primary);
    border: 1.5px solid var(--ims-border);
    border-radius: var(--ims-radius);
    padding: 0.55rem 0.85rem;
    font-size: 0.875rem;
    transition: var(--ims-transition);
    width: 100%;
    background: var(--ims-surface);
    color: var(--ims-text);
    min-height: 44px;
}
.ims-form-control:focus {
    outline: none;
    border-color: var(--ims-primary);
    box-shadow: 0 0 0 3px rgba(var(--ims-primary-rgb), 0.12);
    background: #fff;
}
.ims-form-label {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    color: var(--ims-text);
    display: block;
    letter-spacing: 0.1px;
}

/* ═══════════════════════════════════════════════════════════════════
   ALERTS — Toast style with slide-in
   ═══════════════════════════════════════════════════════════════════ */
.ims-alert {
    padding: 0.85rem 1.1rem;
    border-radius: var(--ims-radius-lg);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    animation: ims-slide-down 0.35s ease both;
}

@keyframes ims-slide-down {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Progress bar at bottom of auto-dismiss alerts */
.ims-alert[data-auto-dismiss]::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    height: 2px;
    width: 100%;
    animation: ims-dismiss-bar 5s linear forwards;
    border-radius: 0 0 var(--ims-radius-lg) var(--ims-radius-lg);
}
@keyframes ims-dismiss-bar {
    from { width: 100%; }
    to   { width: 0%; }
}

.ims-alert-success {
    background: rgba(var(--ims-success-rgb),.08);
    color: #065f46;
    border-color: rgba(var(--ims-success-rgb),.2);
}
.ims-alert-success::after { background: var(--ims-success); }

.ims-alert-danger {
    background: rgba(var(--ims-danger-rgb),.08);
    color: #991b1b;
    border-color: rgba(var(--ims-danger-rgb),.2);
}
.ims-alert-danger::after { background: var(--ims-danger); }

.ims-alert-warning {
    background: rgba(var(--ims-warning-rgb),.08);
    color: #92400e;
    border-color: rgba(var(--ims-warning-rgb),.2);
}
.ims-alert-warning::after { background: var(--ims-warning); }

.ims-alert-info {
    background: rgba(var(--ims-info-rgb),.08);
    color: #155e75;
    border-color: rgba(var(--ims-info-rgb),.2);
}
.ims-alert-info::after { background: var(--ims-info); }

/* ═══════════════════════════════════════════════════════════════════
   EMPTY STATE & LOADING
   ═══════════════════════════════════════════════════════════════════ */
.ims-empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    color: var(--ims-text-muted);
}
.ims-empty-state i {
    font-size: 3rem;
    opacity: 0.25;
    margin-bottom: 1rem;
    display: block;
}
.ims-empty-state h5 { color: var(--ims-text); margin-bottom: 0.5rem; font-family: var(--font-display); }
.ims-empty-state p  { font-size: 0.875rem; max-width: 360px; margin: 0 auto; }

.ims-loading { display: flex; align-items: center; justify-content: center; padding: 3rem; }
.ims-spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--ims-border);
    border-top-color: var(--ims-primary);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════════
   PLACEHOLDER MODULE PAGE
   ═══════════════════════════════════════════════════════════════════ */
.ims-placeholder-module {
    text-align: center;
    padding: 4rem 2rem;
}
.ims-placeholder-module .icon-wrap {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, rgba(var(--ims-primary-rgb),.12), rgba(var(--ims-primary-rgb),.04));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    border: 2px solid rgba(var(--ims-primary-rgb),.1);
}
.ims-placeholder-module .icon-wrap i { font-size: 2rem; color: var(--ims-primary); }
.ims-placeholder-module h3 { font-family: var(--font-display); font-weight: 700; margin-bottom: 0.5rem; }
.ims-placeholder-module p { color: var(--ims-text-muted); max-width: 400px; margin: 0 auto; font-size: 0.9rem; }

/* ═══════════════════════════════════════════════════════════════════
   MOBILE BOTTOM NAVIGATION BAR — Frosted Glass App Navigation
   ═══════════════════════════════════════════════════════════════════ */
.ims-bottom-nav {
    display: none; /* hidden on desktop */
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-h, 64px);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    z-index: 1045;
    padding: 0 0.5rem;
    padding-bottom: env(safe-area-inset-bottom, 4px);
}

.ims-bottom-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    height: 100%;
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
}

.ims-bottom-nav-item {
    flex: 1 1 0px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0.35rem 0.2rem;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    border: none;
    background: none;
    text-align: center;
    border-radius: 12px;
    min-height: 46px;
}

.ims-bottom-nav-item i {
    font-size: 1.3rem;
    display: block;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.ims-bottom-nav-item span {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.1px;
}

.ims-bottom-nav-item.active {
    color: var(--ims-primary);
}

.ims-bottom-nav-item.active i {
    transform: translateY(-2px);
    color: var(--ims-primary);
}

.ims-bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--ims-primary);
    border-radius: 4px;
    box-shadow: 0 0 8px var(--ims-primary-glow);
}

.ims-bottom-nav-item:active {
    transform: scale(0.92);
}

.ims-bottom-nav-more {
    color: #64748b;
}
.ims-bottom-nav-more:hover, .ims-bottom-nav-more:active {
    color: var(--ims-primary);
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE ACTION SHEET / "MORE" DRAWER
   ═══════════════════════════════════════════════════════════════════ */
.ims-more-sheet {
    height: 82vh !important;
    max-height: 88vh;
    border-radius: 24px 24px 0 0;
    border: none;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.18);
    background: #ffffff;
    z-index: 1060;
}

.ims-sheet-handle {
    width: 44px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 10px;
    margin: 10px auto 4px;
}

.ims-sheet-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--ims-text-muted);
    margin-bottom: 0.65rem;
}

/* App Grid Launcher */
.ims-app-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
@media (min-width: 576px) {
    .ims-app-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.ims-app-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.85rem 0.5rem;
    background: var(--ims-surface-alt);
    border: 1px solid var(--ims-border-subtle);
    border-radius: 16px;
    color: var(--ims-text);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 84px;
    text-align: center;
}
.ims-app-tile:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    border-color: rgba(var(--ims-primary-rgb), 0.3);
    color: var(--ims-primary);
}
.ims-app-tile:active {
    transform: scale(0.94);
}

.ims-app-tile-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.35rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease;
}
.ims-app-tile:hover .ims-app-tile-icon {
    transform: scale(1.06);
}

.ims-app-tile span {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ims-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ims-app-tile-icon-sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Vibrant App Gradient Themes */
.icon-grad-indigo  { background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%); }
.icon-grad-violet  { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); }
.icon-grad-blue    { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%); }
.icon-grad-sky     { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); }
.icon-grad-cyan    { background: linear-gradient(135deg, #06b6d4 0%, #0e7490 100%); }
.icon-grad-emerald { background: linear-gradient(135deg, #10b981 0%, #047857 100%); }
.icon-grad-amber   { background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%); }
.icon-grad-rose    { background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%); }
.icon-grad-purple  { background: linear-gradient(135deg, #a855f7 0%, #7e22ce 100%); }
.icon-grad-slate   { background: linear-gradient(135deg, #64748b 0%, #334155 100%); }

/* Mobile Topbar enhancements */
.ims-topbar-mobile-brand {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.ims-topbar-mobile-brand .brand-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--ims-text);
    letter-spacing: -0.3px;
}
.ims-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}
.ims-topbar-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--ims-surface-alt);
    border: 1px solid var(--ims-border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ims-text-muted);
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.ims-topbar-icon-btn:hover {
    background: var(--ims-border);
    color: var(--ims-primary);
}

/* ═══════════════════════════════════════════════════════════════════
   STUDENT — Welcome Hero Banner
   ═══════════════════════════════════════════════════════════════════ */
.ims-student-hero {
    background: linear-gradient(135deg, var(--ims-primary) 0%, #7c3aed 100%);
    border-radius: var(--ims-radius-xl);
    padding: 1.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.ims-student-hero::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 150px; height: 150px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.ims-student-hero::after {
    content: '';
    position: absolute;
    bottom: -30px; right: 60px;
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
}
.ims-student-hero .hero-reg {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255,255,255,.15);
    border-radius: 50px;
    padding: 0.2rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    backdrop-filter: blur(8px);
}
.ims-student-hero h4 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}
.ims-student-hero p { font-size: 0.82rem; opacity: 0.85; margin: 0; }

/* Quick action chips (horizontal scroll) */
.ims-quick-chips {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-bottom: 1.25rem;
}
.ims-quick-chips::-webkit-scrollbar { display: none; }

.ims-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    min-width: 72px;
    padding: 0.85rem 0.5rem;
    background: var(--ims-surface);
    border: 1.5px solid var(--ims-border-subtle);
    border-radius: var(--ims-radius-lg);
    color: var(--ims-text);
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    transition: var(--ims-transition);
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
    box-shadow: var(--ims-shadow);
}
.ims-chip i {
    font-size: 1.4rem;
}
.ims-chip:hover, .ims-chip:focus {
    border-color: var(--ims-primary);
    color: var(--ims-primary);
    transform: translateY(-2px);
    box-shadow: var(--ims-shadow-md);
    background: rgba(var(--ims-primary-rgb),.04);
}
.ims-chip-primary i { color: var(--ims-primary); }
.ims-chip-success i { color: var(--ims-success); }
.ims-chip-warning i { color: var(--ims-warning); }
.ims-chip-info i    { color: var(--ims-info); }
.ims-chip-danger i  { color: var(--ims-danger); }

/* ═══════════════════════════════════════════════════════════════════
   INFO ROW (key-value pairs styled as mobile cards)
   ═══════════════════════════════════════════════════════════════════ */
.ims-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--ims-border-subtle);
    font-size: 0.875rem;
}
.ims-info-row:last-child { border-bottom: none; }
.ims-info-row .label { color: var(--ims-text-muted); font-weight: 500; }
.ims-info-row .value { font-weight: 600; color: var(--ims-text); text-align: right; max-width: 60%; word-break: break-word; }

/* ═══════════════════════════════════════════════════════════════════
   PUBLIC WEBSITE STYLES
   ═══════════════════════════════════════════════════════════════════ */
.pub-navbar {
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ims-border-subtle);
    padding: 0;
    transition: var(--ims-transition);
}
.pub-navbar.scrolled { box-shadow: var(--ims-shadow-lg); }
.pub-navbar .navbar-brand {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--ims-primary) !important;
    display: flex; align-items: center; gap: 0.5rem;
}
.pub-navbar .nav-link {
    font-weight: 500; font-size: 0.875rem;
    color: var(--ims-text) !important;
    padding: 1rem 0.75rem !important;
    position: relative; transition: var(--ims-transition);
}
.pub-navbar .nav-link:hover,
.pub-navbar .nav-link.active { color: var(--ims-primary) !important; }
.pub-navbar .nav-link.active::after {
    content: '';
    position: absolute; bottom: 0; left: 0.75rem; right: 0.75rem;
    height: 2px; background: var(--ims-primary); border-radius: 2px;
}

/* Hero */
.pub-hero {
    background: linear-gradient(135deg, #1e293b 0%, #334155 50%, var(--ims-primary-dark) 100%);
    color: #fff; padding: 5rem 0 4rem;
    position: relative; overflow: hidden;
}
.pub-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.pub-hero h1 { font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; position: relative; }
.pub-hero p  { font-size: 1.1rem; opacity: 0.85; max-width: 600px; position: relative; }
.pub-hero .btn { position: relative; }

.pub-section { padding: 4rem 0; }
.pub-section-title { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; text-align: center; margin-bottom: 0.5rem; }
.pub-section-subtitle { text-align: center; color: var(--ims-text-muted); margin-bottom: 2.5rem; font-size: 0.95rem; }

.pub-footer {
    background: #1e293b; color: #cbd5e1; padding: 3rem 0 1.5rem;
}
.pub-footer h6 { color: #fff; font-weight: 700; font-size: 0.9rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.5px; }
.pub-footer a { color: #94a3b8; }
.pub-footer a:hover { color: #fff; }
.pub-footer .footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.5rem; margin-top: 2rem; font-size: 0.8rem; color: #64748b; }

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, var(--ims-primary-dark) 100%);
    padding: 2rem;
}
.login-card {
    background: var(--ims-surface);
    border-radius: var(--ims-radius-xl);
    box-shadow: var(--ims-shadow-lg);
    padding: 2.5rem;
    width: 100%; max-width: 420px;
}
.login-card .login-logo { text-align: center; margin-bottom: 2rem; }
.login-card .login-logo .brand-icon {
    width: 58px; height: 58px;
    background: linear-gradient(135deg, var(--ims-primary), #7c3aed);
    border-radius: var(--ims-radius-lg);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 8px 24px var(--ims-primary-glow);
}
.login-card .login-logo h4 { font-family: var(--font-display); font-weight: 700; margin-bottom: 0.25rem; }
.login-card .login-logo p  { font-size: 0.85rem; color: var(--ims-text-muted); }

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile First Breakpoints
   ═══════════════════════════════════════════════════════════════════ */

/* Responsive Brand Header & Navigation */
.brand-logo-img {
    height: 75px;
    width: auto;
    object-fit: contain;
    transition: height 0.2s ease;
}
.brand-title {
    font-size: 2.2rem;
    letter-spacing: -0.5px;
    transition: font-size 0.2s ease;
}
.brand-tagline {
    font-size: 1.05rem;
    transition: font-size 0.2s ease;
}
.brand-badge {
    font-size: 0.68rem;
    letter-spacing: 0.5px;
}

/* Tablet and below — sidebar off-canvas & mobile navigation */
@media (max-width: 991.98px) {
    .ims-sidebar {
        transform: translateX(-100%);
    }
    .ims-sidebar.show {
        transform: translateX(0);
    }
    .ims-main {
        margin-left: 0;
    }
    .ims-sidebar-toggle {
        display: flex !important;
    }
    .pub-hero h1 { font-size: 1.85rem; }
    .pub-hero   { padding: 3rem 0 2.5rem; }

    /* Show bottom nav & prevent content clipping */
    .ims-bottom-nav { 
        display: flex !important; 
        align-items: stretch; 
    }
    body {
        padding-bottom: calc(var(--bottom-nav-h, 64px) + env(safe-area-inset-bottom, 4px)) !important;
    }

    .brand-logo-img {
        height: 54px;
    }
    .brand-title {
        font-size: 1.55rem;
    }
    .brand-tagline {
        font-size: 0.78rem;
        line-height: 1.2;
    }
    .brand-badge {
        font-size: 0.6rem;
        padding: 2px 6px !important;
    }
    .hero-caption {
        padding: 1rem 1.25rem !important;
        margin-bottom: 0.75rem !important;
        max-width: 92% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .hero-heading {
        font-size: 1.25rem !important;
        line-height: 1.25 !important;
    }
    .hero-subheading {
        font-size: 0.72rem !important;
    }
    .btn-hero-action {
        font-size: 0.78rem !important;
        padding: 0.4rem 0.8rem !important;
    }
}

/* Mobile — bottom nav + spacing adjustments */
@media (max-width: 767.98px) {
    /* Topbar slimmer */
    .ims-topbar {
        padding: 0.5rem 1rem;
        min-height: 54px;
    }

    /* Breadcrumb hidden on very small */
    .ims-breadcrumb { display: none; }

    /* Content padding */
    .ims-content { padding: 1rem; }

    /* Stat cards smaller */
    .stat-card { padding: 1rem 1.1rem; }
    .stat-card .stat-value { font-size: 1.5rem; }
    .stat-card .stat-icon { width: 40px; height: 40px; font-size: 1.1rem; margin-bottom: 0.75rem; }

    /* Page title */
    .ims-page-title { font-size: 1.25rem; margin-bottom: 1rem; }

    /* Cards full-width padding */
    .ims-card-body { padding: 1rem; }
    .ims-card-header { padding: 0.85rem 1rem; }

    /* Mobile table — stack rows as cards */
    .ims-table-responsive-cards thead { display: none; }
    .ims-table-responsive-cards tbody tr {
        display: block;
        background: var(--ims-surface);
        border-radius: var(--ims-radius-lg);
        border: 1px solid var(--ims-border-subtle);
        margin-bottom: 0.75rem;
        padding: 0.75rem;
        box-shadow: var(--ims-shadow);
    }
    .ims-table-responsive-cards tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--ims-border-subtle);
        padding: 0.5rem 0;
        font-size: 0.85rem;
    }
    .ims-table-responsive-cards tbody td:last-child { border-bottom: none; }
    .ims-table-responsive-cards tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.72rem;
        text-transform: uppercase;
        color: var(--ims-text-muted);
        letter-spacing: 0.4px;
    }
    .ims-table-responsive-cards tbody tr:hover { background: var(--ims-surface); transform: none; }
}

/* Extra small */
@media (max-width: 575.98px) {
    .header-main-brand {
        padding-top: 0.6rem !important;
        padding-bottom: 0.6rem !important;
    }
    .brand-logo-img {
        height: 44px;
        margin-right: 0.4rem !important;
    }
    .brand-title {
        font-size: 1.3rem;
    }
    .brand-tagline {
        font-size: 0.68rem;
    }
    .brand-badge {
        font-size: 0.52rem;
    }
    .hero-heading {
        font-size: 1.05rem !important;
        line-height: 1.2 !important;
    }
    .hero-caption {
        padding: 0.75rem 0.85rem !important;
        margin-bottom: 0.5rem !important;
    }
    .ims-content { padding: 0.875rem; }
    .pub-hero h1 { font-size: 1.6rem; }
    .stat-card .stat-value { font-size: 1.35rem; }

    /* Login card */
    .login-card { padding: 1.75rem 1.25rem; }
}

/* ═══════════════════════════════════════════════════════════════════
   DIGITAL VERIFICATION CARDS & FORM COMPONENT EXTRAS
   ═══════════════════════════════════════════════════════════════════ */
.ims-verification-card {
    background: var(--ims-surface);
    border-radius: var(--ims-radius-xl);
    border: 1px solid var(--ims-border);
    box-shadow: var(--ims-shadow-lg);
    overflow: hidden;
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}
.ims-verification-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 60%, var(--ims-primary-dark) 100%);
    color: #fff;
    padding: 1.5rem 1.75rem;
    position: relative;
}
.ims-verification-header .verify-seal {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: 2px solid rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #f59e0b;
    backdrop-filter: blur(8px);
}
.ims-badge-verified {
    background: #10b981;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 4px 12px rgba(16,185,129,.35);
}
.ims-badge-unverified {
    background: #ef4444;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.ims-sticky-actions {
    position: sticky;
    bottom: var(--bottom-nav-h, 0px);
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--ims-border);
    padding: 0.85rem 1rem;
    margin-top: 1.5rem;
    z-index: 1020;
    box-shadow: 0 -4px 16px rgba(0,0,0,.08);
    border-radius: 0 0 var(--ims-radius-lg) var(--ims-radius-lg);
}
.ims-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}
.ims-empty-state .icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(79,70,229,.1);
    color: var(--ims-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}
.form-control, .form-select, .btn {
    min-height: 44px;
    border-radius: var(--ims-radius);
}
.btn-ims-lg {
    min-height: 48px;
    font-size: 1rem;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════════
   HERO BANNER & CAROUSEL RESPONSIVE FIXES
   ═══════════════════════════════════════════════════════════════════ */
.hero-caption {
    bottom: 1.5rem;
}
.hero-subheading {
    font-size: 0.9rem;
}
.hero-heading {
    font-size: 1.85rem;
}
.btn-hero-action {
    font-size: 0.95rem;
}

@media (max-width: 767.98px) {
    .hero-caption {
        left: 3% !important;
        right: 3% !important;
        bottom: 0.75rem !important;
        padding: 0.85rem 1rem !important;
        margin-bottom: 0 !important;
        border-radius: 0.85rem !important;
    }
    .hero-subheading {
        font-size: 0.725rem !important;
        margin-bottom: 0.25rem !important;
        line-height: 1.3 !important;
    }
    .hero-heading {
        font-size: 1.15rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
    }
    .btn-hero-action {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.85rem !important;
        min-height: 38px !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   PREMIUM MOBILE APP ADMIN DASHBOARD & GLOBAL COMPONENTS
   ═══════════════════════════════════════════════════════════════════ */

/* Mobile Main Layout Safe Area */
@media (max-width: 767.98px) {
    .ims-main, .ims-content {
        padding-bottom: calc(var(--bottom-nav-h, 64px) + env(safe-area-inset-bottom, 12px) + 28px) !important;
    }
}

/* App Hero Banner */
.ims-dash-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    border-radius: 20px;
    padding: 1.5rem 1.75rem;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15);
    margin-bottom: 1.5rem;
}
.ims-dash-hero::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
}
.ims-dash-hero::after {
    content: '';
    position: absolute;
    bottom: -40px; right: 80px;
    width: 140px; height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.2) 0%, transparent 70%);
}
.ims-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    border-radius: 50px;
    padding: 0.25rem 0.85rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}
.ims-hero-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    letter-spacing: -0.3px;
}
.ims-hero-desc {
    font-size: 0.88rem;
    color: #cbd5e1;
    max-width: 550px;
    margin-bottom: 1.25rem;
}
.ims-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}
.ims-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #ffffff;
    color: #0f172a;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.55rem 1.15rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 42px;
}
.ims-hero-btn:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    color: var(--ims-primary);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.ims-hero-btn:active {
    transform: scale(0.96);
}
.ims-hero-btn-glass {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
}
.ims-hero-btn-glass:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Quick App Launcher on Dashboard */
.ims-dash-launcher {
    margin-bottom: 1.5rem;
}
.ims-launcher-scroll {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
}
@media (min-width: 768px) {
    .ims-launcher-scroll {
        grid-template-columns: repeat(8, 1fr);
    }
}
@media (max-width: 480px) {
    .ims-launcher-scroll {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
}
.ims-dash-app-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 0.35rem;
    background: #ffffff;
    border: 1px solid var(--ims-border-subtle);
    border-radius: 16px;
    box-shadow: var(--ims-shadow);
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}
.ims-dash-app-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--ims-shadow-md);
    border-color: rgba(var(--ims-primary-rgb), 0.3);
}
.ims-dash-app-tile:active {
    transform: scale(0.94);
}
.ims-dash-app-tile .tile-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.4rem;
    margin-bottom: 0.45rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.ims-dash-app-tile .tile-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--ims-text);
    line-height: 1.2;
}

/* Smart KPI Widget Cards */
.ims-kpi-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--ims-border-subtle);
    box-shadow: var(--ims-shadow);
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}
.ims-kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ims-shadow-md);
    border-color: rgba(var(--ims-primary-rgb), 0.25);
}
.ims-kpi-card .kpi-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.ims-kpi-card .kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}
.ims-kpi-card .kpi-number {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--ims-text);
    line-height: 1;
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}
.ims-kpi-card .kpi-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ims-text-muted);
}
.ims-kpi-card .kpi-sub {
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    width: fit-content;
}

/* Tabbed Live Feeds */
.ims-feed-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.ims-feed-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.85rem;
    background: var(--ims-surface-alt);
    border-radius: 12px;
    border: 1px solid var(--ims-border-subtle);
    transition: background 0.15s ease;
    text-decoration: none;
    color: var(--ims-text);
}
.ims-feed-item:hover {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.ims-feed-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #ffffff;
    flex-shrink: 0;
}
.ims-feed-meta {
    line-height: 1.25;
    flex: 1;
    min-width: 0;
    padding: 0 0.75rem;
}
.ims-feed-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--ims-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ims-feed-subtitle {
    font-size: 0.72rem;
    color: var(--ims-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Mobile Table Row Action Spacing */
@media (max-width: 767.98px) {
    .ims-table-responsive-cards tbody td[data-label="Action"],
    .ims-table-responsive-cards tbody td[data-label="Actions"],
    .ims-table-responsive-cards tbody td:last-child {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
        justify-content: flex-end;
    }
    .ims-table-responsive-cards tbody td[data-label="Action"] .btn,
    .ims-table-responsive-cards tbody td[data-label="Actions"] .btn,
    .ims-table-responsive-cards tbody td:last-child .btn {
        min-height: 38px;
        padding: 0.35rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* ── Pagination Fix (Prevent Giant SVG Arrows) ── */
nav[role="navigation"] svg,
.pagination svg,
.page-item svg {
    max-width: 1.15rem !important;
    max-height: 1.15rem !important;
    width: 1.15rem !important;
    height: 1.15rem !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.pagination {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    align-items: center !important;
    margin-bottom: 0 !important;
}

.pagination .page-item .page-link {
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    padding: 0.375rem 0.75rem !important;
    color: var(--ims-primary) !important;
    border: 1px solid var(--ims-border) !important;
}

.pagination .page-item.active .page-link {
    background-color: var(--ims-primary) !important;
    border-color: var(--ims-primary) !important;
    color: #fff !important;
}



