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

:root {
    --font-primary: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-gurmukhi: 'Mukta Mahee', 'Noto Sans Gurmukhi', 'Noto Sans Devanagari', 'Raavi', 'Mangal', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Vibrant Primary Brand Colors */
    --primary: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #3730a3;
    --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    --rainbow-gradient: linear-gradient(90deg, #4f46e5 0%, #06b6d4 25%, #10b981 50%, #f59e0b 75%, #f43f5e 100%);
    
    /* Modern Dynamic Canvas & Surfaces */
    --canvas: #f8fafc;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --surface-sunken: #f1f5f9;
    --surface-warm: #fafaf8;
    
    --ink-black: #0f172a;
    --ink-charcoal: #1e293b;
    --ink-secondary: #334155;
    --ink-muted: #64748b;
    --ink-faint: #94a3b8;
    --ink-ghost: #cbd5e1;
    
    /* Curated Vibrant Accent Colors */
    --accent: #4f46e5;
    --accent-blue: #2563eb;
    --accent-indigo: #4f46e5;
    --accent-purple: #7c3aed;
    --accent-green: #059669;
    --accent-emerald: #10b981;
    --accent-orange: #ea580c;
    --accent-amber: #d97706;
    --accent-red: #e11d48;
    --accent-rose: #f43f5e;
    --accent-teal: #0d9488;
    --accent-cyan: #0284c7;
    
    /* Vibrant Tinted Backgrounds & Matching Borders */
    --tint-blue: #eff6ff;
    --border-blue: #bfdbfe;
    
    --tint-indigo: #eef2ff;
    --border-indigo: #c7d2fe;
    
    --tint-purple: #f5f3ff;
    --border-purple: #ddd6fe;
    
    --tint-green: #ecfdf5;
    --border-green: #a7f3d0;
    
    --tint-orange: #fffbeb;
    --border-orange: #fde68a;
    
    --tint-red: #fff1f2;
    --border-red: #fecdd3;
    
    --tint-teal: #f0fdfa;
    --border-teal: #99f6e4;
    
    --tint-cyan: #f0f9ff;
    --border-cyan: #bae6fd;
    
    --border: #e2e8f0;
    --border-subtle: rgba(0, 0, 0, 0.05);
    --divider: #f1f5f9;
    
    /* Luminous Depth Shadows */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 36px rgba(15, 23, 42, 0.1), 0 4px 12px rgba(15, 23, 42, 0.05);
    --shadow-float: 0 20px 50px rgba(79, 70, 229, 0.12), 0 8px 20px rgba(15, 23, 42, 0.06);
    --shadow-primary: 0 4px 16px rgba(79, 70, 229, 0.35);
    
    /* Radii */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 100px;
    
    /* Layout — Compact High-Density Proportions */
    --sidebar-width: 230px;
    --header-height: 44px;
    --bottom-nav-height: 72px;
    
    /* Transitions */
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ========================================
   RESET & BASE 
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

/* Remove number input plus/minus arrow spin buttons across all browsers */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

input[type="number"] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

html {
    scroll-behavior: smooth;
    font-size: 18px; /* High-readability scaled font */
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary), var(--font-gurmukhi);
    background-color: var(--canvas);
    color: var(--ink-charcoal);
    font-size: 1rem;
    line-height: 1.5;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   LAYOUT WRAPPER
   ======================================== */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    background-color: var(--canvas);
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

/* ========================================
   DESKTOP SIDEBAR — Clean Minimal
   ======================================== */
.app-sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--divider);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.35s var(--ease-out);
}

.sidebar-header {
    min-height: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    background: transparent;
}

.sidebar-brand-icon,
.sidebar-brand-link {
    width: auto;
    height: auto;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0 !important;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebar-brand-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.015em;
    margin-left: 0.5rem;
}

.sidebar-close-btn {
    display: none;
}

.sidebar-toggle-btn {
    display: none;
}

.sidebar-backdrop {
    display: none;
}

.sidebar-brand-icon:hover,
.sidebar-brand-link:hover {
    transform: scale(1.06);
    opacity: 0.85;
    box-shadow: none !important;
}

.sidebar-logo-img {
    height: 40px;
    width: auto;
    max-height: 44px;
    object-fit: contain;
    display: block;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.brand-title {
    font-size: 0.96rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    background: linear-gradient(135deg, #0f172a 0%, #4f46e5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.brand-subtitle {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0.65rem 3.5rem;
    list-style: none;
    scrollbar-width: thin;
}

.menu-category {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    padding: 0.95rem 0.75rem 0.35rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.menu-category::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.2) 0%, transparent 100%);
}

