/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;600;700&display=swap');

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.buy {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge.sell {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

:root {
    --primary-color: #4f46e5;
    --secondary-color: #818cf8;
    --accent-color: #c7d2fe;
    --background-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #0ea5e9;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Prompt', sans-serif;
    background-color: var(--background-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%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(to right, #818cf8, #c7d2fe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1.5rem;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-color);
}

/* Container */
.container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
}

/* Auth Card */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
}

.card h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: var(--text-color);
    transition: all 0.3s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.3);
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-gold {
    background: linear-gradient(to right, #fbbf24, #f59e0b) !important;
    color: #1e293b !important;
    text-shadow: none;
}

.btn-gold:hover {
    background: linear-gradient(to right, #f59e0b, #d97706) !important;
}

/* Flashes */
.flash-messages {
    margin-bottom: 1rem;
}

.flash {
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    text-align: center;
}

.flash.success {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.3);
    color: #6ee7b7;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
}

/* Table */
.table-container {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Rates Form */
.rates-grid {
    display: grid;
    gap: 1rem;
}

.rate-item {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.5rem;
}

.currency-label {
    font-weight: 700;
    font-size: 1.1rem;
}

/* ====================================
   Rates Page - Mobile Responsive
   ==================================== */
.rates-page {
    padding: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.rates-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
}

.rates-header {
    margin-bottom: 1.5rem;
    text-align: center;
}

.rates-header h2 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.rates-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.rates-store {
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.rates-grid-header {
    display: grid;
    grid-template-columns: 120px 1fr 1fr;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(79, 70, 229, 0.2);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-color);
}

.rates-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.rate-item-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rate-currency {
    display: flex;
    align-items: center;
}

.currency-code {
    font-weight: 700;
    font-size: 1rem;
    color: var(--accent-color);
}

.rate-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.rate-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.rate-input-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.rate-input {
    padding: 0.5rem 0.75rem !important;
    font-size: 1rem;
    text-align: center;
}

.rates-submit {
    margin-top: 1.5rem;
}

.btn-save-rates {
    width: 100%;
    padding: 1rem !important;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%) !important;
}

/* Rates Page Mobile Responsive */
@media (max-width: 768px) {
    .rates-page {
        padding: 0.5rem;
    }

    .rates-card {
        padding: 1rem;
        border-radius: 0.75rem;
    }

    .rates-header h2 {
        font-size: 1.25rem;
    }

    .rate-item-card {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1rem;
    }

    .rate-currency {
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .currency-code {
        font-size: 1.1rem;
    }

    .rate-inputs {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .rate-input-group label {
        display: block;
        text-align: center;
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }

    .rate-input {
        padding: 0.75rem !important;
        font-size: 1.1rem;
    }
}

@media (max-width: 400px) {
    .rate-inputs {
        grid-template-columns: 1fr;
    }

    .rate-input-group label {
        text-align: left;
    }
}

/* Slip */
.slip-container {
    background: white;
    color: black;
    width: 300px;
    padding: 20px;
    margin: 20px auto;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
}

/* Date Picker Icon */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    font-size: 20px;
    width: 25px;
    height: 25px;
    filter: invert(1);
    margin-right: 5px;
}

/* =====================================================
   Utility Classes for Conditional Backgrounds
   ===================================================== */

/* Background: Success/Positive (green) */
.bg-success-subtle {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

/* Background: Danger/Negative (red) */
.bg-danger-subtle {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Background: Success for stat-cards (green glow) */
.bg-profit {
    background: rgba(0, 255, 0, 0.1);
}

/* Background: Danger for stat-cards (red glow) */
.bg-loss {
    background: rgba(255, 0, 0, 0.1);
}

/* Text colors */
.text-success {
    color: #22c55e;
}

.text-danger {
    color: #ef4444;
}

/* =====================================================
   Hamburger Menu
   ===================================================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--text-color);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* =====================================================
   Dashboard Header - Responsive
   ===================================================== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    font-size: 1.5rem;
    margin: 0;
}

.dashboard-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.date-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.date-form label {
    color: white;
    margin: 0;
    white-space: nowrap;
}

.date-form .form-control {
    width: auto;
    padding: 5px 10px;
}

.btn-export {
    background: var(--success) !important;
    text-decoration: none;
    white-space: nowrap;
    width: auto;
    padding: 0.5rem 1rem;
}

/* =====================================================
   Section Titles
   ===================================================== */
.section-title {
    margin: 1.5rem 0 1rem 0;
    font-size: 1.25rem;
}

/* =====================================================
   Mobile Cards
   ===================================================== */
.mobile-cards {
    display: none;
}

/* Store Cards */
.store-card {
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    overflow: hidden;
}

.store-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.store-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.store-count {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.store-card-body {
    padding: 1rem;
}

.store-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.store-row:last-child {
    border-bottom: none;
}

.store-row .label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.store-row .value {
    font-weight: 600;
    font-size: 1rem;
}

.balance-row {
    background: rgba(255, 255, 255, 0.03);
    margin: 0.5rem -1rem 0;
    padding: 0.75rem 1rem !important;
    border-radius: 0 0 0.5rem 0.5rem;
}

.store-card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    flex: 1;
    text-align: center;
}

.btn-success {
    background: var(--success) !important;
}

/* Transaction Cards */
.txn-card {
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.txn-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.txn-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.txn-card-body {
    padding: 1rem;
}

.txn-main-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.txn-currency {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--secondary-color);
}

.txn-amount-foreign {
    font-weight: 700;
    font-size: 1.25rem;
}

.txn-details {
    font-size: 0.9rem;
}

.txn-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    color: var(--text-muted);
}

.txn-row span:last-child {
    color: var(--text-color);
    font-weight: 500;
}

.txn-thb {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.txn-thb span:last-child {
    font-size: 1.1rem;
    color: #fbbf24;
}

/* Desktop only class */
.desktop-only {
    display: block;
}

/* Mobile only class - hidden on desktop by default */
.mobile-only {
    display: none;
}

/* =====================================================
   Responsive Styles
   ===================================================== */
@media (max-width: 768px) {

    /* Show mobile-only elements on mobile */
    .mobile-only {
        display: block;
    }

    /* Hamburger Menu */
    .hamburger {
        display: flex;
    }

    .nav-links {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        padding: 5rem 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        display: block;
        margin: 0;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 1.1rem;
        text-align: left;
    }

    .navbar {
        padding: 1rem;
    }

    /* Container */
    .container {
        padding: 1rem;
    }

    /* Dashboard Header */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-header h1 {
        font-size: 1.25rem;
    }

    .dashboard-controls {
        width: 100%;
        justify-content: space-between;
    }

    .date-form {
        flex: 1;
    }

    .date-form .form-control {
        width: 100%;
        max-width: 150px;
    }

    .btn-export {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    /* Global Mobile Optimization */
    .card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: #1e293b !important;
    }

    /* Dashboard Grid */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card h3 {
        font-size: 0.85rem;
    }

    .stat-card .value {
        font-size: 1.5rem;
    }

    /* Hide desktop tables, show mobile cards */
    .desktop-only {
        display: none !important;
    }

    .mobile-cards {
        display: block;
    }

    /* Section titles */
    .section-title {
        font-size: 1.1rem;
        margin: 1rem 0;
    }
}

@media (max-width: 480px) {
    .dashboard-header h1 {
        font-size: 1.1rem;
    }

    .dashboard-controls {
        flex-direction: column;
        gap: 0.75rem;
    }

    .date-form {
        width: 100%;
    }

    .date-form .form-control {
        max-width: none;
        flex: 1;
    }

    .btn-export {
        width: 100%;
        text-align: center;
    }

    .stat-card .value {
        font-size: 1.35rem;
    }

    .store-row .value {
        font-size: 0.95rem;
    }

    .txn-currency,
    .txn-amount-foreign {
        font-size: 1.1rem;
    }
}

/* =====================================================
   Owner Summary Page Styles
   ===================================================== */
.owner-summary-card {
    max-width: 1400px;
    margin: 2rem auto;
}

.owner-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.owner-summary-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.owner-summary-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.owner-filter-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    color: white;
    margin: 0;
    white-space: nowrap;
}

.filter-group .form-control {
    width: auto;
    padding: 5px 10px;
}

.owner-action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-print {
    background: var(--primary-color) !important;
    text-decoration: none;
    white-space: nowrap;
    width: auto;
    padding: 0.5rem 1rem;
}

.date-card {
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 2rem;
    text-align: center;
}

.date-card h3 {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.date-card .value {
    font-size: 1.5rem;
}

/* Currency Cards for Mobile */
.currency-card {
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    overflow: hidden;
}

.currency-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.currency-name {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--secondary-color);
}

.currency-balance {
    font-weight: 600;
    font-size: 0.9rem;
}

.currency-card-body {
    padding: 1rem;
}

.currency-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.currency-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.currency-col .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.currency-col .value {
    font-size: 1rem;
    font-weight: 600;
}

.currency-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.5rem;
}

.total-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.total-card .currency-card-header {
    background: rgba(255, 255, 255, 0.1);
}

.total-card .currency-name {
    color: var(--text-color);
}

/* Summary Stats Grid */
.summary-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.summary-stats-grid .stat-card h3 {
    font-size: 0.9rem;
}

.summary-stats-grid .stat-card .value {
    font-size: 1.3rem;
}

/* Store Breakdown Section */
.store-breakdown-section {
    margin-top: 2rem;
}

.store-breakdown-section h3 {
    margin-bottom: 1rem;
}

.store-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.store-breakdown-card {
    background: rgba(59, 130, 246, 0.1);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.store-breakdown-card:hover {
    transform: translateY(-2px);
    background: rgba(59, 130, 246, 0.15);
}

.store-breakdown-card h4 {
    font-size: 1rem;
    margin: 0 0 0.75rem 0;
}

.store-breakdown-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.store-breakdown-row:last-child {
    margin-bottom: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.empty-state p {
    font-size: 1.2rem;
}

/* Back Button */
.back-button-container {
    margin-top: 2rem;
    text-align: center;
}

.btn-back {
    background: var(--secondary-color) !important;
    text-decoration: none;
    width: auto;
    display: inline-block;
    padding: 0.75rem 1.5rem;
}

/* =====================================================
   Owner Summary Responsive Styles
   ===================================================== */
@media (max-width: 768px) {
    .owner-summary-card {
        margin: 1rem auto;
        padding: 1.5rem;
    }

    .owner-summary-header {
        flex-direction: column;
        align-items: stretch;
    }

    .owner-summary-header h2 {
        font-size: 1.2rem;
        text-align: center;
    }

    .owner-summary-controls {
        flex-direction: column;
        width: 100%;
    }

    .owner-filter-form {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group .form-control {
        flex: 1;
        width: 100%;
    }

    .owner-action-buttons {
        width: 100%;
    }

    .owner-action-buttons .btn {
        flex: 1;
        text-align: center;
    }

    .date-card {
        margin-bottom: 1.5rem;
    }

    .date-card h3 {
        font-size: 1rem;
    }

    .date-card .value {
        font-size: 1.25rem;
    }

    .summary-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin-top: 1.5rem;
    }

    .summary-stats-grid .stat-card .value {
        font-size: 1.2rem;
    }

    .store-breakdown-grid {
        grid-template-columns: 1fr;
    }

    .store-breakdown-card {
        padding: 1rem;
    }

    .btn-back {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .owner-summary-card {
        padding: 1rem;
    }

    .owner-summary-header h2 {
        font-size: 1.1rem;
    }

    .currency-name {
        font-size: 1.1rem;
    }

    .currency-col .value {
        font-size: 0.95rem;
    }
}

/* =====================================================
   Profit Calculator Page Styles
   ===================================================== */
.profit-calc-card {
    max-width: 1200px;
    margin: 2rem auto;
}

.profit-calc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.profit-calc-title h2 {
    margin: 0;
    font-size: 1.5rem;
}

.profit-calc-title p {
    color: var(--text-muted);
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
}

.profit-calc-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.profit-date-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.profit-date-form label {
    color: white;
    margin: 0;
    white-space: nowrap;
}

.profit-date-form .form-control {
    width: auto;
    padding: 5px 10px;
}

.profit-action-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.profit-action-buttons .btn {
    white-space: nowrap;
    width: auto;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 0.5rem;
    text-decoration: none;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-save {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #1e293b !important;
}

.btn-print-profit {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

.btn-export-profit {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

/* Profit Currency Cards for Mobile */
.profit-currency-card {
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    overflow: hidden;
}

.profit-currency-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profit-currency-body {
    padding: 1rem;
}

.profit-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.profit-info-item {
    display: flex;
    flex-direction: column;
}

.profit-info-item .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.profit-info-item .value {
    font-size: 1rem;
    font-weight: 600;
}

.profit-sell-rate-section {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.profit-sell-rate-section label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.profit-sell-rate-section .form-control {
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}

.profit-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.profit-result-item {
    display: flex;
    flex-direction: column;
}

.profit-result-item .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.profit-result-item .value {
    font-size: 1.1rem;
    font-weight: 700;
}

.profit-highlight {
    background: rgba(255, 255, 255, 0.03);
    padding: 0.5rem;
    border-radius: 0.5rem;
}

/* Profit Total Card Mobile */
.profit-total-card-mobile {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    margin-top: 1rem;
    overflow: hidden;
}

.profit-total-header {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
}

.profit-total-body {
    padding: 1rem;
}

.profit-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.profit-total-row:last-child {
    border-bottom: none;
}

.profit-total-row span:first-child {
    color: var(--text-muted);
}

.profit-total-row span:last-child {
    font-weight: 600;
    font-size: 1.1rem;
}

.profit-total-highlight {
    background: rgba(255, 255, 255, 0.05);
    margin: 0.5rem -1rem 0;
    padding: 0.75rem 1rem !important;
    border-radius: 0 0 0.5rem 0.5rem;
}

.profit-total-highlight span:last-child {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Profit Summary Grid */
.profit-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.profit-stat-cost {
    background: rgba(100, 100, 255, 0.1);
    border: 1px solid rgba(100, 100, 255, 0.3);
}

.profit-stat-cost h3 {
    font-size: 1rem;
    color: var(--text-muted);
}

.profit-stat-cost .value {
    font-size: 1.5rem;
    color: #6b8cff;
}

.profit-stat-sell {
    background: rgba(0, 200, 150, 0.1);
    border: 1px solid rgba(0, 200, 150, 0.3);
}

.profit-stat-sell h3 {
    font-size: 1rem;
    color: var(--text-muted);
}

.profit-stat-sell .value {
    font-size: 1.5rem;
    color: #00c896;
}

.profit-stat-profit {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
}

.profit-stat-profit h3 {
    font-size: 1rem;
    color: var(--text-muted);
}

.profit-stat-profit .value {
    font-size: 1.5rem;
}

/* =====================================================
   Profit Calculator Responsive Styles
   ===================================================== */
@media (max-width: 768px) {
    .profit-calc-card {
        margin: 1rem auto;
        padding: 1.5rem;
    }

    .profit-calc-header {
        flex-direction: column;
        align-items: stretch;
    }

    .profit-calc-title {
        text-align: center;
    }

    .profit-calc-title h2 {
        font-size: 1.2rem;
    }

    .profit-calc-title p {
        font-size: 0.85rem;
    }

    .profit-calc-controls {
        flex-direction: column;
        width: 100%;
    }

    .profit-date-form {
        width: 100%;
    }

    .profit-date-form .form-control {
        flex: 1;
    }

    .profit-action-buttons {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .profit-action-buttons .btn {
        text-align: center;
        padding: 0.5rem 0.25rem;
        font-size: 0.85rem;
    }

    .profit-summary-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .profit-stat-cost .value,
    .profit-stat-sell .value,
    .profit-stat-profit .value {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .profit-calc-card {
        padding: 1rem;
    }

    .profit-calc-title h2 {
        font-size: 1.1rem;
    }

    .profit-action-buttons {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .profit-info-item .value {
        font-size: 0.95rem;
    }

    .profit-result-item .value {
        font-size: 1rem;
    }
}

/* =====================================================
   Cash Report Page Styles
   ===================================================== */
.cash-report-card {
    max-width: 1200px;
    margin: 2rem auto;
}

.cash-report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cash-report-title h2 {
    margin: 0;
    font-size: 1.5rem;
}

.cash-report-title p {
    color: var(--text-muted);
    margin: 0.5rem 0 0 0;
    font-size: 0.9rem;
}

.cash-report-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.cash-filter-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    flex-wrap: wrap;
}

.cash-action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-print-cash {
    background: var(--primary-color) !important;
    text-decoration: none;
    white-space: nowrap;
    width: auto;
    padding: 0.5rem 1rem;
}

.btn-export-cash {
    background: var(--success) !important;
    text-decoration: none;
    white-space: nowrap;
    width: auto;
    padding: 0.5rem 1rem;
}

/* Cash Summary Grid */
.cash-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.cash-stat-expected {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.cash-stat-expected h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cash-stat-expected .value {
    font-size: 1.3rem;
    color: #60a5fa;
}

.cash-stat-counted {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.cash-stat-counted h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cash-stat-counted .value {
    font-size: 1.3rem;
    color: #22c55e;
}

.cash-stat-stores {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.cash-stat-stores h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.cash-stat-stores .value {
    font-size: 1.3rem;
    color: #a855f7;
}

/* Cash Count Cards for Mobile */
.cash-count-card {
    background: var(--card-bg);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    overflow: hidden;
}

.cash-count-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cash-count-header .store-name {
    font-weight: 700;
    font-size: 1.1rem;
}

.cash-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cash-count-body {
    padding: 1rem;
}

/* Bills Grid */
/* Bills Flex Layout */
.bills-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: flex-start;
}

.bills-flex .bill-item {
    flex: 1 1 30%;
    /* 3 items per row approx */
    min-width: 80px;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
    border-radius: 0.5rem;
    text-align: center;
}



.bill-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.bill-count {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
}

/* Cash Count Summary */
.cash-count-summary {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
}

.summary-row span:first-child {
    color: var(--text-muted);
}

.summary-row span:last-child {
    font-weight: 600;
}

.diff-row {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
}

.diff-positive {
    background: rgba(34, 197, 94, 0.1);
}

.diff-negative {
    background: rgba(239, 68, 68, 0.1);
}

.diff-row span:last-child {
    font-weight: 700;
    font-size: 1.1rem;
}

/* Cash Total Card Mobile */
.cash-total-card-mobile {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    margin-top: 1rem;
    overflow: hidden;
}

.cash-total-header {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
}

.cash-total-body {
    padding: 1rem;
}

/* Bill Breakdown Section */
.bill-breakdown-section {
    margin-top: 2rem;
}

.bill-breakdown-section h3 {
    margin-bottom: 1rem;
}

.bill-breakdown-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.bill-stat {
    flex: 1 1 150px;
    text-align: center;
    background: var(--card-bg);
    /* Ensure background is set */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1rem;
}

.bill-stat h3 {
    font-size: 0.9rem;
}

.bill-stat .value {
    font-size: 1.2rem;
}

.bill-total {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.bill-1000 {
    background: rgba(139, 92, 246, 0.1);
}

.bill-500 {
    background: rgba(99, 102, 241, 0.1);
}

.bill-100 {
    background: rgba(59, 130, 246, 0.1);
}

.bill-50 {
    background: rgba(34, 197, 94, 0.1);
}

.bill-20 {
    background: rgba(234, 179, 8, 0.1);
}

.bill-coins {
    background: rgba(251, 146, 60, 0.1);
}

/* Missing Stores Alert */
.missing-stores-alert {
    margin-top: 2rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.missing-stores-alert h3 {
    margin-bottom: 1rem;
    color: #ef4444;
}

.missing-stores-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.missing-stores-list.centered {
    justify-content: center;
    margin-top: 0.5rem;
}

.missing-store-tag {
    background: rgba(239, 68, 68, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    color: #fca5a5;
}

.missing-store-tag.small {
    padding: 0.25rem 0.75rem;
    font-size: 0.9rem;
}

.missing-stores-inline {
    margin-top: 1.5rem;
}

.missing-stores-inline p {
    color: #fca5a5;
}

/* =====================================================
   Cash Report Responsive Styles
   ===================================================== */
@media (max-width: 768px) {
    .cash-report-card {
        margin: 1rem auto;
        padding: 1.5rem;
    }

    .cash-report-header {
        flex-direction: column;
        align-items: stretch;
    }

    .cash-report-title {
        text-align: center;
    }

    .cash-report-title h2 {
        font-size: 1.2rem;
    }

    .cash-report-title p {
        font-size: 0.85rem;
    }

    .cash-report-controls {
        flex-direction: column;
        width: 100%;
    }

    .cash-filter-form {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
    }

    .cash-filter-form .filter-group {
        width: 100%;
    }

    .cash-action-buttons {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .cash-action-buttons .btn {
        text-align: center;
    }

    .cash-summary-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    /* Optimization: Remove expensive blur on mobile */
    .card,
    .rates-card,
    .store-card,
    .txn-card,
    .cash-count-card,
    .currency-card,
    .profit-currency-card,
    .cash-total-card-mobile,
    .profit-total-card-mobile {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: #1e293b !important;
        /* Solid background fallback */
    }

    .cash-summary-grid .stat-card {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
    }

    .cash-summary-grid .stat-card h3 {
        margin-bottom: 0;
        font-size: 0.95rem;
    }

    .cash-summary-grid .stat-card .value {
        font-size: 1.1rem;
    }

    .cash-stat-expected .value,
    .cash-stat-counted .value,
    .cash-stat-stores .value {
        font-size: 1.1rem;
    }

    .bill-breakdown-grid {
        display: flex;
        /* Converted to flexbox */
        flex-wrap: wrap;
        justify-content: space-around;
        /* Added for better distribution */
        gap: 0.5rem;
    }

    .bill-stat .value {
        font-size: 1rem;
    }

    .bill-total {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .cash-report-card {
        padding: 1rem;
    }

    .cash-report-title h2 {
        font-size: 1.1rem;
    }

    .cash-summary-grid {
        grid-template-columns: 1fr;
    }



    .bill-count {
        font-size: 1rem;
    }


}

/* =====================================================
   Store Summary Page Styles
   ===================================================== */
.store-summary-card {
    max-width: 1400px;
    margin: 2rem auto;
}

.store-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.store-summary-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.store-summary-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.store-date-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.store-date-form label {
    color: white;
    margin: 0;
    white-space: nowrap;
}

.store-date-form .form-control {
    width: auto;
    padding: 5px 10px;
}

.store-action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-export-store {
    background: var(--success) !important;
    text-decoration: none;
    white-space: nowrap;
    width: auto;
    padding: 0.5rem 1rem;
}

.btn-print-store {
    background: var(--primary-color) !important;
    text-decoration: none;
    white-space: nowrap;
    width: auto;
    padding: 0.5rem 1rem;
}

/* Store Stats Grid */
.store-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.store-stats-grid .stat-card h3 {
    font-size: 0.9rem;
}

.store-stats-grid .stat-card .value {
    font-size: 1.3rem;
}

/* =====================================================
   Store Summary Responsive Styles
   ===================================================== */
@media (max-width: 768px) {
    .store-summary-card {
        margin: 1rem auto;
        padding: 1.5rem;
    }

    .store-summary-header {
        flex-direction: column;
        align-items: stretch;
    }

    .store-summary-header h2 {
        font-size: 1.2rem;
        text-align: center;
    }

    .store-summary-controls {
        flex-direction: column;
        width: 100%;
    }

    .store-date-form {
        width: 100%;
    }

    .store-date-form .form-control {
        flex: 1;
    }

    .store-action-buttons {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .store-action-buttons .btn {
        text-align: center;
    }

    .store-stats-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .store-stats-grid .stat-card .value {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .store-summary-card {
        padding: 1rem;
    }

    .store-summary-header h2 {
        font-size: 1.1rem;
    }
}

/* =====================================================
   TRANSACTIONS PAGE STYLES
   ===================================================== */
.transactions-card {
    max-width: 1400px;
    margin: 2rem auto;
}

.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.transactions-title h2 {
    margin: 0;
}

.transactions-title .store-info {
    color: var(--text-muted);
    margin: 0.5rem 0 0 0;
    font-size: 1.1rem;
}

.transactions-back .btn-back {
    background: var(--secondary-color) !important;
    text-decoration: none;
}

/* Transactions Controls */
.transactions-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.txn-date-form {
    display: flex;
    align-items: center;
}

.txn-date-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.txn-date-control label {
    font-size: 0.9rem;
    white-space: nowrap;
}

.txn-date-control input[type="date"] {
    background: var(--card-bg);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 1rem;
}

/* Transactions Summary Grid */
.transactions-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.transactions-summary-grid .stat-card {
    padding: 1rem;
}

.transactions-summary-grid .stat-card h3 {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.5rem;
}

.transactions-summary-grid .stat-card .value {
    font-size: 1.5rem;
    white-space: nowrap;
}

.transactions-summary-grid .stat-card .value small {
    font-size: 0.6em;
    opacity: 0.8;
}

/* Stat card backgrounds */
.txn-stat-topup {
    background: rgba(255, 165, 0, 0.1) !important;
}

.txn-stat-topup .value {
    color: orange;
}

.txn-stat-buy {
    background: rgba(0, 255, 0, 0.1) !important;
}

.txn-stat-sell {
    background: rgba(255, 0, 0, 0.1) !important;
}

.txn-stat-balance {
    background: rgba(0, 0, 255, 0.1) !important;
}

/* Currency Summary Section */
.currency-summary-section {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.currency-summary-section h3 {
    margin: 0 0 1rem 0;
}

/* Currency Summary Card (Mobile) */
.currency-summary-card {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.75rem;
}

.currency-summary-card:last-child {
    margin-bottom: 0;
}

.currency-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.currency-summary-header .currency-name {
    font-weight: bold;
    font-size: 1.1rem;
}

.currency-summary-header .currency-balance {
    font-weight: bold;
    font-size: 1.1rem;
}

.currency-summary-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.currency-summary-row {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Transactions List Title */
.transactions-list-title {
    margin-bottom: 1rem;
}

/* Transaction Card (Mobile) */
.transaction-card {
    background: var(--card-bg);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.transaction-card:last-child {
    margin-bottom: 0;
}

.transaction-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.transaction-card-header .txn-time {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.transaction-card-header .badge {
    font-size: 0.8rem;
    padding: 0.35rem 0.75rem;
}

.transaction-card-body .txn-main-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.txn-currency-badge {
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: bold;
    font-size: 1.1rem;
}

.txn-amount-foreign {
    font-size: 1.5rem;
    font-weight: bold;
}

.txn-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.txn-detail-item {
    display: flex;
    flex-direction: column;
}

.txn-detail-item .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.txn-detail-item .value {
    font-size: 1rem;
}

.txn-thb-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.txn-thb-row span:first-child {
    color: var(--text-muted);
}

.txn-thb-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent-color);
}

.transaction-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-slip {
    flex: 1;
    background: var(--accent-color) !important;
    text-align: center;
    text-decoration: none;
    padding: 0.75rem !important;
    font-size: 0.9rem;
}

.btn-delete-txn {
    background: var(--danger) !important;
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Badge topup */
.badge.topup {
    background: orange;
    color: black;
}

/* =====================================================
   Transactions Responsive Styles
   ===================================================== */
@media (max-width: 768px) {
    .transactions-card {
        margin: 1rem auto;
        padding: 1.5rem;
    }

    .transactions-header {
        flex-direction: column;
        align-items: stretch;
    }

    .transactions-title h2 {
        font-size: 1.2rem;
        text-align: center;
    }

    .transactions-controls {
        flex-direction: column;
        width: 100%;
    }

    .txn-date-form {
        width: 100%;
    }

    .txn-date-control {
        width: 100%;
        justify-content: space-between;
    }

    .txn-date-control input[type="date"] {
        flex: 1;
    }

    .transactions-controls .btn-back {
        width: 100%;
        text-align: center;
        display: block;
    }

    .transactions-summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .transactions-summary-grid .stat-card h3 {
        font-size: 0.7rem;
    }

    .transactions-summary-grid .stat-card .value {
        font-size: 1.2rem;
    }

    .currency-summary-section {
        padding: 1rem;
    }

    .currency-summary-section h3 {
        font-size: 1rem;
    }

    .transactions-list-title {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .transactions-card {
        padding: 1rem;
    }

    .transactions-title h2 {
        font-size: 1.1rem;
    }

    .transactions-summary-grid {
        grid-template-columns: 1fr;
    }

    .transactions-summary-grid .stat-card .value {
        font-size: 1.1rem;
    }

    .txn-amount-foreign {
        font-size: 1.3rem;
    }

    .txn-thb-value {
        font-size: 1.1rem;
    }

    .transaction-card-actions {
        flex-direction: column;
    }

    .btn-slip,
    .btn-delete-txn {
        width: 100%;
        text-align: center;
    }
}

/* =====================================================
   EXCHANGE PAGE STYLES (Staff)
   ===================================================== */
.exchange-card {
    max-width: 1400px;
    margin: 2rem auto;
}

.exchange-title {
    margin-bottom: 1.5rem;
}

/* Mode Buttons */
.exchange-mode-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-mode-buy {
    background: var(--success) !important;
    opacity: 0.5;
    flex: 1;
    min-width: 150px;
}

.btn-mode-sell {
    background: var(--danger) !important;
    opacity: 0.5;
    flex: 1;
    min-width: 150px;
}

.btn-topup {
    flex: 0.5;
    min-width: 150px;
}

/* Topup Modal */
.topup-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.topup-modal-content {
    margin: 15% auto;
    padding: 20px;
    width: 90%;
    max-width: 350px;
    text-align: center;
}

.topup-modal-content h3 {
    margin-bottom: 0.5rem;
}

.topup-modal-content p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.topup-modal-content .form-control {
    margin-bottom: 1rem;
}

.topup-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.topup-modal-buttons .btn-confirm {
    background: var(--accent-color) !important;
}

.topup-modal-buttons .btn-cancel {
    background: var(--danger) !important;
}

/* Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .split-layout {
        grid-template-columns: 1fr 2fr;
        align-items: start;
    }
}

/* Input Card */
.exchange-input-card {
    margin-bottom: 0;
    background: rgba(0, 0, 0, 0.02);
}

.rate-display {
    margin-bottom: 1rem;
}

.rate-card {
    text-align: center;
}

.rate-card h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.rate-card .value {
    font-size: 2rem;
    color: var(--accent-color);
}

.btn-add-item {
    margin-top: 1rem;
    background: var(--secondary-color) !important;
    width: 100%;
}

/* Items Section */
.exchange-items-section {
    display: flex;
    flex-direction: column;
}

.items-title {
    margin-bottom: 1rem;
    margin-top: 0;
}

/* Desktop Table */
.exchange-items-table {
    background: white;
    margin-bottom: 2rem;
}

.exchange-items-table table {
    width: 100%;
    color: #333;
}

.exchange-items-table thead tr {
    border-bottom: 2px solid #ddd;
}

.exchange-items-table th {
    color: #555;
}

.exchange-items-table tbody {
    font-size: 1.1rem;
    color: #000;
}

.exchange-items-table .total-row-desktop {
    font-weight: bold;
    background: #f9f9f9;
    border-top: 2px solid #ddd;
}

.exchange-items-table .total-row-desktop td:first-child {
    text-align: right;
    color: #333;
}

.exchange-items-table .total-row-desktop td:nth-child(2) {
    color: #000;
    font-size: 1.2rem;
}

/* Mobile Item Cards - Hidden on Desktop */
.exchange-items-cards {
    display: none;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.exchange-total-mobile {
    display: none;
}

.exchange-item-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
}

.item-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.item-currency {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent-color);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-remove-item {
    background: var(--danger) !important;
    padding: 0.5rem 0.75rem !important;
    font-size: 0.9rem;
    min-width: 40px;
    max-width: 40px;
    flex-shrink: 0;
    text-align: center;
}

.item-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.item-row {
    display: flex;
    justify-content: space-between;
}

.item-row .label {
    color: var(--text-muted);
}

.item-row .value {
    font-weight: 500;
}

.item-thb-row {
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 0.25rem;
}

.item-thb-row .value {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent-color);
}

/* Mobile Total - Styled but hidden on desktop */
.exchange-total-mobile.show-mobile {
    background: rgba(0, 255, 0, 0.1);
    border: 2px solid var(--success);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.exchange-total-mobile .total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
}

.exchange-total-mobile .total-value {
    font-size: 1.5rem;
    color: var(--success);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: white;
    padding: 1rem !important;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-submit:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* =====================================================
   Exchange Page Responsive Styles
   ===================================================== */
@media (max-width: 768px) {
    .exchange-card {
        margin: 1rem auto;
        padding: 1.5rem;
    }

    .exchange-title {
        font-size: 1.2rem;
        text-align: center;
    }

    .exchange-mode-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-mode-buy,
    .btn-mode-sell,
    .btn-topup {
        flex: none;
        width: 100%;
        min-width: auto;
    }

    .exchange-input-card {
        padding: 1rem;
    }

    .rate-card .value {
        font-size: 1.8rem;
    }

    .items-title {
        font-size: 1rem;
        text-align: center;
    }

    .btn-submit {
        font-size: 1.1rem;
    }

    /* Show mobile cards, hide desktop table */
    .exchange-items-cards {
        display: flex;
    }

    .exchange-total-mobile {
        display: block;
        background: rgba(0, 255, 0, 0.1);
        border: 2px solid var(--success);
        border-radius: 0.75rem;
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .exchange-items-table {
        display: none;
    }
}

@media (max-width: 480px) {
    .exchange-card {
        padding: 1rem;
    }

    .exchange-title {
        font-size: 1.1rem;
    }

    .rate-card .value {
        font-size: 1.5rem;
    }

    .form-control {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }
}

/* =====================================================
   CASH COUNT PAGE STYLES (Staff)
   ===================================================== */
.cash-count-card {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 2rem;
}

.cash-count-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.cash-count-title {
    margin: 0;
}

.cash-count-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.cash-count-controls .date-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.cash-count-controls .date-form label {
    white-space: nowrap;
}

.cash-count-controls .date-form .form-control {
    width: auto;
    padding: 0.5rem;
}

.cash-count-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-export {
    background: var(--success) !important;
    text-decoration: none;
    white-space: nowrap;
}

.btn-print {
    background: var(--primary-color) !important;
    text-decoration: none;
    white-space: nowrap;
}

/* Summary Cards */
.cash-count-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.cash-count-summary .stat-card h3 {
    font-size: 1.1rem;
    /* Increased from 0.8rem */
    font-weight: 600;
}

.cash-count-summary .stat-card .value {
    font-size: 1.8rem;
    /* Increased from 1.2rem */
    font-weight: 700;
}

.cash-count-summary .stat-topup {
    background: rgba(255, 165, 0, 0.1);
}

.cash-count-summary .stat-topup .value {
    color: orange;
}

.cash-count-summary .stat-buy {
    background: rgba(255, 0, 0, 0.1);
}

.cash-count-summary .stat-sell {
    background: rgba(0, 255, 0, 0.1);
}

.cash-count-summary .stat-expected {
    background: rgba(0, 0, 255, 0.1);
}

.cash-count-summary .stat-expected .value {
    color: #60a5fa;
}

/* Bills Section */
.bills-section {
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 1rem;
}

.section-title {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

.bills-list {
    display: flex;
    flex-direction: column;
}

/* Bill Row - Desktop */
.bill-row {
    display: grid;
    grid-template-columns: 200px 1fr 180px;
    gap: 2rem;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bill-row.bill-header {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.bill-type {
    font-size: 1.1rem;
    white-space: nowrap;
}

.bill-header .bill-type {
    font-size: 1rem;
}

.bill-header .bill-count {
    text-align: center;
}

.bill-header .bill-total {
    text-align: right;
}

.bill-input-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bill-input {
    text-align: center;
    font-size: 1.1rem;
    padding: 0.75rem;
    flex: 1;
}

.mobile-label {
    display: none;
}

.bill-total-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

.bill-total-value {
    text-align: right;
    font-size: 1.15rem;
    font-weight: 500;
}

/* Grand Total Row */
.bill-row.bill-grand-total {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.3), rgba(129, 140, 248, 0.3));
    margin-top: 1.5rem;
    border-radius: 0.75rem;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.bill-grand-total .bill-type {
    font-weight: bold;
    font-size: 1.3rem;
}

.bill-grand-total .spacer {
    display: block;
}

.grand-total-value {
    text-align: right;
    font-weight: bold;
    font-size: 1.6rem;
    color: var(--accent-color);
}

/* Result Section */
.result-section {
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 1rem;
}

.result-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.result-card {
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
}

.result-card h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    white-space: nowrap;
}

.result-value {
    font-size: 1.6rem;
    font-weight: bold;
}

.result-expected {
    background: rgba(59, 130, 246, 0.15);
}

.result-expected .result-value {
    color: #60a5fa;
}

.result-counted {
    background: rgba(34, 197, 94, 0.15);
}

.result-counted .result-value {
    color: #22c55e;
}

.result-diff {
    background: rgba(100, 100, 100, 0.15);
}

.result-diff.diff-exact {
    background: rgba(0, 0, 255, 0.1);
}

.result-diff.diff-exact .result-value {
    color: #60a5fa;
}

.result-diff.diff-excess {
    background: rgba(0, 255, 0, 0.1);
}

.result-diff.diff-excess .result-value {
    color: #6ee7b7;
}

.result-diff.diff-shortage {
    background: rgba(255, 0, 0, 0.1);
}

.result-diff.diff-shortage .result-value {
    color: #fca5a5;
}

.btn-save {
    width: 100%;
    font-size: 1.1rem;
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    color: white;
    padding: 1rem !important;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.btn-save:hover {
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

.last-saved {
    margin-top: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* =====================================================
   Cash Count Responsive Styles (Staff)
   ===================================================== */
@media (max-width: 768px) {
    .cash-count-card {
        margin: 1rem auto;
        padding: 1.5rem;
    }

    .cash-count-header {
        flex-direction: column;
        align-items: stretch;
    }

    .cash-count-title {
        font-size: 1.2rem;
        text-align: center;
    }

    .cash-count-controls {
        flex-direction: column;
        width: 100%;
    }

    .cash-count-controls .date-form {
        width: 100%;
        justify-content: space-between;
    }

    .cash-count-controls .date-form .form-control {
        flex: 1;
    }

    .cash-count-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .cash-count-actions .btn {
        text-align: center;
    }

    .cash-count-summary {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .bills-section {
        padding: 1rem;
    }

    .section-title {
        font-size: 1.1rem;
    }

    /* Bill Row - Mobile Layout */
    .bill-row {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 0.5rem;
        margin-bottom: 0.5rem;
        border-bottom: none;
    }

    .bill-row.bill-header {
        display: none;
    }

    .bill-type {
        font-size: 1rem;
        font-weight: bold;
        text-align: center;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .bill-input-group,
    .bill-total-group {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .mobile-label {
        display: block;
        color: var(--text-muted);
        font-size: 0.9rem;
    }

    .bill-input {
        width: 120px;
        flex: none;
    }

    .bill-total-value {
        font-size: 1rem;
    }

    /* Grand Total Mobile */
    .bill-row.bill-grand-total {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-top: 1rem;
    }

    .bill-grand-total .bill-type {
        font-size: 1.1rem;
        padding-bottom: 0;
        border-bottom: none;
        text-align: left;
    }

    .bill-grand-total .spacer {
        display: none;
    }

    .grand-total-value {
        font-size: 1.3rem;
    }

    /* Result Cards Mobile */
    .result-section {
        padding: 1rem;
    }

    .result-cards {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .result-card {
        padding: 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .result-card h4 {
        margin-bottom: 0;
        font-size: 0.9rem;
    }

    .result-value {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .cash-count-card {
        padding: 1rem;
    }

    .cash-count-title {
        font-size: 1.1rem;
    }

    .cash-count-summary {
        grid-template-columns: 1fr;
    }

    .cash-count-summary .stat-card .value {
        font-size: 1.1rem;
    }

    .bill-input {
        width: 100px;
    }

    .grand-total-value {
        font-size: 1.2rem;
    }
}

/* ====================================
   Transactions Modal (Dashboard Mobile)
   ==================================== */
.txn-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    justify-content: center;
    align-items: flex-start;
    padding: 1rem;
    overflow-y: auto;
}

.txn-modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
}

.txn-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(79, 70, 229, 0.2);
    border-radius: 1rem 1rem 0 0;
}

.txn-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.txn-modal-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.txn-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.txn-modal-body {
    padding: 1rem;
    overflow-y: auto;
    flex: 1;
}

.modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.modal-error {
    text-align: center;
    padding: 2rem;
    color: var(--danger);
}

/* Currency Summary Cards in Modal */
.modal-currency-summary {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.modal-currency-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.75rem;
    text-align: center;
}

.modal-currency-card .currency-name {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.modal-currency-card .currency-values {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.8rem;
}

/* THB Summary in Modal */
.modal-thb-summary {
    background: rgba(79, 70, 229, 0.15);
    border: 1px solid rgba(79, 70, 229, 0.3);
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.modal-thb-summary .thb-row {
    display: flex;
    justify-content: space-between;
    padding: 0.4rem 0;
    font-size: 0.9rem;
}

.modal-thb-summary .thb-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.modal-thb-summary .thb-balance {
    padding-top: 0.6rem;
    margin-top: 0.3rem;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
}

/* Transaction Cards in Modal */
.modal-transactions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-transactions h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.modal-txn-card {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 0.75rem;
}

.modal-txn-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.modal-txn-header .txn-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.modal-txn-body .modal-txn-main {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.modal-txn-body .txn-currency {
    font-weight: 600;
    font-size: 1rem;
    color: var(--accent-color);
}

.modal-txn-body .txn-amount {
    font-weight: 700;
    font-size: 1.1rem;
}

.modal-txn-body .modal-txn-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-txn-body .modal-txn-details .txn-thb {
    color: var(--text-color);
    font-weight: 600;
}

@media (max-width: 480px) {
    .txn-modal {
        padding: 0.5rem;
    }

    .txn-modal-content {
        max-height: 95vh;
        margin-top: 0.5rem;
    }

    .txn-modal-header {
        padding: 0.75rem 1rem;
    }

    .txn-modal-header h3 {
        font-size: 1rem;
    }

    .modal-currency-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Utility Classes */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.nowrap {
    white-space: nowrap;
}

.font-bold {
    font-weight: bold;
}

.bg-transparent {
    background: transparent;
}

.p-0 {
    padding: 0;
}

.overflow-x-auto {
    overflow-x: auto;
}

.min-w-900 {
    min-width: 900px;
}

.min-w-1000 {
    min-width: 1000px;
}

.gap-2 {
    gap: 0.5rem;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.text-white {
    color: white;
}

.border-none {
    border: none;
}

.cursor-pointer {
    cursor: pointer;
}

.decoration-none {
    text-decoration: none;
}

.inline-flex {
    display: inline-flex;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.text-sm {
    font-size: 0.8rem;
}

.text-xs {
    font-size: 0.75rem;
}

.w-auto {
    width: auto;
}

.text-muted {
    color: var(--text-muted);
}

/* Dashboard Action Grid */
.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.btn-action-small {
    width: 100%;
    font-size: 0.8rem !important;
    /* Force override */
    text-align: center;
    white-space: nowrap;
    color: white !important;
}

.btn-bg-success {
    background: var(--success) !important;
}

.btn-bg-primary {
    background: var(--primary-color) !important;
}

.btn-bg-warning {
    background: var(--warning) !important;
    color: black !important;
}

.btn-bg-info {
    background: var(--info) !important;
}

/* Dashboard Mobile Store Cards */
.store-card-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.btn-mobile-action {
    width: 100%;
    font-size: 0.9rem;
    color: white;
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
}

.text-orange {
    color: orange;
}

/* Transaction Page Styles */
.mobile-txn-row {
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-txn-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.mobile-txn-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.badge-sm {
    font-size: 0.7rem;
    padding: 2px 6px;
}

.btn-view-details {
    background: #6b7280;
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
}

.btn-print-slip {
    background: var(--accent-color);
    color: var(--background-color);
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
}

.btn-delete-mobile {
    background: var(--danger);
    color: white;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}

.ml-2 {
    margin-left: 0.5rem;
}

.gap-2 {
    gap: 0.5rem;
}

.badge-topup {
    background: orange;
    color: black;
}

.link-muted {
    color: #6b7280;
    text-decoration: none;
    margin-right: 10px;
}

.link-accent {
    color: var(--accent-color);
    text-decoration: none;
    margin-right: 10px;
}

.btn-delete-table {
    background: var(--danger);
    color: white;
    border: none;
    padding: 2px 5px;
    cursor: pointer;
    border-radius: 4px;
}