/**
 * styles.css - Spreadsheet-Aligned Premium Design System for Bright Funds Version 2
 */

/* ==========================================================================
   1. COLOR SCHEME & DESIGN VARIABLES
   ========================================================================== */
:root {
    /* Main Theme - Option 4: Emerald Wealth Light Theme */
    --bg-main: #f4f7f6;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --bg-sidebar: #ffffff;
    --border-color: rgba(0, 168, 132, 0.12);
    --border-color-glow: rgba(0, 168, 132, 0.25);
    
    /* Luxury Gold Accents */
    --gold-primary: #b58d24;
    --gold-light: #fbe69e;
    --gold-dark: #8c6a14;
    --gold-gradient: linear-gradient(135deg, #fbe69e 0%, #b58d24 50%, #8c6a14 100%);
    --gold-glow: 0 0 15px rgba(181, 141, 36, 0.15);
    
    /* Emerald Theme Colors */
    --emerald-primary: #00a884;
    --emerald-light: #e6f6f3;
    --emerald-dark: #008769;
    --emerald-gradient: linear-gradient(135deg, #00d2a0 0%, #00a884 50%, #008769 100%);
    --emerald-glow: 0 0 20px rgba(0, 168, 132, 0.25);
    
    /* Spreadsheet Color Map (Vibrant for Light Background) */
    --sheet-sky-blue: #0288d1;
    --sheet-purple: #7b1fa2;
    --sheet-light-purple: #ede7f6;
    --sheet-dark-red: #c2185b;
    --sheet-grid-border: rgba(15, 23, 42, 0.08);
    --sheet-navy-header: #f8fafc;
    
    /* System Colors (Slate on Light Background) */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    
    --color-success: #0f766e;
    --color-success-bg: rgba(13, 148, 136, 0.1);
    --color-error: #be123c;
    --color-error-bg: rgba(225, 29, 72, 0.1);
    --color-warning: #b45309;
    --color-warning-bg: rgba(217, 119, 6, 0.1);
    
    /* Fonts */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Outfit', sans-serif;
    --font-display: 'Cinzel', serif;
    
    /* Border Radii */
    --radius-lg: 12px;
    --radius-md: 8px;
    --radius-sm: 4px;
}

/* --- ANIMATIONS --- */
@keyframes fadeInSlideUp {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 var(--border-color-glow); }
    70% { box-shadow: 0 0 0 10px rgba(0,0,0,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}

/* ==========================================================================
   2. RESET & GLOBAL LAYOUT
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 168, 132, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(181, 141, 36, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.8) 0%, var(--bg-main) 100%);
    background-attachment: fixed;
    transition: background-color 0.4s ease, color 0.4s ease;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-family: var(--font-display);
    font-weight: 700;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #04090e;
}
::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold-primary);
}

.hidden {
    display: none !important;
}

.view-section {
    display: none !important;
}
.view-section.active {
    display: block !important;
}

/* ==========================================================================
   3. SECURE PORTAL LOGIN
   ========================================================================== */
#login-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2rem;
    overflow: hidden;
    background-image: url('login_bg_emerald.jpg');
    background-size: cover;
    background-position: center;
}

.login-decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.decor-circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
}
.circle-1 {
    width: 400px;
    height: 400px;
    background: rgba(212, 175, 55, 0.05);
    top: -100px;
    left: -100px;
}
.circle-2 {
    width: 500px;
    height: 500px;
    background: rgba(59, 138, 211, 0.04);
    bottom: -150px;
    right: -100px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 3rem 2.5rem;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45), var(--gold-glow);
    z-index: 1;
    position: relative;
    opacity: 0;
    animation: fadeInSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease, border-color 0.4s ease;
}

.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2rem;
    gap: 0.5rem;
}

.login-logo-img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
    margin-bottom: 0.5rem;
    box-shadow: var(--gold-glow);
    border: 1px solid var(--border-color);
}

