/**
 * Buffalo Burger ERP - Styles
 */

/* ===== CSS VARIABLES ===== */
/* ===== CSS VARIABLES ===== */
:root {
    /* Primary Colors */
    --primary: #d62828;
    --primary-dark: #b91c1c;
    --primary-light: #ef4444;

    /* Secondary Colors */
    --secondary: #ffffff;
    --secondary-light: #9ca3af;

    /* Status Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;

    /* Neutral Colors - BROWN MODE */
    --background: #1a0f0a;
    --surface: #261811;
    --surface-alt: #3d2b1f;
    --border: #4a372d;
    --text: #ffffff;
    --text-muted: #a69b91;
    --text-light: #7c6e64;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #d62828 0%, #ef4444 100%);
    --gradient-dark: linear-gradient(135deg, #261811 0%, #1a0f0a 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --sidebar-width: 260px;
    --header-height: 64px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.25s ease;
}

/* ===== LIGHT MODE (Restored) ===== */
[data-theme="light"] {
    --background: #F3F4F6;
    --surface: #FFFFFF;
    --surface-alt: #E5E7EB;
    --border: #D1D5DB;
    --text: #111827;
    --text-muted: #4B5563;
    --text-light: #6B7280;
    --secondary: #2E294E;

    /* Ensure sidebar elements have correct bg in light mode */
    --sidebar-header-bg: #FFFFFF;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Theme toggle button */
.theme-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--surface-alt);
    color: var(--primary);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background-color: var(--background);
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ===== LAYOUT ===== */
.erp-layout {
    display: flex;
    min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform var(--transition-base);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    font-size: 2rem;
}

.sidebar-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text);
    /* Changed from secondary to text for better adaptation */
}

.sidebar-close {
    display: none;
    margin-left: auto;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition-fast);
    margin-bottom: 4px;
}

.nav-item:hover {
    background: var(--surface-alt);
    color: var(--text);
}

