@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ==================== VARIABLES & RESET ==================== */
:root {
    --bg-primary: #0a0e27;
    --bg-secondary: #131829;
    --bg-card: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-cyan: #00d4ff;
    --accent-purple: #a855f7;
    --accent-orange: #fb923c;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --border-glass: rgba(255, 255, 255, 0.1);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(rgba(10, 14, 39, 0.8), rgba(10, 14, 39, 0.8)), url('assets/store-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==================== AUTH SCREEN (LOGIN/REGISTER) ==================== */
#auth-screen,
#client-login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: linear-gradient(rgba(10, 14, 39, 0.7), rgba(10, 14, 39, 0.7)), url('assets/store-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.auth-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    padding: 3rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-form h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-align: center;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
    background: rgba(255, 255, 255, 0.08);
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--accent-cyan);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-switch a:hover {
    color: var(--accent-purple);
}

.auth-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* ==================== APP LAYOUT ==================== */
/* ==================== APP LAYOUT ==================== */
#app-screen {
    min-height: 100vh;
    padding-bottom: 100px;
    /* Increased to accommodate bottom nav */
}



.app-header {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-glass);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo-area {
    font-size: 1.5rem;
    margin-right: 1rem;
    display: flex;
    align-items: center;
}

.header-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.header-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-cyan);
}

