/* Tokyo Night Premium Dark Mode Design System */

:root {
    --bg-color: #1a1b26;
    --card-bg: #24283c;
    --sidebar-bg: #16161e;
    --input-bg: #1f2335;
    
    --text-primary: #c0caf5;
    --text-muted: #7982a9;
    --text-bright: #ffffff;
    
    --accent-primary: #7aa2f7;
    --accent-secondary: #bb9af3;
    --accent-gradient: linear-gradient(135deg, #7aa2f7 0%, #bb9af3 100%);
    --accent-hover-gradient: linear-gradient(135deg, #8baef8 0%, #c5a8f5 100%);
    
    --success-color: #9ece6a;
    --success-bg: rgba(158, 206, 106, 0.15);
    
    --warning-color: #e0af68;
    --warning-bg: rgba(224, 175, 104, 0.15);
    
    --error-color: #f7768e;
    --error-bg: rgba(247, 118, 142, 0.15);
    
    --border-color: #383e5a;
    --border-focus: #7aa2f7;
    
    --font-stack: 'Outfit', 'Sarabun', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-stack);
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#app-container {
    width: 100%;
    height: 100%;
    position: relative;
}

/* ==================== BUTTONS ==================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
    outline: none;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #1a1b26;
    box-shadow: 0 4px 15px rgba(122, 162, 247, 0.3);
}

.btn-primary:hover {
    background: var(--accent-hover-gradient);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(122, 162, 247, 0.4);
}

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

.btn-success {
    background-color: var(--success-color);
    color: #16161e;
    box-shadow: 0 4px 12px rgba(158, 206, 106, 0.25);
}

.btn-success:hover {
    background-color: #aedf7b;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(158, 206, 106, 0.35);
}

.btn-secondary {
    background-color: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #2e344f;
    border-color: var(--text-muted);
}

.btn-text {
    background: transparent;
    color: var(--text-muted);
}

.btn-text:hover {
    color: var(--text-primary);
}

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

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ==================== FORMS ==================== */

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.form-group label {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.form-group input, 
.form-group select,
.form-group textarea {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--input-bg);
    color: var(--text-bright);
    font-family: var(--font-stack);
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus, 
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--border-focus);
    background-color: var(--input-focus-bg, #20243c);
    box-shadow: 0 0 0 3px rgba(122, 162, 247, 0.15);
}

.form-group input::placeholder {
    color: #565f89;
}

.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 10px 0;
}

/* ==================== VIEW LAYOUTS ==================== */

.view-panel {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

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

.hidden {
    display: none !important;
}

/* ==================== AUTHENTICATION VIEW ==================== */

#view-auth {
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1f2335 0%, #1a1b26 100%);
}

.auth-card {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.auth-toggle {
    display: flex;
    background-color: var(--input-bg);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 30px;
}

.auth-toggle-btn {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    font-family: var(--font-stack);
    font-weight: 600;
    color: var(--text-muted);
    border-radius: 6px;
    transition: var(--transition-smooth);
}

.auth-toggle-btn.active {
    background-color: var(--card-bg);
    color: var(--text-bright);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

.auth-header h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 1.5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

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

.auth-actions {
    margin-top: 15px;
}

.auth-actions button {
    width: 100%;
    padding: 12px;
    font-size: 15px;
}

/* ==================== MAIN VIEW & SIDEBAR ==================== */

#view-main {
    flex-direction: row;
}

.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 25px 0;
}

.sidebar-logo {
    padding: 0 24px;
    margin-bottom: 35px;
}

.sidebar-logo h2 {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-bright);
    margin-bottom: 6px;
}

.sidebar-logo span {
    display: block;
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 6px;
}

.nav-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 13px 24px;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-stack);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
}

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

.nav-btn.active {
    background-color: rgba(122, 162, 247, 0.08);
    color: var(--accent-primary);
    border-left: 4px solid var(--accent-primary);
    padding-left: 20px;
    font-weight: 600;
}

