/* 
   =========================================================================
   MAESTRO SGRH - DESIGN SYSTEM & PREMIUM GLASSMORPHIC STYLING
   =========================================================================
*/

/* Core CSS Variables and Themes */
:root {
    /* Dark Theme Default */
    --bg-base: #0f172a;
    --bg-surface: rgba(30, 41, 59, 0.45);
    --bg-card: rgba(15, 23, 42, 0.6);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(255, 255, 255, 0.15);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1; /* Brighter slate for better contrast */
    --text-muted: #94a3b8; /* Brighter slate for better contrast */
    
    --color-primary: #818cf8; /* Indigo accent */
    --color-primary-hover: #4f46e5;
    --color-success: #34d399; /* Emerald */
    --color-warning: #fbbf24; /* Amber */
    --color-danger: #f87171;  /* Rose */
    --color-info: #38bdf8;    /* Sky */
    
    --glass-blur: blur(16px);
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Light Theme Variables */
body.light-theme {
    --bg-base: #f1f5f9;
    --bg-surface: rgba(255, 255, 255, 0.65);
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-color: rgba(0, 0, 0, 0.06);
    --border-highlight: rgba(0, 0, 0, 0.1);
    
    --text-primary: #0f172a;
    --text-secondary: #334155; /* Darker slate for better contrast */
    --text-muted: #475569; /* Darker slate for better contrast */
    
    --color-primary: #4f46e5;
    --color-primary-hover: #3730a3;
    --color-success: #059669;
    --color-warning: #d97706;
    --color-danger: #dc2626;
    --color-info: #0284c7;
    
    --shadow-premium: 0 8px 32px 0 rgba(31, 38, 135, 0.08);
}

/* 1. Global Reset & Base Styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Utilities */
.d-none { display: none !important; }
.text-center { text-align: center; }
.text-break { word-break: break-all; }
.margin-top-10 { margin-top: 10px; }
.margin-top-20 { margin-top: 20px; }
.margin-top-30 { margin-top: 30px; }
.w-100 { width: 100%; }
.gap-20 { gap: 20px; }

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.6);
}

/* Glassmorphism Styles */
.glass {
    background: var(--bg-surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-premium);
    border-radius: 16px;
    transition: var(--transition-smooth);
}

/* 2. Login Page Aesthetics */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 40%);
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 15px;
    filter: drop-shadow(0 0 10px rgba(129, 140, 248, 0.5));
}

.login-header h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.login-header p {
    color: var(--text-secondary);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    outline: none;
    transition: var(--transition-smooth);
}

body.light-theme .form-group input, 
body.light-theme .form-group select, 
body.light-theme .form-group textarea {
    background: rgba(255, 255, 255, 0.8);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.2);
}

/* Test Credentials Block */
.test-creds {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 12px;
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
    border-left: 3px solid var(--color-primary);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, #a78bfa 100%);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(129, 140, 248, 0.4);
    transition: var(--transition-smooth);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(129, 140, 248, 0.6);
}

.btn-secondary {
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.25);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--color-danger);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn-danger:hover {
    background: #e11d48;
    transform: translateY(-2px);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    background: var(--color-primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-small:hover {
    transform: translateY(-1px);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

/* 3. Layout Structure */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

@media (max-width: 992px) {
    .app-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: fixed;
        left: -280px;
        width: 260px;
        top: 0;
        bottom: 0;
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        z-index: 1000;
        transition: var(--transition-smooth);
        visibility: hidden;
        pointer-events: none;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
        background: var(--bg-surface) !important;
        overflow: hidden !important;
    }
    .sidebar.open {
        left: 0;
        visibility: visible;
        pointer-events: auto;
    }
    /* Backdrop overlay when sidebar is open */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(15, 23, 42, 0.7);
        backdrop-filter: blur(4px);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-smooth);
    }
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* Sidebar Styling */
.sidebar {
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: 20px 15px 15px 15px;
    border-radius: 0;
    border-right: 1px solid var(--border-color);
    box-sizing: border-box;
    overflow: hidden;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.brand-icon {
    font-size: 1.8rem;
    color: var(--color-primary);
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
}

.user-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #a78bfa 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.user-info h4 {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.badge-role {
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 500;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
    min-height: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 11px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.nav-link:hover, .nav-link.active {
    background: rgba(129, 140, 248, 0.1);
    color: var(--color-primary);
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: auto;
    padding-top: 15px;
    padding-bottom: 15px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
    background: var(--bg-surface);
    width: 100%;
}

.btn-logout {
    width: 100%;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #f87171;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.6);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Main Content Area */
.main-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.top-navbar {
    height: 70px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    border-radius: 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

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

@media (max-width: 992px) {
    #btn-sidebar-toggle {
        display: flex;
    }
    .top-navbar {
        padding: 0 15px;
    }
    .content-body {
        padding: 15px;
    }
}

.table-responsive {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

.content-body {
    padding: 40px;
    flex-grow: 1;
}

/* 4. Dashboard Widgets & Cards */
.grid-col-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.grid-col-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 768px) {
    .grid-col-3, .grid-col-2 {
        grid-template-columns: 1fr;
    }
}

.card {
    padding: 24px;
    margin-bottom: 20px;
    border-radius: 16px;
    background: var(--bg-card);
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.gradient-border {
    position: relative;
    border: 1px solid transparent;
}
.gradient-border::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: -1;
    margin: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--color-primary), var(--color-info));
}

.border-alert {
    border-left: 4px solid var(--color-danger);
}

.card-huge-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.color-primary { color: var(--color-primary); }
.color-success { color: var(--color-success); }
.color-warning { color: var(--color-warning); }
.color-danger { color: var(--color-danger); }
.color-info { color: var(--color-info); }

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 8px 0;
    font-family: var(--font-heading);
}