.header-left h1 {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-name {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Navigation */
.app-nav {
    display: flex;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    background: transparent;
    overflow-x: auto;
}

.nav-tab {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.nav-tab.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(168, 85, 247, 0.2));
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

/* Content */
.app-content {
    padding: 0 2rem;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ==================== DASHBOARD ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
    border-color: rgba(0, 212, 255, 0.3);
}

.dashboard-card.warning {
    border-color: rgba(251, 146, 60, 0.3);
}

.dashboard-card.warning:hover {
    box-shadow: 0 10px 30px rgba(251, 146, 60, 0.2);
}

.dashboard-card.danger {
    border-color: rgba(236, 72, 153, 0.3);
}

.dashboard-card.danger:hover {
    box-shadow: 0 10px 30px rgba(236, 72, 153, 0.2);
}

.dashboard-card.success {
    border-color: rgba(16, 185, 129, 0.3);
}

.dashboard-card.success:hover {
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

.dashboard-card.cyan {
    border-color: rgba(0, 212, 255, 0.3);
}

.dashboard-card.cyan:hover {
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.card-icon {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    flex-shrink: 0;
}

.card-info h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.dashboard-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-shortcut {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 1rem;
    min-height: 160px;
}

.dashboard-shortcut:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.dashboard-shortcut .shortcut-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.dashboard-shortcut span {
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Colors for shortcuts */
.dashboard-shortcut.blue {
    border-color: rgba(59, 130, 246, 0.3);
}

.dashboard-shortcut.blue .shortcut-icon {
    color: #3b82f6;
}

.dashboard-shortcut.purple {
    border-color: rgba(168, 85, 247, 0.3);
}

.dashboard-shortcut.purple .shortcut-icon {
    color: #a855f7;
}

.dashboard-shortcut.green {
    border-color: rgba(16, 185, 129, 0.3);
}

.dashboard-shortcut.green .shortcut-icon {
    color: #10b981;
}

.dashboard-shortcut.orange {
    border-color: rgba(249, 115, 22, 0.3);
}

.dashboard-shortcut.orange .shortcut-icon {
    color: #f97316;
}

.dashboard-shortcut.red {
    border-color: rgba(239, 68, 68, 0.3);
}

.dashboard-shortcut.red .shortcut-icon {
    color: #ef4444;
}

.dashboard-shortcut.teal {
    border-color: rgba(20, 184, 166, 0.3);
}

.dashboard-shortcut.teal .shortcut-icon {
    color: #14b8a6;
}

.dashboard-shortcut.brown {
    border-color: rgba(161, 98, 7, 0.3);
}

.dashboard-shortcut.brown .shortcut-icon {
    color: #a16207;
}

.dashboard-shortcut.grey {
    border-color: rgba(107, 114, 128, 0.3);
}

.dashboard-shortcut.grey .shortcut-icon {
    color: #9ca3af;
}

.dashboard-shortcut.green-light {
    border-color: rgba(132, 204, 22, 0.3);
}

.dashboard-shortcut.green-light .shortcut-icon {
    color: #84cc16;
}

/* Brand Shortcuts */
.dashboard-shortcut.brand-gmail {
    border-color: rgba(234, 67, 53, 0.3);
}

.dashboard-shortcut.brand-gmail .shortcut-icon {
    color: #ea4335;
}

.dashboard-shortcut.brand-facebook {
    border-color: rgba(24, 119, 242, 0.3);
}

.dashboard-shortcut.brand-facebook .shortcut-icon {
    color: #1877f2;
}

.dashboard-shortcut.brand-instagram {
    border-color: rgba(225, 48, 108, 0.3);
}

.dashboard-shortcut.brand-instagram .shortcut-icon {
    color: #e1306c;
}

.dashboard-shortcut.brand-tiktok {
    border-color: rgba(255, 255, 255, 0.2);
}

.dashboard-shortcut.brand-tiktok .shortcut-icon {
    color: #ffffff;
}

.dashboard-shortcut.brand-mercadolivre {
    border-color: rgba(255, 230, 0, 0.3);
}

.dashboard-shortcut.brand-mercadolivre .shortcut-icon {
    color: #ffe600;
}

.dashboard-shortcut.brand-youtube {
    border-color: rgba(255, 0, 0, 0.3);
}

.dashboard-shortcut.brand-youtube .shortcut-icon {
    color: #ff0000;
}

.dashboard-shortcut.brand-picpay {
    background: #11c76f;
    border-color: #11c76f;
    color: white;
}

.dashboard-shortcut.brand-picpay:hover {
    background: #0ea85d;
    box-shadow: 0 10px 30px rgba(17, 199, 111, 0.4);
    transform: translateY(-5px);
}

.dashboard-shortcut.brand-picpay .shortcut-icon,
.dashboard-shortcut.brand-picpay span {
    color: white !important;
}

/* ==================== TABLES ==================== */
.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.table-container {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--accent-cyan);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 600px;
}

.data-table th {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.25rem 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--accent-cyan);
    border-bottom: 2px solid var(--border-glass);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.category-badge {
    background: rgba(168, 85, 247, 0.1);
    color: var(--accent-purple);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.data-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dashboard-card .table-container {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-cyan) rgba(255, 255, 255, 0.05);
}

/* ==================== CAIXA/PDV ==================== */
.caixa-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.pos-layout {
    background: linear-gradient(rgba(0, 31, 63, 0.7), rgba(0, 31, 63, 0.7)), url('assets/caixa-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    padding: 1rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.pos-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40rem;
    color: rgba(255, 255, 255, 0.03);
    z-index: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}



.caixa-left,
.caixa-right {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2rem;
}

.barcode-scanner {
    margin-bottom: 2rem;
}

.barcode-scanner label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.barcode-scanner input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
}

.barcode-scanner input:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.cart-items {
    min-height: 200px;
    margin-bottom: 1.5rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    font-size: 1.25rem;
    font-weight: 700;
}

.total-value {
    color: var(--accent-green);
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.payment-btn,
.payment-option-btn {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.payment-btn:hover,
.payment-option-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.payment-btn.active,
.payment-option-btn.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(168, 85, 247, 0.2));
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.action-buttons {
    display: grid;
    gap: 1rem;
}

/* ==================== BUTTONS ==================== */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 212, 255, 0.4);
}

.btn-secondary {
    padding: 0.875rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.btn-success {
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--accent-green), #059669);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    padding: 0.875rem;
    background: linear-gradient(135deg, var(--accent-red), #dc2626);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.4);
}

.btn-logout {
    padding: 0.625rem 1.25rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    color: var(--accent-red);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

.btn-text {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0.5rem;
}

.btn-text:hover {
    color: var(--accent-cyan);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex !important;
}

.modal-content {
    background: rgba(19, 24, 41, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-actions button {
    flex: 1;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}


.payment-option-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.payment-option-btn.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2), rgba(168, 85, 247, 0.2));
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.2);
}

#btn-modal-picpay.active {
    background: linear-gradient(135deg, rgba(17, 199, 111, 0.2), rgba(5, 150, 105, 0.2));
    border-color: #11c76f;
    color: #11c76f;
    box-shadow: 0 4px 15px rgba(17, 199, 111, 0.2);
}


/* ==================== UTILITIES & STATUS ==================== */
.server-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-top: 1rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--text-secondary);
    transition: all 0.3s ease;
}

