/* ROOT DESIGN SYSTEM */
:root {
    --bg-primary: #0a0b10;
    --bg-secondary: rgba(20, 22, 33, 0.7);
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.08);
    
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --color-primary: #6366f1; /* Indigo */
    --color-primary-hover: #4f46e5;
    --color-secondary: #06b6d4; /* Cyan */
    --color-success: #10b981; /* Emerald */
    --color-success-hover: #059669;
    --color-danger: #ef4444; /* Rose */
    --color-warning: #f59e0b; /* Amber */
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 16px;
}

/* BASE STYLES */
html {
    font-size: clamp(12px, 0.95vw, 18px);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 2rem;
}

/* Background Gradients */
.glass-bg {
    position: fixed;
    top: -10%;
    left: -10%;
    width: 60%;
    height: 70%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
    animation: pulse 15s infinite alternate;
}

.glass-bg2 {
    position: fixed;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 70%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
    animation: pulse 12s infinite alternate-reverse;
}

@keyframes pulse {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(5%, 5%); }
}

/* APP HEADER */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(10, 11, 16, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.logo h1 span {
    font-weight: 300;
    color: var(--color-secondary);
    font-size: 0.9rem;
    display: block;
    margin-top: -3px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* TOGGLE BUTTONS */
.view-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 4px;
    border-radius: 30px;
}

.toggle-btn {
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.toggle-btn:hover {
    color: var(--text-primary);
}

.toggle-btn.active {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* MAIN LAYOUT */
.main-container {
    max-width: 100rem;
    margin: 2rem auto 0;
    padding: 0 1.5rem;
    position: relative;
}

.view-section {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.view-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* PREMIUM GLASS CARDS */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-premium);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition-smooth);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.card-header {
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

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

/* FORMS & SELECTIONS */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.control-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.select-wrapper {
    position: relative;
    width: 100%;
}

select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

select option {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

select:focus {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.08);
}

.select-wrapper::after {
    content: "\f078";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* BUTTONS */
.btn {
    border: none;
    outline: none;
    font-family: var(--font-sans);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--color-primary-hover);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-success {
    background: var(--color-success);
    color: #fff;
}
.btn-success:hover {
    background: var(--color-success-hover);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.btn-success:disabled {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    border: 1px solid var(--card-border);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* CASHIER DASHBOARD GRID */
.dashboard-grid {
    display: grid;
    grid-template-columns: 22rem 1fr;
    gap: 1.5rem;
}

.sidebar-card {
    height: fit-content;
}

/* Status Info panel */
.status-panel {
    border-top: 1px solid var(--card-border);
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.status-label {
    color: var(--text-secondary);
}

.status-value {
    font-weight: 600;
}

.text-indigo {
    color: #818cf8;
}

.text-truncate {
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status badges */
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.status-badge.connected {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-badge.disconnected {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.connected .dot {
    background: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
    animation: blink 2s infinite;
}

.disconnected .dot {
    background: var(--color-danger);
}

@keyframes blink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.db-info-box {
    margin-top: 1.5rem;
    background: rgba(6, 182, 212, 0.05);
    border: 1px solid rgba(6, 182, 212, 0.15);
    padding: 1rem;
    border-radius: 8px;
}

.box-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.text-success { color: var(--color-success); }

.db-info-box p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* REAL-TIME STREAM LAYOUT */
.orders-card {
    display: flex;
    flex-direction: column;
    min-height: 500px;
}

.orders-container {
    flex-grow: 1;
    position: relative;
    overflow-y: auto;
    max-height: 600px;
    padding-right: 0.5rem;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--card-border), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.empty-state p {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}

.empty-state span {
    font-size: 0.85rem;
    max-width: 320px;
    line-height: 1.4;
}

/* ORDER ITEM CARD */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.order-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--card-border);
    padding-bottom: 0.8rem;
}

.order-title {
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
}

.order-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.order-items-detail {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dish-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.dish-name {
    color: var(--text-secondary);
}

.dish-qty {
    font-weight: 600;
    color: var(--text-primary);
}

.order-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.3rem;
}

.order-total-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-secondary);
}

.kitchen-badge {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
    border: 1px solid rgba(245, 158, 11, 0.25);
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kitchen-badge.completed {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* CUSTOMER VIEW GRID */
.customer-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
}

.customer-tenant-selector {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.customer-tenant-selector label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.customer-tenant-selector select {
    padding: 0.5rem 2rem 0.5rem 0.8rem;
    font-size: 0.85rem;
}

/* MENU CARD GRID */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.menu-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 240px;
    transition: var(--transition-smooth);
}

.menu-card:hover {
    transform: translateY(-4px);
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 10px 20px rgba(6, 182, 212, 0.05);
}

.menu-card-top h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.menu-card-top p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.menu-card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    border-top: 1px solid var(--card-border);
    padding-top: 0.8rem;
}

.menu-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--color-secondary);
}

/* SHOPPING CART */
.cart-card {
    display: flex;
    flex-direction: column;
    height: fit-content;
    position: sticky;
    top: 5.5rem;
}

.cart-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-items-container {
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 0;
    max-height: 250px;
    overflow-y: auto;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.cart-item-left {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    max-width: 60%;
}

.cart-item-name {
    font-weight: 500;
}

.cart-item-price {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cart-item-right {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.cart-qty-btn {
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: var(--transition-smooth);
}

.cart-qty-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.cart-item-qty {
    font-weight: 600;
    min-width: 15px;
    text-align: center;
}

.cart-totals {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.total-row.highlight {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    border-top: 1px dashed var(--card-border);
    padding-top: 0.8rem;
    margin-top: 0.4rem;
}

.total-row.highlight span:last-child {
    color: var(--color-secondary);
}

/* TOAST NOTIFICATION */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    z-index: 1000;
}

.toast {
    background: rgba(20, 22, 33, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: 4px solid var(--color-primary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 300px;
    max-width: 450px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transform: translateX(120%);
    animation: slideToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast.toast-success {
    border-left-color: var(--color-success);
}
.toast.toast-warning {
    border-left-color: var(--color-warning);
}
.toast.toast-danger {
    border-left-color: var(--color-danger);
}

@keyframes slideToast {
    to { transform: translateX(0); }
}

.toast-icon {
    font-size: 1.2rem;
}
.toast-success .toast-icon { color: var(--color-success); }
.toast-warning .toast-icon { color: var(--color-warning); }
.toast-danger .toast-icon { color: var(--color-danger); }

.toast-content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex-grow: 1;
}

.toast-title {
    font-weight: 600;
}

.toast-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* SCROLLBARS */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .customer-grid {
        grid-template-columns: 1fr;
    }
    .cart-card {
        position: static;
    }
}

/* Translation inputs */
.translation-card input[type="text"],
.translation-card textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

.translation-card input[type="text"]:focus,
.translation-card textarea:focus {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.08);
}

/* THEME TOGGLE BUTTON */
.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 1.1rem;
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: scale(1.05);
}

#simulate-table-select {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-weight: 500;
    cursor: pointer;
    outline: none;
    transition: var(--transition-smooth);
}

#simulate-table-select:focus {
    border-color: var(--color-primary);
}

body.light-mode #simulate-table-select {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.2);
}

/* LIGHT MODE STYLING */
body.light-mode {
    --bg-primary: #f1f5f9; /* slate-100 */
    --bg-secondary: rgba(255, 255, 255, 0.7);
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(99, 102, 241, 0.12);
    
    --text-primary: #0f172a; /* slate-900 */
    --text-secondary: #475569; /* slate-600 */
    --text-muted: #64748b; /* slate-500 */
    
    --color-primary: #6366f1; /* Indigo */
    --color-primary-hover: #4f46e5;
    --color-secondary: #06b6d4; /* Cyan */
    --color-success: #10b981; /* Emerald */
    --color-success-hover: #059669;
    --color-danger: #ef4444; /* Rose */
    --color-warning: #f59e0b; /* Amber */
    
    --shadow-premium: 0 10px 30px -10px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.02);
}

body.light-mode .glass-bg {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, rgba(255,255,255,0) 70%);
}

body.light-mode .glass-bg2 {
    background: radial-gradient(circle, rgba(6, 182, 212, 0.05) 0%, rgba(255,255,255,0) 70%);
}

body.light-mode .app-header {
    background: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
}

body.light-mode .view-toggle {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(99, 102, 241, 0.15);
}

body.light-mode .toggle-btn {
    color: var(--text-secondary);
}

body.light-mode .toggle-btn:hover {
    color: var(--text-primary);
}

body.light-mode .toggle-btn.active {
    color: #ffffff;
    background: var(--color-primary);
}

body.light-mode select {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.2);
}

