/* Business Manager - Light Glass Theme */
:root {
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.45);
    --primary: #c2410c;
    --primary-hover: #9a3412;
    --primary-light: #fff7ed;
    --primary-muted: #ffedd5;
    --accent-gold: #f59e0b;
    --text: #0f172a;
    --text-muted: #64748b;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0284c7;
}

* { box-sizing: border-box; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    min-height: 100vh;
}

.app-bg {
    background: #ffffff;
    min-height: 100vh;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.pos-agent-card {
    overflow: visible;
    position: relative;
    z-index: 20;
}

.pos-agent-card:focus-within {
    z-index: 40;
}

.pos-agent-results {
    z-index: 50;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

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

.btn-secondary {
    background: white;
    color: var(--text);
    border: 1px solid #e2e8f0;
}
.btn-secondary:hover { background: #f8fafc; }

.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }

.choice-group {
    display: grid;
    gap: 0.5rem;
}

.choice-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.8125rem;
    background: white;
    border: 1px solid #e2e8f0;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.choice-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.choice-btn-active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 2px rgba(194, 65, 12, 0.15);
}

.pay-mode-group {
    display: grid;
    gap: 0.5rem;
}

.pay-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.8125rem;
    line-height: 1.2;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 2.75rem;
    text-align: center;
}

.pay-btn-full {
    background: #dcfce7;
    color: #166534;
}

.pay-btn-full:hover {
    background: #bbf7d0;
}

.pay-btn-full.pay-btn-active {
    background: var(--success);
    color: #fff;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.pay-btn-credit {
    background: #fef3c7;
    color: #92400e;
}

.pay-btn-credit:hover {
    background: #fde68a;
}

.pay-btn-credit.pay-btn-active {
    background: var(--warning);
    color: #fff;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}

.pay-btn-partial {
    background: #dbeafe;
    color: #1e40af;
}

.pay-btn-partial:hover {
    background: #bfdbfe;
}

.pay-btn-partial.pay-btn-active {
    background: var(--info);
    color: #fff;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: rgba(255,255,255,0.9);
    font-size: 0.875rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}

.badge {
    display: inline-flex;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #e0f2fe; color: #075985; }
.badge-neutral { background: #f1f5f9; color: #475569; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid #e2e8f0;
}
.data-table td {
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
}
.data-table tr:hover td { background: rgba(255,255,255,0.5); }

.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 9999px;
    transition: width 0.3s;
}

/* Sidebar */
.sidebar {
    width: 260px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 40;
    padding: 1.25rem;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: all 0.2s;
    text-decoration: none;
}

.sidebar-link:hover, .sidebar-link.active {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-link.active { font-weight: 600; }

/* Mobile nav */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    padding: 0.375rem;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 0.5rem;
}

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

.mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
}

.stat-card-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 100;
}

@media (max-width: 1023px) {
    .sidebar { display: none; }
    .main-content { padding-bottom: 5rem !important; }
}

@media (min-width: 1024px) {
    .mobile-bottom-nav, .mobile-menu-btn { display: none !important; }
}

@media (max-width: 640px) {
    .data-table-responsive { display: block; overflow-x: auto; }
}

/* ===== Login Page — Dark Orange & Gold ===== */
:root {
    --login-red-dark: #7c2d12;
    --login-red: #c2410c;
    --login-red-mid: #9a3412;
    --login-red-light: #ea580c;
    --login-gold: #f59e0b;
    --login-gold-light: #fde68a;
    --login-gold-dark: #b45309;
}

.login-page-bg {
    background: #ffffff;
    min-height: 100vh;
}

.login-card {
    display: flex;
    width: 100%;
    max-width: 900px;
    min-height: 520px;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(212, 175, 55, 0.15);
}

/* Left panel */
.login-panel-left {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 2rem;
    background: linear-gradient(160deg, var(--login-red-light) 0%, var(--login-red) 45%, var(--login-red-dark) 100%);
    overflow: hidden;
}

.login-diamond {
    position: absolute;
    border: 2px solid rgba(212, 175, 55, 0.2);
    border-radius: 0.5rem;
    transform: rotate(45deg);
    pointer-events: none;
}

.login-diamond-1 {
    width: 120px;
    height: 120px;
    top: 15%;
    right: -30px;
    background: rgba(212, 175, 55, 0.06);
}

.login-diamond-2 {
    width: 80px;
    height: 80px;
    bottom: 25%;
    left: 10%;
    background: rgba(255, 255, 255, 0.04);
}

.login-diamond-3 {
    width: 50px;
    height: 50px;
    top: 55%;
    right: 25%;
    border-color: rgba(212, 175, 55, 0.35);
}

.login-panel-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.login-logo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    object-fit: cover;
    border: 2px solid rgba(212, 175, 55, 0.5);
}

.login-logo-placeholder {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    background: rgba(212, 175, 55, 0.25);
    border: 2px solid var(--login-gold);
    color: var(--login-gold-light);
    font-weight: 700;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-business-name {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.login-panel-center {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1rem 0;
}

.login-welcome {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.login-welcome-sub {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    line-height: 1.6;
    max-width: 260px;
    margin: 0 auto;
}

.login-panel-bottom {
    position: relative;
    z-index: 1;
    text-align: center;
}

.login-portal-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    border: 1px solid rgba(212, 175, 55, 0.5);
    border-radius: 9999px;
    color: var(--login-gold-light);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

/* Right panel */
.login-panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 2.5rem 2rem;
}

.login-form-wrap {
    width: 100%;
    max-width: 320px;
}

.login-title {
    color: var(--login-red);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    color: #94a3b8;
    font-size: 0.8125rem;
    margin-bottom: 1.75rem;
}

.login-error {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 0.8125rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-field {
    position: relative;
    display: flex;
    align-items: center;
}

.login-field-icon {
    position: absolute;
    left: 1rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 1;
}

.login-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: none;
    border-radius: 9999px;
    background: #f1f5f9;
    font-size: 0.875rem;
    color: var(--text);
    transition: box-shadow 0.2s, background 0.2s;
}

.login-input::placeholder {
    color: #94a3b8;
}

.login-input:focus {
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 2px var(--primary), 0 0 0 4px rgba(194, 65, 12, 0.15);
}

.login-btn {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--login-red-mid) 0%, var(--login-red) 50%, var(--login-red-dark) 100%);
    color: #fff;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(194, 65, 12, 0.35);
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(194, 65, 12, 0.45);
}

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

.login-footer-note {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.6875rem;
    color: #cbd5e1;
}

/* Mobile: stack panels */
@media (max-width: 767px) {
    .login-card {
        flex-direction: column;
        max-width: 420px;
        min-height: auto;
    }

    .login-panel-left {
        padding: 2rem 1.5rem;
        min-height: 220px;
    }

    .login-welcome {
        font-size: 1.5rem;
    }

    .login-panel-center {
        padding: 0.5rem 0;
    }

    .login-panel-bottom {
        display: none;
    }

    .login-panel-right {
        padding: 2rem 1.5rem;
    }
}

/* Reports */
.report-filters .btn {
    white-space: nowrap;
}

.report-table td {
    vertical-align: middle;
}

@media print {
    .no-print,
    .sidebar,
    .mobile-nav,
    .toast-container { display: none !important; }

    .glass-card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
        break-inside: avoid;
    }

    body { background: #fff; }
    main { margin: 0 !important; padding: 0 !important; }
}

