/* =============================================
   CSS Variables & Theme System
   ============================================= */
:root {
    /* Light Mode - Crimson & Gold */
    --primary: #006064; /* Deeper Dark Teal/Turquoise */
    --primary-light: #0097a7;
    --primary-dark: #00363a;
    --secondary: #00897b;
    --secondary-light: #4db6ac;
    --accent: #00acc1;

    --bg-main: #f0f2f5;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-topbar: #ffffff;
    --bg-input: #f8f9fa;
    --bg-hover: #f0f2f5;
    --bg-table-head: #f8f9fa;

    --text-primary: #1a1a2e;
    --text-secondary: #636e72;
    --text-muted: #adb5bd;
    --text-on-primary: #ffffff;
    --text-on-accent: #ffffff;

    --border-color: #e9ecef;
    --border-active: #0062cc;
    --divider: #f0f2f5;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.09);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);

    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 68px;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;

    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    --gradient-secondary: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    --gradient-success: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    --gradient-info: linear-gradient(135deg, #2980b9 0%, #3498db 100%);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Dark Mode - Cinematic Blue Gradient */
    --primary: #3498db;
    --primary-light: #5dade2;
    --primary-dark: #21618c;
    --secondary: #1abc9c;
    --secondary-light: #48dbfb;

    --bg-main: #030b1c; /* Base color used if gradient fails */
    --bg-card: rgba(22, 27, 34, 0.6);
    --bg-sidebar: rgba(13, 17, 23, 0.9);
    --bg-topbar: rgba(22, 27, 34, 0.7);
    --bg-input: rgba(28, 34, 48, 0.8);
    --bg-hover: rgba(30, 41, 59, 1);
    --bg-table-head: rgba(28, 34, 48, 1);

    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #484f58;
    --text-on-primary: #ffffff;

    --border-color: rgba(255, 255, 255, 0.1);
    --border-active: #e74c3c;
    --divider: rgba(255, 255, 255, 0.1);

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.6);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.8);
    color-scheme: dark;
}

/* Icons in time inputs: Standard in light mode, Light Blue in dark mode */
[data-theme="dark"] input::-webkit-calendar-picker-indicator {
    filter: invert(0.5) sepia(1) saturate(5) hue-rotate(175deg) brightness(1.5);
    cursor: pointer;
}

[data-theme="dark"] body {
    background: radial-gradient(circle at center, #1e40af 0%, #111b36 50%, #030b1c 100%) !important;
    background-attachment: fixed !important;
}

[data-theme="dark"] .main-content, 
[data-theme="dark"] .page-content {
    background: transparent !important;
}

/* =============================================
   Reset & Base
   ============================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    display: flex;
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* =============================================
   Sidebar
   ============================================= */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 16px;
    border-bottom: 1px solid var(--border-color);
    min-height: var(--topbar-height);
}

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

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 98, 204, 0.35);
}

.logo-text {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
}

.sidebar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.sidebar-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: var(--transition);
}

.sidebar-toggle-header:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
    transform: rotate(15deg);
}
.theme-icon { font-size: 20px; }

/* Nav Items */
.sidebar-nav {
    flex: 1;
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}
.nav-item.active {
    background: rgba(139, 0, 0, 0.1);
    color: var(--primary);
    font-weight: 700;
}
[data-theme="dark"] .nav-item.active {
    background: rgba(0, 229, 255, 0.1) !important;
    color: #00e5ff !important; text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}
.nav-item.active::before {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: var(--primary);
    border-radius: 3px 0 0 3px;
}
/* Custom Logout Style */
.nav-item.logout-nav-item {
    margin-top: 15px;
    color: #e74c3c !important;
    border: 1px dashed rgba(231, 76, 60, 0.3);
}
.nav-item.logout-nav-item:hover {
    background: rgba(231, 76, 60, 0.1) !important;
    color: #c0392b !important;
    border-style: solid;
}
[data-theme="dark"] .nav-item.logout-nav-item {
    color: #ff6b6b !important;
    border-color: rgba(255, 107, 107, 0.2);
}
[data-theme="dark"] .nav-item.logout-nav-item:hover {
    background: rgba(231, 76, 60, 0.15) !important;
}

.nav-icon { font-size: 20px; flex-shrink: 0; }
.nav-label { white-space: nowrap; }



/* =============================================
   Mobile Overlay
   ============================================= */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-overlay.show { display: block; opacity: 1; }

/* =============================================
   Main Content
   ============================================= */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    height: 100vh;
    transition: margin-right 0.3s ease;
    overflow: hidden;
    width: calc(100% - var(--sidebar-width));
}

/* Top Bar */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-topbar);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-primary);
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.mobile-menu-btn:hover { background: var(--bg-hover); }

.topbar-title { flex: 1; }
.topbar-title h2 { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.topbar-date { font-size: 17px; color: var(--text-secondary); font-weight: 700; margin-top: 2px; }

.digital-clock {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px;
    font-weight: 900;
    direction: ltr !important;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 15px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 120px;
    color: #ffffff;
}

.digital-clock span#hrs { color: #00e5ff; text-shadow: 0 0 15px rgba(0, 229, 255, 0.8); }
.digital-clock span#min { color: #ff9f43; text-shadow: 0 0 15px rgba(255, 159, 67, 0.8); }
.digital-clock span#sec { color: #ff4757; text-shadow: 0 0 15px rgba(255, 71, 87, 0.8); }

[data-theme="dark"] .digital-clock {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Cloud Status Indicator */
.cloud-status {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 700;
    transition: var(--transition);
}
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8;
    display: inline-block;
    transition: var(--transition);
}
.cloud-status.connected .status-dot {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    animation: pulse-green 2s infinite;
}
.cloud-status.disconnected .status-dot {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}
@keyframes pulse-green {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}
[data-theme="dark"] .cloud-status {
    background: rgba(255, 255, 255, 0.05);
}

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.branch-selector select {
    background: #001f3f; /* Deep Navy */
    color: white;
    padding: 8px 32px 8px 12px;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(255,255,255,0.2);
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='white' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.8), 0 0 5px rgba(255, 255, 255, 0.5); /* Stronger White glow */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 2px solid #3498db;
}
.branch-selector select option {
    font-weight: 900;
}
.branch-selector select:focus { border-color: var(--primary); }

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(139, 0, 0, 0.3);
}