.server-status.online .status-dot {
    background-color: var(--accent-green);
    box-shadow: 0 0 10px var(--accent-green);
    animation: pulse 2s infinite;
}

.server-status.offline .status-dot {
    background-color: var(--accent-red);
    box-shadow: 0 0 10px var(--accent-red);
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stock-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
}

.stock-badge.ok {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stock-badge.low {
    background: rgba(251, 146, 60, 0.1);
    color: var(--accent-orange);
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.stock-badge.out {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .app-header {
        padding: 1rem;
    }

    .app-nav {
        padding: 1rem;
    }

    .app-content {
        padding: 0 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .caixa-container {
        grid-template-columns: 1fr;
    }

    .payment-methods {
        grid-template-columns: 1fr;
    }
}

/* ==================== TABLE SCROLLBAR & ADMIN BUTTONS ==================== */
.table-container {
    overflow-x: auto;
    /* Enable horizontal scrolling */
    white-space: nowrap;
    /* Prevent text wrapping */
    padding-bottom: 1rem;
    /* Space for scrollbar */
}

/* Custom Scrollbar for Table Container */
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: var(--accent-cyan);
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: var(--accent-blue);
}

/* Small Buttons for Admin Actions */
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}


/* ==================== NEW POS LAYOUT (REDESIGN) ==================== */

/* Header Redesign */
.app-header {
    background: #1e293b;
    /* Darker header */
    border-bottom: none;
    padding: 0.5rem 1rem;
    height: 60px;
}

.logo-area {
    font-size: 1.5rem;
    margin-right: 2rem;
    display: flex;
    align-items: center;
}

.header-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
    text-transform: uppercase;
}

.header-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.header-btn.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    min-height: 160px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-shortcut:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.shortcut-icon {
    font-size: 3rem;
    color: white;
}

.dashboard-shortcut span {
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Shortcut Colors */
.dashboard-shortcut.blue {
    background: #3b82f6;
}

.dashboard-shortcut.brown {
    background: #78350f;
}

/* Using brown for + Produto */
.dashboard-shortcut.grey {
    background: #64748b;
}

.dashboard-shortcut.teal {
    background: #14b8a6;
}

.dashboard-shortcut.purple {
    background: #a855f7;
}

.dashboard-shortcut.green {
    background: #22c55e;
}

.dashboard-shortcut.green-light {
    background: #86efac;
    color: #064e3b;
}

.dashboard-shortcut.green-light .shortcut-icon,
.dashboard-shortcut.green-light span {
    color: #064e3b;
}

.dashboard-shortcut.orange {
    background: #f97316;
}

.dashboard-shortcut.red {
    background: #ef4444;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #f8fafc;
    display: flex;
    /* Visible on all devices */
    justify-content: center;
    /* Center items on desktop */
    padding: 0;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    height: 70px;
    gap: 1rem;
}

.nav-item {
    flex: 1;
    border: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    cursor: pointer;
    color: #64748b;
    font-weight: 700;
    font-size: 0.7rem;
    transition: all 0.2s;
    border-right: 1px solid #e2e8f0;
}

.nav-item:last-child {
    border-right: none;
}

.nav-item i {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: #f1f5f9;
    color: #334155;
}

.nav-item.active-green {
    background: #22c55e;
}

/* ==================== CLIENT ONLINE STORE ==================== */

/* Store Container */
.store-container {
    width: 100%;
    min-height: 100vh;
    background: transparent;
    padding-bottom: 70px;
}

/* Store Header with Search */
.store-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #ee4d2d 0%, #ff7337 100%);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.store-search-bar {
    flex: 1;
    background: white;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.store-search-bar i {
    color: #999;
    font-size: 1.2rem;
}

.store-search-bar input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 0.9rem;
    background: transparent;
}

.store-cart-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.store-cart-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.store-cart-btn i {
    font-size: 1.5rem;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    text-align: center;
}