body.light-mode select:focus {
    background: #ffffff;
    border-color: var(--color-primary);
}

body.light-mode .btn-secondary {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(99, 102, 241, 0.15);
}

body.light-mode .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

body.light-mode .theme-toggle-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(99, 102, 241, 0.15);
}

body.light-mode .theme-toggle-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

body.light-mode .db-info-box {
    background: rgba(6, 182, 212, 0.04);
    border-color: rgba(6, 182, 212, 0.12);
}

body.light-mode .order-item-card {
    background: rgba(255, 255, 255, 0.5);
}

body.light-mode .order-header-row {
    border-bottom-color: rgba(99, 102, 241, 0.12);
}

body.light-mode .translation-card input[type="text"],
body.light-mode .translation-card textarea {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.2);
}

body.light-mode .translation-card input[type="text"]:focus,
body.light-mode .translation-card textarea:focus {
    background: #ffffff;
    border-color: var(--color-primary);
}

body.light-mode .cart-items-container {
    border-top-color: rgba(99, 102, 241, 0.12);
    border-bottom-color: rgba(99, 102, 241, 0.12);
}

body.light-mode .cart-qty-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(99, 102, 241, 0.12);
}

body.light-mode .cart-qty-btn:hover {
    background: rgba(0, 0, 0, 0.08);
}