.nav-item.active {
    background: var(--gradient-primary);
    color: white;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

.nav-label {
    display: block;
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

.sidebar-footer {
    padding: 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

@media (max-width: 1024px) {
    .sidebar-footer {
        padding-bottom: 80px;
        /* Extra space for mobile browsers nav bar */
        background: var(--surface);
        /* Ensure bg covers safe area */
    }
}

.user-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.logout-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    transition: var(--transition-fast);
}

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

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-header {
    height: var(--header-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    color: var(--text);
    border-radius: var(--radius-md);
}

.menu-toggle:hover {
    background: var(--surface-alt);
}

.page-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

.header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}

.current-time {
    font-weight: 500;
    color: var(--text-muted);
}

.content {
    flex: 1;
    padding: 24px;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-icon.sales {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-icon.orders {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.stat-icon.tables {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary);
}

.stat-icon.kitchen {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== SECTIONS ===== */
.section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px;
    background: var(--surface-alt);
    border-radius: var(--radius-lg);
    border: 2px solid transparent;
    transition: var(--transition-base);
    text-align: center;
}

.action-card:hover {
    border-color: var(--primary);
    background: rgba(255, 107, 53, 0.05);
}

.action-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon svg {
    width: 28px;
    height: 28px;
}

.action-card span {
    font-weight: 600;
    color: var(--secondary);
}

/* ===== MINI TABLE CARDS ===== */
.tables-mini {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini-table-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--surface-alt);
    border-radius: var(--radius-md);
}

.table-number {
    font-weight: 600;
}

.table-total {
    color: var(--success);
    font-weight: 600;
}

/* ===== ORDERS LIST ===== */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--surface-alt);
    border-radius: var(--radius-md);
}

.order-info {
    display: flex;
    flex-direction: column;
}

.order-table {
    font-weight: 600;
}

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

.order-status {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.status-abierta {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.status-en_cocina {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.status-servida {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-cerrada {
    background: var(--surface-alt);
    color: var(--text-muted);
}

.empty-message {
    color: var(--text-muted);
    text-align: center;
    padding: 20px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    cursor: pointer;
}

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

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--surface-alt);
    color: var(--text);
}

.btn-secondary:hover {
    background: var(--border);
}

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

.btn-success:hover {
    opacity: 0.9;
}

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

.btn-danger:hover {
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 16px 28px;
    font-size: 1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 0.95rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    transition: var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon-wrapper svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.input-icon-wrapper .form-input {
    padding-left: 44px;
}

/* ===== TABLES ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--surface-alt);
}

.data-table tbody tr:hover {
    background: var(--surface-alt);
}

.data-table .actions {
    display: flex;
    gap: 8px;
}

/* ===== TABLE MAP ===== */
.table-map {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    padding: 20px;
}

.table-item {
    aspect-ratio: 1;
    background: var(--surface);
    border: 3px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition-base);
}

.table-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.table-item.libre {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.05);
}

.table-item.ocupada {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.table-item.reservada {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.05);
}

.table-item .table-num {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
}

.table-item .table-status {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-item.libre .table-status {
    color: var(--success);
}

.table-item.ocupada .table-status {
    color: var(--danger);
}

.table-item.reservada .table-status {
    color: var(--warning);
}

/* ===== KITCHEN DISPLAY ===== */
.kitchen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.kitchen-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.kitchen-card-header {
    background: var(--secondary);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kitchen-card-header h3 {
    font-size: 1.25rem;
}

.kitchen-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    opacity: 0.8;
}

.kitchen-card-body {
    padding: 20px;
}

.kitchen-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.kitchen-item:last-child {
    border-bottom: none;
}

.kitchen-qty {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 30px;
}

.kitchen-product {
    flex: 1;
}

.kitchen-product-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.kitchen-product-obs {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.kitchen-card-footer {
    padding: 16px 20px;
    background: var(--surface-alt);
    display: flex;
    gap: 12px;
}

.kitchen-card-footer .btn {
    flex: 1;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: var(--transition-base);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    color: var(--text-muted);
}

.modal-close:hover {
    background: var(--surface-alt);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ===== ORDER FORM ===== */
.order-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.product-btn {
    padding: 16px;
    background: var(--surface-alt);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    text-align: center;
    transition: var(--transition-fast);
}

.product-btn:hover {
    border-color: var(--primary);
}

.product-btn.selected {
    border-color: var(--primary);
    background: rgba(255, 107, 53, 0.1);
}

.product-btn-name {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-btn-price {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

.order-summary {
    background: var(--surface-alt);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.order-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.order-line:last-child {
    border-bottom: none;
}

.order-line-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-line-qty {
    width: 60px;
    padding: 6px 10px;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
}

.order-line-name {
    font-weight: 500;
}

.order-line-remove {
    color: var(--danger);
    padding: 4px;
}

.order-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    margin-top: 8px;
    border-top: 2px solid var(--border);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

/* ===== POS ===== */
.pos-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    height: calc(100vh - var(--header-height) - 48px);
}

.pos-orders {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pos-orders-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.pos-orders-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.pos-order-item {
    background: var(--surface-alt);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition-fast);
}

.pos-order-item:hover {
    border-color: var(--primary);
}

.pos-order-item.selected {
    border-color: var(--primary);
    background: rgba(255, 107, 53, 0.05);
}

.pos-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pos-order-table {
    font-weight: 700;
    font-size: 1.1rem;
}

.pos-order-total {
    font-weight: 700;
    color: var(--primary);
}

.pos-checkout {
    background: var(--surface);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
}

.pos-checkout-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.pos-checkout-header h2 {
    font-size: 1.1rem;
}

.pos-checkout-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.pos-checkout-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
}

.payment-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.payment-method {
    padding: 20px;
    background: var(--surface-alt);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    text-align: center;
    transition: var(--transition-fast);
}

.payment-method:hover {
    border-color: var(--border);
}

.payment-method.selected {
    border-color: var(--primary);
    background: rgba(255, 107, 53, 0.1);
}

.payment-method svg {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    color: var(--primary);
}

.payment-method span {
    display: block;
    font-weight: 600;
}

/* ===== PRODUCTS MANAGEMENT ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    border: 1px solid var(--border);
}

.product-card-image {
    height: 160px;
    flex-shrink: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.product-card-body {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    position: relative;
    z-index: 2;
}

.product-card-category {
    font-size: 0.70rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 6px;
}

.product-card-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.product-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.product-card-price {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.product-card-actions {
    display: flex;
    gap: 8px;
}

/* ===== ALERTS ===== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--surface-alt);
    padding: 4px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.tab {
    flex: 1;
    padding: 12px 16px;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    text-align: center;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    background: var(--surface);
    color: var(--primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .pos-layout {
        grid-template-columns: 1fr;
        height: auto;
    }

    .pos-orders,
    .pos-checkout {
        height: auto;
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-close {
        display: flex;
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }

    .kitchen-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }

    .content {
        padding: 16px;
    }
}

/* ===== SKELETON LOADERS ===== */
.skeleton {
    background: linear-gradient(90deg, var(--surface-alt) 25%, var(--surface) 50%, var(--surface-alt) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-card {
    height: 150px;
}

.skeleton-stat {
    height: 80px;
}

.skeleton-table-row {
    height: 50px;
    margin-bottom: 8px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ===== IMPROVED TRANSITIONS ===== */
.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-in-up {
    animation: slideInUp 0.3s ease;
}

.slide-in-right {
    animation: slideInRight 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== CHARTS CONTAINER ===== */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* ===== IMPROVED CARDS ===== */
.card-hover {
    transition: var(--transition-base);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(255, 107, 53, 0.15);
    color: var(--primary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

/* ===== SEARCH BOX ===== */
.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
}

.search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

/* ===== KEYBOARD SHORTCUTS HINT ===== */
.kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    box-shadow: 0 1px 0 var(--border);
}

/* ===== TOOLTIP ===== */
.tooltip-custom {
    position: relative;
}

.tooltip-custom::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: var(--secondary);
    color: white;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    margin-bottom: 8px;
}

.tooltip-custom:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.empty-state-text {
    color: var(--text-muted);
    max-width: 300px;
    margin-bottom: 24px;
}

/* ===== PULSE ANIMATION ===== */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ===== SOUND TOGGLE ===== */
.sound-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--surface-alt);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

.sound-toggle.active {
    background: var(--primary);
    color: white;
}

.sound-toggle svg {
    width: 18px;
    height: 18px;
}

/* ===== DATA GRID IMPROVEMENTS ===== */
.data-table-responsive {
    overflow-x: auto;
}

.data-table-striped tbody tr:nth-child(even) {
    background: var(--surface-alt);
}

/* ===== FLOATING ACTION BUTTON ===== */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: var(--transition-base);
    z-index: 50;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

.fab svg {
    width: 24px;
    height: 24px;
}

/* ===== CALENDAR STYLES ===== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 0.9rem;
}

.calendar-day:hover {
    background: var(--surface-alt);
}

.calendar-day.today {
    background: var(--primary);
    color: white;
}

.calendar-day.has-event {
    position: relative;
}

.calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: var(--radius-full);
}

.calendar-day.today.has-event::after {
    background: white;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    height: 8px;
    background: var(--surface-alt);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

/* ===== AVATAR GROUP ===== */
.avatar-group {
    display: flex;
}

.avatar-group .user-avatar {
    margin-left: -10px;
    border: 2px solid var(--surface);
}

.avatar-group .user-avatar:first-child {
    margin-left: 0;
}

/* ===== PRINT STYLES ===== */
@media print {

    .sidebar,
    .main-header,
    .no-print {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .content {
        padding: 0 !important;
    }

    body {
        background: white !important;
    }
}

/* ===== NOTIFICATIONS ===== */
#notificationContainer {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.notification {
    pointer-events: auto;
    min-width: 320px;
    padding: 18px 24px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border);
    border-left: 6px solid var(--primary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.notification-success {
    border-left-color: #059669;
}

.notification-error {
    border-left-color: #DC2626;
}

.notification-warning {
    border-left-color: #D97706;
}

.notification.fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    padding: 0;
    line-height: 1;
}

.notification-close:hover {
    color: var(--text);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    animation: zoomIn 0.3s ease-out;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== PRODUCT IMAGE IMPROVEMENTS ===== */
.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
    padding: 10px;
    background: #000;
    cursor: zoom-in;
    transition: transform 0.3s;
}

.product-card-image img:hover {
    transform: scale(1.05);
}