/* ==========================================================
   Super Sys-Tech Computers Centre, Umerkot
   Staff Management System - Premium Native-App UI/UX Design System
   ========================================================== */

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

:root {
    /* Brand Theme Colors */
    --primary: #4338ca;
    --primary-hover: #3730a3;
    --primary-light: #eef2ff;
    --primary-gradient: linear-gradient(135deg, #4338ca 0%, #6366f1 100%);
    --primary-glow: rgba(67, 56, 202, 0.35);

    --success: #059669;
    --success-hover: #047857;
    --success-light: #ecfdf5;
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --success-glow: rgba(5, 150, 105, 0.35);

    --warning: #d97706;
    --warning-light: #fffbeb;
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

    --danger: #dc2626;
    --danger-light: #fef2f2;
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

    --info: #0284c7;
    --info-light: #f0f9ff;
    --info-gradient: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);

    /* Neutral & Surface Palette */
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #f1f5f9;
    --bg-surface-glass: rgba(255, 255, 255, 0.85);

    --bg-sidebar: #0f172a;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --text-sidebar: #cbd5e1;
    --text-sidebar-muted: #64748b;
    --sidebar-active-bg: #1e293b;
    --sidebar-active-border: #6366f1;

    --text-main: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-inverse: #ffffff;

    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;
    --border-focus: #818cf8;

    /* Elevated App Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 6px 12px -2px rgba(0, 0, 0, 0.06), 0 3px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 24px -4px rgba(0, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.03);
    --shadow-xl: 0 20px 30px -6px rgba(0, 0, 0, 0.1), 0 8px 14px -4px rgba(0, 0, 0, 0.04);

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    /* Typography */
    --font-heading: 'Plus Jakarta Sans', 'Outfit', sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-spring: 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================
   RESET & BASE CONFIG
   ========================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all var(--transition-fast);
}

/* ==========================================================
   BUTTONS (NATIVE TOUCH & HAPTIC STATES)
   ========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    user-select: none;
    line-height: 1.25;
    white-space: nowrap;
}

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

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--primary-glow);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #3730a3 0%, #4f46e5 100%);
    box-shadow: 0 6px 18px var(--primary-glow);
    color: #ffffff;
}

.btn-success {
    background: var(--success-gradient);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--success-glow);
}
.btn-success:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    color: #ffffff;
}

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

.btn-secondary {
    background-color: var(--bg-surface);
    color: var(--text-secondary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-xs);
}
.btn-secondary:hover {
    background-color: var(--bg-surface-alt);
    color: var(--text-main);
    border-color: #cbd5e1;
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background-color: var(--primary-light);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ==========================================================
   APP SHELL & NAVIGATION
   ========================================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.app-sidebar {
    width: 270px;
    background-color: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-xl);
}

.sidebar-brand {
    padding: 20px 18px;
    border-bottom: 1px solid var(--sidebar-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 3px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-title {
    display: flex;
    flex-direction: column;
}

.brand-title .brand-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.brand-title .brand-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    letter-spacing: 0.5px;
    font-weight: 500;
}

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

.sidebar-nav {
    flex: 1;
    padding: 18px 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-sidebar-muted);
    padding: 14px 12px 6px;
    font-weight: 700;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: var(--text-sidebar);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-size: 0.92rem;
    position: relative;
}

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

.nav-item.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.22) 0%, rgba(99, 102, 241, 0.06) 100%);
    color: #ffffff;
    font-weight: 600;
    border-left: 4px solid #818cf8;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.85;
}

.nav-item.active svg {
    opacity: 1;
    color: #818cf8;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--sidebar-border);
    background-color: rgba(0, 0, 0, 0.25);
}

.user-snippet {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
}

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

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.25);
    color: #c7d2fe;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

/* Main Content Area */
.app-main {
    margin-left: 270px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--bg-body);
}

/* Sticky App Topbar */
.topbar {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex-shrink: 0;
}

.topbar-brand-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.topbar-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    object-fit: contain;
    background: #ffffff;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

@media (min-width: 992px) {
    /* Hide topbar logo on desktop since sidebar already shows institute branding */
    .topbar-logo-img {
        display: none !important;
    }
}

.menu-toggle-btn {
    display: none;
    background: #ffffff;
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-main);
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xs);
    flex-shrink: 0;
}

.menu-toggle-btn:active {
    transform: scale(0.92);
    background: var(--bg-hover);
}

.page-headline {
    min-width: 0;
    flex-shrink: 0;
}

.page-headline h1 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.2;
    white-space: nowrap;
}

.page-headline p {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.topbar-row-main {
    display: contents; /* On desktop, let children directly participate in topbar flex */
}

.topbar-left {
    order: 1;
    margin-right: auto;
}

.topbar-row-sub {
    order: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    margin-right: 14px;
    flex-shrink: 0;
}

.topbar-sub-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.topbar-user-section {
    order: 3;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.user-chip .badge {
    white-space: nowrap;
}

.user-chip:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.topbar-install-btn {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(79, 70, 229, 0.25);
    transition: all var(--transition-fast);
}

.topbar-install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.35);
}

.topbar-install-btn:active {
    transform: scale(0.96);
}

.pst-header-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: var(--shadow-xs);
    white-space: nowrap;
    flex-shrink: 0;
}

.pst-header-date {
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 500;
    border-left: 1px solid var(--border-color);
    padding-left: 8px;
    margin-left: 2px;
    white-space: nowrap;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.page-content {
    padding: 28px;
    flex: 1;
}

/* ==========================================================
   APP PROFILE HERO BANNER
   ========================================================== */
.staff-profile-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.profile-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-avatar-large {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4338ca, #6366f1);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(67, 56, 202, 0.3);
    position: relative;
}

.avatar-online-ring {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    background-color: var(--success);
    border: 2px solid #ffffff;
    border-radius: 50%;
}

.profile-info h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.profile-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    flex-wrap: wrap;
}

/* ==========================================================
   PUNCH-IN TERMINAL (DIGITAL BIOMETRIC LOOK)
   ========================================================== */