.metric-value-sub {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 8px 0;
    color: var(--text-primary);
}

.card-detail {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.section-title {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

/* List widgets */
.absent-list, .overlap-alerts-list, .celebrations-list, .headcount-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.empty-list {
    color: var(--text-muted);
    font-style: italic;
}

.list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.list-row-main {
    font-weight: 500;
}
.list-row-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* 5. Data Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    margin-top: 10px;
}

.data-table th {
    background: rgba(255,255,255,0.02);
    padding: 14px 18px;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

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

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

/* Status Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.badge-pending {
    background: rgba(251, 191, 36, 0.15);
    color: var(--color-warning);
}

.badge-approved-supervisor {
    background: rgba(56, 189, 248, 0.15);
    color: var(--color-info);
}

.badge-approved-final {
    background: rgba(52, 211, 153, 0.15);
    color: var(--color-success);
}

.badge-rejected {
    background: rgba(248, 113, 113, 0.15);
    color: var(--color-danger);
}

.badge-active {
    background: rgba(52, 211, 153, 0.15);
    color: var(--color-success);
}

.badge-inactive {
    background: rgba(100, 116, 139, 0.15);
    color: var(--text-muted);
}

/* Scorecard Grid */
.scorecard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .scorecard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.scorecard-card {
    text-align: center;
    padding: 15px;
}

.scorecard-num {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.scorecard-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 6. Notifications System */
.notif-bell-container {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--color-danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.6);
}

.notifications-dropdown {
    position: absolute;
    right: 0;
    top: 50px;
    width: 340px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    padding: 15px;
    border-radius: 12px;
    background: #1e293b; /* High-contrast solid dark slate background */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

body.light-theme .notifications-dropdown {
    background: #ffffff; /* Solid white background in light theme */
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.dropdown-header h3 {
    font-size: 0.95rem;
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--color-primary);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
}

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

.notif-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
    font-size: 0.85rem;
    transition: var(--transition-smooth);
    color: var(--text-primary);
    cursor: pointer;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.notif-item.unread {
    background: rgba(129, 140, 248, 0.15); /* More visible background for unread */
}

body.light-theme .notif-item {
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .notif-item:hover {
    background: rgba(0, 0, 0, 0.06);
}

body.light-theme .notif-item.unread {
    background: rgba(79, 70, 229, 0.08);
}

.empty-notif {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

/* Toast Messages */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: var(--shadow-premium);
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    animation: slideIn 0.3s ease forwards;
    border-left: 4px solid var(--color-primary);
}

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

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 7. Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-card {
    width: 100%;
    max-width: 650px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
}

.modal-card.sm {
    max-width: 450px;
}

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

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.4rem;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
}

/* Receipt Details */
.receipt-body {
    background: #ffffff;
    color: #0f172a;
    padding: 30px;
    border-radius: 12px;
    font-family: 'Courier New', Courier, monospace;
    border: 2px dashed #cbd5e1;
}

body.light-theme .receipt-body {
    border-color: #475569;
}

.receipt-header {
    text-align: center;
    margin-bottom: 20px;
}

.gold-color {
    color: #e2e8f0;
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.receipt-details p {
    margin-bottom: 12px;
    border-bottom: 1px dotted #e2e8f0;
    padding-bottom: 4px;
}

.receipt-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.qr-mock-code {
    font-size: 4rem;
    color: #334155;
}

.digital-seal code {
    display: block;
    background: #f1f5f9;
    padding: 8px;
    font-size: 0.75rem;
    border-radius: 4px;
    border: 1px solid #cbd5e1;
}

/* Company Logo Brand Elements */
.logo-icon {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 2.5rem;
    color: var(--color-primary);
    margin: 0 auto 20px auto;
}

body.light-theme .logo-icon {
    background: rgba(0, 0, 0, 0.05);
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-logo-preview-box {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 2.2rem;
    color: var(--color-primary);
}

body.light-theme .company-logo-preview-box {
    background: rgba(0, 0, 0, 0.05);
}

.company-logo-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-icon-container {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-right: 10px;
}

.brand-icon-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-info-box {
    padding: 15px;
    font-size: 0.75rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    color: var(--text-secondary);
    line-height: 1.4;
}

.sidebar-info-box p {
    margin-bottom: 4px;
    white-space: normal;
    word-break: break-all;
}

/* Printing styles */
@media print {
    body > * {
        display: none !important;
    }
    #modal-digital-receipt {
        display: block !important;
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        height: auto !important;
        background: white !important;
        color: black !important;
    }
    #modal-digital-receipt .modal-card {
        background: white !important;
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    #modal-digital-receipt .modal-header,
    #modal-digital-receipt .modal-actions {
        display: none !important;
    }
    #receipt-print-area {
        display: block !important;
        border: none !important;
        background: white !important;
        color: black !important;
        padding: 0 !important;
    }
}

/* =========================================================================
CALENDAR VIEW STYLES
========================================================================= */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 15px;
}
.calendar-day-header {
    text-align: center;
    font-weight: 600;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.calendar-day-cell {
    min-height: 100px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(255, 255, 255, 0.02);
}
.calendar-day-cell.empty {
    opacity: 0.3;
    background: transparent;
}
.calendar-day-num {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.calendar-event {
    font-size: 0.7rem;
    padding: 4px 6px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.calendar-event.birthday {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border-left: 3px solid #f59e0b;
}
.calendar-event.vacation {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border-left: 3px solid #10b981;
}

.calendar-day-cell.today-highlight {
    background: rgba(37, 99, 235, 0.12) !important;
    border: 2px solid var(--color-primary) !important;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.25);
}
.calendar-day-cell.today-highlight .calendar-day-num {
    color: var(--color-primary);
    font-weight: 800;
}
.badge-today {
    background: var(--color-primary);
    color: #ffffff;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 5px;
    font-weight: 700;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, minmax(80px, 1fr));
        overflow-x: auto;
        padding-bottom: 10px;
    }
    .calendar-day-cell {
        min-height: 80px;
        padding: 5px;
    }
    .calendar-event {
        font-size: 0.65rem;
        padding: 2px 4px;
    }
    .calendar-header {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px;
    }
}

/* QR Lookup Form Glassmorphic Premium Styling */
.qr-lookup-form {
    margin-top: 22px;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.qr-lookup-input-wrapper {
    flex: 1;
    min-width: 320px;
    position: relative;
}

.qr-lookup-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.35rem;
    color: var(--color-primary);
    transition: var(--transition-smooth);
    pointer-events: none;
}

.qr-lookup-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.75) !important;
    border: 1.5px solid var(--color-primary) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-body);
    font-size: 1.05rem !important;
    font-weight: 600;
    padding: 14px 20px 14px 50px !important;
    border-radius: 12px !important;
    box-sizing: border-box;
    outline: none;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
    transition: var(--transition-smooth);
    height: 52px;
}

.qr-lookup-input:focus {
    border-color: #6366f1 !important;
    background: rgba(15, 23, 42, 0.9) !important;
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.45) !important;
}

.qr-lookup-input:focus + .qr-lookup-icon,
.qr-lookup-input-wrapper:focus-within .qr-lookup-icon {
    color: #818cf8;
    transform: translateY(-50%) scale(1.15);
}

.qr-lookup-btn {
    padding: 14px 28px !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    white-space: nowrap;
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%) !important;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.35);
    transition: var(--transition-smooth);
}

.qr-lookup-btn:hover {
    background: linear-gradient(135deg, #4338ca 0%, #312e81 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

/* View Transition Animations */
.view-panel {
    animation: fadeInView 0.22s ease-out forwards;
}

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