.logout-btn {
    color: var(--error-color);
}

.logout-btn:hover {
    background-color: rgba(247, 118, 142, 0.08);
    color: var(--error-color);
}

/* ==================== CONTENT FRAME ==================== */

.content-frame {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: var(--bg-color);
    overflow-y: auto;
    overflow-x: hidden;
}

.tab-panel {
    display: none;
    width: 100%;
    min-height: 100%;
    height: auto;
    flex-direction: column;
    padding: 20px 28px;
    box-sizing: border-box;
}

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

.tab-header {
    margin-bottom: 14px;
}

.tab-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-bright);
}

.workspace-layout {
    display: flex;
    flex: 1;
    gap: 24px;
    min-height: 0; /* Enable inner overflow scrolling */
}

/* Left Panel */
.left-panel {
    width: 320px;
    background-color: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.left-panel h3 {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-bright);
}

/* Right Panel */
.right-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background-color: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 24px;
}

/* ==================== WORKSPACE INNER PANELS ==================== */

.info-card {
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.6;
}

.info-card div {
    font-weight: 600;
}

#lbl-limit-info {
    color: var(--warning-color);
}

#lbl-payout-info {
    color: var(--success-color);
    margin-top: 4px;
}

.cart-header-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.cart-header-summary h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-bright);
}

#lbl-cart-total {
    font-size: 16px;
    font-weight: 700;
    color: var(--success-color);
}

/* ==================== TABLE DESIGN ==================== */

.table-container {
    flex: 1;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--input-bg);
    margin-bottom: 20px;
    min-height: 180px;
}

.full-width-table {
    min-height: 400px;
}

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

.lotto-table th {
    background-color: #1e2030;
    color: var(--text-bright);
    font-weight: 600;
    padding: 10px 14px;
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--border-color);
    z-index: 5;
    letter-spacing: 0.5px;
}

.lotto-table td {
    padding: 8px 14px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.lotto-table tr {
    transition: var(--transition-smooth);
}

.lotto-table tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

.lotto-table tr.selected td {
    background-color: rgba(122, 162, 247, 0.1);
    font-weight: 600;
    color: var(--text-bright);
}

/* ==================== BADGES ==================== */

.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.badge-role {
    background-color: var(--border-color);
    color: var(--text-bright);
    margin-top: 8px;
    display: inline-block;
}

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

.badge-unpaid {
    background-color: var(--error-bg);
    color: var(--error-color);
}

.badge-status-open {
    background-color: var(--success-bg);
    color: var(--success-color);
}

.badge-status-closed {
    background-color: var(--warning-bg);
    color: var(--warning-color);
}

.badge-status-completed {
    background-color: rgba(122, 162, 247, 0.15);
    color: var(--accent-primary);
}

.badge-status-draft {
    background-color: var(--border-color);
    color: var(--text-muted);
}

/* ==================== SWITCH / TOGGLE ==================== */

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #383e5a;
    transition: .3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--success-color);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* ==================== BILL DETAILS PANEL ==================== */

.bill-details-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.bill-details-header h3 {
    font-size: 18px;
    color: var(--text-bright);
}

.bill-details-header p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.bill-details-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.bill-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: var(--text-bright);
}

.text-win {
    color: var(--success-color);
}

.text-lose {
    color: var(--error-color);
}

.payment-instruction {
    font-size: 12.5px;
    color: var(--warning-color);
    margin-top: 12px;
    font-style: italic;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--text-muted);
    font-size: 14px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
}

/* ==================== MODAL DIALOGS ==================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: var(--transition-smooth);
}

.modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

.modal-header h2 {
    font-size: 17px;
    color: var(--text-bright);
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-close-modal:hover {
    color: var(--error-color);
}

.modal-body {
    padding: 24px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 18px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==================== WORKSPACE FOOTER AND MISC ==================== */

.workspace-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
}