.punch-in-hero-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    border-radius: var(--radius-xl);
    padding: 36px 24px;
    color: #ffffff;
    box-shadow: 0 20px 40px -10px rgba(30, 27, 75, 0.5), 0 10px 20px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.punch-in-hero-card::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(99, 102, 241, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.punch-in-hero-card::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.pst-clock-display {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    padding: 14px 28px;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.pst-clock-display .pst-label {
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #a5b4fc;
    font-weight: 700;
    margin-bottom: 4px;
}

.pst-clock-display .pst-time {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.pst-clock-display .pst-date {
    font-size: 0.9rem;
    color: #e0e7ff;
    font-weight: 500;
}

/* Master Punch-in Button */
.btn-punch-in {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 18px 46px;
    border-radius: var(--radius-full);
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 12px 30px rgba(5, 150, 105, 0.5), 0 0 0 10px rgba(16, 185, 129, 0.2);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    max-width: 360px;
    margin: 8px auto 0;
    animation: punchPulse 2.5s infinite;
}

.btn-punch-in:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 16px 36px rgba(5, 150, 105, 0.6), 0 0 0 14px rgba(16, 185, 129, 0.25);
}

.btn-punch-in:active {
    transform: scale(0.95);
}

@keyframes punchPulse {
    0% { box-shadow: 0 12px 30px rgba(5, 150, 105, 0.5), 0 0 0 0 rgba(16, 185, 129, 0.45); }
    70% { box-shadow: 0 12px 30px rgba(5, 150, 105, 0.5), 0 0 0 18px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 12px 30px rgba(5, 150, 105, 0.5), 0 0 0 0 rgba(16, 185, 129, 0); }
}

.btn-punched-already {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.28);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    padding: 16px 32px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 380px;
    width: 100%;
    cursor: default;
    box-shadow: var(--shadow-md);
}

/* ==========================================================
   METRIC & KPI STAT CARDS
   ========================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 18px;
    margin-bottom: 26px;
}

.stat-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--card-accent, var(--primary));
}

.stat-card.accent-primary { --card-accent: var(--primary); }
.stat-card.accent-success { --card-accent: var(--success); }
.stat-card.accent-warning { --card-accent: var(--warning); }
.stat-card.accent-danger  { --card-accent: var(--danger); }
.stat-card.accent-info    { --card-accent: var(--info); }

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background-color: var(--bg-surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1;
}

.stat-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ==========================================================
   CARDS, TABLES & MOBILE LIST TIMELINES
   ========================================================== */
.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.card-title {
    font-size: 1.12rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 22px;
}
.card-body.p-0 {
    padding: 0;
}

/* ==========================================================
   ADMIN DASHBOARD RESPONSIVE GRID & SUB-COMPONENTS
   ========================================================== */
.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
    margin-bottom: 24px;
    width: 100%;
}

.admin-grid-col-12 {
    grid-column: span 12;
}

.admin-grid-col-6 {
    grid-column: span 6;
}

.admin-card-header-responsive {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-card-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-table-search-input {
    max-width: 190px;
    padding: 5px 12px;
    font-size: 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.mobile-leaves-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-leave-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: var(--shadow-xs);
    transition: transform 0.15s ease;
}

.mobile-leave-item:active {
    transform: scale(0.99);
}

.mobile-leave-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.mobile-leave-reason {
    margin: 8px 0 0 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ==========================================================
   ADMIN PORTAL UNIVERSAL GRID & FORM HELPERS
   ========================================================== */
.responsive-two-col,
.admin-split-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
}

.admin-two-col-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
}

.admin-two-col-main {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
}

.modal-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.modal-form-row-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.guide-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.admin-header-actions-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.admin-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
    width: 100%;
}

/* Table Design */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

.data-table th {
    background-color: var(--bg-surface-alt);
    color: var(--text-secondary);
    font-weight: 700;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
}

.attendance-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.attendance-month-pill {
    font-size: 0.78rem;
    font-weight: 700;
    background: var(--primary-light);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    margin-left: 6px;
    display: inline-block;
    white-space: nowrap;
}

.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

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

.data-table tbody tr:hover {
    background-color: rgba(241, 245, 249, 0.6);
}

/* Mobile Timeline Item (Alternative to cramped tables on phone) */
.mobile-log-list {
    display: flex;
    flex-direction: column;
}

.mobile-log-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-fast);
}

.mobile-log-item:last-child {
    border-bottom: none;
}

.mobile-log-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-date-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
}

.mobile-date-badge .day-num {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-main);
}

.mobile-date-badge .month-name {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1;
}

.badge-success {
    background-color: var(--success-light);
    color: var(--success);
    border: 1px solid #a7f3d0;
}

.badge-warning {
    background-color: var(--warning-light);
    color: var(--warning);
    border: 1px solid #fde68a;
}

.badge-danger {
    background-color: var(--danger-light);
    color: var(--danger);
    border: 1px solid #fecaca;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
    border: 1px solid #c7d2fe;
}

.badge-info {
    background-color: var(--info-light);
    color: var(--info);
    border: 1px solid #bae6fd;
}

.badge-secondary {
    background-color: var(--bg-surface-alt);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* ==========================================================
   FORMS & CONTROLS
   ========================================================== */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.94rem;
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ==========================================================
   MODAL DIALOGS (NATIVE BOTTOM-SHEET ON MOBILE)
   ========================================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    padding: 20px;
}

.modal-backdrop.show {
    display: flex;
}

