/* ==========================================================================
   CAREFINANCE - SMART DAYCARE FINANCIAL SYSTEM (v1.4.0)
   Custom Premium CSS System - Vanilla CSS Style
   ========================================================================== */

/* DESIGN SYSTEM VARIABLES & TOKENS */
:root {
    --primary: #1A3460;
    --primary-light: #2C4D82;
    --primary-rgb: 26, 52, 96;
    --secondary: #F35E50;
    --secondary-hover: #E14E40;
    --secondary-rgb: 243, 94, 80;
    --accent: #F3BC6F;
    --accent-light: #FEF8EF;
    --social-bg: #EAE6DF;
    --social-pink: #F9C5CB;
    
    /* Semantic Colors */
    --success: #4EAD74;
    --success-light: #EBF7EE;
    --warning: #F3BC6F;
    --warning-light: #FEF8EF;
    --danger: #E55050;
    --danger-light: #FDF1F1;
    
    /* Layout Colors */
    --bg-warm: #FAF9F6;
    --card-bg: #FFFFFF;
    --text-main: #2C3E50;
    --text-muted: #7F8C8D;
    --text-white: #FFFFFF;
    --border-color: #EBF0F6;
    
    /* Shadows */
    --shadow-soft: 0px 4px 24px rgba(26, 52, 96, 0.04);
    --shadow-medium: 0px 8px 32px rgba(26, 52, 96, 0.08);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
    
    /* Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-round: 50%;
    
    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: all 0.15s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-warm);
    line-height: 1.5;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--primary);
}

button {
    font-family: 'Inter', sans-serif;
    border: none;
    background: none;
    cursor: pointer;
    transition: var(--transition-fast);
}

input, select, textarea {
    font-family: 'Inter', sans-serif;
    border: 1px solid var(--border-color);
    outline: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

/* APP FRAMEWORK & LAYOUT MANAGER */
/* Desktop Emulator Frame: behaves like high-fidelity phone mock on desktop, natively fluid on mobile */
@media (min-width: 481px) {
    body {
        background-color: #ECEFF3;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        padding: 20px;
    }
    
    .app-container {
        width: 425px;
        height: 880px;
        max-height: 95vh;
        border-radius: 40px;
        box-shadow: 0px 24px 64px rgba(26, 52, 96, 0.15);
        border: 12px solid var(--primary);
        background-color: var(--bg-warm);
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .app-container {
        width: 100vw;
        height: 100vh;
        display: flex;
        flex-direction: column;
        position: relative;
        background-color: var(--bg-warm);
    }
}

/* APP HEADER */
.app-header {
    background-color: var(--primary);
    color: var(--text-white);
    padding: 6px 16px 12px 16px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.06);
}

.system-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    opacity: 0.8;
    margin-bottom: 8px;
    font-weight: 500;
}

