/* ============================================
   CHAMAEASE - MASTER STYLESHEET
   Shared across all pages
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, 'Roboto', sans-serif;
}

body {
    background: #f4f7fb;
    color: #1e2a3e;
}

:root {
    --primary: #b6552a;
    --primary-light: #fbeee2;
    --primary-dark: #963f1d;
    --primary-accent: #e0935b;
    --danger: #dc4c4c;
    --warning: #f59e0b;
    --info: #3b82f6;
    --gray-border: #e2e8f0;
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --radius-card: 16px;
    --radius-btn: 32px;
    --sidebar-width: 280px;
    --sidebar-width-mobile: 260px;
}

/* Dark Theme Support */
body.dark-theme {
    background: #1a1a2e;
    color: #e2e8f0;
}

body.dark-theme .sidebar,
body.dark-theme .card,
body.dark-theme .top-bar,
body.dark-theme .stat-card,
body.dark-theme .spreadsheet-container {
    background: #16213e;
    border-color: #2d3748;
}

body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea {
    background: #0f3460;
    border-color: #2d3748;
    color: #e2e8f0;
}

body.dark-theme .spreadsheet-table th {
    background: #0f3460;
}

body.dark-theme .member-name-cell {
    background: #0f3460;
}

body.dark-theme .totals-row {
    background: #0a1628;
}

/* App Wrapper */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--gray-border);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transform: translateX(0);
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-logo {
    font-weight: 800;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #94a3b8;
    display: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
}

.sidebar-close:hover {
    background: #fee2e2;
    color: var(--danger);
}

.sidebar-nav {
    padding: 0.8rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.7rem 1rem;
    margin: 0.2rem 0.8rem;
    border-radius: 12px;
    text-decoration: none;
    color: #4a5568;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-item:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-item.active {
    background: var(--primary);
    color: white;
}

.nav-item .icon {
    font-size: 1.1rem;
    width: 26px;
    text-align: center;
}

.nav-item .label {
    font-weight: 500;
    font-size: 0.85rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s ease;
    width: calc(100% - var(--sidebar-width));
}

/* Top Bar */
.top-bar {
    background: white;
    padding: 0.7rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 99;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--primary);
    padding: 6px;
    border-radius: 50%;
}

.page-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e2a3e;
}

body.dark-theme .page-title {
    color: #e2e8f0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.user-email {
    font-size: 0.7rem;
    color: #5b6e8c;
    display: none;
}

@media (min-width: 480px) {
    .user-email {
        display: inline;
    }
}

.logout-btn {
    background: transparent;
    border: 1px solid #dc2626;
    color: #dc2626;
    padding: 0.35rem 0.7rem;
    border-radius: 2rem;
    cursor: pointer;
    font-size: 0.7rem;
}

.logout-btn:hover {
    background: #dc2626;
    color: white;
}

/* Header quick-access shortcuts to the most-used pages.
   Hidden on narrow phones (the sidebar already covers navigation
   there) and shown once there's room, from tablet width up. */
.header-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.header-quicklinks {
    display: none;
    align-items: center;
    gap: 6px;
}

@media (min-width: 768px) {
    .header-quicklinks {
        display: flex;
    }
}

.quicklink-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.2s;
}

.quicklink-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

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

body.dark-theme .quicklink-btn {
    background: #0f3460;
}

/* Container */
.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
    min-height: 70vh;
}

/* Buttons */
.btn {
    border: none;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-btn);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.75rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

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

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-light);
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.65rem;
}

.btn-danger {
    background: var(--danger);
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--gray-border);
}

/* Spreadsheet Table - Mobile Responsive */
.spreadsheet-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--gray-border);
    background: white;
    -webkit-overflow-scrolling: touch;
}

.spreadsheet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    min-width: 700px;
}

.spreadsheet-table th,
.spreadsheet-table td {
    border: 1px solid var(--gray-border);
    padding: 12px 10px;
    text-align: left;
    vertical-align: middle;
}

.spreadsheet-table th {
    background: #f8fafc;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.spreadsheet-table td input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.85rem;
    background: transparent;
}

.spreadsheet-table td input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 2px rgba(182, 85, 42, 0.1);
}