.modal-card {
    background-color: var(--bg-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSpring 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

@keyframes modalSpring {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background-color: var(--bg-surface);
}

.modal-title {
    font-size: 1.15rem;
    font-weight: 800;
}

.modal-close-btn {
    background: var(--bg-surface-alt);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.modal-body {
    padding: 20px 22px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
}

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background-color: var(--bg-surface-alt);
    flex-shrink: 0;
}

/* ==========================================================
   TOAST & NOTIFICATIONS
   ========================================================== */
.toast-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    background-color: #0f172a;
    color: #ffffff;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    font-size: 0.9rem;
    animation: toastPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-left: 4px solid #6366f1;
}

.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error   { border-left-color: var(--danger); }
.toast.toast-warning { border-left-color: var(--warning); }

@keyframes toastPop {
    from { transform: translateY(30px) scale(0.9); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Offline Floating Status Banner */
.offline-banner {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #ffffff;
    padding: 10px 16px;
    text-align: center;
    font-size: 0.86rem;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.offline-banner.show {
    display: flex;
}

/* PWA App Install Banner */
.install-app-banner {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    color: #ffffff;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
    box-shadow: var(--shadow-lg);
}

.install-app-banner.show {
    display: flex;
}

.install-app-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.install-app-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: contain;
    background: #ffffff;
    padding: 3px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

/* ==========================================================
   NATIVE MOBILE BOTTOM BAR
   ========================================================== */
.mobile-bottom-bar {
    display: none;
}

@media (max-width: 991px) {
    .app-sidebar {
        transform: translateX(-100%);
        z-index: 1050;
    }

    .app-sidebar.show {
        transform: translateX(0) !important;
        box-shadow: 10px 0 35px rgba(0, 0, 0, 0.5) !important;
    }

    .sidebar-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        margin-left: auto;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        border: 1.5px solid rgba(255, 255, 255, 0.22);
        color: #ffffff;
        cursor: pointer;
        flex-shrink: 0;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        padding: 0;
    }

    .sidebar-close-btn:hover {
        background: rgba(255, 255, 255, 0.25);
        border-color: rgba(255, 255, 255, 0.45);
        color: #ffffff;
        transform: scale(1.06);
    }

    .sidebar-close-btn:active {
        background: rgba(255, 255, 255, 0.35);
        transform: scale(0.92);
    }

    .sidebar-close-btn svg {
        width: 18px;
        height: 18px;
        stroke: #ffffff;
        stroke-width: 2.5;
        transition: transform 0.25s ease;
    }

    .sidebar-close-btn:hover svg {
        transform: rotate(90deg);
    }

    .app-main {
        margin-left: 0;
    }

    .menu-toggle-btn {
        display: flex;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1040;
        display: none;
    }

    .sidebar-overlay.show {
        display: block !important;
    }

    .page-content {
        padding: 14px 14px 85px; /* bottom clearance for mobile bar */
    }

    /* Staff Dashboard on Mobile: Seamless Single App Header (Hide Redundant Topbar) */
    body.page-staff-dashboard .topbar {
        display: none !important;
    }

    body.page-staff-dashboard .install-app-banner {
        display: none !important;
    }

    body.page-staff-dashboard .page-content {
        padding-top: 0 !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    /* Executive 2-Row Mobile Topbar (Clean, Spacious, Zero Overlap) */
    .topbar {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        padding: 9px 12px !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        position: sticky;
        top: 0;
        z-index: 90;
    }

    /* Row 1: Brand & User Profile */
    .topbar-row-main {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .topbar-left {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        flex: 1 !important;
        min-width: 0 !important;
        margin-right: 0 !important;
        order: unset !important;
    }

    .menu-toggle-btn {
        display: flex !important;
        width: 36px !important;
        height: 36px !important;
        border-radius: 9px !important;
        flex-shrink: 0 !important;
    }

    .topbar-brand-group {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        min-width: 0 !important;
        flex: 1 !important;
    }

    .topbar-logo-img {
        width: 32px !important;
        height: 32px !important;
        border-radius: 7px !important;
        flex-shrink: 0 !important;
    }

    .page-headline {
        min-width: 0 !important;
        flex: 1 !important;
    }

    .page-headline h1 {
        font-size: 1rem !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        line-height: 1.2 !important;
        margin: 0 !important;
    }

    .page-headline p {
        display: none !important;
    }

    .topbar-user-section {
        display: flex !important;
        align-items: center !important;
        flex-shrink: 0 !important;
        order: unset !important;
    }

    .user-chip {
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 3px 6px !important;
        border-radius: 20px !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
    }

    .topbar-avatar-img {
        width: 26px !important;
        height: 26px !important;
    }

    .user-chip .badge {
        font-size: 0.72rem !important;
        padding: 3px 7px !important;
        font-weight: 700 !important;
    }

    /* Row 2: Live Clock & Action Tools */
    .topbar-row-sub {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        gap: 8px !important;
        padding-top: 7px !important;
        border-top: 1px solid #f1f5f9 !important;
        margin-right: 0 !important;
        order: unset !important;
    }

    .pst-header-chip {
        padding: 4px 10px !important;
        font-size: 0.74rem !important;
        gap: 6px !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 20px !important;
    }

    .pst-header-date {
        display: inline-block !important;
        font-size: 0.72rem !important;
        color: #64748b !important;
        font-weight: 500 !important;
    }

    .topbar-sub-actions {
        display: flex !important;
        align-items: center !important;
        gap: 7px !important;
        flex-shrink: 0 !important;
    }

    .topbar .sound-toggle-btn {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
    }

    .app-sidebar .nav-item.sound-toggle-btn {
        width: auto !important;
        height: auto !important;
        background: transparent !important;
        border: none !important;
        border-radius: var(--radius-md) !important;
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 11px 14px !important;
        box-shadow: none !important;
    }

    .topbar-install-btn {
        padding: 4px 10px !important;
        font-size: 0.72rem !important;
        border-radius: 18px !important;
    }

    .btn-punch-in {
        font-size: 1.3rem;
        padding: 16px 28px;
    }

    .pst-clock-display .pst-time {
        font-size: 2rem;
    }

    /* Native Floating Curved Bottom Bar with iOS/Android safe area */
    .mobile-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding-bottom: env(safe-area-inset-bottom, 6px);
        height: calc(64px + env(safe-area-inset-bottom, 6px));
        background: rgba(15, 23, 42, 0.94);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-top: 1px solid rgba(255, 255, 255, 0.14);
        display: flex;
        align-items: center;
        justify-content: space-around;
        z-index: 1000;
        box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.4);
        padding-left: 8px;
        padding-right: 8px;
    }

    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: #94a3b8;
        text-decoration: none;
        font-size: 0.68rem;
        font-weight: 600;
        flex: 1;
        height: 52px;
        border-radius: 14px;
        position: relative;
        transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav-item svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
        stroke-width: 2.2;
        transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.22s ease;
    }

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

    .bottom-nav-item.active {
        color: #ffffff;
        font-weight: 700;
        background: rgba(99, 102, 241, 0.22);
    }

    .bottom-nav-item.active svg {
        stroke: #818cf8;
        transform: translateY(-2px) scale(1.12);
        filter: drop-shadow(0 2px 8px rgba(129, 140, 248, 0.5));
    }

    .bottom-nav-item.active::after {
        content: '';
        position: absolute;
        bottom: 3px;
        width: 14px;
        height: 3px;
        border-radius: 999px;
        background: #818cf8;
        box-shadow: 0 0 8px #818cf8;
    }

    .toast-container {
        bottom: 74px;
        left: 16px;
        right: 16px;
    }

    /* Bottom sheet modal on phone */
    body.modal-open {
        overflow: hidden !important;
    }

    body.modal-open .mobile-bottom-bar {
        transform: translateY(120%) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: transform 0.25s ease, opacity 0.2s ease !important;
    }

    .modal-backdrop {
        padding: 0 !important;
        align-items: flex-end !important;
        z-index: 2500 !important;
        background-color: rgba(15, 23, 42, 0.72) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }

    .modal-card {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 90dvh !important;
        max-height: calc(100vh - 40px) !important;
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
        border-top-left-radius: 24px !important;
        border-top-right-radius: 24px !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        animation: sheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
        background-color: #ffffff !important;
        margin: 0 !important;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35) !important;
    }

    .modal-card form {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
    }

    .modal-header {
        padding: 18px 20px 14px !important;
        border-bottom: 1px solid var(--border-color) !important;
        flex-shrink: 0 !important;
        position: relative !important;
        background-color: #ffffff !important;
    }

    .modal-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        border-radius: 999px;
        background: #cbd5e1;
    }

    .modal-body {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        overscroll-behavior: contain !important;
        padding: 16px 20px 24px !important;
    }

    .modal-footer {
        flex-shrink: 0 !important;
        position: sticky !important;
        bottom: 0 !important;
        z-index: 20 !important;
        background-color: #f8fafc !important;
        border-top: 1px solid var(--border-color) !important;
        padding: 12px 18px calc(14px + env(safe-area-inset-bottom, 16px)) 18px !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        gap: 10px !important;
        box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.05) !important;
    }

    .modal-footer .btn {
        flex: 1 1 auto !important;
        justify-content: center !important;
        min-height: 44px !important;
        padding: 10px 16px !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        border-radius: var(--radius-md) !important;
    }

    /* Auto-collapse multi-column form grids on mobile phones */
    .modal-body div[style*="grid-template-columns: 1fr 1fr"],
    .modal-body div[style*="grid-template-columns: 1fr 1fr 1fr"],
    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* Responsive Card Headers & Action Groups */
    .card-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 14px 16px !important;
    }

    .card-header .card-title {
        font-size: 1.05rem !important;
        width: 100% !important;
    }

    .card-header > div:last-child {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .card-header > div:last-child .form-control {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }

    .card-header > div:last-child .btn {
        flex: 1 1 auto !important;
        justify-content: center !important;
        padding: 8px 12px !important;
        font-size: 0.82rem !important;
    }

    /* Filter Bars on Mobile */
    .filter-bar form,
    .card-body form[method="GET"] {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .filter-item {
        flex: 1 1 calc(50% - 6px) !important;
        min-width: 130px !important;
    }

    .filter-item input,
    .filter-item select {
        width: 100% !important;
    }

    /* KPI Stat Cards 2-column mobile grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 18px !important;
    }

    .stat-card {
        padding: 12px 14px !important;
    }

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

    /* Admin Dashboard Mobile Grid & Responsive Headers */
    .admin-dashboard-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
    }

    .admin-grid-col-12,
    .admin-grid-col-6 {
        grid-column: span 12 !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    .admin-card-header-responsive {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        padding: 12px 14px !important;
    }

    .admin-card-header-actions {
        width: 100% !important;
        display: flex !important;
        gap: 8px !important;
    }

    .admin-table-search-input {
        flex: 1 !important;
        max-width: none !important;
    }

    .admin-header-btn {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }

    /* Admin Portal Universal Responsive Layouts */
    .responsive-two-col,
    .admin-split-grid,
    .admin-two-col-sidebar,
    .admin-two-col-main {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
    }

    .modal-form-row-2,
    .modal-form-row-checkboxes {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .guide-steps-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    .admin-header-actions-group {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .admin-header-actions-group > input,
    .admin-header-actions-group > select {
        flex: 1 1 100% !important;
        max-width: none !important;
    }

    .admin-header-actions-group > .btn,
    .admin-header-actions-group > button {
        flex: 1 1 auto !important;
        text-align: center !important;
        justify-content: center !important;
    }

    .admin-filter-bar {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        align-items: stretch !important;
    }

    .admin-filter-bar > div {
        width: 100% !important;
    }

    .admin-filter-bar > div > input,
    .admin-filter-bar > div > select {
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Table Padding and Action Buttons on Phone */
    .data-table th,
    .data-table td {
        padding: 10px 12px !important;
        font-size: 0.82rem !important;
    }

    .data-table td .btn {
        padding: 4px 8px !important;
        font-size: 0.76rem !important;
    }

    /* Horizontal scrolling tabs on phone */
    div:has(> a[href*="?tab="]),
    div:has(> a[href*="?type="]),
    .login-tabs {
        display: flex !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        gap: 6px !important;
        padding-bottom: 6px !important;
        flex-wrap: nowrap !important;
    }

    div:has(> a[href*="?tab="]) > a.btn,
    div:has(> a[href*="?type="]) > a.btn,
    .login-tab-btn {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        padding: 7px 12px !important;
        font-size: 0.82rem !important;
    }

    @keyframes sheetUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
}

/* ==========================================================
   RESPONSIVE UTILITIES & NATIVE MOBILE LOG CARDS
   ========================================================== */
.d-md-none {
    display: block;
}
.d-none-mobile {
    display: block;
}

@media (max-width: 768px) {
    .d-none-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .d-md-none {
        display: none !important;
    }
}

.mobile-topbar-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    background: #ffffff;
    padding: 2px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    flex-shrink: 0;
    margin-right: 4px;
}

.mobile-log-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

.mobile-log-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.mobile-log-card:active {
    transform: scale(0.99);
    background-color: #f8fafc;
}

.mobile-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-log-date {
    display: flex;
    flex-direction: column;
}

.mobile-log-date strong {
    font-size: 0.95rem;
    color: var(--text-main);
}

.mobile-log-day {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.mobile-log-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
    font-size: 0.88rem;
}

.mobile-log-time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-main);
}

.mobile-log-notes {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #f8fafc;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

/* ==========================================================
   LOGIN PAGE SPECIFIC STYLING
   ========================================================== */
.login-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #1e1b4b 0%, #0f172a 100%);
    padding: 20px;
}

.login-card {
    background-color: #ffffff;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 460px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-header {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    padding: 32px 24px;
    text-align: center;
    color: #ffffff;
}

.login-logo-img {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: inline-block;
    transition: transform var(--transition-base);
}

.login-logo-img:hover {
    transform: scale(1.05);
}

.login-header .institute-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.72rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-weight: 700;
    margin-bottom: 8px;
    color: #c7d2fe;
}