.footer-actions {
    display: flex;
    gap: 12px;
}

.workspace-centered {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex: 1;
    width: 100%;
    padding: 10px 0 50px 0;
}

.settings-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 680px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.settings-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.settings-actions button {
    flex: 1;
}

.status-indicator {
    font-size: 13.5px;
    font-weight: 600;
}

.status-msg {
    margin-top: 18px;
    font-size: 13.5px;
    font-weight: 600;
    text-align: center;
}

.error-msg {
    color: var(--error-color);
}

.success-msg {
    color: var(--success-color);
}

.info-msg {
    color: var(--accent-primary);
}

.customer-list-container {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.listbox {
    list-style: none;
}

.listbox li {
    padding: 12px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13.5px;
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.listbox li:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.listbox li.selected {
    background-color: rgba(122, 162, 247, 0.15);
    color: var(--text-bright);
    font-weight: 600;
    border-left: 3px solid var(--accent-primary);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ==================== LOGOS ==================== */
.app-logo {
    width: 130px;
    height: 130px;
    object-fit: contain;
    margin: 0 auto 15px auto;
    display: block;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(224, 175, 104, 0.4);
    border: 3px solid var(--warning-color);
}

.sidebar-app-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto 15px auto;
    display: block;
    border-radius: 50%;
    box-shadow: 0 8px 25px rgba(224, 175, 104, 0.4);
    border: 3px solid var(--warning-color);
}

.mobile-app-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 10px;
    border-radius: 50%;
    border: 1px solid var(--warning-color);
}

.menu-app-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
    vertical-align: middle;
    margin-right: 8px;
    border-radius: 50%;
}

/* ==================== RESPONSIVE DESIGN (MOBILE FRIENDLY) ==================== */

@media (max-width: 768px) {
    body {
        overflow-y: auto !important;
        height: auto !important;
        width: 100% !important;
    }
    
    #app-container {
        height: auto;
        min-height: 100vh;
    }
    
    #view-main {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        position: relative;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -260px;
        width: 250px;
        height: 100vh;
        z-index: 1000;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
    }
    
    .sidebar.open {
        transform: translateX(260px);
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        backdrop-filter: blur(2px);
        display: none;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .mobile-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 12px 20px;
        background-color: var(--sidebar-bg);
        border-bottom: 1px solid var(--border-color);
        position: sticky;
        top: 0;
        z-index: 100;
        height: 56px;
    }
    
    .mobile-menu-toggle {
        background: transparent;
        border: none;
        color: var(--text-bright);
        font-size: 24px;
        cursor: pointer;
        padding: 4px 8px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-header-title {
        font-size: 16px;
        font-weight: 700;
        letter-spacing: 1px;
        background: var(--accent-gradient);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .content-frame {
        height: auto;
        min-height: calc(100vh - 56px);
        overflow-y: visible;
    }
    
    .tab-panel {
        padding: 16px;
        height: auto;
        overflow-y: visible;
    }
    
    .tab-header {
        margin-bottom: 18px;
    }
    
    .tab-header h1 {
        font-size: 20px;
    }
    
    .workspace-layout {
        flex-direction: column;
        gap: 16px;
        height: auto;
        overflow: visible;
    }
    
    .left-panel {
        width: 100%;
        height: auto;
        flex: none;
    }
    
    .right-panel {
        width: 100%;
        height: auto;
        flex: none;
        margin-top: 0;
        padding: 16px;
    }
    
    .table-container {
        overflow-x: auto;
        overflow-y: auto;
        min-height: 150px;
    }
    
    .lotto-table {
        min-width: 600px;
    }
    
    /* Auth Form adjustments */
    .auth-card {
        padding: 24px 16px;
        width: 92%;
        margin: 20px auto;
    }
    
    .auth-header h2 {
        font-size: 22px;
    }
    
    /* Adjust specific layouts like Dashboard grid or bill details */
    .bill-details-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .bill-actions-btn-group {
        width: 100%;
    }
    
    .bill-actions-btn-group button {
        width: 100%;
    }
    
    .bill-summary-row {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
}

/* Flatpickr 24-Hour Custom Tokyo Night Styling */
.flatpickr-calendar {
    background: #1f2335 !important;
    border: 1px solid rgba(122, 162, 247, 0.3) !important;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6) !important;
    border-radius: 12px !important;
    font-family: 'Sarabun', 'Outfit', sans-serif !important;
}
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
    background: #7aa2f7 !important;
    border-color: #7aa2f7 !important;
    color: #15161e !important;
    font-weight: bold !important;
}
.flatpickr-day:hover {
    background: rgba(122, 162, 247, 0.2) !important;
}
.flatpickr-time {
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.flatpickr-time input {
    color: #7aa2f7 !important;
    font-weight: bold !important;
    font-size: 1.2em !important;
}
.flatpickr-time input:hover, .flatpickr-time input:focus {
    background: rgba(122, 162, 247, 0.15) !important;
}
.flatpickr-time .flatpickr-time-separator {
    color: #7aa2f7 !important;
    font-weight: bold !important;
}

/* Round Payouts Display (Tokyo Night style) */
.round-payouts-container {
    background-color: rgba(36, 40, 60, 0.45);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 10px;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
}

.payout-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.payout-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 6px;
}