/* Promotional Banner */
.store-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem 1rem;
    margin: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.banner-content {
    text-align: center;
    color: white;
}

.banner-content h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.banner-content p {
    font-size: 1rem;
    opacity: 0.95;
}

/* Quick Actions */
.store-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 1rem;
    background: #ee4d2d;
    margin: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.action-btn i {
    font-size: 1.8rem;
    color: white;
}

.action-btn span {
    font-size: 0.75rem;
    color: white;
}

/* Products Section */
.store-products-section {
    padding: 0 1rem;
}

.store-products-section h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background: #f0f0f0;
}

.product-info {
    padding: 0.75rem;
}

.product-name {
    font-size: 0.85rem;
    color: #333;
    margin-bottom: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 2.4rem;
}

.product-price {
    font-size: 1.1rem;
    font-weight: bold;
    color: #ee4d2d;
    margin-bottom: 0.5rem;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-stock {
    font-size: 0.7rem;
    color: #666;
}

.btn-add-cart {
    background: #ee4d2d;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-cart:hover {
    background: #d73211;
}

.btn-add-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Store Bottom Navigation */
.store-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    display: flex;
    justify-content: space-around;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    padding: 0.5rem 0;
    z-index: 1000;
}

.store-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #999;
    transition: all 0.2s;
}

.store-nav-item i {
    font-size: 1.5rem;
}

.store-nav-item span {
    font-size: 0.7rem;
}

.store-nav-item.active {
    color: #ee4d2d;
}

.store-nav-item:hover {
    color: #ee4d2d;
}

/* Cart Screen */
.cart-header {
    background: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-back {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 0.5rem;
}

.cart-header h2 {
    font-size: 1.2rem;
    color: #333;
}

.cart-items-container {
    padding: 1rem;
    min-height: calc(100vh - 200px);
}

.cart-item-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    background: #f0f0f0;
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-size: 1rem;
    font-weight: bold;
    color: #ee4d2d;
    margin-bottom: 0.5rem;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    background: #f0f0f0;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.qty-btn:hover {
    background: #e0e0e0;
}

.cart-item-qty span {
    min-width: 30px;
    text-align: center;
}

.btn-remove {
    background: none;
    border: none;
    color: #ff4444;
    cursor: pointer;
    font-size: 1.3rem;
}

.cart-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 1rem;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.total-amount {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ee4d2d;
}

.btn-checkout {
    width: 100%;
    background: #ee4d2d;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-checkout:hover {
    background: #d73211;
}

/* Orders Screen */
.orders-container {
    padding: 1rem;
}

.order-card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.order-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}

.order-id {
    font-size: 0.85rem;
    color: #666;
}

.order-date {
    font-size: 0.85rem;
    color: #999;
}

.order-items {
    margin-bottom: 0.75rem;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    color: #ee4d2d;
}

/* Profile Screen */
.profile-container {
    background: white;
    margin: 1rem;
    padding: 2rem 1rem;
    border-radius: 12px;
    text-align: center;
}

.profile-info {
    margin-bottom: 2rem;
}

.profile-info h3 {
    margin: 1rem 0 0.5rem;
    color: #333;
}

.profile-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Responsive */
@media (min-width: 768px) {

    /* ==================== NOTIFICATION & APPROVAL MODAL ==================== */

    #new-order-notification {
        transition: all 0.3s ease;
    }

    #new-order-notification:hover {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 0 60px rgba(16, 185, 129, 0.7);
    }

    @keyframes pulse {
        0% {
            transform: translate(-50%, -50%) scale(1);
            box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
        }

        70% {
            transform: translate(-50%, -50%) scale(1.05);
            box-shadow: 0 0 0 20px rgba(16, 185, 129, 0);
        }

        100% {
            transform: translate(-50%, -50%) scale(1);
            box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
        }
    }

    .w-large {
        max-width: 900px;
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .store-container {
        max-width: 1200px;
        margin: 0 auto;
    }
}

.nav-item.active-green:hover {
    background: #16a34a;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .dashboard-grid-large {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-grid-large {
        grid-template-columns: repeat(2, 1fr);
    }

    .bottom-nav {
        display: flex;
        overflow-x: auto;
        justify-content: flex-start;
    }

    .nav-item {
        min-width: 80px;
    }
}