.login-header h1 {
    font-size: 1.4rem;
    color: #ffffff;
    font-weight: 800;
    margin-bottom: 4px;
}

.login-header p {
    font-size: 0.85rem;
    color: #c7d2fe;
}

.login-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-surface-alt);
}

.login-tab-btn {
    flex: 1;
    padding: 14px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 0.94rem;
    font-weight: 700;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all var(--transition-fast);
}

.login-tab-btn.active {
    background-color: #ffffff;
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.login-body {
    padding: 28px 24px;
}

.quick-staff-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.chip-btn {
    background-color: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.chip-btn:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    border-color: #c7d2fe;
}

/* Alert Boxes */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    animation: alertSlideDown 0.35s ease-out;
    transition: opacity 0.4s ease, transform 0.4s ease, max-height 0.4s ease, margin 0.4s ease, padding 0.4s ease;
    max-height: 120px;
    overflow: hidden;
}

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

.alert.alert-fade-out {
    opacity: 0 !important;
    transform: translateY(-8px) !important;
    max-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-width: 0 !important;
}

.alert-success { background-color: var(--success-light); color: var(--success); border: 1px solid #a7f3d0; }
.alert-error   { background-color: var(--danger-light); color: var(--danger); border: 1px solid #fecaca; }
.alert-info    { background-color: var(--info-light); color: var(--info); border: 1px solid #bae6fd; }
.alert-warning { background-color: var(--warning-light); color: var(--warning); border: 1px solid #fde68a; }

/* Print Stylesheet */
@media print {
    .app-sidebar, .topbar, .btn, .filter-bar, .mobile-bottom-bar, .no-print {
        display: none !important;
    }
    body { background-color: #ffffff !important; color: #000000 !important; }
    .app-main { margin-left: 0 !important; padding: 0 !important; }
    .page-content { padding: 0 !important; }
    .card { border: none !important; box-shadow: none !important; }
    .print-header { display: block !important; text-align: center; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 2px solid #000000; }
    .data-table th, .data-table td { border: 1px solid #cccccc !important; padding: 8px 10px !important; }
}

.print-header {
    display: none;
}

/* ==========================================================
   MODERN MOBILE-APP DESIGN SYSTEM (REFERENCE UI MOCKUP)
   ========================================================== */

/* Curved Organic Blue Header */
.app-mobile-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 25%, #1e40af 65%, #2563eb 100%);
    background-image: 
        radial-gradient(circle at 12% 18%, rgba(99, 102, 241, 0.35) 0%, transparent 45%),
        radial-gradient(circle at 88% 82%, rgba(59, 130, 246, 0.3) 0%, transparent 50%),
        linear-gradient(135deg, #0f172a 0%, #1e1b4b 25%, #1e40af 65%, #2563eb 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 32px -4px rgba(30, 58, 138, 0.35), 0 4px 12px rgba(0, 0, 0, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

@media (max-width: 768px) {
    .app-mobile-hero {
        margin: 0 -14px 22px -14px;
        border-radius: 0 0 32px 32px;
        padding: max(18px, env(safe-area-inset-top, 18px)) 18px 24px 18px;
    }
}

@media (min-width: 769px) {
    .app-mobile-hero {
        margin: 0 0 24px 0;
        border-radius: 24px;
        padding: 24px 28px;
    }
    .hero-menu-btn {
        display: none !important;
    }
}

.app-mobile-hero::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -50px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.02) 70%, transparent 100%);
    pointer-events: none;
}

.app-mobile-hero::before {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -20px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.28) 0%, transparent 70%);
    pointer-events: none;
}

/* Native Header Bar Inside Hero (Mobile Viewport) */
.hero-brand-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    position: relative;
    z-index: 2;
}

.hero-brand-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.hero-menu-btn:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.25);
}