.payout-item {
    background-color: var(--input-bg);
    border: 1px solid rgba(56, 62, 90, 0.5);
    border-radius: 6px;
    padding: 3px 8px;
    min-height: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-smooth);
}

.payout-item:hover {
    border-color: var(--border-focus);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.payout-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.payout-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--success-color);
}

/* === Elderly Mode Overrides === */
body.elderly-mode {
    --bg-color: #f7f7f3; /* Off-white cream */
    --card-bg: #faf8f5; /* Light cream */
    --sidebar-bg: #eae6df; /* Warm gray */
    --input-bg: #ffffff; /* Pure white */
    --input-focus-bg: #ffffff; /* Pure white on focus */
    
    --text-primary: #111111; /* Dark charcoal */
    --text-muted: #444444; 
    --text-bright: #000000;
    
    --accent-primary: #d35400; /* Dark orange */
    --accent-secondary: #c0392b; /* Dark red */
    --accent-gradient: linear-gradient(135deg, #d35400 0%, #c0392b 100%);
    --accent-hover-gradient: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
    
    --success-color: #27ae60;
    --success-bg: rgba(39, 174, 96, 0.15);
    
    --warning-color: #d35400;
    --border-color: #b3b3b3;
    --border-focus: #d35400;
}

body.elderly-mode select option {
    background-color: #ffffff !important;
    color: #111111 !important;
}

/* === Slip Upload & Lightbox Preview === */
.bill-slip-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.bill-slip-section h4 {
    margin: 0 0 12px 0;
    font-size: 0.95em;
    color: var(--text-bright);
}

.slip-container {
    margin-bottom: 12px;
}

.slip-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
}

.slip-img-preview {
    width: 90px;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid var(--accent-primary);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.slip-img-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.slip-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.no-slip-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
}

.no-slip-box p {
    margin: 0;
    font-size: 0.9em;
}

.slip-upload-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.slip-status-text {
    font-size: 0.85em;
    font-weight: 500;
}

/* Modal Image Lightbox */
.modal-img-content {
    max-width: 650px !important;
    background: #181b20 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 16px !important;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 16px;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
}

.modal-close:hover {
    color: var(--error-color);
}

/* Discount Styles */
.text-discount {
    color: #ff9e64;
    font-weight: 600;
}

.payout-discount-tag {
    display: inline-block;
    background: rgba(255, 158, 100, 0.15);
    color: #ff9e64;
    border: 1px solid rgba(255, 158, 100, 0.4);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.8em;
    font-weight: 600;
    margin-left: 4px;
}