.menu-item {
    margin-bottom: 3px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    color: var(--ink-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.22s var(--ease-smooth);
    position: relative;
    white-space: nowrap;
}

.menu-link:hover {
    background: #f1f5f9;
    color: var(--ink-black);
    transform: translateX(2px);
}

.menu-link.active {
    background: #f1f5f9 !important;
    color: var(--ink-black) !important;
    font-weight: 700;
    box-shadow: none !important;
    border-left: 3.5px solid var(--primary) !important;
}

.menu-icon {
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    transition: transform 0.2s var(--ease-spring);
}

.menu-link:hover .menu-icon {
    transform: scale(1.1);
}

/* Sidebar Menu Icon Distinctive Palette */
.menu-link[href*="dashboard"] .menu-icon i { color: #4f46e5; }
.menu-link[href*="textbooks/index"] .menu-icon i { color: #d97706; }
.menu-link[href*="textbooks/add"] .menu-icon i { color: #ea580c; }
.menu-link[href*="textbooks/demand"] .menu-icon i { color: #6366f1; }
.menu-link[href*="library/index"] .menu-icon i { color: #059669; }
.menu-link[href*="library/add"] .menu-icon i { color: #10b981; }
.menu-link[href*="circulation/scan"] .menu-icon i { color: #db2777; }
.menu-link[href*="circulation/index"] .menu-icon i { color: #7c3aed; }
.menu-link[href*="circulation/issue"] .menu-icon i { color: #2563eb; }
.menu-link[href*="circulation/reminders"] .menu-icon i { color: #e11d48; }
.menu-link[href*="reports"] .menu-icon i { color: #0d9488; }
.menu-link[href*="admin"] .menu-icon i,
.menu-link[href*="sessions_classes"] .menu-icon i { color: #8b5cf6; }
.menu-link[href*="profile"] .menu-icon i { color: #6366f1; }
.menu-link[href*="logout"] .menu-icon i { color: #f43f5e; }

.menu-link.active .menu-icon i {
    filter: none !important;
}

.badge-counter {
    margin-left: auto;
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-pill);
    min-width: 22px;
    text-align: center;
    line-height: 1.35;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.4);
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100vw - var(--sidebar-width));
    padding-bottom: 1rem;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* ========================================
   TOP HEADER — Frosted Glass
   ======================================== */
.app-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.25rem;
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.app-header::before {
    display: none;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.page-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.header-school-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-left: 0.5rem;
    padding: 0.2rem 0.65rem;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    box-shadow: none;
}

.header-school-badge .school-name {
    font-weight: 600;
    color: #1e293b;
}

.header-school-badge .school-code {
    font-family: monospace;
    font-size: 0.7rem;
    font-weight: 700;
    color: #475569;
    background: #e2e8f0;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: auto;
    min-width: 34px;
    height: 34px;
    padding: 0 0.65rem;
    border-radius: 9px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    box-shadow: var(--shadow-xs);
    transition: all 0.22s var(--ease-smooth);
    flex-shrink: 0;
}

.header-lang-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.header-icon-btn[href*="profile"]:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.header-icon-btn:active {
    transform: scale(0.96);
}

.header-lang-code {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.btn-logout-icon {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.btn-logout-icon:hover {
    background: #fee2e2;
    color: #7f1d1d;
    border-color: #f87171;
    box-shadow: 0 1px 3px rgba(153, 27, 27, 0.15);
}

/* PC vs Mobile Text Switching */
.btn-text-pc {
    display: inline;
    font-size: 0.78rem;
    font-weight: 700;
}

.btn-icon-mobile-caption {
    display: none;
}

/* ========================================
   MAIN CONTENT CONTAINER
   ======================================== */
.page-container {
    padding: 0.35rem 0.6rem;
    flex: 1;
    max-width: 100%;
    margin: 0;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* ========================================
   CARDS — Compact High-Density Containers
   ======================================== */
.card {
    background: var(--surface, #ffffff);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.03);
    margin-bottom: 0.45rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.card:hover {
    box-shadow: 0 2px 8px -1px rgba(15, 23, 42, 0.06);
    border-color: #cbd5e1;
}

.card-header {
    padding: 0.35rem 0.65rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.02) 0%, #ffffff 100%);
    border-left: 3px solid #4f46e5;
}

.card-title {
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.card-title i {
    color: #4f46e5;
}

.card-body {
    padding: 0.45rem 0.65rem;
}

/* ========================================
   STAT CARDS — Compact Dashboard KPI Tiles
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
    overflow: hidden;
    min-height: 46px;
    text-decoration: none !important;
    color: inherit !important;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    text-decoration: none !important;
    color: inherit !important;
}

.stat-card:active {
    transform: scale(0.99);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2.5px;
}

/* Stat Card Colorful Variations */
.stat-card.primary {
    background: linear-gradient(145deg, #ffffff 0%, #f5f3ff 100%);
    border-color: #e0e7ff;
    border-left: 3.5px solid #4f46e5;
}
.stat-card.primary::before { background: linear-gradient(90deg, #4f46e5, #6366f1); }
.stat-card.primary .stat-value { color: #4338ca; }

.stat-card.success {
    background: linear-gradient(145deg, #ffffff 0%, #ecfdf5 100%);
    border-color: #d1fae5;
    border-left: 3.5px solid #10b981;
}
.stat-card.success::before { background: linear-gradient(90deg, #10b981, #059669); }
.stat-card.success .stat-value { color: #047857; }

.stat-card.info {
    background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 100%);
    border-color: #e0f2fe;
    border-left: 3.5px solid #0284c7;
}
.stat-card.info::before { background: linear-gradient(90deg, #0284c7, #0ea5e9); }
.stat-card.info .stat-value { color: #0369a1; }

.stat-card.warning {
    background: linear-gradient(145deg, #ffffff 0%, #fffbeb 100%);
    border-color: #fef3c7;
    border-left: 3.5px solid #f59e0b;
}
.stat-card.warning::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.stat-card.warning .stat-value { color: #b45309; }

.stat-card.danger {
    background: linear-gradient(145deg, #ffffff 0%, #fff1f2 100%);
    border-color: #ffe4e6;
    border-left: 3.5px solid #f43f5e;
}
.stat-card.danger::before { background: linear-gradient(90deg, #f43f5e, #e11d48); }
.stat-card.danger .stat-value { color: #e11d48; }

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-info .stat-label {
    font-size: 0.7rem;
    color: var(--ink-secondary);
    font-weight: 700;
    margin-bottom: 0.1rem;
    line-height: 1.2;
    white-space: normal;
}

.stat-info .stat-value {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-family: var(--font-primary);
}

.stat-icon {
    display: none !important;
}

/* ========================================
   BUTTONS — Compact Fintech / SaaS Style
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-xs, 6px);
    font-weight: 600;
    font-size: 0.78rem;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    font-family: inherit;
    letter-spacing: -0.01em;
    min-height: 29px;
    height: 29px;
    position: relative;
    overflow: hidden;
}

.btn:active {
    transform: scale(0.97);
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    border-color: #3730a3;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
    color: #ffffff !important;
}

.btn-secondary {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: #ffffff !important;
    border-color: #334155;
    box-shadow: 0 1px 2px rgba(51, 65, 85, 0.2);
}

.btn-secondary:hover {
    background: #1e293b;
    border-color: #1e293b;
    color: #ffffff !important;
}

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

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #047857;
    color: #ffffff !important;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff !important;
    border-color: #dc2626;
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #b91c1c;
    color: #ffffff !important;
}

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

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    border-color: #b45309;
    color: #ffffff !important;
}

.btn-info {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff !important;
    border-color: #0369a1;
    box-shadow: 0 1px 2px rgba(2, 132, 199, 0.25);
}

.btn-info:hover {
    background: #075985;
    border-color: #075985;
    color: #ffffff !important;
}

.btn-outline {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.btn-outline.btn-primary {
    color: #4f46e5;
    border-color: #c7d2fe;
    background: #ffffff;
}

.btn-outline.btn-primary:hover {
    background: #eef2ff;
    color: #4338ca;
    border-color: #a5b4fc;
}

.btn-outline.btn-success {
    color: #059669;
    border-color: #a7f3d0;
    background: #ffffff;
}

.btn-outline.btn-success:hover {
    background: #ecfdf5;
    color: #047857;
    border-color: #6ee7b7;
}

.btn-outline.btn-danger {
    color: #dc2626;
    border-color: #fca5a5;
    background: #ffffff;
}

.btn-outline.btn-danger:hover {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #f87171;
}

.btn-sm {
    padding: 0.18rem 0.5rem;
    font-size: 0.74rem;
    min-height: 26px;
    height: 26px;
    font-weight: 600;
}

/* ========================================
   FORMS & INPUTS — Dense High-Capacity Inputs
   ======================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.span-1 { grid-column: span 1; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-full { grid-column: 1 / -1; }

@media (max-width: 1024px) {
    .form-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .form-grid, .form-grid-2, .form-grid-3, .form-grid-4 {
        grid-template-columns: 1fr !important;
        gap: 0.4rem;
    }
    .span-1, .span-2, .span-3, .span-4, .span-full {
        grid-column: 1 / -1 !important;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.form-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink-secondary);
    letter-spacing: -0.01em;
}

.form-control {
    padding: 0.28rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs, 6px);
    font-size: 0.88rem;
    background-color: var(--surface);
    color: var(--ink-black);
    font-family: inherit;
    outline: none;
    transition: all 0.15s ease;
    min-height: 33px;
    height: 33px;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.12);
}

input[type="date"].form-control,
input[type="date"] {
    -webkit-appearance: auto;
    appearance: auto;
    cursor: pointer;
}
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.85;
    padding: 2px;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.form-control::placeholder {
    color: var(--ink-ghost);
}

/* ========================================
   DROPDOWNS / SELECT BOXES
   ======================================== */
.form-select, 
select.form-control, 
select.custom-select, 
select {
    padding: 0.28rem 1.6rem 0.28rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xs, 6px);
    font-size: 0.88rem;
    background-color: var(--surface);
    color: var(--ink-black);
    font-family: inherit;
    outline: none;
    transition: all 0.15s ease;
    min-height: 33px;
    height: 33px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.55rem center;
    background-size: 13px 13px;
}

.form-select:focus, 
select.form-control:focus, 
select.custom-select:focus, 
select:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.12);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23007aff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.form-select-sm,
select.form-select-sm,
.filter-bar .form-select,
.filter-bar select {
    min-height: 29px;
    height: 29px;
    padding: 0.2rem 1.4rem 0.2rem 0.5rem;
    font-size: 0.78rem;
    border-radius: var(--radius-xs, 6px);
    background-position: right 0.45rem center;
    background-size: 12px 12px;
}

select option,
optgroup,
optgroup option {
    font-family: var(--font-primary), var(--font-gurmukhi), sans-serif;
    font-size: 0.84rem;
    color: var(--ink-black);
    background-color: var(--surface);
}

/* ========================================
   FILTER BAR (High-Density Compact Layout)
   ======================================== */
.filter-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    margin-bottom: 0.45rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.4rem;
    box-shadow: var(--shadow-xs);
}

.filter-bar .form-group {
    gap: 0.15rem;
    margin-bottom: 0;
}

.filter-bar .form-label {
    font-size: 0.7rem;
    margin-bottom: 0.1rem;
    font-weight: 700;
}

.filter-bar .form-control {
    min-height: 29px;
    height: 29px;
    padding: 0.2rem 0.5rem;
    font-size: 0.78rem;
    border-radius: var(--radius-xs, 6px);
}

.filter-bar .btn {
    min-height: 29px;
    height: 29px;
    padding: 0 0.65rem;
    font-size: 0.76rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   TABLES — Dense High-Information Density
   ======================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    text-align: left;
}

.table th {
    background-color: var(--surface-sunken);
    padding: 0.42rem 0.6rem;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--ink-secondary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 0.42rem 0.6rem;
    border-bottom: 1px solid var(--divider);
    vertical-align: middle;
    color: var(--ink-charcoal);
    font-size: 0.88rem;
    line-height: 1.4;
}

.table tbody tr {
    transition: background-color 0.1s ease;
}

.table tbody tr:hover {
    background-color: rgba(79, 70, 229, 0.025);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ========================================
   BADGES — Subtle Pill Tags
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.55rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    line-height: 1.3;
}

.badge-primary { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }
.badge-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.badge-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-danger  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-secondary { background: #f8fafc; color: #475569; border: 1px solid #cbd5e1; }
.badge-info    { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }

/* ========================================
   ALERTS — Soft Rounded & Colorful
   ======================================== */
.alert {
    padding: 0.9rem 1.15rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.88rem;
    font-weight: 500;
    gap: 0.75rem;
}

.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.alert-danger { background: #fff1f2; border: 1px solid #fecdd3; color: #e11d48; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #b45309; }
.alert-info { background: #f0f9ff; border: 1px solid #bae6fd; color: #0284c7; }

/* ========================================
   MOBILE BOTTOM NAVIGATION — Instagram Latest Style Glass Dock
   ======================================== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 0;
    right: 0;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    z-index: 1001000;
    padding: 0 12px;
    box-sizing: border-box;
    pointer-events: none;
    background: transparent;
    border: none;
    box-shadow: none;
    height: auto;
    overflow: visible;
}

.mobile-bottom-nav-items {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: space-around;
    list-style: none;
    padding: 0 0.5rem;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.mobile-nav-item {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    overflow: hidden;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #8e8e8e;
    padding: 0.35rem 0.2rem;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s ease;
    gap: 3px;
    position: relative;
    min-width: 0;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    border-radius: 8px;
}

.mobile-nav-link span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.68rem;
    line-height: 1.1;
    font-weight: 500;
    color: #8e8e8e;
    letter-spacing: -0.01em;
    transition: color 0.15s ease, font-weight 0.15s ease;
}

.mobile-nav-link i {
    font-size: 1.35rem;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.15s ease;
    flex-shrink: 0;
    color: #8e8e8e;
}

.mobile-nav-link:active {
    transform: scale(0.90);
}

.mobile-nav-link.active {
    color: #000000;
}

.mobile-nav-link.active i {
    transform: scale(1.1);
    color: #000000;
}

.mobile-nav-link.active span {
    font-weight: 700;
    color: #000000;
}

/* CRED-Style Page & Element Transitions */
.page-container {
    animation: credFadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.card {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease !important;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.stat-card {
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease !important;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.icon-action-btn {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background 0.15s ease !important;
}

.icon-action-btn:active {
    transform: scale(0.95);
}

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

/* ========================================
   RESPONSIVE — Fit To Screen On All Devices
   ======================================== */
@media (max-width: 991px) {
    .app-sidebar {
        display: none !important;
    }
    
    .app-main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        min-width: 0 !important;
        padding-bottom: calc(85px + env(safe-area-inset-bottom, 0px)) !important;
        overflow-x: hidden !important;
    }
    
    .mobile-bottom-nav {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        overflow: visible !important;
        z-index: 1001000 !important;
    }
    
    .app-header {
        padding: 0 0.85rem !important;
        height: 48px !important;
    }
    
    .page-title {
        font-size: 1.1rem !important;
        font-weight: 800 !important;
    }
    
    .page-container {
        padding: 0.65rem 0.75rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
        margin-bottom: 0.65rem !important;
    }
    
    .stat-card {
        padding: 0.55rem 0.65rem !important;
        min-height: 58px !important;
        flex-direction: column !important;
        gap: 2px !important;
        align-items: flex-start !important;
        justify-content: center !important;
    }

    .stat-icon {
        display: none !important;
    }

    .stat-info .stat-value {
        font-size: 1.25rem !important;
        font-weight: 800 !important;
        line-height: 1.1 !important;
        color: var(--ink-black) !important;
    }

    .stat-info .stat-label {
        font-size: 0.75rem !important;
        font-weight: 600 !important;
        color: var(--ink-muted) !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
    }
    
    .card-header {
        padding: 0.65rem 0.85rem !important;
    }
    
    .card-title {
        font-size: 0.95rem !important;
        font-weight: 700 !important;
    }
    
    .card-body {
        padding: 0.65rem 0.85rem !important;
    }

    .card {
        margin-bottom: 0.65rem !important;
        border-radius: 12px !important;
    }
    
    .filter-bar {
        padding: 0.65rem 0.85rem !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        margin-bottom: 0.65rem !important;
        gap: 0.5rem !important;
    }

    .filter-bar form {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }

    .filter-bar .form-group {
        width: 100% !important;
        min-width: 0 !important;
    }

    .filter-bar div[style*="align-self: flex-end"] {
        align-self: stretch !important;
        width: 100% !important;
        display: flex !important;
    }

    .filter-bar div[style*="align-self: flex-end"] .btn {
        flex: 1 1 auto !important;
    }

    /* Mobile Text & Icon Rules */
    .btn-text-pc {
        display: none !important;
    }

    .header-icon-btn {
        width: 36px !important;
        min-width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        justify-content: center !important;
        font-size: 1rem !important;
        border-radius: 9px !important;
    }

    .quick-icon-toolbar {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 0.4rem !important;
        width: 100% !important;
    }

    .icon-action-btn {
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 56px !important;
        padding: 0.55rem 0.25rem !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 4px !important;
        border-radius: 10px !important;
    }

    .icon-action-btn i {
        font-size: 1.25rem !important;
    }

    .btn-icon-mobile-caption {
        display: block !important;
        font-size: 0.75rem !important;
        font-weight: 700 !important;
        line-height: 1.1 !important;
        color: var(--ink-charcoal) !important;
        text-align: center !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 100% !important;
    }

    .btn-icon {
        width: 34px !important;
        min-width: 34px !important;
        height: 34px !important;
        padding: 0 !important;
        justify-content: center !important;
        font-size: 0.95rem !important;
    }

    .icon-action-btn-sm {
        width: 30px !important;
        min-width: 30px !important;
        height: 30px !important;
        padding: 0 !important;
        justify-content: center !important;
        font-size: 0.85rem !important;
    }
}

@media (max-width: 600px) {
    .app-header {
        padding: 0 0.65rem !important;
        height: 46px !important;
    }

    .page-title {
        font-size: 1.05rem !important;
    }

    .page-container {
        padding: 0.5rem 0.6rem !important;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 0.65rem !important;
    }

    .btn {
        padding: 0.55rem 1rem !important;
        font-size: 0.88rem !important;
        min-height: 40px !important;
    }

    .btn-sm {
        padding: 0.35rem 0.75rem !important;
        font-size: 0.8rem !important;
        min-height: 32px !important;
    }

    .quick-actions {
        gap: 0.35rem !important;
    }

    .action-chip {
        font-size: 0.8rem !important;
        padding: 0.35rem 0.65rem !important;
        min-height: 32px !important;
    }

    .modal-backdrop {
        padding: 0.5rem !important;
    }

    .modal-card {
        max-width: calc(100vw - 1rem) !important;
        border-radius: var(--radius-lg) !important;
    }
}

@media (max-width: 420px) {
    html {
        font-size: 16.33px !important;
        font-size: calc(15px + 1pt) !important;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.35rem !important;
    }

    .stat-card {
        padding: 0.45rem 0.5rem !important;
        min-height: 52px !important;
    }

    .stat-info .stat-value {
        font-size: 1.15rem !important;
    }

    .stat-info .stat-label {
        font-size: 0.7rem !important;
    }

    .card-header, .card-body, .card-footer {
        padding: 0.5rem 0.65rem !important;
    }

    .mobile-bottom-nav {
        height: auto !important;
        overflow: visible !important;
    }

    .mobile-nav-link span {
        font-size: 0.68rem !important;
        font-weight: 600 !important;
    }

    .mobile-nav-link i {
        font-size: 1.25rem !important;
    }
}

/* ========================================
   LOGIN PAGE — Clean Centered Card
   ======================================== */
.login-container {
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 90% 15%, rgba(236, 72, 153, 0.12) 0%, transparent 40%),
                radial-gradient(circle at 50% 85%, rgba(6, 182, 212, 0.15) 0%, transparent 45%),
                #f8fafc;
    padding: 1.25rem;
    box-sizing: border-box;
    position: relative;
}

.login-card {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 50px rgba(79, 70, 229, 0.1), 0 4px 14px rgba(15, 23, 42, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 2.25rem 2rem;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4f46e5 0%, #06b6d4 30%, #10b981 60%, #f59e0b 85%, #ec4899 100%);
}

@media (max-width: 480px) {
    .login-container {
        padding: 0.75rem;
    }
    .login-card {
        padding: 1.75rem 1.35rem;
        border-radius: var(--radius-lg);
    }
}

.login-brand {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #06b6d4 100%);
    color: #fff;
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
}

.lang-switcher {
    display: inline-flex;
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 3px;
    gap: 3px;
}

.lang-btn {
    padding: 0.3rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--ink-secondary);
    border-radius: var(--radius-pill);
    transition: all 0.2s var(--ease-smooth);
}

.lang-btn:hover {
    color: var(--primary);
}

.lang-btn.active {
    background: #1e293b;
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* ========================================
   PRINT OVERRIDES
   ======================================== */
@media print {
    .app-sidebar, .app-header, .mobile-bottom-nav, .btn, .filter-bar, .actions-column, .hide-print {
        display: none !important;
    }
    .app-main {
        margin-left: 0 !important;
        padding-bottom: 0 !important;
    }
    .page-container {
        padding: 0 !important;
    }
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 2rem;
    }
    body, table, th, td, div, p, span, h1, h2, h3, h4 {
        font-family: 'Mukta Mahee', 'Noto Sans Gurmukhi', 'Noto Sans Devanagari', 'Plus Jakarta Sans', sans-serif !important;
    }
}

.print-header {
    display: none;
}

/* ========================================
   MICRO-ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card, .stat-card, .alert {
    animation: fadeInUp 0.4s var(--ease-out) both;
}

.stat-card:nth-child(2) { animation-delay: 0.05s; }
.stat-card:nth-child(3) { animation-delay: 0.1s; }
.stat-card:nth-child(4) { animation-delay: 0.15s; }
.stat-card:nth-child(5) { animation-delay: 0.2s; }
.stat-card:nth-child(6) { animation-delay: 0.25s; }

/* ========================================
   QUICK ACTIONS TOOLBAR (ICON BUTTONS)
   ======================================== */
.quick-icon-toolbar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.icon-action-btn {
    width: auto;
    min-width: 36px;
    height: 38px;
    padding: 0.45rem 0.85rem;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink-black);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--shadow-xs);
    transition: all 0.2s var(--ease-smooth);
    flex-shrink: 0;
}
.icon-action-btn:hover {
    background: var(--surface-sunken);
    color: var(--ink-black);
    border-color: var(--ink-ghost);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.icon-action-btn:active {
    transform: scale(0.94);
}
.icon-action-btn.primary {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}
.icon-action-btn.primary:hover {
    background: #1e293b;
    border-color: #1e293b;
    color: #ffffff;
}
.icon-action-btn.danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.icon-action-btn.danger:hover {
    background: #991b1b;
    border-color: #991b1b;
    color: #ffffff;
}

.icon-action-btn-sm {
    width: auto;
    min-width: 26px;
    height: 26px;
    padding: 0 0.45rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink-secondary);
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.icon-action-btn-sm:hover {
    background: var(--surface-sunken);
    color: #0f172a;
    border-color: #94a3b8;
}

.btn-icon {
    width: auto !important;
    min-width: 32px;
    height: 32px !important;
    padding: 0 0.65rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    border-radius: 8px !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

.action-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ink-charcoal);
    text-decoration: none;
    box-shadow: var(--shadow-xs);
    transition: all 0.2s var(--ease-smooth);
    min-height: 28px;
}

.action-chip:active {
    transform: scale(0.96);
}

.action-chip:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--ink-ghost);
}

.action-chip i {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ========================================
   DASHBOARD SECTION HEADERS
   ======================================== */
.section-title {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ink-muted);
    font-weight: 700;
    margin-bottom: 0.35rem;
    padding-left: 0.1rem;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 3.5rem 1.5rem;
    color: var(--ink-muted);
    line-height: 1.6;
}

.empty-state i {
    font-size: 2.5rem;
    color: var(--ink-ghost);
    margin-bottom: 0.75rem;
    display: block;
}

.empty-state p, .empty-state div, .empty-state h4 {
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.6;
    margin: 0;
    padding-bottom: 4px;
}

/* ========================================
   SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--ink-ghost);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--ink-muted);
}

/* ========================================
   CARD & ROW STATUS COLOR THEMES
   ======================================== */
.card-type-issued {
    border-left: 4px solid #0284c7 !important;
}
.card-type-returned {
    border-left: 4px solid #16a34a !important;
}
.card-type-overdue {
    border-left: 4px solid #dc2626 !important;
    background-color: #fef2f2;
}
.card-type-warning {
    border-left: 4px solid #f59e0b !important;
}
.card-type-active {
    border-left: 4px solid #0d9488 !important;
}
.card-type-passed,
.card-type-inactive {
    border-left: 4px solid #94a3b8 !important;
}

@media (max-width: 991px) {
    .desktop-table-view {
        display: block !important;
        width: 100% !important;
    }
}

/* ========================================
   GOOGLE ADSENSE CONTAINERS — Perfect Sizing
   ======================================== */
.adsense-dashboard-wrapper {
    max-width: 728px;
    width: 100%;
    margin: 1.25rem auto 0.75rem auto;
    text-align: center;
}

.adsense-label-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    padding: 0 4px;
    max-width: 728px;
    margin-left: auto;
    margin-right: auto;
}

.adsense-label-text {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--ink-faint, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.adsense-label-sub {
    font-size: 0.62rem;
    color: var(--ink-faint, #94a3b8);
}

.adsense-leaderboard-card {
    background: #ffffff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 4px 6px;
    width: 100%;
    max-width: 728px;
    height: auto;
    min-height: 50px;
    max-height: 105px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    margin: 0 auto;
}

.adsense-leaderboard-card ins.adsbygoogle {
    max-width: 728px !important;
    max-height: 90px !important;
    width: 100% !important;
}

@media (max-width: 768px) {
    .adsense-dashboard-wrapper {
        max-width: 336px;
        margin: 1rem auto 0.5rem auto;
    }
    .adsense-label-bar {
        max-width: 320px;
    }
    .adsense-leaderboard-card {
        max-width: 320px;
        max-height: 65px;
        min-height: 50px;
        padding: 3px;
    }
    .adsense-leaderboard-card ins.adsbygoogle {
        max-width: 320px !important;
        max-height: 50px !important;
    }
}

/* -------------------------------------------------------------
 * Flipkart-style Live Search Dropdown Styles
 * ------------------------------------------------------------- */
.flipkart-search-wrapper {
    position: relative;
    flex: 1;
    min-width: 220px;
    width: 100%;
}

.flipkart-search-input-box {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.flipkart-search-input {
    width: 100%;
    height: 36px;
    padding: 0 2.2rem 0 2.2rem;
    font-size: 0.85rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background-color: #ffffff;
    color: #1e293b;
    transition: all 0.2s ease-in-out;
}

.flipkart-search-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
    background-color: #ffffff;
}

.flipkart-search-icon-left {
    position: absolute;
    left: 0.75rem;
    color: #94a3b8;
    font-size: 0.85rem;
    pointer-events: none;
    transition: color 0.2s;
}

.flipkart-search-input:focus + .flipkart-search-icon-left,
.flipkart-search-input-box:focus-within .flipkart-search-icon-left {
    color: #4f46e5;
}

.flipkart-search-clear {
    position: absolute;
    right: 0.6rem;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.15s ease;
}

.flipkart-search-clear:hover {
    background: #cbd5e1;
    color: #0f172a;
}

.flipkart-search-clear.show {
    display: flex;
}

.flipkart-search-spinner {
    position: absolute;
    right: 2.2rem;
    color: #6366f1;
    font-size: 0.8rem;
    display: none;
}

.flipkart-search-spinner.show {
    display: inline-block;
    animation: fa-spin 1s infinite linear;
}

/* Floating Dropdown */
.flipkart-search-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    z-index: 1050;
    max-height: 420px;
    overflow-y: auto;
    display: none;
    animation: fkDropdownFade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.flipkart-search-dropdown.show {
    display: block;
}

.flipkart-dropdown-header {
    padding: 0.45rem 0.85rem;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flipkart-search-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.15s ease;
}

.flipkart-search-item:last-child {
    border-bottom: none;
}

.flipkart-search-item:hover,
.flipkart-search-item.active {
    background-color: #f1f5f9;
}

.flipkart-item-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #eef2ff;
    color: #4f46e5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.flipkart-search-item.item-student .flipkart-item-icon {
    background: #ecfdf5;
    color: #059669;
}

.flipkart-item-body {
    flex: 1;
    min-width: 0;
}

.flipkart-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.flipkart-item-title mark {
    background: #fef08a;
    color: #854d0e;
    padding: 0 2px;
    border-radius: 2px;
}

.flipkart-item-subtitle {
    font-size: 0.75rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.flipkart-item-badge {
    display: inline-block;
    padding: 0.18rem 0.45rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #334155;
    flex-shrink: 0;
}

.flipkart-item-badge.badge-avail {
    background: #dcfce7;
    color: #166534;
}

.flipkart-item-badge.badge-unavail {
    background: #fee2e2;
    color: #991b1b;
}

.flipkart-search-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.82rem;
}

.flipkart-dropdown-footer {
    display: block;
    padding: 0.55rem 0.85rem;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    font-size: 0.78rem;
    color: #4f46e5;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s;
}

.flipkart-dropdown-footer:hover {
    background: #eef2ff;
    color: #4338ca;
}