body.light-mode .total-row.highlight {
    border-top-color: rgba(99, 102, 241, 0.12);
}

body.light-mode .toast {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

body.light-mode ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

body.light-mode ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

body.light-mode .card:hover {
    border-color: rgba(99, 102, 241, 0.25);
}

body.light-mode .menu-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 10px 20px rgba(6, 182, 212, 0.08);
}

body.light-mode .menu-card-bottom {
    border-top-color: rgba(99, 102, 241, 0.12);
}

/* ADMIN & SETUP CRUD DESIGN */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--card-border);
    font-size: 0.9rem;
    vertical-align: middle;
}

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

body.light-mode .admin-table tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

.merchant-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--card-border);
}

/* Tabs */
.setup-tabs {
    display: flex;
    gap: 10px;
}

.setup-tab-content {
    display: none;
}

.setup-tab-content.active {
    display: block;
}

/* Table buttons styling */
.action-btn-group {
    display: flex;
    gap: 5px;
}

/* QR Code link styling */
.qr-link-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.25);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
}

body.light-mode .qr-link-badge {
    background: rgba(99, 102, 241, 0.08);
    color: var(--color-primary);
}

.qr-link-badge:hover {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}


/* ============================================
   AUTH MODAL & LOGIN BUTTON STYLES
   ============================================ */

.auth-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.auth-btn:hover { border-color: var(--color-primary); background: rgba(99,102,241,0.12); color: var(--color-primary); }
.auth-btn.logged-in { border-color: var(--color-success); background: rgba(16,185,129,0.1); color: var(--color-success); }
.auth-btn .auth-avatar {
    width: 1.6rem; height: 1.6rem; border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; color: #fff; flex-shrink: 0;
}
body.light-mode .auth-btn { background: rgba(0,0,0,0.04); }
body.light-mode .auth-btn.logged-in { background: rgba(16,185,129,0.08); }

.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }
body.light-mode .modal-overlay { background: rgba(0,0,0,0.5); }

.auth-modal {
    background: var(--bg-secondary); border: 1px solid var(--card-border);
    border-radius: 20px; padding: 2rem; width: 100%; max-width: 440px;
    box-shadow: var(--shadow-premium);
    transform: translateY(20px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s ease;
    position: relative;
}
.modal-overlay.active .auth-modal { transform: translateY(0) scale(1); }
body.light-mode .auth-modal { background: rgba(255,255,255,0.97); border-color: rgba(0,0,0,0.08); }

.auth-modal-header { text-align: center; margin-bottom: 1.8rem; }
.auth-modal-header .modal-logo {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 0.5rem;
}
.auth-modal-header h2 { font-size: 1.4rem; font-weight: 700; }
.auth-modal-header p { font-size: 0.9rem; color: var(--text-secondary); margin-top: 0.3rem; }

.modal-close-btn {
    position: absolute; top: 1rem; right: 1rem;
    background: none; border: none; color: var(--text-secondary); font-size: 1.2rem;
    cursor: pointer; width: 2rem; height: 2rem; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition-smooth);
}
.modal-close-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-primary); }