.header-logo-img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.login-header h2 {
    font-size: 1.85rem;
    letter-spacing: 0.08em;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.1);
}
.login-header .subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.login-header .tagline {
    font-size: 0.75rem;
    color: var(--gold-light);
    letter-spacing: 0.1em;
    font-weight: 500;
    margin-top: 0.15rem;
    text-transform: uppercase;
}

.login-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 2rem;
    overflow: hidden;
}

.login-tab {
    background: rgba(4, 9, 14, 0.4);
    border: none;
    color: var(--text-secondary);
    padding: 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.login-tab:hover {
    color: var(--text-primary);
}
.login-tab.active {
    background: var(--gold-gradient);
    color: #060d15;
}

/* Forms styling */
.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.input-container {
    position: relative;
}

.field-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid rgba(0, 168, 132, 0.2);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    transition: all 0.3s;
    outline: none;
}
.input-container .form-input {
    padding-left: 2.75rem;
}
.form-input:focus {
    border-color: var(--emerald-primary);
    box-shadow: var(--emerald-glow);
}

.form-input.select-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    width: auto;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}
.alert-info {
    background: rgba(212, 175, 55, 0.04);
    border: 1px solid var(--border-color);
    color: var(--gold-light);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: var(--radius-sm);
    cursor: pointer;
    border: 1px solid transparent;
    font-family: var(--font-sans);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: var(--emerald-gradient);
    color: #ffffff;
    border: 1px solid var(--emerald-dark);
    box-shadow: var(--emerald-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 168, 132, 0.35);
    background: linear-gradient(135deg, #00d2a0 0%, #008769 100%);
}

.btn-secondary {
    background: transparent;
    color: var(--emerald-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    border-color: var(--emerald-primary);
    background: var(--emerald-light);
    box-shadow: var(--emerald-glow);
    color: var(--emerald-dark);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #991b1b 100%);
    color: white;
    border: 1px solid #ef4444;
}
.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.3);
}

.btn-block {
    width: 100%;
}
.btn-sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.7rem;
}

.login-footer {
    margin-top: 2rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ==========================================================================
   4. APPLICATION MAIN HEADER
   ========================================================================== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: 0.08em;
    font-weight: 900;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.version-tag {
    font-size: 0.65rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 0.1rem 0.35rem;
    border-radius: 10px;
    margin-left: 0.25rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.system-date-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid var(--border-color);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.system-date-badge strong {
    color: var(--gold-primary);
}
@media (min-width: 769px) {
    .system-date-badge.header-center {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}


.user-profile-summary {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    border-left: 1px solid rgba(255,255,255,0.08);
    padding-left: 1.5rem;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: #060d15;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
    font-family: var(--font-display);
}

.profile-meta {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.profile-meta .user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}
.profile-meta .user-role {
    font-size: 0.7rem;
    color: var(--gold-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.btn-logout {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.15rem;
    cursor: pointer;
    transition: color 0.3s;
}
.btn-logout:hover {
    color: #f87171;
}

/* Database Status Badge */
.db-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(3, 7, 12, 0.4);
}
.db-status-badge.cloud {
    background: var(--color-success-bg);
    color: var(--color-success);
    border-color: rgba(16, 185, 129, 0.3);
    animation: pulseGlow 2s infinite;
}
.db-status-badge.local {
    border-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}
.db-status-badge .status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6b7280;
}
.db-status-badge.cloud .status-indicator {
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
}
.db-status-badge.local .status-indicator {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}

/* ==========================================================================
   5. SPREADSHEET TAB BAR NAVIGATION
   ========================================================================== */
.sheet-tabs-nav {
    display: flex;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 5%;
    gap: 0.5rem;
    overflow-x: auto;
    align-items: center;
}

.sheet-tab {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    position: relative;
    transition: all 0.3s;
    font-family: var(--font-sans);
    border-radius: var(--radius-md);
    white-space: nowrap;
}

.sheet-tab:hover {
    color: var(--emerald-primary);
    background: var(--emerald-light);
}

.sheet-tab.active {
    color: #ffffff !important;
    background: var(--emerald-gradient);
    font-weight: 600;
    box-shadow: var(--emerald-glow);
}

/* Content Area spacing */
.sheet-content-area {
    padding: 2.5rem 5%;
    min-height: calc(100vh - 160px);
}

.sheet-tab-panel {
    display: none;
}
.sheet-tab-panel.active {
    display: block;
    animation: fadeInSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   6. TAB: DASHBOARD
   ========================================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.4s ease, border-color 0.4s ease;
}
.card:hover, .stat-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.3), var(--gold-glow);
}

.card-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.card-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}
.card-header-bar .card-title {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.card-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* The spreadsheet table mock layout */
.sheets-table-mock {
    width: 100%;
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-size: 0.95rem;
}

.sheets-mock-header {
    background: var(--emerald-primary);
    border-bottom: 1px solid var(--border-color);
    color: #ffffff;
    font-family: var(--font-serif);
    font-weight: 600;
    letter-spacing: 0.15em;
    padding: 0.75rem;
    text-align: center;
    font-size: 1.15rem;
    text-shadow: none;
}

.sheets-mock-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--sheet-grid-border);
    padding: 0.75rem 1.25rem;
    color: var(--text-primary);
}