.pos-layout {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 80px);
    /* Adjust based on header/nav */
    background-color: #f0f2f5;
    /* Light background for contrast */
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

.pos-header {
    background: linear-gradient(to right, #1e3a8a, #1e40af);
    color: white;
    padding: 0.25rem 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    height: 40px;
}

.pos-status-bar {
    background-color: #dc2626;
    /* Red for "Caixa Ocupado" */
    color: white;
    padding: 0.2rem 1rem;
    border-radius: 4px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pos-main-container {
    display: flex;
    flex: 1;
    padding: 1rem;
    gap: 1rem;
    overflow: hidden;
}

/* Left Panel */
.pos-panel-left {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pos-qty-display {
    background-color: #1e3a8a;
    color: white;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pos-qty-number {
    font-size: 2rem;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    padding: 0 0.5rem;
    border-radius: 4px;
}

.pos-product-desc {
    font-size: 1.1rem;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-image-container {
    flex: 1;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    position: relative;
    min-height: 120px;
}

.pos-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.pos-input-group {
    background: white;
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pos-input-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.25rem;
    display: block;
}

.pos-input {
    width: 100%;
    padding: 0.5rem;
    font-size: 1.2rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
}

.pos-input:focus {
    border-color: #1e40af;
    outline: none;
}

.pos-price-display {
    background: white;
    padding: 0.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pos-price-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1f2937;
}

/* Right Panel */
.pos-panel-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pos-cart-table-container {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background-color: white;
}

.pos-table {
    width: 100%;
    border-collapse: collapse;
}

/* POS Table Customization per user request */
.pos-table tbody tr td:nth-child(4),
/* Description */
.pos-table tbody tr td:nth-child(5),
/* UN */
.pos-table tbody tr td:nth-child(7),
/* Unit Price */
.pos-table tbody tr td:nth-child(8)

/* Total */
    {
    color: #0d47a1 !important;
    /* Dark Blue (Azur Escuro) */
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

/* Trash Button */
.pos-table tbody tr td:nth-child(9) button {
    color: #0d47a1 !important;
    /* Dark Blue to match */
    font-size: 1.5rem !important;
    /* Larger icon */
    background: rgba(13, 71, 161, 0.1) !important;
    /* Subtle background */
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.pos-table tbody tr td:nth-child(9) button:hover {
    background: #0d47a1 !important;
    color: white !important;
    transform: scale(1.1);
}

.pos-table th {
    background-color: #f3f4f6;
    padding: 0.4rem;
    text-align: left;
    font-weight: 600;
    color: #4b5563;
    position: sticky;
    top: 0;
}

.pos-table td {
    padding: 0.4rem;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
}

.pos-table tr:nth-child(even) {
    background-color: #f9fafb;
}

.pos-totals-area {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-top: 2px solid #e5e7eb;
    padding-top: 1rem;
}

.pos-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-total-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4b5563;
}

.pos-total-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1e40af;
}

.pos-payment-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.pos-payment-input {
    width: 100%;
    padding: 0.4rem;
    font-size: 1.2rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    text-align: right;
}

.pos-change-display {
    font-size: 1.5rem;
    font-weight: bold;
    color: #059669;
    /* Green */
    text-align: right;
}

.pos-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-top: auto;
}

.pos-btn {
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
    text-align: center;
    font-size: 0.8rem;
}

.pos-btn:hover {
    opacity: 0.9;
}

.pos-btn-blue {
    background-color: #1e40af;
}

.pos-btn-green {
    background-color: #059669;
}

.pos-btn-red {
    background-color: #dc2626;
}

.pos-btn-yellow {
    background-color: #d97706;
}

/* PIX Overlay */
.pix-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    border-radius: 12px;
}

.pix-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
}

.btn-sm.btn-success {
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}


/* Quantity Controls in Cart */
.qty-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.btn-qty {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: white;
    color: #4b5563;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-qty:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #1e40af;
}

.input-qty {
    width: 40px;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0.2rem;
    font-weight: 600;
    color: #1f2937;
}


/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 100;
}

.search-result-item {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f3f4f6;
}

.search-result-name {
    font-weight: 600;
    color: #1f2937;
}

.search-result-price {
    color: #059669;
    font-weight: bold;
}



.btn-sm.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-sm.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

/* Products Split Screen Layout */
.products-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 1.5rem;
    height: calc(100vh - 140px);
    /* Adjust based on header/nav */
    overflow: hidden;
}