.member-name-cell {
    font-weight: 600;
    background: #f8fafc;
    position: sticky;
    left: 0;
    background: white;
    z-index: 5;
}

.totals-row {
    background: #f1f5f9;
    font-weight: 600;
}

.totals-row td {
    border-top: 2px solid var(--primary);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.action-buttons .btn,
.action-buttons .btn-outline {
    padding: 10px 18px;
    font-size: 0.85rem;
}

/* Month/Year Selector */
.month-year-selector {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.month-year-selector select {
    padding: 0.6rem 1rem;
    border-radius: 40px;
    border: 1px solid var(--gray-border);
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Save Button */
.save-all-btn {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

.save-all-btn:hover {
    background: var(--primary-dark);
}

.save-all-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.saving-indicator {
    font-size: 0.75rem;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 1rem;
}

.saving {
    color: var(--primary);
}

/* Footer */
footer {
    text-align: center;
    padding: 0.8rem;
    font-size: 0.65rem;
    color: #6c757d;
    border-top: 1px solid var(--gray-border);
    margin-top: 1rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

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

/* Toast Notification */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 12px 20px;
    border-radius: 40px;
    font-size: 0.85rem;
    z-index: 10000;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-md);
}

.toast-notification.error {
    background: var(--danger);
}

.toast-notification.warning {
    background: var(--warning);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0.8rem;
    }
    
    .spreadsheet-table th,
    .spreadsheet-table td {
        padding: 10px 8px;
        font-size: 0.75rem;
    }
    
    .spreadsheet-table td input {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width-mobile);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar-close {
        display: flex;
    }
    
    .container {
        padding: 0.6rem;
    }
    
    .action-buttons {
        gap: 8px;
    }
    
    .action-buttons .btn,
    .action-buttons .btn-outline {
        padding: 8px 14px;
        font-size: 0.75rem;
    }
    
    .month-year-selector select {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .spreadsheet-table {
        min-width: 600px;
        font-size: 0.7rem;
    }
    
    .spreadsheet-table th,
    .spreadsheet-table td {
        padding: 8px 6px;
    }
    
    .spreadsheet-table td input {
        padding: 5px 6px;
        font-size: 0.7rem;
    }
    
    .member-name-cell {
        position: sticky;
        left: 0;
        background: white;
    }
    
    .page-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn,
    .action-buttons .btn-outline {
        width: 100%;
        text-align: center;
    }
    
    .month-year-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .month-year-selector select {
        width: 100%;
    }
    
    .saving-indicator {
        margin-left: 0;
        text-align: center;
    }
    
    .save-all-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================
   SHARED COMPONENTS (consolidated from per-page
   inline styles so every page looks/behaves the
   same way)
   ============================================ */

/* Stat Cards (dashboard, settings overview, etc.) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--gray-border);
    transition: all 0.2s;
}

body.dark-theme .stat-card {
    background: #16213e;
    border-color: #2d3748;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    overflow-wrap: break-word;
}

@media (max-width: 480px) {
    .stat-value {
        font-size: 1.15rem;
    }
}

.stat-label {
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-small {
    font-size: 0.65rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: white;
    border-radius: 20px;
    border: 1px solid var(--gray-border);
}

body.dark-theme .empty-state {
    background: #16213e;
    border-color: #2d3748;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

/* Rich Form Modal (add/edit dialogs) */
.modal-modern {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    backdrop-filter: blur(4px);
    padding: 1rem;
}

.modal-content-modern {
    background: white;
    border-radius: 28px;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

body.dark-theme .modal-content-modern {
    background: #16213e;
    color: #e2e8f0;
}

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

.modal-header-modern {
    padding: 1.2rem;
    border-bottom: 1px solid var(--gray-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: inherit;
    z-index: 10;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background: #fee2e2;
    color: var(--danger);
}

.modal-body {
    padding: 1.2rem;
}

.modal-footer {
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--gray-border);
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: flex-end;
}

/* Simple Confirm Modal (e.g. destructive-action confirmation) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 1rem;
}

.modal-box {
    background: white;
    border-radius: var(--radius-card);
    padding: 1.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

body.dark-theme .modal-box {
    background: #16213e;
    color: #e2e8f0;
}

.modal-box-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.modal-box h3 {
    font-size: 1.1rem;
    margin-bottom: 0.6rem;
}

.modal-box p {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0.6rem;
    line-height: 1.4;
}

body.dark-theme .modal-box p {
    color: #94a3b8;
}

.modal-box-instruction {
    color: #1e2a3e !important;
    font-weight: 600;
}

body.dark-theme .modal-box-instruction {
    color: #e2e8f0 !important;
}

.modal-box-input {
    text-align: center;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.modal-box-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.modal-box-actions .btn {
    flex: 1;
    min-width: 120px;
}

.modal-box-actions .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Forms (shared across modals, settings, auth pages) */
.form-group-modern {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #1e2a3e;
}

body.dark-theme .form-label {
    color: #e2e8f0;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-border);
    border-radius: 16px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(182, 85, 42, 0.1);
}

.form-input:disabled {
    background: #f8fafc;
    cursor: not-allowed;
}

/* Toggle Switch */
.toggle-switch {
    width: 45px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 30px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
}

.toggle-switch.active {
    background: var(--primary);
}

.toggle-switch::after {
    content: '';
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 3px;
    transition: all 0.3s;
}

.toggle-switch.active::after {
    left: 22px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--gray-border);
    gap: 0.8rem;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-info h4 {
    font-size: 0.85rem;
    margin-bottom: 0.2rem;
}

.setting-info p {
    font-size: 0.7rem;
    color: #6c757d;
}

@media (max-width: 768px) {
    .setting-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Inline Alert Banners (auth pages, settings) */
.error-message {
    background: #fee2e2;
    color: #dc2626;
    padding: 0.8rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    text-align: center;
}

.success-message {
    background: #dff0e4;
    color: #2c7a4d;
    padding: 0.8rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    text-align: center;
}

.info-message {
    background: #e0f2fe;
    color: #0284c7;
    padding: 0.8rem;
    border-radius: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    text-align: center;
}

/* Auth pages (login, reset password) */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fbeee2 0%, #f3d9be 100%);
}

body.dark-theme .auth-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.auth-card-wrapper {
    max-width: 450px;
    width: 100%;
}

.auth-card {
    background: white;
    border-radius: 2rem;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-border);
}

@media (max-width: 640px) {
    .auth-card {
        padding: 1.5rem;
    }
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo h1 {
    font-size: 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-logo p {
    color: #5b6e8c;
    margin-top: 0.5rem;
}

.auth-form-group {
    margin-bottom: 1.5rem;
}

.auth-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1e2a3e;
}

.auth-form-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    border: 1px solid #cbd5e1;
    font-size: 1rem;
    transition: all 0.2s;
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(182, 85, 42, 0.1);
}

.auth-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 0.8rem;
    border: none;
    border-radius: 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}

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

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
    margin-right: 8px;
}

.auth-reset-link {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-border);
}

.auth-reset-link a {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.85rem;
}

.auth-reset-link a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.auth-back-link {
    text-align: center;
    margin-top: 1rem;
}

.auth-back-link a {
    color: var(--primary);
    text-decoration: none;
}

/* Reset-password/login modal (forgot password dialog) */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.auth-modal.active {
    display: flex;
}

.auth-modal-content {
    background: white;
    border-radius: 2rem;
    padding: 2rem;
    max-width: 450px;
    width: 100%;
    position: relative;
}

@media (max-width: 640px) {
    .auth-modal-content {
        padding: 1.5rem;
    }
}

.auth-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.auth-modal-header h2 {
    font-size: 1.5rem;
    color: #1e2a3e;
}

.auth-modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s;
}

.auth-modal-close:hover {
    color: #dc2626;
}

/* Scroll hint for wide tables on small screens */
.scroll-hint {
    display: none;
    text-align: center;
    font-size: 0.7rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .scroll-hint {
        display: block;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .top-bar,
    .action-buttons,
    .month-year-selector,
    .logout-btn,
    .menu-toggle,
    footer {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    
    .spreadsheet-container {
        overflow: visible !important;
    }
    
    .spreadsheet-table th,
    .spreadsheet-table td {
        border: 1px solid #000 !important;
    }
}