.sheets-mock-row .col-label {
    font-weight: 500;
}
.sheets-mock-row .col-value {
    font-family: var(--font-sans);
    font-weight: 600;
}

/* Row-specific colors from the Google Sheet */
.sky-blue-row {
    background-color: rgba(59, 138, 211, 0.2);
}
.sky-blue-row .col-value {
    color: #93c5fd;
}

.purple-row {
    background-color: rgba(112, 48, 160, 0.15);
}
.purple-row .col-value {
    color: #c084fc;
}

.light-purple-row {
    background-color: rgba(143, 57, 250, 0.12);
}
.light-purple-row .col-value {
    color: #d8b4fe;
}

.red-row {
    background-color: var(--sheet-dark-red);
}

/* Row 10 - Balance on hand (Burgundy Background, italic gold text, white value) */
.sheets-mock-row-highlighted {
    display: flex;
    justify-content: space-between;
    padding: 0.85rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}
.col-label-italic {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 600;
    color: #ffffff;
}
.col-value-bold {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 1.15rem;
    color: #ffffff;
}

.interest-rate-footer-badge {
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    background: rgba(212, 175, 55, 0.04);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
    text-align: left;
}

/* ==========================================================================
   7. TABLES & LEDGERS
   ========================================================================== */
.full-width-card {
    padding: 1.75rem;
}

.search-input {
    width: 180px;
    padding: 0.4rem 0.75rem;
}
.select-filter {
    width: 140px;
    padding: 0.4rem 0.75rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.sheets-grid-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.85rem;
    background: #ffffff;
}

.sheets-grid-table th {
    border-bottom: 2px solid var(--border-color);
    background: rgba(0, 168, 132, 0.05);
    padding: 0.75rem 1rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

.sheets-grid-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--sheet-grid-border);
    color: var(--text-primary);
}

.sheets-grid-table tbody tr {
    transition: background-color 0.2s;
}
.sheets-grid-table tbody tr:hover {
    background-color: rgba(0, 168, 132, 0.02);
}

/* Status Badges */
.status-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
}
.status-pill.paid {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.status-pill.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}
.status-pill.approved {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-pill.rejected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.amount-gain {
    color: var(--color-success);
    font-weight: 600;
}
.amount-loss {
    color: #f87171;
    font-weight: 600;
}

.text-center { text-align: center !important; }

/* ==========================================================================
   8. TAB: EARNING INTEREST & WITHDRAWALS SPLIT
   ========================================================================== */
.interest-grid, .withdrawals-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2.5rem;
    align-items: start;
}
.withdrawals-main-card {
    grid-column: span 2;
}