.products-form-panel {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    border: 1px solid var(--border-color);
    color: #1f2937;
    /* Dark text for white background */
}

.products-form-panel label {
    color: #4b5563;
    /* Darker grey for labels */
}

.products-form-panel input,
.products-form-panel select {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #1f2937;
}

.products-list-panel {
    background: linear-gradient(rgba(10, 14, 39, 0.8), rgba(10, 14, 39, 0.8)), url('assets/caixa-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-glass);
    overflow: hidden;
    color: var(--text-primary);
}

.products-list-panel h2,
.products-form-panel h2 {
    color: var(--text-primary);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.products-list-panel .table-container {
    flex: 1;
    overflow-y: auto;
}

.products-list-panel table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-cyan);
}

.products-list-panel table td {
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-glass);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
    }

    .products-form-panel {
        margin-bottom: 1.5rem;
    }
}

/* Store Badge on Product Card */
.store-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
    pointer-events: none;
}

.product-card {
    position: relative;
    /* Ensure badge is positioned relative to card */

    /* Product Price Row */
    .product-price-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .product-price {
        font-weight: bold;
        color: var(--accent-green);
        font-size: 1.1rem;
    }

    .owner-name {
        font-size: 0.75rem;
        color: var(--text-secondary);
        background: rgba(0, 0, 0, 0.05);
        padding: 2px 6px;
        border-radius: 4px;
    }
}

.pin-badge {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-orange);
    margin-left: 0.5rem;
    font-family: monospace;
    letter-spacing: 1px;
}

/* PIX QR Container */
#pix-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin: 20px auto;
    width: 230px;
    /* 200px QR + padding */
    min-height: 230px;
}

#pix-qr-container img,
#pix-qr-container canvas {
    display: block;
    max-width: 100%;
}

/* ==================== TOAST NOTIFICATIONS ==================== */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notification-toast {
    background: rgba(30, 41, 59, 0.95);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    border-left: 4px solid var(--accent-cyan);
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.notification-toast.show {
    transform: translateX(0);
}

.notification-toast.success {
    border-color: var(--accent-green);
}

.notification-toast.error {
    border-color: var(--accent-red);
}

.notification-toast.warning {
    border-color: var(--accent-orange);
}

.notification-toast.info {
    border-color: var(--accent-cyan);
}

.notification-toast i {
    font-size: 1.5rem;
}

.notification-toast.success i {
    color: var(--accent-green);
}

.notification-toast.error i {
    color: var(--accent-red);
}

.notification-toast.warning i {
    color: var(--accent-orange);
}

.notification-toast.info i {
    color: var(--accent-cyan);
}

/* ==================== SUBSCRIPTION BLOCK SCREEN ==================== */
#subscription-block-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    background-color: #0f172a;
}

/* ==================== WHATSAPP WEB STYLE ==================== */
.whatsapp-web-container {
    padding: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px);
}

.whatsapp-web-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 17px 50px 0 rgba(0, 0, 0, .19), 0 12px 15px 0 rgba(0, 0, 0, .24);
    width: 100%;
    max-width: 900px;
    overflow: hidden;
    color: #41525d;
}

.whatsapp-web-header {
    background-color: #f0f2f5;
    padding: 2rem 3rem;
    border-bottom: 1px solid #e9edef;
}

.whatsapp-web-title {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.whatsapp-web-title h2 {
    color: #41525d;
    font-size: 1.75rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
}

.whatsapp-web-title p {
    color: #667781;
    font-size: 0.95rem;
}

.whatsapp-web-body {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    padding: 3rem;
    gap: 3rem;
}

.whatsapp-instructions ol {
    padding-left: 1.5rem;
    color: #3b4a54;
    font-size: 1.1rem;
    line-height: 2;
}

.whatsapp-instructions li {
    margin-bottom: 0.75rem;
}

.whatsapp-pairing-toggle {
    margin-top: 2.5rem;
}

.btn-link {
    background: none;
    border: none;
    color: #008069;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

.whatsapp-qr-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.qr-wrapper {
    width: 264px;
    height: 264px;
    background: white;
    padding: 1rem;
    border: 1px solid #e9edef;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.qr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #667781;
    font-size: 0.9rem;
}

.qr-loading i {
    font-size: 2rem;
    color: #00a884;
}

#whatsapp-qr-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#whatsapp-pairing-form {
    text-align: center;
    width: 100%;
}

#whatsapp-pairing-form h3 {
    margin-bottom: 0.5rem;
    color: #41525d;
}

