:root {
    --bg-color: #0f172a;
    --sidebar-bg: rgba(30, 41, 59, 0.7);
    --glass-bg: rgba(30, 41, 59, 0.6);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --accent-neon: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), 
        radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--glass-border);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 0 2rem;
    margin-bottom: 3rem;
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent-neon);
}

.nav-links {
    list-style: none;
}

.nav-links li {
    padding: 1rem 2rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-links li:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.05);
}

.nav-links li.active {
    color: var(--accent-neon);
    border-left: 3px solid var(--accent-neon);
    background: rgba(6, 182, 212, 0.1);
}

/* Main Content */
.content {
    flex: 1;
    padding: 2rem 3rem;
    overflow-y: auto;
}

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

.header h1 {
    font-size: 2rem;
    font-weight: 800;
}

#month-picker {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    color-scheme: dark;
}

/* Views */
.view {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.active-view {
    display: block;
}

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

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* SMS Section */
.sms-section h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.sms-input-group {
    display: flex;
    gap: 1rem;
}

.sms-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 170px;
}

.sms-actions input[type="date"] {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-primary);
    padding: 0.75rem;
    font-family: inherit;
}

textarea {
    flex: 1;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    resize: none;
    outline: none;
    transition: border-color 0.3s;
}

textarea:focus {
    border-color: var(--accent-neon);
}

.lotte-import-panel {
    margin-top: 1rem;
    border-top: 1px solid var(--glass-border);
    padding-top: 1rem;
}

.lotte-import-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.lotte-import-header p {
    margin-top: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.lotte-import-table {
    min-width: 820px;
}

.lotte-import-table input[type="text"],
.lotte-import-table input[type="date"],
.lotte-import-table input[type="number"] {
    width: 100%;
    min-width: 90px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-primary);
    padding: 0.45rem 0.55rem;
}

.lotte-import-table .lotte-item {
    min-width: 150px;
}

.import-row-duplicate {
    opacity: 0.68;
}

.import-status {
    display: inline-flex;
    align-items: center;
    min-width: 48px;
    justify-content: center;
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 0.82rem;
}

.status-new {
    color: var(--accent-neon);
    background: rgba(16, 185, 129, 0.12);
}

.status-duplicate {
    color: var(--text-secondary);
    background: rgba(148, 163, 184, 0.12);
}

.lotte-import-failures {
    margin-top: 0.75rem;
    color: var(--warning);
    font-size: 0.9rem;
    line-height: 1.5;
}

button {
    background: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-2px);
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.card-blue {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(6, 182, 212, 0.2));
    border-left: 4px solid var(--accent-neon);
}

.summary-cards h4 {
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.summary-cards h2 {
    font-size: 2.5rem;
    font-weight: 800;
}

/* Charts */
.charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.chart-card {
    height: 380px;
    display: flex;
    flex-direction: column;
}
.chart-card h3 {
    margin-bottom: 1rem;
}
.chart-wrapper {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
}
.chart-wrapper canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Custom Calendar */
.custom-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.cal-title-text {
    font-size: 1.1rem;
    font-weight: 700;
}

.cal-nav-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-height: unset;
    padding: 0;
    transition: background 0.2s;
}

.cal-nav-btn:hover {
    background: rgba(6,182,212,0.15);
    border-color: var(--accent-neon);
    transform: none;
}

.custom-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-day-label {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    padding: 4px 0 8px;
}

.cal-day-label.sun { color: #f87171; }

.cal-day-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 6px 4px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
    border: 1.5px solid transparent;
    min-height: 52px;
}

.cal-day-cell:hover {
    background: rgba(255,255,255,0.05);
}

.cal-day-cell.today {
    background: rgba(6,182,212,0.18);
    color: var(--accent-neon);
    font-weight: 800;
}

.cal-day-cell.selected {
    border-color: var(--accent-neon);
    background: rgba(6,182,212,0.15);
}

.cal-day-cell.empty {
    cursor: default;
    pointer-events: none;
}

.cal-day-cell.sun-cell .cell-num { color: #f87171; }
.cal-day-cell.sat-cell .cell-num { color: #f87171; }

.cell-num {
    font-weight: 600;
    line-height: 1.3;
}

.cell-amt {
    font-size: 0.62rem;
    color: var(--accent-neon);
    margin-top: 2px;
    white-space: nowrap;
}

/* Calendar Slide Panel */
.cal-panel-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 490;
}

.cal-panel-backdrop.show {
    display: block;
}

.cal-slide-panel {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background: #1e293b;
    border-top: 1px solid rgba(6,182,212,0.3);
    border-radius: 20px 20px 0 0;
    padding: 0 1rem 1rem;
    transform: translateY(110%);
    transition: transform 0.32s cubic-bezier(0.32,0.72,0,1);
    z-index: 495;
    max-height: 55vh;
    overflow-y: auto;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
}

.cal-slide-panel.open {
    transform: translateY(0);
}

.cal-panel-handle {
    width: 36px;
    height: 4px;
    background: #334155;
    border-radius: 2px;
    margin: 10px auto 14px;
}

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

.cal-panel-date-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-neon);
}