.interest-preview-box {
    background: rgba(3, 7, 12, 0.5);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.4s ease, border-color 0.4s ease;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.preview-item strong {
    color: var(--text-primary);
}
.preview-item.highlighted {
    border-top: 1px dashed var(--border-color);
    padding-top: 0.75rem;
}
.preview-item.highlighted strong {
    font-size: 1.1rem;
}

/* ==========================================================================
   9. GLOBAL ADMIN CONTROLS FOOTER
   ========================================================================== */
.admin-global-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #04090e;
    border-top: 1.5px solid var(--border-color);
    padding: 0.65rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 90;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
}

.admin-bar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.8rem;
}

.form-group-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.form-group-inline label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
}
.form-group-inline input {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    height: auto;
}

/* ==========================================================================
   10. MODALS SYSTEM
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.modal-card {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 40px rgba(15, 23, 42, 0.12), var(--emerald-glow);
    overflow: hidden;
    margin: auto;
}

.modal-header {
    background: var(--bg-header);
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    font-size: 1.05rem;
    color: var(--gold-primary);
    margin: 0;
}
.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}
.btn-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.75rem;
}

/* ==========================================================================
   11. TEXT & GLOW UTILITIES
   ========================================================================== */
.text-glow-gold {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hide admin-only features for investors */
body.investor-session .admin-only {
    display: none !important;
}
body.investor-session .admin-only-cell {
    display: none !important;
}

/* ==========================================================================
   12. RESPONSIVE GRID LAYOUTS
   ========================================================================== */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .interest-grid, .withdrawals-grid {
        grid-template-columns: 1fr;
    }
    .admin-interest-panel {
        margin-top: 1.5rem;
    }
    .sheet-content-area {
        padding-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }
    .header-right {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.75rem;
    }
    .system-date-badge {
        font-size: 0.75rem;
    }
    .user-profile-summary {
        border-left: none;
        padding-left: 0;
    }
    .sheet-tabs-nav {
        padding: 0 1rem;
    }
    .sheet-tab {
        padding: 0.75rem 1rem;
        font-size: 0.75rem;
    }
    .sheet-content-area {
        padding: 1.5rem 1rem 2rem;
    }
    .admin-global-bar {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }
    .admin-bar-left {
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: center;
    }
    .admin-bar-right {
        width: 100%;
        text-align: center;
    }
    .card-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .card-header-actions {
        flex-wrap: wrap;
        width: 100%;
        gap: 0.5rem;
    }
    .card-header-actions .form-input,
    .card-header-actions .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    #login-view {
        padding: 1rem;
    }
    .login-card {
        padding: 2rem 1.25rem;
    }
}

/* ==========================================================================
   13. ANNOUNCEMENTS & NOTIFICATIONS STYLING
   ========================================================================== */
.announcements-container {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification-banner {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem 1.75rem;
    border-radius: var(--radius-md);
    background: rgba(3, 7, 12, 0.4);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
}

.notification-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
}

/* Notice Type Presets */
.notification-banner.info {
    border-color: rgba(59, 130, 246, 0.2);
}
.notification-banner.info::before {
    background: #3b82f6;
}
.notification-banner.info .notify-icon {
    color: #3b82f6;
}

.notification-banner.reminder {
    border-color: rgba(245, 158, 11, 0.2);
}
.notification-banner.reminder::before {
    background: var(--gold-primary);
}
.notification-banner.reminder .notify-icon {
    color: var(--gold-primary);
}

.notification-banner.warning {
    border-color: rgba(239, 68, 68, 0.2);
}
.notification-banner.warning::before {
    background: #ef4444;
}
.notification-banner.warning .notify-icon {
    color: #ef4444;
}