.hero-brand-badge {
    display: flex;
    align-items: center;
    gap: 9px;
}

.hero-brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    object-fit: contain;
    background: #ffffff;
    padding: 2.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
}

.hero-brand-names {
    display: flex;
    flex-direction: column;
}

.hero-brand-main {
    font-family: var(--font-heading);
    font-size: 0.96rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: -0.2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-brand-sub {
    font-size: 0.72rem;
    color: #cbd5e1;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.hero-brand-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-pst-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.24);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.hero-bell-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    position: relative;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform var(--transition-fast);
}

.hero-bell-btn:active {
    transform: scale(0.92);
}

.hero-bell-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    border: 1.5px solid #1e40af;
    box-shadow: 0 0 6px #ef4444;
}

/* User Profile Row */
.hero-profile-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
}

.hero-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.15s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.hero-avatar-wrap:hover .hero-avatar-cam-badge {
    transform: scale(1.12);
    background: #4f46e5 !important;
}

.hero-avatar-wrap:active {
    transform: scale(0.93);
}

.hero-user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: transparent;
    border: none;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    font-weight: 800;
    font-family: var(--font-heading);
    overflow: hidden;
}

.hero-user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: none;
}

.hero-avatar-online {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #22c55e;
    border: 2.5px solid #1e3a8a;
    box-shadow: 0 0 6px #22c55e;
}

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

.hero-greeting {
    font-family: var(--font-heading);
    font-size: 1.32rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.3px;
    line-height: 1.25;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-subtext {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.hero-code-pill {
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 3px 9px;
    border-radius: 8px;
    font-weight: 700;
    color: #ffffff;
    font-size: 0.76rem;
    letter-spacing: 0.3px;
}

.hero-role-pill {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 3px 9px;
    border-radius: 8px;
    font-weight: 600;
    color: #e2e8f0;
    font-size: 0.76rem;
}

.hero-incharge-pill {
    background: linear-gradient(135deg, #fde047 0%, #eab308 100%);
    color: #713f12;
    padding: 3px 9px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.74rem;
    box-shadow: 0 2px 8px rgba(234, 179, 8, 0.35);
}

.hero-shift-pill-wrap {
    margin-top: 6px;
    position: relative;
    z-index: 2;
}

.hero-shift-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 7px 15px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #f1f5f9;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-shift-pill.shift-duty {
    color: #fef08a;
    background: rgba(234, 179, 8, 0.2);
    border-color: rgba(250, 204, 21, 0.4);
    box-shadow: 0 4px 14px rgba(234, 179, 8, 0.18);
}

.hero-shift-pill.shift-holiday {
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(96, 165, 250, 0.35);
}

.hero-shift-pill.shift-sunday {
    color: #e0e7ff;
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(129, 140, 248, 0.35);
}

.hero-shift-pill.shift-normal {
    color: #e2e8f0;
}

/* Section Headings */
.section-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.section-title-row h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.2px;
    margin: 0;
}

.section-see-all {
    font-size: 0.82rem;
    font-weight: 700;
    color: #e11d48;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

/* Choose Requests / Quick Action Grid */
.quick-requests-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (max-width: 420px) {
    .quick-requests-grid {
        gap: 8px;
    }
}

.request-action-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 18px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    cursor: pointer;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    position: relative;
}

.request-action-card:active {
    transform: scale(0.95);
    background-color: #fafbfc;
}

.pastel-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: transform var(--transition-fast);
}

.request-action-card:hover .pastel-circle {
    transform: scale(1.08);
}