.status-icons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.small-icon {
    width: 12px !important;
    height: 12px !important;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

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

.logo-icon {
    width: 32px;
    height: 32px;
    background-color: var(--secondary);
    color: var(--text-white);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon i {
    width: 18px;
    height: 18px;
}

.brand-title {
    font-size: 16px;
    color: var(--text-white);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 10px;
    opacity: 0.7;
}

/* DATE SIMULATOR CONTROLLER */
.date-simulator-card {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sim-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.sim-controls {
    display: flex;
    gap: 4px;
    align-items: center;
}

.sim-controls input[type="date"] {
    background: transparent;
    border: none;
    color: var(--text-white);
    font-size: 11px;
    font-weight: 600;
    width: 100px;
}

.sim-controls input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.btn-sim-today {
    background-color: var(--secondary);
    color: var(--text-white);
    font-size: 10px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-sim-today i {
    width: 11px;
    height: 11px;
}

.btn-sim-today:hover {
    background-color: var(--secondary-hover);
}

/* APP VIEWPORT (CONTENT ZONE) */
.app-viewport {
    flex: 1;
    overflow-y: auto;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* TAB VISIBILITY CONTROLLER */
.tab-view {
    display: none;
    flex: 1;
    flex-direction: column;
}

.tab-view.active-tab {
    display: flex;
}

/* TAB LOCK PLACEHOLDER VIEWPORT (v1.6.0 SECURITY FEATURE) */
.tab-lock-placeholder {
    display: none;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 32px 16px;
    text-align: center;
    background: radial-gradient(circle at top left, rgba(26, 52, 96, 0.04), transparent);
    min-height: 70vh;
}

.lock-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    max-width: 340px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.lock-card-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-light);
    border: 1px solid rgba(243, 94, 80, 0.15);
    border-radius: 50%;
    color: var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 12px rgba(243, 94, 80, 0.15);
}

.lock-card-icon i {
    width: 28px;
    height: 28px;
}

.lock-card h3 {
    font-size: 18px;
    color: var(--navy);
    font-weight: 700;
    margin: 0;
}

.lock-card p {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.btn-unlock-tab {
    background: var(--navy);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(26, 52, 96, 0.2);
    transition: all 0.2s ease;
    width: 100%;
    justify-content: center;
}

.btn-unlock-tab i {
    width: 14px;
    height: 14px;
}

.btn-unlock-tab:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-unlock-tab:active {
    transform: translateY(0);
}

/* DYNAMIC ROLE-BASED ACCESS CONTROL (RBAC) STYLING RULES */
.role-admin .tab-lock-placeholder {
    display: flex !important;
}

.role-admin #tab-review .section-container,
.role-admin #tab-dashboard .section-container,
.role-admin #tab-reports .section-container {
    display: none !important;
}

/* ALERTS BANNERS */
.alert-banner {
    background-color: var(--accent);
    color: var(--primary);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    animation: slideDown 0.3s ease;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    line-height: 1.3;
}

.alert-bell-icon {
    width: 18px;
    height: 18px;
    color: var(--primary);
    animation: wobble 1s infinite alternate;
}

.btn-close-alert {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    opacity: 0.6;
    padding: 0 4px;
}

/* BOTTOM NAVIGATION BAR */
.app-nav-bar {
    height: 68px;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 4px 8px;
    z-index: 100;
    box-shadow: 0px -4px 16px rgba(0, 0, 0, 0.02);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    flex: 1;
    height: 100%;
    gap: 4px;
    position: relative;
}

.nav-icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    transition: var(--transition-fast);
}

.nav-text {
    transition: var(--transition-fast);
}

.nav-item.active-nav {
    color: var(--primary);
    font-weight: 700;
}

.nav-item.active-nav .nav-icon {
    color: var(--secondary);
    transform: scale(1.1);
}

.nav-badge {
    position: absolute;
    top: 4px;
    right: 22%;
    background-color: var(--secondary);
    color: var(--text-white);
    font-size: 9px;
    min-width: 15px;
    height: 15px;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    padding: 0 3px;
    border: 1px solid var(--card-bg);
}

.nav-badge.alert-badge {
    background-color: var(--accent);
    color: var(--primary);
}

/* SECTION UTILITIES */
.section-container {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.section-header h2 {
    font-size: 18px;
}

.section-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.section-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.badge-count {
    background-color: rgba(26, 52, 96, 0.08);
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.card-section-title {
    font-size: 13px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-section-title i {
    width: 16px;
    height: 16px;
    color: var(--secondary);
}

/* ==========================================================================
   TAB 1: WHATSAPP CHAT SIMULATOR STYLES
   ========================================================================== */
.chat-wrapper {
    display: flex;
    flex-direction: column;
    flex: 1;
    background-color: var(--social-bg);
    position: relative;
}

/* Chat Header Custom */
.chat-header {
    background-color: var(--primary-light);
    color: var(--text-white);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.05);
}

.chat-user-avatar {
    width: 36px;
    height: 36px;
    background-color: var(--social-pink);
    color: var(--primary);
    font-weight: 700;
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
}

.chat-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-username {
    font-size: 13px;
    font-weight: 600;
}

.chat-userstatus {
    font-size: 9px;
    opacity: 0.8;
}

.chat-header-actions {
    display: flex;
    gap: 14px;
    opacity: 0.8;
}

.chat-header-actions i {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Chat History Display */
.chat-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.system-message {
    align-self: center;
    background-color: rgba(255, 255, 255, 0.8);
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: var(--shadow-card);
    text-transform: uppercase;
}

.chat-bubble {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    position: relative;
    line-height: 1.4;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    word-break: break-word;
    animation: popIn 0.25s ease;
}

.bot-bubble {
    align-self: flex-start;
    background-color: var(--social-bubble-in);
    color: var(--text-main);
    border-top-left-radius: 2px;
}

.admin-bubble {
    align-self: flex-end;
    background-color: var(--social-bubble-out);
    color: var(--text-main);
    border-top-right-radius: 2px;
}

.chat-time {
    font-size: 8px;
    color: var(--text-muted);
    align-self: flex-end;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.chat-time i {
    width: 12px;
    height: 12px;
}

.chat-time .read-checks {
    color: #34B7F1;
}

/* Media Attachment in Chat Bubble */
.chat-bubble-media {
    width: 100%;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    display: block;
    object-fit: cover;
    max-height: 160px;
}

.chat-bubble-link-card {
    background-color: rgba(0, 0, 0, 0.03);
    border-left: 3px solid var(--secondary);
    padding: 6px;
    border-radius: 4px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-bubble-link-card .link-title {
    font-weight: 700;
    color: var(--primary);
    font-size: 11px;
}

.chat-bubble-link-card .link-desc {
    font-size: 9px;
    color: var(--text-muted);
}

.chat-bubble-link-card .link-action {
    font-size: 10px;
    color: var(--secondary);
    font-weight: 700;
    text-decoration: underline;
    margin-top: 2px;
    display: inline-block;
}

/* OCR SCANNING LASER EFFECT COVER OVERLAY */
.ocr-processing-card {
    position: absolute;
    top: 56px;
    left: 0;
    width: 100%;
    height: calc(100% - 170px);
    background-color: rgba(26, 52, 96, 0.92);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 10;
    color: var(--text-white);
    animation: fadeIn 0.3s ease;
}

.ocr-image-preview-container {
    width: 240px;
    height: 240px;
    background: #000;
    border: 3px solid var(--secondary);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(243, 94, 80, 0.4);
    margin-bottom: 20px;
}

.ocr-image-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0.8;
}

.laser-scanner-line {
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--secondary);
    box-shadow: 0 0 12px 2px var(--secondary);
    animation: laserScan 2s infinite ease-in-out;
}

.ocr-status-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.ocr-spinner {
    font-size: 20px;
}

.spin-icon {
    width: 24px;
    height: 24px;
    animation: spin 1s infinite linear;
}

.ocr-status-box span:last-child {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* DEMO GALLERY CHIPS */
.demo-gallery-container {
    padding: 8px 12px;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.gallery-title {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 6px;
}

.gallery-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.demo-card-btn {
    background-color: var(--bg-warm);
    border: 1px dashed var(--border-color);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.demo-card-btn:hover {
    background-color: var(--social-pink);
    border-color: var(--secondary);
}

.demo-card-btn i {
    width: 12px;
    height: 12px;
    color: var(--secondary);
}

/* GUIDED FLOW BUTTON ZONE */
.guided-flow-bar {
    padding: 8px 12px;
    background-color: var(--card-bg);
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--border-color);
}

.btn-guided-flow {
    flex: 1;
    background-color: var(--primary);
    color: var(--text-white);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}

.btn-guided-flow:hover {
    background-color: var(--primary-light);
}

.btn-guided-flow i {
    width: 14px;
    height: 14px;
}

.btn-guided-flow#btn-quick-expense {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-guided-flow#btn-quick-expense:hover {
    background-color: rgba(26, 52, 96, 0.05);
}

/* CHAT INPUT CONTAINER */
.chat-input-bar {
    background-color: #F0F2F5;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid var(--border-color);
}

.chat-attachment-btn {
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-attachment-btn i {
    width: 20px;
    height: 20px;
}

.chat-textarea {
    flex: 1;
    background-color: var(--card-bg);
    border: none;
    border-radius: 20px;
    padding: 8px 14px;
    font-size: 12px;
    resize: none;
    max-height: 80px;
    line-height: 1.3;
}

.chat-send-btn {
    width: 36px;
    height: 36px;
    background-color: var(--primary);
    color: var(--text-white);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-send-btn:hover {
    background-color: var(--primary-light);
    transform: scale(1.05);
}

.chat-send-btn i {
    width: 16px;
    height: 16px;
    margin-left: 2px;
}

/* ==========================================================================
   INTERACTIVE GUIDED FORM MODAL (WHATSAPP OVERLAY)
   ========================================================================== */
.guided-form-modal {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    max-height: 85%;
    background-color: var(--card-bg);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    box-shadow: 0px -10px 40px rgba(0, 0, 0, 0.12);
    z-index: 150;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.guided-form-header h3 {
    font-size: 14px;
    font-family: 'Outfit', sans-serif;
}

.btn-close-modal {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-muted);
}

.guided-form-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
}

.form-group select, .form-group input[type="text"], .form-group input[type="number"], .form-group input[type="tel"] {
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-warm);
}

.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.form-group-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.form-group-checkbox label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
}

.help-text {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.method-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.method-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    background-color: var(--bg-warm);
    transition: var(--transition-fast);
}

.method-option:has(input:checked) {
    border-color: var(--secondary);
    background-color: var(--accent-light);
    color: var(--primary);
    font-weight: 700;
    box-shadow: 0 0 0 1px var(--secondary);
}

.method-option:hover {
    border-color: var(--secondary);
    background-color: rgba(243, 94, 80, 0.04);
}

.method-option input {
    cursor: pointer;
}

.file-uploader-box {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    background-color: var(--bg-warm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: var(--primary);
    font-size: 11px;
    font-weight: 600;
}

.file-upload-label i {
    width: 24px;
    height: 24px;
    color: var(--secondary);
}

.file-name-display {
    font-size: 9px;
    color: var(--text-muted);
}

.guided-form-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

.guided-form-footer button {
    flex: 1;
    padding: 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-align: center;
}

.btn-cancel {
    background-color: var(--bg-warm);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-submit {
    background-color: var(--secondary);
    color: var(--text-white);
}

.btn-submit:disabled {
    background-color: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* ==========================================================================
   TAB 2: PENDING REVIEW QUEUE LIST
   ========================================================================== */
.review-queue-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.review-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    border-left: 4px solid var(--warning);
    animation: slideUp 0.3s ease;
}

.review-card.expense-card {
    border-left-color: var(--secondary);
}

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

.review-source-tag {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.tag-wa-text {
    background-color: rgba(78, 173, 116, 0.08);
    color: var(--success);
}

.tag-ocr {
    background-color: rgba(243, 94, 80, 0.08);
    color: var(--secondary);
}

.review-date {
    font-size: 10px;
    color: var(--text-muted);
}

.review-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
    padding: 10px 0;
}

.review-field-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.review-field-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
}

.review-field-val {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    text-align: right;
}

.review-field-input {
    width: 60%;
    padding: 4px 8px;
    font-size: 11px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: right;
    font-weight: 700;
    color: var(--primary);
    background-color: var(--bg-warm);
}

.review-field-select {
    width: 60%;
    padding: 4px 8px;
    font-size: 11px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-warm);
}

.review-card-footer {
    display: flex;
    gap: 6px;
}

.review-card-footer button {
    flex: 1;
    padding: 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-reject {
    background-color: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(229, 80, 80, 0.15);
}

.btn-reject:hover {
    background-color: var(--danger);
    color: var(--text-white);
}

.btn-approve {
    background-color: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(78, 173, 116, 0.15);
}

.btn-approve:hover {
    background-color: var(--success);
    color: var(--text-white);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 16px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state i {
    width: 48px;
    height: 48px;
    stroke-width: 1;
    color: var(--primary);
    opacity: 0.3;
}

.empty-state p {
    font-size: 12px;
}

/* ==========================================================================
   TAB 3: DASHBOARD METRICS, SVG TREND CHART, LEDGER TABLE
   ========================================================================== */

/* KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.kpi-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 12px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.kpi-card.card-navy {
    grid-column: span 2;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-white);
    border: none;
}

.kpi-icon-wrapper {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background-color: rgba(26, 52, 96, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-navy .kpi-icon-wrapper {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--accent);
}

.kpi-icon-wrapper i {
    width: 14px;
    height: 14px;
}

.kpi-label {
    font-size: 9px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.card-navy .kpi-label {
    color: rgba(255, 255, 255, 0.7);
}

.kpi-value {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 4px;
}

.card-navy .kpi-value {
    font-size: 22px;
    color: var(--text-white);
}

.kpi-change {
    font-size: 8px;
    color: var(--text-muted);
    font-weight: 500;
}

.card-navy .kpi-change {
    color: var(--accent);
}

.text-green {
    color: var(--success) !important;
}

.text-coral {
    color: var(--secondary) !important;
}

.text-yellow {
    color: var(--warning) !important;
}

/* SVG TREND CHART */
.dashboard-chart-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 12px;
    margin-bottom: 16px;
}

.chart-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.chart-legend {
    display: flex;
    gap: 8px;
}

.legend-item {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-color {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    display: inline-block;
}

.bg-green {
    background-color: var(--success);
}

.bg-coral {
    background-color: var(--secondary);
}

.chart-svg-container {
    width: 100%;
    height: 160px;
}

.chart-svg {
    width: 100%;
    height: 100%;
}

.chart-axis-line {
    stroke: var(--border-color);
    stroke-width: 1;
}

.chart-grid-line {
    stroke: var(--border-color);
    stroke-width: 0.5;
    stroke-dasharray: 4 4;
}

.chart-text {
    fill: var(--text-muted);
    font-size: 8px;
    font-family: 'Inter', sans-serif;
}

.chart-path-income {
    stroke: var(--success);
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
}

.chart-area-income {
    fill: rgba(78, 173, 116, 0.08);
}

.chart-path-expense {
    stroke: var(--secondary);
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
}

.chart-area-expense {
    fill: rgba(243, 94, 80, 0.08);
}

.chart-node {
    cursor: pointer;
    transition: transform 0.15s ease;
}

.chart-node:hover {
    transform: scale(1.3);
}

/* LEDGER / BUKU KAS TABLE */
.ledger-box {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 12px;
}

.ledger-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ledger-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 8px 8px 8px 30px;
    font-size: 11px;
    border-radius: var(--radius-sm);
    background-color: var(--bg-warm);
    border: 1px solid var(--border-color);
}

.filter-buttons {
    display: flex;
    gap: 4px;
}

.btn-filter {
    flex: 1;
    padding: 6px;
    font-size: 10px;
    font-weight: 600;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    color: var(--text-muted);
    background-color: var(--bg-warm);
}

.btn-filter.active {
    background-color: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
}

/* Responsive Table layout */
.ledger-list-wrapper {
    width: 100%;
    overflow-x: auto;
}

.ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    text-align: left;
}

.ledger-table th {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--primary);
    padding: 8px;
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.5px;
}

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

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

.source-badge {
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
}

.badge-income {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-expense {
    background-color: var(--danger-light);
    color: var(--danger);
}

.badge-source-wa {
    background-color: rgba(26, 52, 96, 0.05);
    color: var(--primary);
    border: 1px solid var(--border-color);
}

/* Mobile cards fallback for ledger table */
@media (max-width: 480px) {
    .ledger-table {
        display: none;
    }
    .ledger-mobile-cards {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    .ledger-mobile-card {
        background-color: var(--bg-warm);
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        padding: 10px;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }
    .mobile-card-row1 {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .mobile-card-title {
        font-weight: 700;
        font-size: 12px;
        color: var(--primary);
    }
    .mobile-card-amount {
        font-weight: 800;
        font-size: 12px;
    }
    .mobile-card-row2 {
        display: flex;
        justify-content: space-between;
        font-size: 9px;
        color: var(--text-muted);
    }
}

@media (min-width: 481px) {
    .ledger-mobile-cards {
        display: none;
    }
}

/* ==========================================================================
   TAB 4: STUDENT DATABASE & RECURRING BILLING CRUD
   ========================================================================== */
.btn-add-student {
    background-color: var(--primary);
    color: var(--text-white);
    padding: 6px 12px;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-add-student:hover {
    background-color: var(--primary-light);
}

.btn-add-student i {
    width: 12px;
    height: 12px;
}

/* TANGGAL 5 REMINDERS QUEUE BOX */
.reminders-queue-box {
    background-color: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 16px;
    animation: shake 0.5s ease;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(26, 52, 96, 0.08);
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.queue-title {
    font-size: 11px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
}

.queue-title i {
    width: 16px;
    height: 16px;
    color: var(--secondary);
    animation: pulse 1.5s infinite;
}

.btn-send-all-reminders {
    background-color: var(--secondary);
    color: var(--text-white);
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-send-all-reminders i {
    width: 11px;
    height: 11px;
}

.queue-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 150px;
    overflow-y: auto;
}

.queue-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
}

.queue-item-name {
    font-weight: 700;
    color: var(--primary);
}

.queue-item-amount {
    color: var(--secondary);
    font-weight: 700;
}

.btn-send-single-reminder {
    background-color: rgba(243, 94, 80, 0.08);
    color: var(--secondary);
    padding: 3px 6px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 9px;
}

.btn-send-single-reminder:hover {
    background-color: var(--secondary);
    color: var(--text-white);
}

/* STUDENTS CARDS GRID */
.students-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.student-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.student-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-light);
}

.student-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-round);
    background-color: var(--accent-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    border: 2px solid var(--accent);
}

.student-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.student-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.student-name {
    font-weight: 700;
    font-size: 13px;
    color: var(--primary);
}

.student-parent {
    font-size: 10px;
    color: var(--text-muted);
}

.student-status-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 4px;
}

.status-badge {
    font-size: 8px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    text-transform: uppercase;
}

.status-badge.status-lunas {
    background-color: var(--success-light);
    color: var(--success);
}

.status-badge.status-parsial {
    background-color: var(--warning-light);
    color: var(--secondary);
    border: 1px solid var(--warning);
}

.status-badge.status-tunggak {
    background-color: var(--danger-light);
    color: var(--danger);
}

.btn-card-action {
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-card-action i {
    width: 18px;
    height: 18px;
}

/* Student Billing Sheet Modals */
.billing-summary-block {
    background-color: var(--bg-warm);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.billing-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.billing-list-header h4 {
    font-size: 12px;
    color: var(--primary);
}

.btn-add-bill-item {
    background-color: transparent;
    border: 1px solid var(--secondary);
    color: var(--secondary);
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Specific Modal height fix to prevent flex collapse on mobile screens */
#student-billing-detail-modal {
    height: 75%;
}

.student-billing-table-wrapper {
    width: 100%;
    overflow-x: auto;
    min-height: 180px;
    margin-bottom: 16px;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    -webkit-overflow-scrolling: touch; /* Smooth horizontal momentum scroll on iOS */
}

.student-billing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    text-align: left;
}

.student-billing-table th {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    padding: 12px 10px;
    border-bottom: 2px solid var(--border-color);
    color: var(--primary);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.student-billing-table td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    vertical-align: middle;
    color: var(--text-main);
}

.btn-delete-bill {
    color: var(--danger);
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.btn-delete-bill:hover {
    background-color: var(--danger-light);
}

.btn-delete-bill i {
    width: 14px;
    height: 14px;
}

/* ==========================================================================
   TAB 5: FINANCIAL REPORTS ZONE
   ========================================================================== */
.reports-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.report-export-buttons {
    display: flex;
    gap: 6px;
}

.btn-share-report {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-share-report:hover {
    background-color: rgba(26, 52, 96, 0.05);
}

.btn-print-report {
    background-color: var(--secondary);
    color: var(--text-white);
    padding: 6px 10px;
    font-size: 10px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-print-report:hover {
    background-color: var(--secondary-hover);
}

.btn-print-report i, .btn-share-report i {
    width: 12px;
    height: 12px;
}

.period-selector-row {
    display: flex;
    background-color: rgba(26, 52, 96, 0.05);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: 16px;
}

.btn-period {
    flex: 1;
    text-align: center;
    padding: 6px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: 6px;
}

.btn-period.active {
    background-color: var(--primary);
    color: var(--text-white);
}

/* Report Recap Card Block */
.report-recap-block {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    padding: 16px;
}

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

.recap-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 12px;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.recap-date-range {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.recap-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.recap-metric-box {
    background-color: var(--bg-warm);
    border-radius: var(--radius-sm);
    padding: 10px;
    border-left: 3px solid var(--primary);
}

.recap-metric-box.text-coral {
    border-left-color: var(--secondary);
}

.recap-metric-box.text-green {
    border-left-color: var(--success);
}

.recap-box-label {
    font-size: 8px;
    font-weight: 700;
    color: var(--text-muted);
    display: block;
    margin-bottom: 2px;
}

.recap-box-val {
    font-size: 15px;
    font-weight: 800;
}

.report-details-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-column {
    display: flex;
    flex-direction: column;
}

.column-title {
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4px;
    text-transform: uppercase;
}

.column-title i {
    width: 12px;
    height: 12px;
    color: var(--secondary);
}

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

.report-cat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.report-cat-name {
    font-weight: 500;
    color: var(--text-main);
}

.report-cat-bar-wrapper {
    flex: 1;
    margin: 0 12px;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.report-cat-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: var(--secondary);
    border-radius: 3px;
}

.report-cat-val {
    font-weight: 700;
    color: var(--primary);
}

.student-spp-compliance-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.compliance-item {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    padding: 4px 0;
    border-bottom: 1px dashed var(--border-color);
}

.compliance-name {
    font-weight: 600;
}

.compliance-amount {
    color: var(--danger);
    font-weight: 700;
}

.print-table-container {
    display: none;
}

/* ==========================================================================
   PAPERLESS DIGITAL RECEIPT STYLES (MODAL POPUP)
   ========================================================================== */
.receipt-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 52, 96, 0.7);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.receipt-card {
    background-color: #FFFFFF;
    border-radius: var(--radius-lg);
    box-shadow: 0px 20px 50px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
}

.receipt-content-area {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    background-color: #FAFAFA;
}

.receipt-header-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.receipt-logo {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: var(--accent);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.receipt-logo i {
    width: 24px;
    height: 24px;
}

.receipt-daycare-info h3 {
    font-size: 14px;
    line-height: 1.2;
}

.receipt-daycare-info p {
    font-size: 8px;
    color: var(--text-muted);
}

.receipt-divider {
    border: none;
    border-top: 2px dashed var(--border-color);
    margin: 12px 0;
}

.receipt-main-title {
    font-size: 16px;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.receipt-number-row {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.receipt-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.receipt-field {
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 4px;
}

.receipt-field.full-width {
    grid-column: 1 / -1;
}

.field-label {
    font-size: 8px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.field-val {
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
}

.amount-spelled {
    font-style: italic;
    color: var(--text-muted);
    font-size: 10px;
}

.receipt-amount-display-row {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.receipt-total-box {
    flex: 1;
    background-color: var(--primary);
    color: var(--text-white);
    padding: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
}

.receipt-total-box .box-label {
    font-size: 8px;
    opacity: 0.8;
}

.receipt-total-box .box-val {
    font-size: 16px;
    font-weight: 800;
    color: var(--accent);
}

.receipt-status-badge-box {
    width: 100px;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--card-bg);
}

.receipt-status-badge-box .box-label {
    font-size: 8px;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.badge-status-receipt {
    font-size: 11px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
    text-align: center;
}

.badge-status-receipt.success {
    background-color: var(--success-light);
    color: var(--success);
}

.badge-status-receipt.warning {
    background-color: var(--warning-light);
    color: var(--secondary);
    border: 1px solid var(--warning);
}

.receipt-footer-notes {
    font-size: 9px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    line-height: 1.3;
}

.receipt-signature-row {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.signature-block {
    text-align: center;
    font-size: 9px;
    width: 120px;
}

.sig-space {
    height: 40px;
}

.sig-name {
    font-weight: 700;
    border-top: 1px solid var(--text-main);
    padding-top: 2px;
    display: block;
}

.receipt-actions-row {
    padding: 12px 20px;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

.receipt-actions-row button {
    flex: 1;
    padding: 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes slideUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes laserScan {
    0% { top: 0%; }
    50% { top: calc(100% - 4px); }
    100% { top: 0%; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes wobble {
    0% { transform: rotate(-8deg); }
    100% { transform: rotate(8deg); }
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.hidden {
    display: none !important;
}

/* ==========================================================================
   PRINT LAYOUT STYLES (@media print)
   ========================================================================== */
@media print {
    /* Set page setup to portrait A4 */
    @page {
        size: A4 portrait;
        margin: 1.5cm;
    }
    
    body {
        background-color: #FFFFFF !important;
        color: #000000 !important;
        font-size: 11px;
    }
    
    /* Hide all emulator frames and app controls */
    body, html {
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }
    
    /* If running inside Desktop frame emulator, unwrap it */
    .app-container {
        width: 100% !important;
        height: auto !important;
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        position: static !important;
        overflow: visible !important;
        display: block !important;
    }
    
    /* Hide layout controls, simulator date, footer nav, buttons */
    .app-header, 
    .app-nav-bar, 
    .guided-flow-bar, 
    .demo-gallery-container, 
    .chat-input-bar, 
    .alert-banner,
    .btn-sim-today, 
    .date-simulator-card,
    .section-desc,
    .period-selector-row,
    .report-export-buttons,
    #tab-chat,
    #tab-review,
    #tab-dashboard,
    #tab-students,
    .receipt-actions-row {
        display: none !important;
    }
    
    /* Force Reports Tab to be visible during report print */
    #tab-reports {
        display: block !important;
        visibility: visible !important;
        position: static !important;
    }
    
    .report-recap-block {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        background: transparent !important;
    }
    
    .recap-metrics {
        grid-template-columns: 1fr 1fr 1fr !important;
        gap: 12px !important;
        margin-bottom: 24px !important;
    }
    
    .recap-metric-box {
        border: 1px solid #000000 !important;
        background-color: #FAFAFA !important;
        padding: 12px !important;
    }
    
    .report-details-row {
        flex-direction: row !important;
        gap: 20px !important;
        margin-bottom: 24px !important;
    }
    
    .report-column {
        flex: 1 !important;
    }
    
    .report-cat-bar-wrapper {
        border: 1px solid #999999 !important;
        background-color: #FFFFFF !important;
    }
    
    .report-cat-bar {
        background-color: #000000 !important;
    }
    
    /* Show formal ledger list during printing */
    .print-table-container {
        display: block !important;
        margin-top: 24px !important;
        page-break-inside: avoid;
    }
    
    .print-ledger-table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 10px;
    }
    
    .print-ledger-table th, .print-ledger-table td {
        border: 1px solid #000000;
        padding: 6px 8px;
        text-align: left;
        font-size: 10px;
    }
    
    .print-ledger-table th {
        background-color: #F0F0F0;
        font-weight: 700;
    }
    
    /* PRINT RECEIPT OVERLAY SPECIFIC STYLES */
    .receipt-dialog-overlay {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        background-color: #FFFFFF !important;
        width: 100% !important;
        height: auto !important;
        z-index: 1000 !important;
        display: block !important;
        padding: 0 !important;
        backdrop-filter: none !important;
    }
    
    .receipt-card {
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        max-width: 100% !important;
        max-height: 100% !important;
        background: transparent !important;
    }
    
    .receipt-content-area {
        padding: 0 !important;
        background: #FFFFFF !important;
    }
    
    .receipt-total-box {
        border: 1px solid #000000 !important;
        background-color: #F0F0F0 !important;
        color: #000000 !important;
    }
    
    .receipt-total-box .box-val {
        color: #000000 !important;
    }
}

/* ==========================================================================
   SUPERADMIN AUTHENTICATION GATED MODAL STYLES (v1.5.0)
   ========================================================================== */
.superadmin-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 52, 96, 0.4);
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px); /* Safari support */
    animation: fadeIn 0.3s ease;
}

.auth-card {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-lg);
    box-shadow: 0px 20px 50px rgba(26, 52, 96, 0.15);
    width: 100%;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    padding: 24px;
    position: relative;
    animation: slideUp 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.lock-shield-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(243, 94, 80, 0.1);
    color: var(--secondary);
    border-radius: var(--radius-round);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px auto;
}

.lock-shield-icon i {
    width: 26px;
    height: 26px;
}

.auth-header h3 {
    font-size: 16px;
    font-family: 'Outfit', sans-serif;
    color: var(--primary);
    margin-bottom: 4px;
}

.auth-header p {
    font-size: 11px;
    color: var(--text-muted);
}

.auth-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.auth-error-msg {
    background-color: var(--danger-light);
    color: var(--danger);
    font-size: 10px;
    font-weight: 700;
    padding: 8px;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid rgba(229, 80, 80, 0.15);
    animation: shake 0.3s ease;
}

.auth-footer {
    display: flex;
    gap: 8px;
}

.auth-footer button {
    flex: 1;
    padding: 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-align: center;
    transition: var(--transition-fast);
}

/* Nav lock icons styles */
.nav-lock-icon {
    color: var(--text-muted);
    opacity: 0.6;
}

.active-nav .nav-lock-icon {
    color: var(--secondary);
    opacity: 1;
}

/* CSS Shake animation keyframes for incorrect inputs */
.shake-element {
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
    20%, 40%, 60%, 80% { transform: translateX(6px); }
}