#whatsapp-pairing-form input {
    width: 100%;
    padding: 0.75rem;
    margin: 1rem 0;
    border: 1px solid #e9edef;
    border-radius: 6px;
    text-align: center;
    font-size: 1.1rem;
    color: #111b21;
}

.pairing-code-text {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    color: #008069;
    margin: 1.5rem 0;
    font-family: monospace;
}

.connection-status {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #667781;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #d1d7db;
}

.whatsapp-web-footer {
    padding: 1.5rem 3rem;
    background-color: #f8f9fa;
    border-top: 1px solid #e9edef;
    text-align: right;
}

.btn-danger-light {
    background-color: #fff;
    border: 1px solid #d1d7db;
    color: #ea0038;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger-light:hover {
    background-color: #fff5f5;
    border-color: #f8d7da;
}

/* Responsive WhatsApp Web */
@media (max-width: 850px) {
    .whatsapp-web-body {
        grid-template-columns: 1fr;
        padding: 2rem;
        gap: 2rem;
    }

    .whatsapp-qr-area {
        order: -1;
    }
}

/* ==================== STORE QUICK ACTIONS ==================== */
.store-quick-actions {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
    scrollbar-width: thin;
    white-space: nowrap;
}

.store-quick-actions::-webkit-scrollbar {
    height: 4px;
}

.store-quick-actions::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.action-btn.active {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 212, 255, 0.2);
}

.action-btn i {
    font-size: 1.2rem;
}


/* ==================== MARQUEE ANIMATION ==================== */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.marquee-track {
    display: flex;
    gap: 15px;
    width: fit-content;
    animation: scroll 30s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

/* Brand Shortcuts */
.dashboard-shortcut.brand-gmail {
    background: #EA4335;
}

.dashboard-shortcut.brand-facebook {
    background: #1877F2;
}

.dashboard-shortcut.brand-instagram {
    background: #E1306C;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.dashboard-shortcut.brand-tiktok {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dashboard-shortcut.brand-mercadolivre {
    background: #FFE600;
}

.dashboard-shortcut.brand-mercadolivre .shortcut-icon,
.dashboard-shortcut.brand-mercadolivre span {
    color: #2d3277;
}

.dashboard-shortcut.brand-youtube {
    background: #FF0000;
}

/* ==================== LP WALLET MODAL ==================== */
.lp-card {
    background: linear-gradient(135deg, #FF6B6B 0%, #EE4D2D 100%);
    border-radius: 20px;
    padding: 2rem;
    color: white;
    box-shadow: 0 10px 30px rgba(238, 77, 45, 0.4);
    position: relative;
    overflow: hidden;
}

.lp-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.lp-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    justify-content: center;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.lp-balance-container {
    margin-bottom: 2.5rem;
}

.lp-label {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.lp-value {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.lp-converted {
    font-size: 1.2rem;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.2);
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 20px;
}

.lp-actions {
    margin-top: 1rem;
}

.btn-white-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-white-outline:hover {
    background: white;
    color: #EE4D2D;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ==================== AVATAR UPLOAD ==================== */
.profile-avatar-container {
    position: relative;
    width: 6rem;
    height: 6rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 50%;
}

.avatar-overlay i {
    color: white;
    font-size: 2rem;
}

.profile-avatar-container:hover .avatar-overlay {
    opacity: 1;
}

/* ==================== DRIVER UPDATE LOADER ==================== */
.premium-loader {
    width: 100px;
    height: 100px;
    border: 3px solid rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    position: relative;
}

.premium-loader::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border: 3px solid transparent;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: rotate 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

#driver-update-modal .modal-content {
    animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}