.cal-panel-total-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.cal-panel-expense-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cal-panel-item {
    flex: 1;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cal-panel-cat {
    font-size: 0.7rem;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    padding: 2px 6px;
    color: var(--text-secondary);
}

.cal-panel-amt {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--accent-neon);
    white-space: nowrap;
}

.cal-panel-actions {
    display: flex;
    gap: 4px;
}

.cal-panel-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 1.2rem 0;
    font-size: 0.88rem;
}

.cal-panel-add-btn {
    width: 100%;
    margin-top: 12px;
    background: rgba(6,182,212,0.1);
    border: 1px solid rgba(6,182,212,0.3);
    color: var(--accent-neon);
    padding: 0.7rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
}

.cal-panel-add-btn:hover {
    background: rgba(6,182,212,0.2);
    transform: none;
}

@media (min-width: 769px) {
    .cal-slide-panel {
        bottom: 0;
    }
    .cal-day-cell {
        min-height: 64px;
        font-size: 0.9rem;
    }
    .cell-amt {
        font-size: 0.7rem;
    }
}

/* History Table */
.history-table {
    width: 100%;
    border-collapse: collapse;
}

.history-table th, .history-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.history-table th {
    color: var(--text-secondary);
    font-weight: 600;
    transition: color 0.2s ease;
}

.history-table th:hover {
    color: var(--text-primary);
}

.history-table th .sort-icon {
    font-size: 0.8rem;
    margin-left: 4px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.history-table th:hover .sort-icon {
    opacity: 1;
}

.history-table tr:hover {
    background: rgba(255,255,255,0.02);
}

.hidden {
    display: none !important;
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    width: 400px;
    max-width: 90%;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.form-group input {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 0.8rem;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent-neon);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
}
.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
}

/* Budget Card */
.card-budget {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(6, 182, 212, 0.2));
    border-left: 4px solid var(--success);
}
.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.budget-header h4 {
    color: var(--text-secondary);
    font-weight: 400;
}
.btn-small {
    background: rgba(255,255,255,0.1);
    padding: 4px 10px;
    font-size: 0.8rem;
    border-radius: 4px;
}
.progress-container {
    width: 100%;
    height: 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 5px;
    margin: 1rem 0 0.5rem;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: var(--success);
    width: 0%;
    transition: width 0.5s ease-out, background-color 0.3s;
}
.budget-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Category List */
.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}
.category-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.category-item:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-2px);
    border-color: var(--accent-neon);
}
.category-item.active {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--accent-neon);
}
.cat-name-bar {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}
.cat-amount {
    font-size: 1.1rem;
    color: var(--text-primary);
}
.cat-percent {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Auth Overlay */
.auth-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.auth-card {
    width: 400px;
    padding: 3rem;
    text-align: center;
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header span {
    color: var(--accent-neon);
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

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

.auth-form button {
    width: 100%;
    height: 3.5rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.auth-switch {
    margin-top: 1.5rem;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--accent-neon);
    text-decoration: none;
    font-weight: 600;
}

.blur {
    filter: blur(10px);
    pointer-events: none;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    padding: 2rem;
    border-top: 1px solid var(--glass-border);
}

#user-info-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    width: 100%;
    padding: 0.6rem;
    font-size: 0.9rem;
}

.btn-small.btn-outline {
    width: auto;
    padding: 4px 10px;
    font-size: 0.8rem;
}

.btn-outline:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* ── Mobile Logout Button (header) ── */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-mobile-logout {
    display: none;
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 6px;
}

.btn-mobile-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
    transform: none;
}

/* ── Mobile Responsive ── */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
        height: 100svh;
        height: 100vh;
    }

    /* Bottom navigation bar */
    .sidebar {
        order: 2;
        width: 100%;
        height: 60px;
        min-height: 60px;
        flex-direction: row;
        padding: 0;
        border-right: none;
        border-top: 1px solid var(--glass-border);
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 500;
        align-items: stretch;
    }

    .logo,
    .sidebar-footer {
        display: none;
    }

    .nav-links {
        display: flex;
        width: 100%;
    }

    .nav-links li {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.4rem 0.25rem;
        font-size: 0.7rem;
        text-align: center;
        border-left: none;
        border-top: 3px solid transparent;
        white-space: nowrap;
    }

    .nav-links li.active {
        border-left: none;
        border-top: 3px solid var(--accent-neon);
        background: rgba(6, 182, 212, 0.1);
    }

    /* Main content */
    .content {
        order: 1;
        flex: 1;
        padding: 1rem;
        padding-bottom: 70px;
        overflow-y: auto;
    }

    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .header h1 {
        font-size: 1.3rem;
    }

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

    .month-selector {
        flex: 1;
    }

    #month-picker {
        width: 100%;
    }

    .btn-theme-toggle {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .btn-mobile-logout {
        display: block;
        flex-shrink: 0;
    }

    /* 터치 타겟 최소 44px */
    button {
        min-height: 44px;
    }

    .btn-small {
        min-height: 36px;
    }

    .btn-mobile-logout {
        min-height: 36px;
    }

    /* Cards */
    .glass-card {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .summary-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .summary-cards h2 {
        font-size: 1.6rem;
    }

    /* Charts */
    .charts-container {
        grid-template-columns: 1fr;
    }

    .chart-card {
        height: 280px;
    }

    /* Category */
    .category-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.75rem;
    }

    /* SMS input */
    .sms-input-group {
        flex-direction: column;
    }

    .sms-actions {
        flex-direction: row;
        flex-wrap: wrap;
        min-width: 0;
    }

    .sms-actions input[type="date"] {
        flex: 1;
        min-width: 130px;
    }

    .sms-actions button {
        flex: 1;
        min-width: 100px;
    }

    textarea {
        min-height: 70px;
    }

    /* Tables: horizontal scroll */
    .table-card {
        overflow-x: auto;
    }

    .history-table {
        min-width: 480px;
        font-size: 0.82rem;
    }

    .history-table th,
    .history-table td {
        padding: 0.6rem 0.5rem;
    }

    /* Lotte import table: 820px → 560px */
    .lotte-import-table {
        min-width: 560px;
        font-size: 0.78rem;
    }

    .lotte-import-table input[type="text"],
    .lotte-import-table input[type="date"],
    .lotte-import-table input[type="number"] {
        min-width: 60px;
        padding: 0.3rem 0.4rem;
    }

    .lotte-import-table .lotte-item {
        min-width: 90px;
    }

    /* Auth card */
    .auth-card {
        width: 92%;
        padding: 2rem 1.5rem;
    }

    /* Modals */
    .modal-content {
        width: 95%;
    }

    #daily-details-modal .modal-content {
        width: 95% !important;
    }
}