.notify-icon {
    font-size: 1.25rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.notify-content {
    flex-grow: 1;
    text-align: left;
}

.notify-message {
    font-size: 0.92rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0 0 0.4rem 0;
}

.notify-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Announcement Form Grid */
.form-row-three {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    align-items: end;
}

@media (max-width: 768px) {
    .form-row-three {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.btn-align-bottom {
    display: flex;
    align-items: flex-end;
    height: 100%;
}

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

/* Tamil Decor Icon in bottom right corner of login screen */
.tamil-decor-icon {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.2);
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #111;
}

.tamil-decor-icon:hover {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--gold-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 25px rgba(212, 175, 55, 0.4);
}

.tamil-decor-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Adjust size on smaller screens */
@media (max-width: 768px) {
    .tamil-decor-icon {
        width: 70px;
        height: 70px;
        bottom: 1.5rem;
        right: 1.5rem;
        border-width: 1px;
    }
}

/* Collapsible Deposit Details on Login Screen */
.login-payment-info {
    margin-top: 1.5rem;
    width: 100%;
    text-align: center;
}

.btn-toggle-payment {
    background: transparent;
    border: 1px dashed rgba(212, 175, 55, 0.3);
    color: var(--text-secondary);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-family: var(--font-sans);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.btn-toggle-payment:hover {
    color: var(--gold-primary);
    border-color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.02);
}

.toggle-chevron {
    font-size: 0.7rem;
    transition: transform 0.3s;
}

.toggle-chevron.rotated {
    transform: rotate(180deg);
}

.payment-details-content {
    background: rgba(243, 195, 79, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    margin-top: 1.5rem;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.payment-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    padding: 0.4rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.payment-detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.payment-detail-row:first-child {
    padding-top: 0;
}

.payment-detail-row .detail-label {
    color: var(--text-muted);
}

.payment-detail-row .detail-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* WhatsApp Branding & Buttons */
.btn-whatsapp {
    background: #25D366;
    color: white;
    border: 1px solid #128C7E;
}
.btn-whatsapp:hover {
    background: #128C7E;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
    color: white;
}

.btn-whatsapp-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-whatsapp-icon i {
    transition: all 0.2s ease-in-out;
}

.btn-whatsapp-icon:hover i {
    color: #128C7E !important;
    transform: scale(1.25);
}

/* ==========================================================================
   14. BIOMETRICS & VERIFICATION QUEUE STYLING
   ========================================================================== */

/* Investor-only visibility helper */
body:not(.investor-session) .investor-only {
    display: none !important;
}

/* Biometric Buttons */
.btn-biometric {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid var(--border-color);
    color: var(--gold-primary);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}
.btn-biometric:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-primary);
    box-shadow: var(--gold-glow);
}

.login-biometric-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* Form Upload Preview */
.upload-dropzone {
    position: relative;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    background: rgba(3, 7, 12, 0.2);
    cursor: pointer;
    transition: all 0.3s;
}
.upload-dropzone:hover {
    border-color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.02);
}
.upload-dropzone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.upload-icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.upload-preview {
    margin-top: 1rem;
    max-height: 200px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    display: none;
    margin-left: auto;
    margin-right: auto;
    object-fit: contain;
}

/* Pending ledger status */
.sheets-grid-table tr.row-pending {
    background-color: rgba(245, 158, 11, 0.03);
}
.sheets-grid-table tr.row-pending:hover {
    background-color: rgba(245, 158, 11, 0.06);
}
.sheets-grid-table tr.row-pending td {
    border-bottom: 1px solid rgba(245, 158, 11, 0.15);
}

/* Receipt viewing button */
.btn-view-receipt {
    background: rgba(59, 138, 211, 0.1);
    color: var(--sheet-sky-blue);
    border: 1px solid rgba(59, 138, 211, 0.2);
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-view-receipt:hover {
    background: rgba(59, 138, 211, 0.25);
    border-color: var(--sheet-sky-blue);
}

/* Receipt display modal card */
.receipt-display-img {
    width: 100%;
    max-height: 450px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: #000;
}

/* ==========================================================================
   15. PROFILE AVATAR & UPLOAD CSS
   ========================================================================== */
.avatar-circle img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.avatar-circle.small {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.investor-name-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.personal-card-header-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.personal-card-header-box .avatar-circle {
    width: 36px;
    height: 36px;
    box-shadow: var(--gold-glow);
    border: 1px solid var(--border-color);
}