/* Page Content Area */
.page-content {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
    animation: fadeIn 0.3s ease;
}

/* =============================================
   Page Sections & Components
   ============================================= */

/* --- Page Header Section --- */
.page-header {
    margin-bottom: 24px;
}
.page-header h1 {
    font-size: 26px;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.page-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* --- Summary Cards --- */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.summary-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
}
.summary-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }

[data-theme="dark"] .summary-card,
[data-theme="dark"] .financial-summary {
    background: linear-gradient(135deg, #020c1b 0%, #0a192f 100%) !important;
    border: 1px solid rgba(0, 168, 204, 0.2) !important;
    color: white !important;
}

[data-theme="dark"] .summary-card::after,
[data-theme="dark"] .financial-summary::after {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(0, 168, 204, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

[data-theme="dark"] .summary-card::before,
[data-theme="dark"] .financial-summary::before {
    content: '';
    position: absolute;
    bottom: -30px; left: -30px;
    width: 80px; height: 80px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
    border-radius: 50%;
}

[data-theme="dark"] .card-label, 
[data-theme="dark"] .card-value, 
[data-theme="dark"] .card-unit,
[data-theme="dark"] .card-icon,
[data-theme="dark"] .fin-stat {
    position: relative;
    z-index: 1;
}

.summary-card.red::before { background: var(--gradient-primary); }
.summary-card.gold::before { background: var(--gradient-secondary); }
.summary-card.green::before { background: var(--gradient-success); }
.summary-card.blue::before { background: var(--gradient-info); }

.card-icon {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
}
.card-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}
.card-value {
    font-size: 42px;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.summary-card.red .card-value, .summary-card.red .card-label, .summary-card.red .card-unit { color: #ffffff !important; }
.summary-card.gold .card-value { color: #c9a227; }
.summary-card.green .card-value { color: #27ae60; }
.summary-card.blue .card-value { color: #2980b9; }
.card-unit {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
    margin-right: 4px;
}

/* --- Content Grid (2 columns) --- */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}
.content-grid.full { grid-column: 1 / -1; }

/* --- Section Card --- */
.section-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    /* Removed overflow:hidden to allow custom dropdowns to be visible */
    position: relative;
    transition: var(--transition);
}
.section-card:hover { box-shadow: var(--shadow-md); }

.section-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-table-head);
}
.section-card-header .header-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.section-card-body {
    padding: 22px;
}

.header-icon.morning { background: #fff9db; }
.header-icon.evening { background: #e7f5ff; }
.header-icon.expense { background: #ebfbee; }
.header-icon.balance { background: #fff4e6; }
.header-icon.stats   { background: #f3f0ff; }
.header-icon.search  { background: #e3fafc; }
.header-icon.cancel  { background: #fff5f5; }
.header-icon.finance { background: #f3efff; }

.section-card-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}
.shift-time-badge {
    font-size: 12px;
    background: var(--bg-hover);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 100px;
    border: 1px solid var(--border-color);
}

.section-card-body { padding: 20px 22px; }

/* --- Info Rows --- */
.info-list { display: flex; flex-direction: column; gap: 0; }
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed var(--border-color);
    gap: 16px;
}
.info-row:last-child { border-bottom: none; padding-bottom: 0; }
.info-row .lbl { color: var(--text-secondary); font-size: 14px; font-weight: 500; }
.info-row .val { font-weight: 700; color: var(--text-primary); font-size: 14px; text-align: left; }
.info-row .val.primary { color: var(--primary); }
.info-row .val.success { color: #27ae60; }
.info-row .val.warning { color: #e67e22; }

/* --- Mini Stats Row --- */
.mini-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 16px;
}
.mini-stat {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
}
.mini-stat-label { font-size: 11px; color: var(--text-muted); display: block; margin-bottom: 4px; }
.mini-stat-value { font-size: 18px; font-weight: 800; color: var(--text-primary); }
.mini-stat.highlight { background: rgba(0, 98, 204, 0.06); border-color: rgba(0, 98, 204, 0.15); }
.mini-stat.highlight .mini-stat-value { color: var(--primary); }

/* --- Table --- */
.table-wrapper { 
    overflow-x: auto; 
    width: 100%;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
}
table {
    width: 100%;
    border-collapse: collapse;
    direction: rtl;
    min-width: 600px; /* Force scroll on small screens for multi-col tables */
}
thead tr th {
    background: var(--bg-table-head);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
table tr td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 19px; /* Increased 3+ steps for clarity */
    font-weight: 800; /* Extra bold for numbers */
    color: var(--text-primary);
    vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: var(--transition); }
tbody tr:hover { background: var(--bg-hover); }
.amount-cell { font-weight: 700; color: var(--primary); }
.amount-cell.expense { color: #e74c3c; }

/* --- Badge --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
}
.badge-morning   { background: #fff9db; color: #f08c00; }
.badge-evening   { background: #e7f5ff; color: #1971c2; }
.badge-success   { background: #ebfbee; color: #2f9e44; }
.badge-danger    { background: #fff5f5; color: #c92a2a; }
.badge-manager   { background: #e0f2fe; color: #0369a1; } /* Sky Blue */
.badge-secretary { background: #fff9db; color: #f08c00; } /* Gold/Yellow */
.badge-teacher   { background: #f3f0ff; color: #7048e8; } /* Purple */

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* --- Form Elements --- */
.form-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
}
.form-section-header {
    padding: 16px 22px;
    background: var(--bg-table-head);
    border-bottom: 1px solid var(--border-color);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-section-body { padding: 22px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Custom styling for specific highlighted labels as requested */
label[for="teacherBookings"],
label[for="morningCalls"], label[for="eveningCalls"],
label[for="morningBookings"], label[for="eveningBookings"],
label[for="eveningBookingNote"],
label[for="morningRevenue"], label[for="eveningRevenue"],
label[for="morningSecretary"], label[for="morningOpenTime"], label[for="morningCloseTime"],
label[for="eveningSecretariesList"] {
    font-size: 16.5px !important;
    font-weight: 900 !important;
    color: #000000 !important;
}

[data-theme="dark"] label[for="teacherBookings"],
[data-theme="dark"] label[for="morningCalls"], [data-theme="dark"] label[for="eveningCalls"],
[data-theme="dark"] label[for="morningBookings"], [data-theme="dark"] label[for="eveningBookings"],
[data-theme="dark"] label[for="eveningBookingNote"],
[data-theme="dark"] label[for="morningRevenue"], [data-theme="dark"] label[for="eveningRevenue"],
[data-theme="dark"] label[for="morningSecretary"], [data-theme="dark"] label[for="morningOpenTime"], [data-theme="dark"] label[for="morningCloseTime"],
[data-theme="dark"] label[for="eveningSecretariesList"] {
    color: #ffffff !important;
}

.form-group input,
.form-group select,
.form-group textarea,
.expense-row input,
.expense-row select {
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.expense-row input:focus,
.expense-row select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 98, 204, 0.08);
}
.summary-card.red { background: var(--gradient-primary); box-shadow: 0 4px 15px rgba(0, 98, 204, 0.25); }
.form-group textarea { resize: vertical; min-height: 80px; }

/* Expense Rows */
.expense-rows { display: flex; flex-direction: column; gap: 12px; }
.expense-row {
    display: grid;
    grid-template-columns: 1fr 1fr 120px auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}
.btn-remove {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: bold;
}

.btn-remove:hover {
    background: #e74c3c;
    color: white;
}

.btn-add-row {
    width: 100%;
    background: var(--bg-input);
    border: 2px dashed var(--border-color);
    color: var(--text-secondary);
    padding: 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 700;
    margin-top: 10px;
}

.btn-add-row:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(0, 96, 100, 0.02);
}

.btn-add-row.inflow:hover {
    border-color: #27ae60;
    color: #27ae60;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.transaction-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    align-items: center;
    padding: 8px 15px;
    border-radius: 15px;
    background: var(--bg-card) !important;
    border: 1.5px solid var(--border-color) !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.06) !important;
    transition: var(--transition);
    max-width: 650px;
    margin: 0 auto 15px;
}
[data-theme="light"] .transaction-row {
    border-color: #d1d8e0 !important;
    box-shadow: 0 12px 25px rgba(0,0,0,0.1) !important;
}

.transaction-row input {
    padding: 8px 12px !important;
    font-size: 15px !important;
    font-weight: 600;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.transaction-row.inflow { border-right: 4px solid #27ae60; }
.transaction-row.outflow { border-right: 4px solid #e74c3c; }

.transaction-row:focus-within {
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    border-color: #00e5ff !important; text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.btn-remove {
    background: #fff5f5;
    color: #e74c3c;
    border: none;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}
.btn-remove:hover { 
    background: #c0392b; 
    color: white; 
    border-color: #c0392b;
}

.btn-add-row {
    background: none;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    width: 100%;
    color: var(--text-muted);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    margin-top: 8px;
}
.btn-add-row:hover { border-color: var(--primary); color: var(--primary); background: rgba(0, 98, 204, 0.04); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(0,98,204,0.3);
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(0,98,204,0.4); transform: translateY(-2px);}
.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-success {
    background: var(--gradient-success);
    color: white;
    box-shadow: 0 4px 12px rgba(39,174,96,0.3);
}
.btn-success:hover { box-shadow: 0 6px 20px rgba(39,174,96,0.4); transform: translateY(-2px);}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* --- Branch Cards Grid --- */
.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}
.branch-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}
.branch-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.branch-card-top {
    padding: 24px;
    background: var(--gradient-primary);
    color: white;
    position: relative;
    overflow: hidden;
}
.branch-card-top::after {
    content: '';
    position: absolute;
    bottom: -30px; left: -30px;
    width: 100px; height: 100px;
    background: rgba(255,255,255,0.07);
    border-radius: 50%;
}
.branch-name { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.branch-location { font-size: 13px; opacity: 0.85; }
.branch-card-body { padding: 18px 20px; }
.branch-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}
.branch-stat-row:last-child { border-bottom: none; }
.branch-stat-row .bsr-label { color: var(--text-secondary); }
.branch-stat-row .bsr-val { font-weight: 900; font-size: 16px; }
.branch-card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

/* Employee Table */
.employee-card {
    display: flex;
    align-items: center;
    gap: 12px;
}
.emp-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}
.emp-name { font-weight: 700; font-size: 14px; color: var(--text-primary); }
.emp-role { font-size: 12px; color: var(--text-secondary); }

/* Financial Summary Bottom */
.financial-summary {
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    color: white;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    box-shadow: 0 6px 24px rgba(0, 98, 204, 0.3);
}
.fin-stat { text-align: center; }
.fin-stat-label { font-size: 13px; opacity: 0.8; margin-bottom: 8px; }
.fin-stat-value { font-size: 44px; font-weight: 900; text-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.fin-stat-unit { font-size: 13px; opacity: 0.7; }

/* =============================================
   Animations
   ============================================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes countUp {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.animate-in {
    opacity: 0;
    animation: fadeIn 0.4s ease forwards;
}
.animate-in:nth-child(1) { animation-delay: 0.05s; }
.animate-in:nth-child(2) { animation-delay: 0.10s; }
.animate-in:nth-child(3) { animation-delay: 0.15s; }
.animate-in:nth-child(4) { animation-delay: 0.20s; }
.animate-in:nth-child(5) { animation-delay: 0.25s; }
.animate-in:nth-child(6) { animation-delay: 0.30s; }

/* =============================================
   Toast Notification
   ============================================= */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    animation: slideInRight 0.3s ease;
    min-width: 240px;
}
.toast.success { border-right: 4px solid #27ae60; }
.toast.error   { border-right: 4px solid #e74c3c; }

/* =============================================
   Responsive / Mobile
   ============================================= */
@media (max-width: 900px) {
    .sidebar {
        right: calc(-1 * var(--sidebar-width));
        box-shadow: none;
        width: var(--sidebar-width);
    }
    .sidebar.open {
        right: 0;
        box-shadow: var(--shadow-lg);
    }
    .main-content { margin-right: 0; width: 100%; }
    .mobile-menu-btn { display: flex; }
    .mobile-overlay.show { display: block; }
    .content-grid { grid-template-columns: 1fr; }
    .topbar { padding: 0 12px; }
    .topbar-title h2 { font-size: 16px; }
    .topbar-date { font-size: 12px; }
}

@media (max-width: 768px) {
    .digital-clock { display: none; } /* Hide clock on small screens to save space */
    .summary-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .page-content { padding: 12px; }
    .summary-grid { grid-template-columns: 1fr; }
    .mini-stats { grid-template-columns: 1fr; }
    .expense-row { grid-template-columns: 1fr; gap: 15px; }
    .financial-summary { grid-template-columns: 1fr; padding: 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .branches-grid { grid-template-columns: 1fr; }
    h1 { font-size: 18px !important; }
    .section-card-header { padding: 12px 16px; flex-direction: column; align-items: flex-start; gap: 8px; }
    .header-icon { display: none; }
    .login-card { padding: 30px 20px; border-radius: 20px; }
    .login-title { font-size: 24px; }
    .topbar { padding: 0 8px; gap: 8px; }
    .branch-selector select { padding: 6px 24px 6px 10px; font-size: 11px; }
    table { min-width: 500px; }
}

@media (max-width: 400px) {
    .summary-grid { grid-template-columns: 1fr; }
}

/* =============================================
   Scrollbar Styling
   ============================================= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* =============================================
   Premium Login Redesign (EduMaster Pro)
   ============================================= */
.login-wrapper {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: radial-gradient(circle at center, #3b82f6 0%, #1e40af 40%, #030b1c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cairo', sans-serif;
    padding: 20px;
    direction: rtl;
}

.login-card {
    background: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(15px);
    width: 100%;
    max-width: 420px;
    border-radius: 32px;
    border: 1px solid rgba(0, 98, 204, 0.4);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8), 0 0 30px rgba(0, 98, 204, 0.15);
    padding: 50px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, transparent, #0062cc, transparent);
}

.login-logo-circle {
    width: 100px;
    height: 100px;
    background: #0d1117;
    border: 2px solid #0062cc;
    border-radius: 50%;
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    box-shadow: 0 0 30px rgba(0, 98, 204, 0.3);
}

.login-title {
    color: #ffffff;
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    margin-bottom: 45px;
}

.login-btn-admin {
    background: #1c2230;
    border: 1px solid #0062cc;
    color: #ffffff;
    width: 100%;
    padding: 18px;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 20px;
}

.login-btn-admin:hover, .login-btn-admin.active {
    background: #0062cc!important;
    box-shadow: 0 10px 30px rgba(0, 98, 204, 0.4);
    transform: translateY(-2px);
}

.login-select-wrapper.active .login-select {
    border-color: #0062cc;
    background: #1c2230;
    box-shadow: 0 0 15px rgba(0, 98, 204, 0.2);
}

.login-select-wrapper {
    position: relative;
    width: 100%;
    transition: all 0.3s;
}

.login-select {
    width: 100%;
    background: #1c2230;
    border: 1px solid #30363d;
    color: #ffffff;
    padding: 16px 50px 16px 20px;
    border-radius: 16px;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: right;
}

.login-select:focus {
    border-color: #0062cc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 98, 204, 0.1);
}

.login-select-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 20px;
    opacity: 0.8;
}

.login-input-group {
    position: relative;
    margin-top: 25px;
}

.login-input {
    width: 100%;
    background: #0d1117;
    border: 1px solid #30363d;
    color: #ffffff;
    padding: 16px 20px 16px 55px;
    border-radius: 16px;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    transition: all 0.3s;
    text-align: right;
}

.login-input:focus {
    border-color: #0062cc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 98, 204, 0.1);
}

.login-eye-btn {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 20px;
    opacity: 0.5;
    transition: 0.3s;
}

.login-eye-btn:hover { opacity: 1; color: #0062cc; }

.login-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
    color: #8b949e;
    font-size: 14px;
}

.login-checkbox-row input {
    width: 18px;
    height: 18px;
    accent-color: #0062cc;
    cursor: pointer;
}

.login-link {
    display: block;
    margin-top: 25px;
    color: rgba(255,255,255,0.4);
    font-size: 14px;
    text-decoration: none;
    transition: 0.3s;
}

.login-link:hover { color: #ffffff; }

/* =============================================
   Secretary Checklist Styles
   ============================================= */
/* =============================================
   Redesigned Presence Grid & Cards (Modern)
   ============================================= */
.secretary-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.presence-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    user-select: none;
    box-shadow: var(--shadow-sm);
}

.presence-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: #00e5ff !important; text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
}

.presence-card.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-color: transparent;
    color: white;
}

.presence-card .avatar-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 12px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.presence-card.active .avatar-circle {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.presence-card .emp-name {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
    line-height: 1.2;
}

.presence-card .emp-role {
    font-size: 11px;
    opacity: 0.7;
    font-weight: 600;
}

.presence-card.active .emp-role {
    color: rgba(255, 255, 255, 0.9);
}

/* Checkmark Icon */
.presence-card .check-icon {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 20px;
    height: 20px;
    background: white;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transform: scale(0.5);
    transition: var(--transition);
}

.presence-card.active .check-icon {
    opacity: 1;
    transform: scale(1);
}

/* Card Time Inputs (Compact) */
.presence-card .card-times {
    margin-top: 15px;
    width: 100%;
    display: none; /* Only show when active */
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 12px;
}

.presence-card.active .card-times {
    display: flex;
}

.presence-card .card-times .time-input-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.presence-card .card-times label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8) !important;
}

.presence-card .card-times input {
    width: 100%;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white !important;
    font-size: 12px;
    font-weight: 700;
    outline: none;
}

/* Responsive Grid */
@media (max-width: 480px) {
    .secretary-checklist {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }
}


@media (max-width: 768px) {
    .secretary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .time-inputs {
        width: 100%;
        justify-content: flex-start;
    }
}


/* =============================================
   Professional Manager Report Design (Mockup-Match)
   ============================================= */
.report-wrapper {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    font-family: "Cairo", sans-serif;
    color: #000;
    direction: rtl;
    max-width: 900px;
    margin: 0 auto;
}

.report-header-banner {
    background: #b20000;
    color: #fff;
    padding: 15px;
    text-align: center;
    border: 2px solid #000;
    margin-bottom: 2px;
}

.report-header-banner h2 { margin: 0; font-size: 22px; font-weight: 900; }
.report-header-banner h3 { margin: 5px 0 0; font-size: 18px; font-weight: 700; }

.report-table-main {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2px;
}

.report-table-main td, .report-table-main th {
    border: 2px solid #aaa;
    padding: 10px;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
    background: #eee;
    color: #000;
}

.report-table-main th {
    background: #f0f0f0;
    color: #000;
}

.report-section-title {
    background: #b20000;
    color: #fff;
    padding: 8px;
    text-align: center;
    font-weight: 900;
    font-size: 19px;
    border: 2px solid #000;
}

.report-summary-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2px;
    margin-bottom: 2px;
}

.summary-box {
    padding: 12px;
    text-align: center;
    border: 2px solid #000;
    color: #fff;
    background: #b20000;
}

.summary-box .label { font-size: 15px; display: block; margin-bottom: 4px; font-weight: 700; }
.summary-box .value { font-size: 22px; font-weight: 900; }

.current-balance-box {
    background: #b20000;
    color: #fff;
    padding: 12px;
    text-align: center;
    font-size: 22px;
    font-weight: 900;
    border: 2px solid #000;
    margin-bottom: 2px;
}

.statement-table {
    width: 100%;
    border-collapse: collapse;
}

.statement-table th {
    background: #fff;
    color: #b20000;
    border: 2px solid #aaa;
    padding: 10px;
    font-weight: 900;
    font-size: 16px;
}

.statement-table td {
    border: 2px solid #aaa;
    padding: 10px;
    color: #b20000;
    font-weight: 800;
    font-size: 16px;
    text-align: center;
}

.absences-header {
    background: #b20000;
    color: #fff;
    padding: 10px;
    text-align: center;
    font-weight: 900;
    font-size: 20px;
    border: 2px solid #000;
}

.report-footer-note {
    padding: 15px;
    text-align: center;
    font-weight: 800;
    font-size: 16px;
    border: 2px solid #aaa;
}


/* =============================================
   Financial Summary Redesign
   ============================================= */
.financial-summary-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    margin: 20px auto 0;
    border: 1px solid var(--border-color);
    max-width: 800px; /* Centered and not full width */
}

.summary-title-bar {
    background: var(--primary);
    color: white;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 15px;
}

.summary-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
}

.summary-box .label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 700;
}

.summary-box .value {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-primary);
}

.summary-box.inflow-box { background: #f0fff4; border-color: #c6f6d5; }
.summary-box.inflow-box .label { color: #2f855a; }
.summary-box.inflow-box .value { color: #27ae60; }

.summary-box.outflow-box { background: #fff5f5; border-color: #fed7d7; }
.summary-box.outflow-box .label { color: #c53030; }
.summary-box.outflow-box .value { color: #e74c3c; }

.net-balance-container {
    padding: 0 15px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.net-balance-label {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.net-balance-highlight {
    background: linear-gradient(135deg, #007791 0%, #00a8cc 100%);
    color: white;
    padding: 8px 30px;
    border-radius: 14px;
    font-size: 32px;
    font-weight: 900;
    min-width: 200px;
    text-align: center;
    box-shadow: 0 6px 15px rgba(0, 168, 204, 0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

[data-theme="dark"] .summary-box {
    background: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.05);
}
[data-theme="dark"] .summary-box.inflow-box { background: rgba(39, 174, 96, 0.1); }
[data-theme="dark"] .summary-box.outflow-box { background: rgba(231, 76, 60, 0.1); }

/* =============================================
   Official Report Table Style (Manager View)
   ============================================= */
.official-report-container {
    background: #fff;
    border: 3px solid #000;
    margin: 20px auto;
    width: 100%;
    max-width: 900px;
    font-family: 'Cairo', sans-serif;
    color: #000;
    direction: rtl;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.official-header {
    background: #b20000;
    color: #fff;
    padding: 15px;
    text-align: center;
    border-bottom: 2px solid #000;
}

.official-header h2 { margin: 0; font-size: 24px; font-weight: 900; }
.official-header h3 { margin: 5px 0 0; font-size: 20px; font-weight: 700; color: rgba(255,255,255,0.9); }

.official-sub-header {
    background: #b20000;
    color: #fff;
    padding: 10px;
    text-align: center;
    font-weight: 900;
    font-size: 20px;
    border-top: 3px solid #000;
    border-bottom: 3px solid #000;
}

.official-table-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    border: none;
    margin-bottom: 2px;
}

.official-cell {
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 10px 6px;
    background: var(--bg-input);
    text-align: center;
    font-size: 15px;
    font-weight: 950;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 52px;
}

.official-cell.label-val {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.official-full-row {
    grid-column: span 3;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: var(--bg-card);
    padding: 8px;
    text-align: center;
    font-weight: 950;
    color: var(--text-primary);
}

.official-header-red {
    background: var(--gradient-primary);
    color: #fff;
    padding: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
    font-size: 16px;
    font-weight: 950;
    grid-column: span 3;
}

.official-title-bar {
    background: #b20000;
    color: #fff;
    padding: 10px;
    border: 3px solid #000;
    text-align: center;
    font-weight: 950;
    margin-bottom: 5px;
}

.official-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr; /* Matched to image proportions */
    border-bottom: 2px solid #000;
}

.official-grid div {
    border: 1px solid #000;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85px;
    background: #fdf5e6; /* Beige background */
}

.official-grid div.white { background: #fff; }

.official-grid .label {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #333;
}

.official-grid .value {
    font-size: 20px;
    font-weight: 900;
    color: #000;
}

.official-row-full {
    grid-column: 1 / -1;
    background: #fdf5e6 !important;
    padding: 12px 20px !important;
    font-weight: 900 !important;
    font-size: 19px !important;
    border-bottom: 2px solid #000 !important;
    text-align: right;
    min-height: unset !important;
}

.financial-grid-headers {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    background: #b20000;
    color: #fff;
    text-align: center;
    font-weight: 900;
    font-size: 18px;
    border-top: 3px solid #000;
}

.financial-grid-headers div {
    padding: 15px;
    border: 1.5px solid #000;
}

.financial-grid-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #fff;
    color: #000;
    text-align: center;
    font-size: 28px;
    font-weight: 950;
    border-bottom: 3px solid #000;
}

.financial-grid-values div {
    padding: 15px;
    border: 1.5px solid #000;
}

.official-balance-bar {
    background: #b20000;
    color: #fff;
    text-align: center;
    padding: 18px;
    font-size: 32px;
    font-weight: 950;
    border-bottom: 3px solid #000;
}

.official-expense-table {
    width: 100%;
    border-collapse: collapse;
}

.official-expense-table th {
    background: #b20000;
    color: #fff;
    padding: 12px;
    font-weight: 900;
    font-size: 18px;
    border: 1.5px solid #000;
}

.official-expense-table td {
    padding: 12px;
    font-weight: 800;
    font-size: 18px;
    border: 1.5px solid #000;
    text-align: center;
    background: #fff;
    color: #b20000;
}

.official-absences-section {
    border-top: 3px solid #000;
}

.official-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 3.5px solid #000;
    background: #fff;
}

.official-footer-grid div {
    padding: 20px;
    font-weight: 950;
    font-size: 22px;
    font-style: italic;
    text-align: center;
}

.official-footer-grid .side-label {
    text-align: right;
    padding-right: 40px;
}

.official-footer-grid .side-value {
    background: #fdf5e6;
    border-right: 2px solid #000;
}

[data-theme="dark"] .official-report-container {
    background: #111111 !important;
    color: #ffffff !important;
    border-color: #333 !important;
}

/* =============================================
   Official Dashboard Modernization
   ============================================= */
.official-summary-banner {
    background: transparent;
    border: none;
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.official-summary-item {
    background: var(--gradient-primary);
    color: #fff;
    padding: 20px 10px;
    text-align: center;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.official-summary-item .label {
    font-size: 16px;
    font-weight: 950;
    color: rgba(255,255,255,0.95);
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.official-summary-item .value {
    font-size: 32px;
    font-weight: 950;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.official-summary-item.revenue {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}
.official-summary-item.expenses {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
}
.official-summary-item.net {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
}
.official-summary-item.balance {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
}

.official-summary-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.official-summary-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0,0,0,0.25);
    z-index: 2;
}

/* Balance Card Contrast logic */
.official-summary-item.balance .label, 
.official-summary-item.balance .value {
    color: #000 !important;
    text-shadow: none !important;
}

[data-theme="dark"] .official-summary-item.balance {
    background: linear-gradient(135deg, #e67e22 0%, #f1c40f 100%);
}
[data-theme="dark"] .official-summary-item.balance .label, 
[data-theme="dark"] .official-summary-item.balance .value {
    color: #000 !important;
}

.official-dashboard-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.official-dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.official-card-header {
    background: var(--gradient-primary);
    color: #fff;
    padding: 12px 15px;
    border-bottom: none;
}

.official-card-header .name {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 2px;
}

.official-card-header .loc {
    font-size: 13px;
    opacity: 0.9;
}

.official-card-body {
    padding: 0;
    flex-grow: 1;
}

.official-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    font-size: 15px;
}

.official-stat-row:nth-child(even) { background: #fdf5e6; }
.official-stat-row:last-child { border-bottom: none; }

.official-stat-label { color: var(--text-primary); }
.official-stat-value { color: var(--text-primary) !important; font-weight: 950; }

.official-card-footer {
    padding: 12px;
    border-top: 3px solid #000;
    background: #fff;
}

.official-btn {
    width: 100%;
    padding: 12px;
    background: #b20000;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 950;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 15px;
}

.official-btn:hover { background: #880000; }

/* Ledger Specific */
.ledger-input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Cairo', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #000;
    text-align: center;
}

.ledger-input:focus {
    background: rgba(178, 0, 0, 0.05);
}

[data-theme="dark"] .ledger-input { color: #fff; }
[data-theme="dark"] .official-cell { background: #1a1a1a; border-color: #444; color: #eee !important; }
[data-theme="dark"] .official-cell b, 
[data-theme="dark"] .official-cell strong { color: #fff !important; }
[data-theme="dark"] .label-val { color: #eee !important; }
[data-theme="dark"] .official-full-row { background: #1a1a1a; color: #fff; border-color: #444; }
[data-theme="dark"] .official-header-red { border-color: #444; color: #fff !important; }

/* Print specific hiding */
@media print {
    .sidebar, .topbar, .official-btn, .page-header button { display: none !important; }
    .main-content { margin: 0; padding: 0; width: 100%; }
    .official-report-container { border: none; box-shadow: none; margin: 0; padding: 0; }
    body { background: #fff !important; }
}

/* =============================================
   🌟 Dark Mode - Glassmorphism & Neon Glow System
   ============================================= */

/* --- Glass Cards --- */
[data-theme="dark"] .official-dashboard-card,
[data-theme="dark"] .shift-card {
    background: rgba(255,255,255,0.04) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

[data-theme="dark"] .official-dashboard-card:hover,
[data-theme="dark"] .shift-card:hover {
    border-color: rgba(255,255,255,0.15) !important;
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

/* --- Glass Summary Banner --- */
[data-theme="dark"] .official-summary-banner {
    background: transparent !important;
}

[data-theme="dark"] .official-summary-item {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255,255,255,0.1) !important;
}

/* --- Neon Glow on Pill Headers --- */
[data-theme="dark"] .morning-pill {
    box-shadow: 0 0 25px rgba(243,156,18,0.5), 0 0 60px rgba(243,156,18,0.15) !important;
}

[data-theme="dark"] .evening-pill {
    box-shadow: 0 0 25px rgba(41,128,185,0.5), 0 0 60px rgba(41,128,185,0.15) !important;
}

/* Neon glow on Inflow/Outflow pill headers */
[data-theme="dark"] [style*="linear-gradient(135deg, #11998e"] {
    box-shadow: 0 0 20px rgba(17,153,142,0.5), 0 0 50px rgba(17,153,142,0.12) !important;
}

[data-theme="dark"] [style*="linear-gradient(135deg, #cb2d3e"] {
    box-shadow: 0 0 20px rgba(203,45,62,0.5), 0 0 50px rgba(203,45,62,0.12) !important;
}

/* --- Previous Balance Box: Amber Neon Glow --- */
[data-theme="dark"] .prev-balance-box {
    box-shadow: 0 0 25px rgba(243,156,18,0.35), 0 0 60px rgba(243,156,18,0.1), inset 0 0 30px rgba(243,156,18,0.05) !important;
    border-color: rgba(255,217,61,0.5) !important;
    animation: pulseAmber 3s ease-in-out infinite;
}

@keyframes pulseAmber {
    0%, 100% { box-shadow: 0 0 25px rgba(243,156,18,0.35), 0 0 60px rgba(243,156,18,0.1); }
    50% { box-shadow: 0 0 35px rgba(243,156,18,0.5), 0 0 80px rgba(243,156,18,0.2); }
}

[data-theme="dark"] .prev-balance-box input {
    color: #ffd93d !important;
    text-shadow: 0 0 10px rgba(255,217,61,0.3);
}

[data-theme="dark"] .prev-balance-box input::placeholder {
    color: rgba(255,217,61,0.35) !important;
}

/* --- Luminous Input Fields --- */
[data-theme="dark"] .transaction-row {
    background: rgba(255,255,255,0.03) !important;
    border-color: rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .transaction-row:focus-within {
    border-color: rgba(52,152,219,0.5) !important;
    box-shadow: 0 0 15px rgba(52,152,219,0.2), 0 4px 12px rgba(0,0,0,0.3) !important;
    background: rgba(255,255,255,0.06) !important;
}

[data-theme="dark"] .transaction-row input {
    color: #fff !important;
}

[data-theme="dark"] .transaction-row input::placeholder {
    color: rgba(255,255,255,0.3) !important;
}

/* --- Glass Input Fields (General) --- */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="time"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: rgba(255,255,255,0.05) !important;
    border-color: rgba(255,255,255,0.1) !important;
    color: #fff !important;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] select:focus {
    border-color: rgba(52,152,219,0.6) !important;
    box-shadow: 0 0 12px rgba(52,152,219,0.25) !important;
    background: rgba(255,255,255,0.08) !important;
}

/* --- Crisp White Typography --- */
[data-theme="dark"] .official-card-body,
[data-theme="dark"] .official-card-body label,
[data-theme="dark"] .official-card-body .form-group label,
[data-theme="dark"] .shift-card .official-card-body {
    color: rgba(255,255,255,0.9) !important;
}

[data-theme="dark"] .official-card-header .name,
[data-theme="dark"] .official-card-header .loc {
    color: #fff !important;
}

/* --- Financial Summary Card (Dark Glass) --- */
[data-theme="dark"] .financial-summary-card {
    background: rgba(255,255,255,0.04) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08) !important;
}

/* --- Presence Cards (Secretary) Glow --- */
[data-theme="dark"] .presence-card {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.08) !important;
}

[data-theme="dark"] .presence-card.active {
    background: rgba(52,152,219,0.1) !important;
    border-color: rgba(52,152,219,0.4) !important;
    box-shadow: 0 0 15px rgba(52,152,219,0.15) !important;
}

[data-theme="dark"] .presence-card .emp-name,
[data-theme="dark"] .presence-card .emp-role {
    color: rgba(255,255,255,0.85) !important;
}

/* --- Button Remove (Dark) --- */
[data-theme="dark"] .btn-remove {
    background: rgba(231,76,60,0.1) !important;
    color: #ff6b6b !important;
}

[data-theme="dark"] .btn-remove:hover {
    background: rgba(231,76,60,0.3) !important;
    box-shadow: 0 0 10px rgba(231,76,60,0.3) !important;
}

/* --- Add Row Buttons (Dark Glow) --- */
[data-theme="dark"] .btn-add-row {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.15) !important;
    color: rgba(255,255,255,0.7) !important;
}

[data-theme="dark"] .btn-add-row:hover {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.25) !important;
    color: #fff !important;
}

/* --- Manager Dashboard Card Stats (Dark) --- */
[data-theme="dark"] .official-stat-row {
    border-color: rgba(255,255,255,0.06) !important;
}

[data-theme="dark"] .official-stat-row:nth-child(even) {
    background: rgba(255, 255, 255, 0.04) !important;
}

[data-theme="dark"] .official-stat-row .official-stat-label,
[data-theme="dark"] .official-stat-label {
    color: rgba(255,255,255,0.85) !important;
}

[data-theme="dark"] .official-stat-row .official-stat-value,
[data-theme="dark"] .official-stat-value {
    color: #ffffff !important;
}

/* Compact inputs for report fields as requested */
.compact-input {
    width: 100% !important;
    max-width: 450px !important;
}

/* Print specific hiding */
@media print {
    .sidebar, .topbar, .official-btn, .page-header button, .form-actions { display: none !important; }
    .main-content { margin: 0; padding: 0; width: 100%; }
    .official-report-container { border: none; box-shadow: none; margin: 0; padding: 0; }
    body { background: #fff !important; }
}

/* =============================================
   Premium Capsule-Based Layout
   ============================================= */
.ledger-row-premium { 
    display: grid !important;
    grid-template-columns: 50px 1.5fr 110px 110px 1.5fr 110px 1.5fr 1.8fr; /* Widened statement and value fields */
    gap: 10px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2px 0 !important;
    margin-bottom: 8px !important;
    align-items: center;
}

/* Specific class for shorter rows (in Shift cards) */
.short-row-premium {
    display: flex !important;
    gap: 15px !important;
    align-items: center !important;
    margin-bottom: 12px !important;
    width: 100% !important;
}
.short-row-premium .capsule-wide {
    flex: 3 !important;
}
.short-row-premium .capsule-small {
    flex: 1.2 !important;
    min-width: 120px !important;
}

.capsule-input {
    background: var(--bg-card) !important;
    border: 1.5px solid #bdc3c7 !important; /* Darker border for light mode */
    box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
    border-radius: 50px !important;
    padding: 8px 15px !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .capsule-input {
    border-color: rgba(255, 255, 255, 0.3) !important; /* Prominent border for dark mode */
}

.capsule-input:focus-within {
    border-color: var(--primary) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
    transform: translateY(-2px);
}

.capsule-input input {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    text-align: center;
    font-weight: 700;
    color: var(--text-primary);
    width: 100%;
    font-size: 14px;
}

/* Sizing variant for capsules */
.capsule-idx { width: 100%; height: 45px; flex-shrink: 0; background: var(--gradient-primary) !important; color: #fff !important; font-weight: 900; border: none !important; }
.capsule-small { width: 100%; flex-shrink: 0; }
.capsule-medium { width: 100%; flex-shrink: 0; }
.capsule-large { width: 100%; flex-shrink: 0; }
.capsule-wide { width: 100%; }

/* Color accents for inflow/outflow capsules */
.inflow-accent { border-color: rgba(46, 204, 113, 0.4) !important; }
.inflow-accent input { color: #2ecc71 !important; }
.outflow-accent { border-color: rgba(231, 76, 60, 0.4) !important; }
.outflow-accent input { color: #e74c3c !important; }


/* Custom Colored Dropdown - Mini Version (Clean Fix) */
.custom-select-wrapper { 
    position: relative; 
    width: 100%;
    cursor: pointer; 
    z-index: 10;
}
.custom-select-trigger {
    background: #001f3f !important;
    color: #fff !important;
    padding: 10px 16px; 
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid #3498db !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}
.custom-select-trigger:hover {
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    border-color: #5dade2 !important;
    transform: translateY(-1px);
}
.custom-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff !important;
    border-radius: 12px;
    overflow-y: auto;
    max-height: 300px; 
    scrollbar-width: thin;
    display: none;
    z-index: 999999 !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border: 1px solid rgba(0,0,0,0.1);
    padding: 6px;
    backdrop-filter: blur(10px);
    animation: fadeInScale 0.2s ease;
}

[data-theme="dark"] .custom-options { 
    background: #0a192f !important;
    border-color: rgba(0, 168, 204, 0.3);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

.custom-options.show { display: block; }

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

.custom-option {
    padding: 10px 14px;
    color: #1a1a2e !important;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    margin-bottom: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

[data-theme="dark"] .custom-option { color: #e6edf3 !important; }

.custom-option:last-child { margin-bottom: 0; }

.custom-option:hover { 
    background: var(--primary) !important;
    color: #fff !important;
    padding-right: 20px;
    transform: translateX(-4px);
}

[data-theme="dark"] .custom-option:hover {
    background: #1e3a8a !important; /* Premium dark blue hover */
}

/* Custom Scrollbar for Dropdown */
.custom-options::-webkit-scrollbar { width: 4px; }
.custom-options::-webkit-scrollbar-track { background: transparent; }
.custom-options::-webkit-scrollbar-thumb { 
    background: rgba(0,0,0,0.3); 
    border-radius: 10px; 
}
[data-theme="dark"] .custom-options::-webkit-scrollbar-thumb { 
    background: rgba(255,255,255,0.4); /* Brighter thumb for visibility */
}

/* UI Enhancements & Ghost Placeholders */
[data-theme="dark"] .page-header h1 {
    color: #ffffff !important;
}

::placeholder {
    color: #cbd5e1;
    opacity: 0.8;
}

[data-theme="dark"] ::placeholder {
    color: rgba(255, 255, 255, 0.2) !important;
    opacity: 1;
}

/* --- PREMIUM FLOATING CALCULATOR --- */
.floating-calc {
    position: fixed;
    top: 100px;
    right: 20px;
    width: 280px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.3);
    z-index: 10000;
    overflow: hidden;
    user-select: none;
    backdrop-filter: blur(10px);
}
.calc-header {
    background: var(--bg-input);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    font-weight: 900;
    border-bottom: 1px solid var(--border-color);
    color: var(--primary);
}
.calc-header button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
}
.calc-display {
    padding: 15px;
    background: #000;
}
.calc-display input {
    width: 100%;
    background: transparent !important;
    border: none !important;
    color: #00ff00 !important;
    font-size: 24px;
    text-align: right !important;
    font-family: monospace;
}
.calc-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 15px;
}
.calc-buttons button {
    padding: 15px 5px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-primary);
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s;
}
.calc-buttons button:hover {
    background: var(--primary);
    color: #fff;
    transform: scale(1.05);
}
.calc-buttons button:active { transform: scale(0.95); }

/* --- PREMIUM CALCULATOR TOP BUTTON --- */
.calc-app-btn {
    width: 48px;
    height: 48px;
    background: #008080 !important; /* Premium Teal */
    border-radius: 14px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 22px;
    user-select: none;
    padding: 0;
}
.calc-app-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0,128,128,0.4);
    border-color: rgba(255, 255, 255, 0.3);
}
.calc-app-btn:active { transform: scale(0.95); }