/* 💳 Glassmorphic Toast Notification */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-notification {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(6, 182, 212, 0.4);
    color: #fff;
    padding: 16px 24px;
    border-radius: 14px;
    box-shadow: 
        0 10px 25px -5px rgba(0, 0, 0, 0.4), 
        0 8px 10px -6px rgba(0, 0, 0, 0.4),
        0 0 15px rgba(6, 182, 212, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(50px) translateY(-10px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: auto;
    max-width: 380px;
}

.toast-notification.show {
    transform: translateX(0) translateY(0);
    opacity: 1;
}

.toast-icon {
    font-size: 1.4rem;
    color: var(--accent-neon);
    animation: pulse 2s infinite;
}

.toast-message {
    font-weight: 500;
    font-size: 0.92rem;
    line-height: 1.4;
}

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

@media (max-width: 768px) {
    .toast-container {
        top: 16px;
        right: 16px;
        left: 16px;
        align-items: center;
    }
    .toast-notification {
        width: 100%;
        max-width: 100%;
        transform: translateY(-20px) translateX(0);
    }
    .toast-notification.show {
        transform: translateY(0) translateX(0);
    }
}

/* ── 테마 토글 버튼 스타일 ── */
.btn-theme-toggle {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    outline: none;
}

.btn-theme-toggle:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: var(--accent-neon);
    color: var(--accent-neon);
    transform: translateY(-1px);
}

/* 🧾 🧾 🧾 RECEIPT THEME 🧾 🧾 🧾 */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:ital,wght@0,400;0,700;1,400;1,700&display=swap');

body.theme-receipt {
    background-color: #e2e8f0;
    background-image: 
        radial-gradient(at 0% 0%, rgba(203, 213, 225, 0.8) 0, transparent 60%),
        radial-gradient(at 100% 100%, rgba(148, 163, 184, 0.6) 0, transparent 60%);
    color: #1e293b;
    font-family: 'Space Mono', 'Courier New', monospace;
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* 영수증 테마일 때의 폰트 강제 전환 */
body.theme-receipt * {
    font-family: 'Space Mono', 'Courier New', monospace !important;
}

/* 영수증 카드 자체의 종이 연출 */
body.theme-receipt .receipt-card {
    background: #fdfdfd;
    color: #1e293b;
    border: none;
    border-radius: 0; /* 톱니 모양 연출을 위해 둥근 모서리 해제 */
    box-shadow: 
        0 10px 30px -5px rgba(15, 23, 42, 0.15),
        0 8px 10px -6px rgba(15, 23, 42, 0.15);
    position: relative;
    padding: 3rem 1.5rem 2.5rem;
    margin-bottom: 2rem;
    
    /* 순수 CSS 그라디언트를 사용한 지그재그 톱니 모양 영수증 상하단 찢김 연출 */
    background-image: 
        linear-gradient(135deg, #e2e8f0 4px, transparent 0), 
        linear-gradient(225deg, #e2e8f0 4px, transparent 0),
        linear-gradient(45deg, #e2e8f0 4px, transparent 0), 
        linear-gradient(315deg, #e2e8f0 4px, transparent 0);
    background-position: 
        top left, top left,
        bottom left, bottom left;
    background-size: 8px 8px;
    background-repeat: repeat-x;
    animation: printOut 0.8s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes printOut {
    0% {
        transform: translateY(50px);
        opacity: 0;
        clip-path: inset(0 0 100% 0);
    }
    100% {
        transform: translateY(0);
        opacity: 1;
        clip-path: inset(0 0 0 0);
    }
}

/* 영수증 테이블 스타일링 보정 */
body.theme-receipt .receipt-card .history-table {
    border-collapse: collapse;
}

body.theme-receipt .receipt-card .history-table th,
body.theme-receipt .receipt-card .history-table td {
    border-bottom: 1px dashed #cbd5e1;
    color: #334155;
}

body.theme-receipt .receipt-card .history-table th {
    color: #64748b;
    font-weight: 700;
}

body.theme-receipt .receipt-card .history-table tr:hover {
    background: rgba(15, 23, 42, 0.02);
}

body.theme-receipt .receipt-header-title {
    text-align: center;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: #1e293b;
    border-bottom: 1px dashed #cbd5e1;
    padding-bottom: 0.75rem;
}

/* 영수증 풋터와 바코드 연출 */
body.theme-receipt .receipt-footer {
    display: block !important;
    margin-top: 1.5rem;
    text-align: center;
    color: #475569;
}

body.theme-receipt .receipt-divider {
    font-size: 0.9rem;
    letter-spacing: -1px;
    color: #94a3b8;
    margin: 8px 0;
    user-select: none;
}

body.theme-receipt .receipt-total-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.2rem;
    color: #0f172a;
    padding: 6px 1rem;
}

body.theme-receipt .barcode-wrapper {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

body.theme-receipt .barcode {
    width: 220px;
    height: 48px;
    /* CSS로 정교하게 그린 감열 영수증 바코드 선 효과 */
    background: repeating-linear-gradient(
        90deg,
        #1e293b,
        #1e293b 2px,
        transparent 2px,
        transparent 5px,
        #1e293b 5px,
        #1e293b 8px,
        transparent 8px,
        transparent 10px
    );
    opacity: 0.85;
}

body.theme-receipt .barcode-number {
    font-size: 0.75rem;
    color: #64748b;
    letter-spacing: 2px;
}

body.theme-receipt .receipt-thankyou {
    font-weight: 700;
    font-size: 0.85rem;
    color: #475569;
    margin-top: 10px;
}

/* 영수증 테마일 때의 사이드바/헤더 글자 색상 보정 */
body.theme-receipt .sidebar {
    background: rgba(255, 255, 255, 0.4);
    border-right: 1px solid rgba(15, 23, 42, 0.08);
}

body.theme-receipt .logo h2,
body.theme-receipt .nav-links li,
body.theme-receipt #page-title,
body.theme-receipt #user-info-text {
    color: #1e293b;
}

body.theme-receipt .nav-links li.active {
    color: #097d8e;
    border-left-color: #097d8e;
    background: rgba(9, 125, 142, 0.08);
}

body.theme-receipt #month-picker {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #1e293b;
    color-scheme: light;
}

body.theme-receipt .btn-theme-toggle {
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #1e293b;
}

body.theme-receipt .btn-theme-toggle:hover {
    background: rgba(9, 125, 142, 0.1);
    border-color: #097d8e;
    color: #097d8e;
}

/* 영수증 테마 시 일일 상세 내역 모달 크기 제한 및 글자색 보정 */
body.theme-receipt #daily-details-modal .receipt-card {
    width: 480px !important;
    padding-top: 2.5rem;
    padding-bottom: 2rem;
}
body.theme-receipt .modal-content.receipt-card .modal-header h3 {
    color: #1e293b !important;
}
body.theme-receipt .modal-content.receipt-card .btn-outline {
    border-color: rgba(15, 23, 42, 0.15);
    color: #1e293b;
    background: transparent;
}
body.theme-receipt .modal-content.receipt-card .btn-outline:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: var(--danger);
    color: var(--danger);
}