.pastel-mint   { background: #e6f9f0; color: #10b981; }
.pastel-blue   { background: #e0e7ff; color: #4338ca; }
.pastel-amber  { background: #fef3c7; color: #d97706; }
.pastel-purple { background: #f3e8ff; color: #7c3aed; }

.request-action-card .card-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 3px;
}

.request-action-card .card-counter {
    font-size: 0.85rem;
    font-weight: 800;
}

.pastel-mint   + .card-label + .card-counter { color: #10b981; }
.pastel-blue   + .card-label + .card-counter { color: #4338ca; }
.pastel-amber  + .card-label + .card-counter { color: #d97706; }
.pastel-purple + .card-label + .card-counter { color: #7c3aed; }

/* Biometric & Manual Punch Terminal Card */
.biometric-hero-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px 20px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.biometric-clock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    color: #475569;
    font-weight: 700;
    margin-bottom: 12px;
}

.biometric-pst-time {
    font-size: 2.1rem;
    font-weight: 800;
    color: #0f172a;
    font-family: var(--font-heading);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.biometric-pst-date {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Fingerprint Sensor Button */
.fingerprint-sensor-wrapper {
    position: relative;
    width: 104px;
    height: 104px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fingerprint-pulse-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(244, 63, 94, 0.12);
    animation: radarWave 2.2s infinite ease-out;
}

.fingerprint-pulse-ring-2 {
    position: absolute;
    width: 80%;
    height: 80%;
    border-radius: 50%;
    background: rgba(244, 63, 94, 0.18);
    animation: radarWave 2.2s infinite ease-out 0.8s;
}

@keyframes radarWave {
    0% {
        transform: scale(0.7);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.fingerprint-touch-btn {
    position: relative;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffffff 0%, #fff1f2 100%);
    border: 2.5px solid #fda4af;
    box-shadow: 0 8px 24px rgba(244, 63, 94, 0.2), inset 0 2px 4px rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    outline: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    z-index: 2;
    overflow: hidden;
}

.fingerprint-touch-btn:active {
    transform: scale(0.92);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.35);
}

.fingerprint-sensor-img {
    width: 54px;
    height: 54px;
    object-fit: contain;
    transition: transform 0.25s ease, filter 0.25s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.fingerprint-touch-btn:hover .fingerprint-sensor-img {
    transform: scale(1.06);
}

.fingerprint-action-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    user-select: none;
}

.laser-scanner-line {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    height: 2.5px;
    background: linear-gradient(90deg, transparent, #f43f5e, #fb7185, transparent);
    box-shadow: 0 0 10px #f43f5e;
    border-radius: 2px;
    opacity: 0;
    pointer-events: none;
    z-index: 3;
}

.fingerprint-touch-btn.scanning .laser-scanner-line {
    opacity: 1;
    animation: laserScan 1.1s infinite alternate ease-in-out;
}

@keyframes laserScan {
    0% { transform: translateY(0); }
    100% { transform: translateY(58px); }
}

.fingerprint-touch-btn.scanning {
    border-color: #f43f5e;
    box-shadow: 0 0 28px rgba(244, 63, 94, 0.45);
}

.fingerprint-touch-btn.scanning .fingerprint-sensor-img {
    filter: drop-shadow(0 0 8px rgba(244, 63, 94, 0.7));
    animation: fingerprintPulse 0.7s infinite alternate ease-in-out;
}

@keyframes fingerprintPulse {
    0% { transform: scale(1); filter: drop-shadow(0 0 6px rgba(244, 63, 94, 0.5)); }
    100% { transform: scale(1.08); filter: drop-shadow(0 0 14px rgba(244, 63, 94, 0.9)); }
}

/* Biometric Sensor States */
.fingerprint-pulse-ring.pulse-amber {
    background: rgba(245, 158, 11, 0.15) !important;
}
.fingerprint-pulse-ring-2.pulse-amber {
    background: rgba(245, 158, 11, 0.22) !important;
}

.fingerprint-touch-btn.not-enrolled {
    border-color: #f59e0b;
    background: linear-gradient(145deg, #ffffff 0%, #fffbeb 100%);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.25);
}

.fingerprint-touch-btn.verified {
    border-color: #22c55e !important;
    background: linear-gradient(145deg, #ffffff 0%, #f0fdf4 100%) !important;
    box-shadow: 0 0 28px rgba(34, 197, 94, 0.55) !important;
    animation: sensorVerifiedPop 0.4s ease-out;
}

.fingerprint-touch-btn.sensor-error-shake {
    border-color: #ef4444 !important;
    background: linear-gradient(145deg, #ffffff 0%, #fef2f2 100%) !important;
    box-shadow: 0 0 24px rgba(239, 68, 68, 0.5) !important;
    animation: sensorShake 0.45s ease-in-out;
}

@keyframes sensorVerifiedPop {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

@keyframes sensorShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.fingerprint-label-text.text-amber {
    color: #b45309 !important;
}

.fingerprint-label-text {
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 4px;
}

.fingerprint-subtext {
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 18px;
}

/* Manual Punch In Button */
.btn-manual-punch {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-full);
    padding: 12px 20px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-manual-punch:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

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

/* Punched In Already Card */
.punched-status-card {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #15803d;
}

.punched-status-card .status-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #22c55e;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}

.punched-status-card h4 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #14532d;
    margin: 0;
}

.punched-status-card p {
    font-size: 0.85rem;
    color: #166534;
    margin: 0;
}

/* "Your Attendance" KPI Row (Matching Reference Screen 1) */
.attendance-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.attendance-pill-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 16px 10px;
    text-align: center;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.kpi-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
}

.kpi-circle-green  { background-color: #22c55e; box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35); }
.kpi-circle-orange { background-color: #f97316; box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35); }
.kpi-circle-red    { background-color: #ef4444; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35); }

.attendance-pill-card .kpi-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #64748b;
}

/* Recent Requests Applications (Matching Reference Screen 1) */
.recent-requests-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.request-item-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 14px 16px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: transform var(--transition-fast);
}

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

.request-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.request-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    flex-shrink: 0;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.request-text h5 {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 2px 0;
}

.request-text .request-date {
    font-size: 0.78rem;
    color: #6366f1;
    font-weight: 600;
    margin-bottom: 2px;
}

.request-text .request-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
}

.pill-approved {
    background: #dcfce7;
    color: #15803d;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid #86efac;
    text-transform: capitalize;
}

.pill-pending {
    background: #fef3c7;
    color: #b45309;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid #fde68a;
}

.pill-sunday {
    background: #e0e7ff;
    color: #4338ca;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid #c7d2fe;
}

/* Modern Calendar Widget (Matching Reference Screen 2) */
.calendar-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 20px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    margin-bottom: 24px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-month-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: #1e293b;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    text-align: center;
}

.calendar-weekday {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    padding-bottom: 6px;
}

.calendar-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
    border-radius: 12px;
    position: relative;
    cursor: default;
}

.calendar-cell.active-today {
    background: #2563eb;
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
}

.calendar-cell .dot-indicator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    margin-top: 2px;
}

.dot-indicator.present { background: #22c55e; }
.dot-indicator.leave   { background: #6366f1; }
.dot-indicator.late    { background: #f59e0b; }

/* ==========================================================
   APP LAUNCH SPLASH SCREEN (MOBILE & DESKTOP)
   ========================================================== */
.splash-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: radial-gradient(circle at 50% 30%, #1e1b4b 0%, #0f172a 65%, #020617 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    color: #ffffff;
    font-family: var(--font-body);
    transition: opacity 0.5s ease, transform 0.5s ease;
    overflow: hidden;
}

.splash-wrapper.fade-out {
    opacity: 0;
    transform: scale(1.04);
    pointer-events: none;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    animation: splashAppear 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.splash-logo-container {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.splash-logo-glow {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.45) 0%, rgba(99, 102, 241, 0) 70%);
    animation: splashGlowPulse 2s ease-in-out infinite alternate;
}

.splash-logo-circle {
    width: 108px;
    height: 108px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    animation: splashLogoPop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.splash-logo-img {
    width: 82px;
    height: 82px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}

.splash-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(129, 140, 248, 0.4);
    color: #c7d2fe;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.splash-title {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 6px;
}

.splash-subtitle {
    font-size: 0.88rem;
    color: #94a3b8;
    margin-bottom: 28px;
}

.splash-progress-track {
    width: 180px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.splash-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 45%;
    background: linear-gradient(90deg, #6366f1, #38bdf8);
    border-radius: 999px;
    animation: splashProgressIndeterminate 1.4s infinite ease-in-out;
}

.splash-status-text {
    font-size: 0.78rem;
    color: #cbd5e1;
    margin-top: 12px;
    font-weight: 500;
}

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

@keyframes splashLogoPop {
    0% { transform: scale(0.65); opacity: 0; }
    70% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes splashGlowPulse {
    0% { transform: scale(0.9); opacity: 0.35; }
    100% { transform: scale(1.25); opacity: 0.75; }
}

@keyframes splashProgressIndeterminate {
    0% { left: -45%; width: 45%; }
    50% { left: 30%; width: 60%; }
    100% { left: 100%; width: 45%; }
}

/* ==========================================================
   EXECUTIVE MOBILE DESIGN SYSTEM (ADMIN & STAFF SIDES)
   ========================================================== */

/* Executive Admin Mobile Hero */
.exec-mobile-hero {
    display: none;
}

@media (max-width: 991px) {
    .exec-mobile-hero {
        display: block;
        background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #1e293b 100%);
        border-radius: var(--radius-xl);
        padding: 18px 16px;
        margin-bottom: 20px;
        color: #ffffff;
        box-shadow: 0 10px 30px rgba(15, 23, 42, 0.35);
        border: 1px solid rgba(255, 255, 255, 0.12);
        position: relative;
        overflow: hidden;
    }

    .exec-mobile-hero::before {
        content: '';
        position: absolute;
        top: -30px;
        right: -30px;
        width: 140px;
        height: 140px;
        background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
    }

    .exec-hero-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 14px;
        gap: 10px;
    }

    .exec-hero-profile,
    .exec-hero-user {
        display: flex;
        align-items: center;
        gap: 12px;
        min-width: 0;
        flex: 1;
    }

    .exec-hero-user > div:last-child,
    .exec-hero-profile > div:last-child {
        min-width: 0;
        flex: 1;
    }

    .exec-avatar-ring {
        position: relative;
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: 2px solid #818cf8;
        padding: 2px;
        box-shadow: 0 4px 12px rgba(129, 140, 248, 0.35);
        flex-shrink: 0;
    }

    .exec-avatar-ring img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        object-fit: cover;
    }

    .exec-hero-user h3,
    .exec-name-title h3 {
        font-size: 1.05rem;
        margin: 0;
        color: #ffffff;
        font-weight: 700;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .exec-name-title span {
        font-size: 0.75rem;
        color: #94a3b8;
        display: block;
        margin-top: 2px;
    }

    .exec-live-time {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.16);
        padding: 5px 10px;
        border-radius: var(--radius-full);
        font-size: 0.72rem;
        font-weight: 700;
        color: #f1f5f9;
        flex-shrink: 0;
        white-space: nowrap;
    }

    .live-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background-color: #22c55e;
        box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
        animation: livePulse 2s infinite;
        display: inline-block;
    }

    .exec-quick-actions-bar {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin-top: 14px;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .exec-quick-pill {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        padding: 8px 4px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: var(--radius-md);
        color: #ffffff;
        text-decoration: none;
        font-size: 0.7rem;
        font-weight: 600;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        text-align: center;
        cursor: pointer;
    }

    .exec-quick-pill:active {
        transform: scale(0.94);
        background: rgba(255, 255, 255, 0.16);
    }

    .exec-quick-pill svg {
        width: 18px;
        height: 18px;
        stroke: #818cf8;
    }

    /* Mobile Staff Cards List (Replaces wide desktop table) */
    .mobile-staff-cards-list {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .mobile-staff-card {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: var(--radius-lg);
        padding: 14px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        display: flex;
        flex-direction: column;
        gap: 10px;
        transition: transform 0.15s ease, box-shadow 0.15s ease;
    }

    .mobile-staff-card:active {
        transform: scale(0.985);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .mobile-card-row-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }

    .mobile-card-staff-info {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
        flex: 1;
    }

    .mobile-card-avatar {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        object-fit: cover;
        border: 1.5px solid var(--border-color);
        flex-shrink: 0;
    }

    .mobile-card-details {
        min-width: 0;
        flex: 1;
    }

    .mobile-card-details h4 {
        font-size: 0.95rem;
        margin: 0;
        color: var(--text-main);
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-card-details .code-pill {
        font-size: 0.72rem;
        color: var(--primary);
        font-weight: 700;
        font-family: var(--font-heading);
    }

    .mobile-card-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 4px;
        padding-top: 8px;
        border-top: 1px solid #f1f5f9;
    }

    .mobile-card-action-btn {
        flex: 1;
        padding: 6px 10px;
        border-radius: var(--radius-md);
        font-size: 0.78rem;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        text-decoration: none;
        border: 1px solid transparent;
        transition: all 0.15s ease;
    }

    .mobile-card-action-btn.btn-call {
        background: #f0fdf4;
        color: #15803d;
        border-color: #bbf7d0;
    }

    .mobile-card-action-btn.btn-wa {
        background: #ecfdf5;
        color: #047857;
        border-color: #a7f3d0;
    }

    /* Tactile Thumb Scanner / Punch Ripple */
    .biometric-scanner-wrap {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
    }

    .biometric-scanner-wrap::before {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        background: rgba(99, 102, 241, 0.18);
        animation: scannerRipple 2.2s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
        pointer-events: none;
    }

    .biometric-scanner-wrap::after {
        content: '';
        position: absolute;
        width: 118%;
        height: 118%;
        border-radius: 50%;
        background: rgba(99, 102, 241, 0.08);
        animation: scannerRipple 2.2s infinite 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        pointer-events: none;
    }

    @keyframes scannerRipple {
        0% { transform: scale(0.85); opacity: 0.8; }
        100% { transform: scale(1.4); opacity: 0; }
    }

    /* Desktop/Mobile display helpers */
    .d-desktop-only {
        display: none !important;
    }
    .d-mobile-only {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .d-mobile-only {
        display: none !important;
    }
    .d-desktop-only {
        display: block !important;
    }
}

/* ==========================================================
   SMOOTH TRANSITIONS & ADVANCED ANIMATIONS
   ========================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastSpringIn {
    0% {
        opacity: 0;
        transform: translateY(28px) scale(0.90);
    }
    75% {
        transform: translateY(-4px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
}

/* Page content staggered entrance */
.page-content > div,
.page-content > .card,
.page-content > .stats-grid,
.page-content > .app-mobile-hero,
.page-content > .exec-mobile-hero,
.page-content > .section-title-row,
.page-content > .quick-requests-grid,
.page-content > .biometric-hero-card {
    animation: fadeInUp 0.42s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-content > *:nth-child(1) { animation-delay: 0.03s; }
.page-content > *:nth-child(2) { animation-delay: 0.07s; }
.page-content > *:nth-child(3) { animation-delay: 0.12s; }
.page-content > *:nth-child(4) { animation-delay: 0.17s; }
.page-content > *:nth-child(5) { animation-delay: 0.22s; }
.page-content > *:nth-child(6) { animation-delay: 0.27s; }

/* Tactile Spring Micro-Interactions */
.btn, .exec-quick-pill, .request-action-card, .mobile-staff-card, .btn-touch-action, .sound-toggle-btn {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.btn:active, .exec-quick-pill:active, .request-action-card:active, .btn-touch-action:active {
    transform: scale(0.92) !important;
}

/* Modern Glassmorphism Toast with Glow */
.toast-container {
    position: fixed;
    bottom: 86px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 420px;
}

@media (max-width: 768px) {
    .toast-container {
        bottom: 86px;
        left: 14px;
        right: 14px;
        max-width: none;
    }
}

.toast {
    pointer-events: auto;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: #ffffff;
    padding: 13px 18px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.92rem;
    line-height: 1.4;
    animation: toastSpringIn 0.38s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
    position: relative;
    overflow: hidden;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    border-radius: 4px;
    background: #6366f1;
}

.toast.toast-success::before {
    background: #22c55e;
    box-shadow: 0 0 12px #22c55e;
}
.toast.toast-error::before, .toast.toast-danger::before {
    background: #ef4444;
    box-shadow: 0 0 12px #ef4444;
}
.toast.toast-warning::before {
    background: #f59e0b;
    box-shadow: 0 0 12px #f59e0b;
}

/* ==========================================================
   SOUND / SPEAKER TOGGLE BUTTON - PREMIUM DESIGN SYSTEM
   ========================================================== */
.sound-toggle-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.2s ease,
                border-color 0.2s ease,
                color 0.2s ease,
                box-shadow 0.2s ease;
}

.sound-toggle-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35) !important;
}

/* Sound Icon Container */
.sound-toggle-btn .sound-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    pointer-events: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sound-toggle-btn:hover .sound-icon {
    transform: scale(1.08);
}

.sound-toggle-btn:active .sound-icon {
    transform: scale(0.92);
}

.sound-toggle-btn .sound-icon svg {
    display: block;
    width: 16px;
    height: 16px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Topbar Sound Button (Desktop, Tablet & Base) */
.topbar .sound-toggle-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: #4338ca;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    flex-shrink: 0;
}

.topbar .sound-toggle-btn:hover {
    background: #eef2ff;
    border-color: #818cf8;
    color: #3730a3;
    transform: translateY(-1.5px) scale(1.05);
    box-shadow: 0 4px 12px rgba(67, 56, 202, 0.2);
}

.topbar .sound-toggle-btn:active {
    transform: scale(0.92);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* Sound Active / Enabled Status Dot */
.topbar .sound-toggle-btn::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    border: 1.5px solid #ffffff;
    box-shadow: 0 0 4px rgba(16, 185, 129, 0.6);
    transition: all 0.2s ease;
    pointer-events: none;
}

/* Muted State (Sound OFF) */
.sound-toggle-btn.muted {
    opacity: 0.8;
}

.topbar .sound-toggle-btn.muted {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
    box-shadow: none;
}

.topbar .sound-toggle-btn.muted::after {
    background: #cbd5e1;
    box-shadow: none;
    border-color: #f8fafc;
}

.topbar .sound-toggle-btn.muted:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #64748b;
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Audio Wave Ripple Animation on Play / Click */
@keyframes soundRipplePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.6);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(99, 102, 241, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

.topbar .sound-toggle-btn.sound-ripple {
    animation: soundRipplePulse 0.45s cubic-bezier(0, 0, 0.2, 1);
}

/* App Sidebar Nav Item - Reset & Polish */
.app-sidebar .nav-item.sound-toggle-btn {
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    border-radius: var(--radius-md) !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #cbd5e1 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 11px 14px !important;
    transform: none !important;
}

.app-sidebar .nav-item.sound-toggle-btn::after {
    display: none !important;
}

.app-sidebar .nav-item.sound-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #ffffff !important;
    transform: translateX(3px) !important;
}

.app-sidebar .nav-item.sound-toggle-btn.muted {
    opacity: 0.6;
    color: #94a3b8 !important;
}

/* Dashboard Hero Sound Button */
.hero-brand-right .sound-toggle-btn.hero-bell-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.hero-brand-right .sound-toggle-btn.hero-bell-btn::after {
    top: 3px;
    right: 3px;
    width: 6px;
    height: 6px;
    border-color: rgba(255, 255, 255, 0.9);
}

.hero-brand-right .sound-toggle-btn.hero-bell-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.hero-brand-right .sound-toggle-btn.hero-bell-btn.muted {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.55);
}

.hero-brand-right .sound-toggle-btn.hero-bell-btn.muted::after {
    background: rgba(255, 255, 255, 0.35);
}


/* Site Footer & Developer Credits */
.site-credit-footer {
    margin-top: 40px;
    padding-top: 20px;
    padding-bottom: 24px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.footer-credit-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.footer-copyright {
    margin: 0;
    color: #64748b;
    font-weight: 500;
}

.footer-developer {
    margin: 0;
    font-size: 0.85rem;
    color: #475569;
    font-weight: 600;
}

.footer-developer .dev-name {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    display: inline-block;
}

@media (max-width: 991px) {
    .site-credit-footer {
        margin-top: 28px;
        padding-bottom: calc(78px + env(safe-area-inset-bottom, 12px));
    }
}

/* ==========================================================
   INTERACTIVE AVATAR ZOOM & CROP TOOL
   ========================================================== */
.avatar-crop-container {
    width: 280px;
    height: 280px;
    margin: 0 auto 14px auto;
    position: relative;
    background: #090d16;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    touch-action: none;
    user-select: none;
    cursor: grab;
}

.avatar-crop-container:active {
    cursor: grabbing;
}

.avatar-crop-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.avatar-crop-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

.crop-zoom-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f1f5f9;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    border: 1px solid #e2e8f0;
}

.crop-zoom-btn {
    background: none;
    border: none;
    color: #475569;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.15s ease;
}

.crop-zoom-btn:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.crop-zoom-slider {
    flex: 1;
    accent-color: var(--primary);
    cursor: pointer;
    height: 6px;
}

.crop-tool-btn-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.crop-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.crop-tool-btn:hover {
    background: #f8fafc;
    color: var(--primary);
    border-color: var(--primary-light);
}

.crop-tool-btn:active {
    transform: scale(0.95);
}

.crop-hint-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    color: #4338ca;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.18);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    margin-bottom: 12px;
    font-weight: 500;
}

/* ==========================================================
   ADMIN PORTAL RESPONSIVE UTILITIES & LAYOUTS
   ========================================================== */

/* Split 2-Column Grids */
.responsive-two-col,
.admin-split-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 20px;
    align-items: flex-start;
}

.admin-two-col-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: flex-start;
}

.admin-two-col-main {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    align-items: flex-start;
}

/* Modal Form Grids */
.modal-form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.modal-form-row-checkboxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

/* Setup Guide Steps Grid */
.guide-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

/* Header Action Bars */
.admin-header-actions-group {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Filter Bar Forms */
.admin-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
}

/* Responsive Mobile Collapse for All Admin Grids & Bars */
@media (max-width: 991px) {
    .responsive-two-col,
    .admin-split-grid,
    .admin-two-col-sidebar,
    .admin-two-col-main {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 16px !important;
    }

    .modal-form-row-2,
    .modal-form-row-checkboxes {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
    }

    .guide-steps-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 12px !important;
    }

    .admin-header-actions-group {
        width: 100% !important;
        margin-top: 10px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .admin-header-actions-group > * {
        flex: 1 1 auto !important;
        min-width: 120px !important;
    }

    .admin-filter-bar {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        width: 100% !important;
        gap: 12px !important;
    }

    .admin-location-grid {
        grid-template-columns: 1fr !important;
    }

    .admin-filter-bar > div {
        width: 100% !important;
    }

    .admin-filter-bar .form-control,
    .admin-filter-bar .form-select,
    .admin-filter-bar .btn {
        width: 100% !important;
    }

    /* Modal dialog sizing on mobile */
    .modal-card {
        width: 94% !important;
        max-width: 94% !important;
        margin: 16px auto !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }

    /* Card header stacking */
    .card-header {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    /* Prevent any overflow in tables */
    .table-responsive {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}