.auth-tabs {
    display: flex; background: rgba(255,255,255,0.05);
    border: 1px solid var(--card-border); border-radius: 12px;
    padding: 4px; margin-bottom: 1.5rem; gap: 4px;
}
body.light-mode .auth-tabs { background: rgba(0,0,0,0.04); }
.auth-tab-btn {
    flex: 1; padding: 0.6rem; border: none; background: transparent;
    border-radius: 9px; font-family: var(--font-sans); font-size: 0.9rem;
    font-weight: 600; color: var(--text-secondary); cursor: pointer;
    transition: var(--transition-smooth);
}
.auth-tab-btn.active { background: var(--color-primary); color: #fff; box-shadow: 0 3px 10px rgba(99,102,241,0.3); }

.auth-form-group { margin-bottom: 1rem; }
.auth-form-group label {
    display: block; font-size: 0.82rem; font-weight: 600;
    color: var(--text-secondary); text-transform: uppercase;
    letter-spacing: 0.05em; margin-bottom: 0.4rem;
}
.auth-input {
    width: 100%; padding: 0.75rem 1rem; border-radius: 10px;
    border: 1.5px solid var(--card-border); background: rgba(255,255,255,0.04);
    color: var(--text-primary); font-family: var(--font-sans); font-size: 0.95rem;
    outline: none; transition: var(--transition-smooth);
}
.auth-input:focus {
    border-color: var(--color-primary); background: rgba(99,102,241,0.06);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
body.light-mode .auth-input { background: rgba(255,255,255,0.9); border-color: rgba(0,0,0,0.15); color: var(--text-primary); }
body.light-mode .auth-input:focus { border-color: var(--color-primary); background: #fff; }

.register-type-selector { display: flex; gap: 0.6rem; margin-bottom: 1rem; }
.register-type-btn {
    flex: 1; padding: 0.7rem; border-radius: 10px;
    border: 1.5px solid var(--card-border); background: transparent;
    color: var(--text-secondary); font-family: var(--font-sans);
    font-size: 0.85rem; font-weight: 600; cursor: pointer; text-align: center;
    transition: var(--transition-smooth);
}
.register-type-btn.active { border-color: var(--color-primary); background: rgba(99,102,241,0.1); color: var(--color-primary); }
.register-type-btn i { display: block; font-size: 1.2rem; margin-bottom: 3px; }

.auth-submit-btn {
    width: 100%; padding: 0.85rem; border-radius: 12px; border: none;
    background: linear-gradient(135deg, var(--color-primary), #8b5cf6);
    color: #fff; font-family: var(--font-sans); font-size: 1rem; font-weight: 700;
    cursor: pointer; transition: var(--transition-smooth); margin-top: 0.5rem;
    box-shadow: 0 4px 14px rgba(99,102,241,0.35);
}
.auth-submit-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.45); }
.auth-submit-btn:active { transform: translateY(0); }
.auth-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.user-dropdown { position: relative; }
.user-dropdown-menu {
    position: absolute; top: calc(100% + 10px); right: 0;
    min-width: 200px; background: var(--bg-secondary);
    border: 1px solid var(--card-border); border-radius: 14px;
    padding: 0.5rem; box-shadow: var(--shadow-premium);
    opacity: 0; pointer-events: none; transform: translateY(-8px);
    transition: var(--transition-smooth); z-index: 500;
}
.user-dropdown-menu.open { opacity: 1; pointer-events: all; transform: translateY(0); }
body.light-mode .user-dropdown-menu { background: #fff; }

.dropdown-user-info { padding: 0.75rem 1rem; border-bottom: 1px solid var(--card-border); margin-bottom: 0.4rem; }
.dropdown-user-info .name { font-weight: 700; font-size: 0.95rem; }
.dropdown-user-info .email { font-size: 0.78rem; color: var(--text-secondary); margin-top: 2px; }
.dropdown-user-info .role-badge {
    display: inline-block; margin-top: 5px; padding: 2px 8px; border-radius: 20px;
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    background: rgba(99,102,241,0.15); color: var(--color-primary);
}
.dropdown-user-info .role-badge.superuser { background: rgba(239,68,68,0.15); color: var(--color-danger); }
.dropdown-item {
    display: flex; align-items: center; gap: 0.6rem;
    width: 100%; padding: 0.6rem 1rem; border: none; background: transparent;
    color: var(--text-primary); font-family: var(--font-sans); font-size: 0.88rem;
    cursor: pointer; border-radius: 10px; transition: var(--transition-smooth); text-align: left;
}
.dropdown-item:hover { background: rgba(255,255,255,0.08); }
body.light-mode .dropdown-item:hover { background: rgba(0,0,0,0.05); }
.dropdown-item.danger { color: var(--color-danger); }
.dropdown-item.danger:hover { background: rgba(239,68,68,0.1); }

/* Staff Panel */
.staff-panel { margin-top: 1.5rem; }
.staff-panel .staff-table-wrapper { max-height: 300px; overflow-y: auto; border: 1px solid var(--card-border); border-radius: 10px; }
.staff-add-row { display: flex; gap: 0.6rem; align-items: flex-end; margin-top: 1rem; }
.staff-add-row .auth-input { flex: 1; }
.staff-add-row .select-wrapper { margin-bottom: 0; min-width: 130px; }
.staff-role-tag {
    display: inline-flex; align-items: center; gap: 4px; padding: 0.2rem 0.6rem;
    border-radius: 20px; font-size: 0.78rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.staff-role-tag.OWNER { background: rgba(99,102,241,0.15); color: var(--color-primary); }
.staff-role-tag.CASHIER { background: rgba(16,185,129,0.15); color: var(--color-success); }
.staff-role-tag.WAITER { background: rgba(6,182,212,0.15); color: var(--color-secondary); }
.staff-role-tag.CHEF { background: rgba(245,158,11,0.15); color: var(--color-warning); }

.auth-divider {
    display: flex; align-items: center; gap: 0.8rem;
    margin: 0.8rem 0; color: var(--text-muted); font-size: 0.8rem;
}
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--card-border); }
