/* assets/css/style.css - Premium Modern POS Design - Fixed & Restructured */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Cairo:wght@400;600;700&display=swap');

/* =====================================================
   CSS VARIABLES / THEME TOKENS
   ===================================================== */
:root {
    /* Light Theme (Default) */
    --primary-color: #00E5FF;
    --primary-dark: #00B8D4;
    --primary-light: rgba(0, 229, 255, 0.1);

    --secondary-color: #B400FF;
    --secondary-dark: #8E00E5;

    --bg-color: #f0f4f8;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-sidebar: #ffffff;

    --text-main: #1a202c;
    --text-muted: #718096;
    --text-inverse: #ffffff;

    --border-color: rgba(0, 0, 0, 0.08);

    --success: #00c853;
    --danger: #ff1744;
    --warning: #ffab00;
    --info: #00b0ff;

    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --mobile-header-height: 65px;

    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.07);
    --neon-glow: 0 0 15px rgba(0, 229, 255, 0.15);
    --focus-ring: 0 0 0 3px rgba(0, 229, 255, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme='dark'] {
    --primary-color: #00E5FF;
    --primary-dark: #00B8D4;
    --primary-light: rgba(0, 229, 255, 0.12);

    --secondary-color: #FF00FF;
    --secondary-dark: #B400FF;

    --bg-color: #08090a;
    --bg-card: rgba(18, 20, 26, 0.88);
    --bg-sidebar: rgba(12, 14, 19, 0.97);

    --text-main: #edf2f7;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;

    --border-color: rgba(0, 229, 255, 0.1);

    --success: #00ffa3;
    --danger: #ff0055;
    --warning: #ffcc00;
    --info: #00e5ff;

    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
    --neon-glow: 0 0 10px rgba(0, 229, 255, 0.35), 0 0 25px rgba(0, 229, 255, 0.15);
    --focus-ring: 0 0 0 2px rgba(0, 229, 255, 0.2), 0 0 15px rgba(0, 229, 255, 0.35);
    color-scheme: dark;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[dir="rtl"] body,
[dir="rtl"] {
    font-family: 'Cairo', sans-serif;
}

[data-theme='light'] body {
    background-image:
        radial-gradient(circle at top right, rgba(0, 229, 255, 0.06), transparent 500px),
        radial-gradient(circle at bottom left, rgba(180, 0, 255, 0.04), transparent 500px);
}

[data-theme='dark'] body {
    background-image:
        linear-gradient(rgba(0, 229, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.02) 1px, transparent 1px);
    background-size: 35px 35px;
}

/* =====================================================
   SCROLLBAR
   ===================================================== */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--bg-color); }
::-webkit-scrollbar-thumb { background: var(--primary-color); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--secondary-color); }

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

/* =====================================================
   SIDEBAR - Desktop (Floating Cyberpunk Style)
   ===================================================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 1.5rem 0 1rem;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.12);
    position: fixed;
    top: 15px;
    bottom: 15px;
    left: 15px;
    height: calc(100vh - 30px);
    border-radius: 24px;
    z-index: 1000;
    transition: var(--transition);
    overflow: hidden;
}

[data-theme='dark'] .sidebar {
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 229, 255, 0.05);
}

[dir="rtl"] .sidebar {
    left: auto;
    right: 15px;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

/* Sidebar Logo */
.sidebar-logo {
    text-align: center;
    padding: 0.5rem 1rem 1.5rem;
    margin-bottom: 0.5rem;
    flex-shrink: 0;
}

.sidebar-logo img {
    max-width: 120px !important;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.4));
    transition: var(--transition);
}

.sidebar-logo h2 {
    font-size: 1.25rem;
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.5);
    letter-spacing: 1.5px;
    font-weight: 800;
    text-transform: uppercase;
    margin: 0;
}

.sidebar.collapsed .sidebar-logo {
    padding: 0 0.5rem 1rem;
}

.sidebar.collapsed .sidebar-logo h2 {
    display: none;
}

.sidebar.collapsed .sidebar-logo img {
    max-width: 40px !important;
}

/* Sidebar Nav */
.sidebar ul {
    list-style: none;
    padding: 0.5rem 1rem;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar ul li {
    margin-bottom: 0.5rem;
}

.sidebar li a {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.1rem;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar li a i {
    width: 22px;
    min-width: 22px;
    margin-right: 12px;
    font-size: 1.15rem;
    color: var(--primary-color);
    filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.4));
    transition: var(--transition);
    text-align: center;
}

[dir="rtl"] .sidebar li a i {
    margin-right: 0;
    margin-left: 12px;
}

.sidebar li a:hover,
.sidebar li a.active {
    background: var(--primary-light);
    border-color: rgba(0, 229, 255, 0.3);
    color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.12);
    transform: translateX(3px);
}

[dir="rtl"] .sidebar li a:hover,
[dir="rtl"] .sidebar li a.active {
    transform: translateX(-3px);
}

.sidebar.collapsed ul li a {
    justify-content: center;
    padding: 0.8rem;
}

.sidebar.collapsed ul li a:hover {
    transform: none;
}

.sidebar.collapsed ul li a span,
.sidebar.collapsed .sidebar-footer {
    display: none;
}

.sidebar.collapsed ul li a i {
    margin: 0;
}

/* Toggle button inside sidebar (desktop collapse) */
.toggle-sidebar {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.15rem;
    cursor: pointer;
    margin-bottom: 0.5rem;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.5rem;
    border-radius: 10px;
    transition: var(--transition);
    flex-shrink: 0;
}

.toggle-sidebar:hover {
    color: var(--primary-color);
    background: var(--primary-light);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 1rem 1rem 0.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.5;
    flex-shrink: 0;
}

.sidebar-footer .copyright,
.sidebar-footer .developer {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 3px;
    display: block;
}

.sidebar-footer p {
    margin: 2px 0;
    font-size: 0.68rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}

.footer-social a {
    color: var(--text-muted);
    font-size: 1rem;
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
    text-shadow: var(--neon-glow);
}

/* Glass utility */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

/* =====================================================
   PAGE CONTENT
   ===================================================== */
.content {
    flex: 1;
    padding: 2rem;
    margin-left: calc(var(--sidebar-width) + 30px);
    transition: margin-left 0.3s ease;
    min-width: 0;
}

[dir="rtl"] .content {
    margin-left: 0;
    margin-right: calc(var(--sidebar-width) + 30px);
}

.sidebar.collapsed ~ .content {
    margin-left: calc(var(--sidebar-collapsed-width) + 30px);
}

[dir="rtl"] .sidebar.collapsed ~ .content {
    margin-left: 0;
    margin-right: calc(var(--sidebar-collapsed-width) + 30px);
}

h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

/* =====================================================
   LANGUAGE TOGGLE (Desktop)
   ===================================================== */
.lang-toggle {
    position: fixed;
    top: 20px;
    right: calc(var(--sidebar-width) + 45px);
    padding: 8px 18px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 1100;
    transition: var(--transition);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 6px;
}

[dir="rtl"] .lang-toggle {
    right: auto;
    left: calc(var(--sidebar-width) + 45px);
}

.lang-toggle:hover {
    box-shadow: var(--neon-glow);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

/* Hide desktop lang-toggle on mobile (it's in mobile-header instead) */
@media (max-width: 768px) {
    #lang-toggle-desktop {
        display: none !important;
    }
}

/* =====================================================
   FLOATING THEME TOGGLE (Desktop)
   ===================================================== */
.btn-theme-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

[dir="rtl"] .btn-theme-float {
    right: auto;
    left: 30px;
}

.btn-theme-float:hover {
    transform: rotate(35deg) scale(1.1);
    box-shadow: var(--neon-glow);
    color: var(--warning);
}

/* =====================================================
   MOBILE HEADER (Hidden on Desktop by default)
   ===================================================== */
.mobile-header {
    display: none;
}

/* =====================================================
   MOBILE OVERLAY
   ===================================================== */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2050;
}

.mobile-overlay.active {
    display: block;
}

/* =====================================================
   BOTTOM NAVIGATION (Mobile Only - Hidden by default)
   ===================================================== */
.bottom-nav {
    display: none;
}

/* =====================================================
   DASHBOARD CARDS
   ===================================================== */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    touch-action: manipulation;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    box-shadow: var(--neon-glow);
}

[dir="rtl"] .stat-card::before {
    left: auto;
    right: 0;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--neon-glow), var(--card-shadow);
    border-color: rgba(0, 229, 255, 0.3);
}

.stat-icon {
    font-size: 2.2rem;
    opacity: 0.25;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-card.success::before { background: var(--success); }
.stat-card.info::before { background: var(--primary-color); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before { background: var(--danger); }

[dir="rtl"] .stat-card.warning { border-left: none; border-right: 4px solid var(--warning); }

.stat-card h3 {
    margin: 0 0 0.5rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.stat-card p {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
}

/* =====================================================
   CARDS
   ===================================================== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

/* =====================================================
   TABLES
   ===================================================== */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-main);
    min-width: 400px;
}

.data-table th {
    background: rgba(0, 229, 255, 0.08);
    color: var(--primary-color);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    padding: 0.9rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

[dir="rtl"] .data-table th {
    text-align: right;
}

.data-table td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

[data-theme='light'] .data-table td {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: rgba(0, 229, 255, 0.04);
}

[data-theme='light'] .data-table tr:hover td {
    background: rgba(0, 229, 255, 0.07);
}

/* =====================================================
   FORMS & INPUTS
   ===================================================== */
.filters {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-form {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

input,
select,
textarea {
    padding: 0.6rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 8px;
    font-size: 16px; /* Prevent auto-zoom on iOS */
    outline: none;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
    font-family: inherit;
}

[data-theme='light'] input,
[data-theme='light'] select,
[data-theme='light'] textarea {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    color: var(--text-main);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: var(--focus-ring);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 1.2rem;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    min-height: 42px;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    font-family: inherit;
    white-space: nowrap;
}

.btn-primary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.08);
}

.btn-primary:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
    transform: translateY(-2px);
}

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

.btn-success:hover {
    background: var(--success);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 200, 83, 0.4);
    transform: translateY(-2px);
}

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

.btn-danger:hover {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.4);
    transform: translateY(-2px);
}

.btn-warning {
    background: transparent;
    color: var(--warning);
    border-color: var(--warning);
}

.btn-warning:hover {
    background: var(--warning);
    color: #000;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--text-muted);
    color: var(--text-main);
}

.btn-small {
    padding: 0.3rem 0.7rem;
    font-size: 0.78rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    min-height: 30px;
}

.btn-small:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.2);
}

/* =====================================================
   MODALS
   ===================================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 3000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    width: 100%;
    max-width: 600px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--neon-glow), 0 25px 60px rgba(0,0,0,0.3);
    padding: 2rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    color: var(--text-main);
}

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

.modal-header h2,
.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    background: none;
    border: none;
    padding: 4px;
    line-height: 1;
    border-radius: 6px;
}

.close:hover {
    color: var(--danger);
    background: rgba(255, 0, 85, 0.1);
}

/* Custom Confirm Modal */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 1rem;
}

.custom-modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--neon-glow), 0 25px 60px rgba(0,0,0,0.3);
    animation: modal-pop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.custom-modal h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.custom-modal p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@keyframes modal-pop {
    from { transform: scale(0.85); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* =====================================================
   ALERTS
   ===================================================== */
.alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    border: 1px solid transparent;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert.success {
    background: rgba(0, 200, 83, 0.08);
    border-color: rgba(0, 200, 83, 0.3);
    color: var(--success);
}

.alert.error,
.alert.danger {
    background: rgba(255, 23, 68, 0.08);
    border-color: rgba(255, 23, 68, 0.3);
    color: var(--danger);
}

.alert.warning {
    background: rgba(255, 171, 0, 0.08);
    border-color: rgba(255, 171, 0, 0.3);
    color: var(--warning);
}

.alert.info {
    background: rgba(0, 229, 255, 0.08);
    border-color: rgba(0, 229, 255, 0.3);
    color: var(--primary-color);
}

/* =====================================================
   POS LAYOUT
   ===================================================== */
.pos-wrapper {
    max-width: 100%;
}

.pos-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.pos-left,
.pos-right {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.pos-left::before,
.pos-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    box-shadow: var(--neon-glow);
}

/* =====================================================
   SETTINGS TABS
   ===================================================== */
.settings-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.55rem 1.1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
    font-size: 0.88rem;
    font-family: inherit;
}

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

.tab-btn.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: rgba(0, 229, 255, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.35s ease-out;
}

/* =====================================================
   REPORT TABS
   ===================================================== */
.report-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.report-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.3rem;
    text-decoration: none;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

.report-tab i {
    font-size: 1rem;
    transition: var(--transition);
}

.report-tab:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: rgba(0, 229, 255, 0.25);
    transform: translateY(-2px);
}

.report-tab.active {
    background: var(--primary-color);
    color: #000;
    border-color: var(--primary-color);
    box-shadow: var(--neon-glow);
}

.report-tab.active i,
.report-tab.active span {
    color: #000;
}

[data-theme='light'] .report-tab:not(.active) {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.07);
}

[data-theme='light'] .report-tab:not(.active):hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: rgba(0, 229, 255, 0.3);
}

/* =====================================================
   BACKUP
   ===================================================== */
.backup-list {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 1rem;
}

[data-theme='light'] .backup-list {
    background: rgba(0, 0, 0, 0.03);
}

.backup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    gap: 1rem;
}

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

/* =====================================================
   TOAST NOTIFICATIONS
   ===================================================== */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 11000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 340px;
    width: calc(100vw - 40px);
}

[dir="rtl"] #toast-container {
    right: auto;
    left: 20px;
}

.toast {
    padding: 14px 18px;
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    color: var(--text-main);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 0.9rem;
}

[dir="rtl"] .toast {
    transform: translateX(-120%);
    border-left: 1px solid var(--border-color);
    border-right: 4px solid var(--primary-color);
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
[dir="rtl"] .toast.success { border-right-color: var(--success); }
[dir="rtl"] .toast.error { border-right-color: var(--danger); }
[dir="rtl"] .toast.warning { border-right-color: var(--warning); }

.toast i { font-size: 1.1rem; flex-shrink: 0; }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--primary-color); }

/* =====================================================
   SKELETON LOADING
   ===================================================== */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite linear;
    border-radius: 6px;
    display: inline-block;
    min-height: 1em;
}

[data-theme='light'] .skeleton {
    background: linear-gradient(90deg, rgba(0,0,0,0.05) 25%, rgba(0,0,0,0.08) 50%, rgba(0,0,0,0.05) 75%);
    background-size: 200% 100%;
}

/* =====================================================
   LOGIN PAGE
   ===================================================== */
.login-page {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at center, rgba(0, 229, 255, 0.1) 0%, transparent 55%),
        linear-gradient(rgba(0, 229, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 35px 35px, 35px 35px;
    padding: 1rem;
}

.login-container {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: var(--neon-glow), 0 25px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 400px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    box-shadow: var(--neon-glow);
}

.login-container h1 {
    margin-bottom: 2rem;
    color: var(--primary-color);
    text-shadow: 0 0 15px rgba(0, 229, 255, 0.4);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 800;
    font-size: 1.5rem;
}

.login-container input {
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    background: rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(0, 229, 255, 0.2) !important;
    color: var(--text-main) !important;
    border-radius: 10px;
    transition: var(--transition);
}

[data-theme='light'] .login-container input {
    background: rgba(0, 0, 0, 0.04) !important;
    color: var(--text-main) !important;
}

.login-container input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: var(--focus-ring) !important;
}

.login-container button {
    width: 100%;
    padding: 0.9rem;
    margin-top: 0.5rem;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 1rem;
    font-family: inherit;
}

.login-container button:hover {
    background: var(--primary-color);
    color: #000;
    box-shadow: var(--neon-glow);
    transform: translateY(-2px);
}

/* =====================================================
   ANIMATIONS
   ===================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes neonPulse {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 229, 255, 0.2); }
    50% { box-shadow: 0 0 18px rgba(0, 229, 255, 0.6); }
}

@keyframes slideInRight {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* =====================================================
   DASHBOARD GRID
   ===================================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

/* =====================================================
   BREADCRUMB / PAGE HEADER
   ===================================================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    margin-bottom: 0;
}

/* =====================================================
   BADGES & STATUS
   ===================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-success { background: rgba(0, 200, 83, 0.15); color: var(--success); }
.badge-danger { background: rgba(255, 23, 68, 0.15); color: var(--danger); }
.badge-warning { background: rgba(255, 171, 0, 0.15); color: var(--warning); }
.badge-info { background: rgba(0, 229, 255, 0.15); color: var(--primary-color); }
.badge-secondary { background: rgba(100, 100, 100, 0.15); color: var(--text-muted); }

/* =====================================================
   TABLET BREAKPOINT (769px - 1024px)
   ===================================================== */
@media (max-width: 1100px) {
    :root {
        --sidebar-width: 240px;
    }

    .content {
        margin-left: calc(var(--sidebar-width) + 30px);
        padding: 1.5rem;
    }

    [dir="rtl"] .content {
        margin-left: 0;
        margin-right: calc(var(--sidebar-width) + 30px);
    }

    .lang-toggle {
        right: calc(var(--sidebar-width) + 45px);
        padding: 7px 14px;
        font-size: 0.82rem;
    }

    [dir="rtl"] .lang-toggle {
        right: auto;
        left: calc(var(--sidebar-width) + 45px);
    }

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

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

/* =====================================================
   MOBILE BREAKPOINT (≤ 768px)
   ===================================================== */
@media (max-width: 768px) {

    /* === SIDEBAR: Off-canvas drawer === */
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -290px;
        right: auto;
        margin: 0;
        border-radius: 0 20px 20px 0;
        height: 100vh;
        width: 280px;
        z-index: 2100;
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
        will-change: left;
        overflow-y: auto;
        overflow-x: hidden;
    }

    [dir="rtl"] .sidebar {
        left: auto;
        right: -290px;
        border-radius: 20px 0 0 20px;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.show-mobile {
        left: 0;
        box-shadow: 5px 0 40px rgba(0, 0, 0, 0.5);
    }

    [dir="rtl"] .sidebar.show-mobile {
        left: auto;
        right: 0;
        box-shadow: -5px 0 40px rgba(0, 0, 0, 0.5);
    }

    /* === CONTENT: Full width with top padding for mobile header === */
    .content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 1rem;
        padding-top: calc(var(--mobile-header-height) + 1rem);
        padding-bottom: 1.5rem;
    }

    /* === MOBILE HEADER: Sticky top bar === */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1.25rem;
        height: var(--mobile-header-height);
        background: var(--bg-sidebar);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border-color);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 900;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    }

    [data-theme='dark'] .mobile-header {
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    }

    .mobile-header-logo h2 {
        font-size: 1.05rem;
        color: var(--primary-color);
        text-shadow: 0 0 10px rgba(0, 229, 255, 0.4);
        margin: 0;
        font-weight: 800;
        letter-spacing: 1px;
    }

    .mobile-header-actions {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .menu-toggle-btn {
        background: var(--primary-light);
        border: 1px solid rgba(0, 229, 255, 0.3);
        color: var(--primary-color);
        padding: 8px 12px;
        border-radius: 10px;
        font-size: 1.1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        min-width: 42px;
        height: 42px;
    }

    .menu-toggle-btn:hover {
        background: var(--primary-color);
        color: #000;
    }

    .theme-toggle-btn {
        background: rgba(255, 255, 255, 0.07);
        border: 1px solid var(--border-color);
        color: var(--warning);
        padding: 8px;
        border-radius: 10px;
        font-size: 1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: var(--transition);
        width: 42px;
        height: 42px;
    }

    [data-theme='dark'] .theme-toggle-btn {
        color: var(--primary-color);
    }

    /* Hide desktop-only elements */
    .btn-theme-float {
        display: none;
    }

    .toggle-sidebar {
        display: none;
    }

    /* === LANG TOGGLE: inside mobile header area === */
    .lang-toggle {
        position: static;
        margin: 0;
        width: auto;
        padding: 6px 12px;
        font-size: 0.78rem;
        border-radius: 10px;
        height: 42px;
    }

    /* === STATS GRID: 2 columns on mobile === */
    .stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem 0.875rem;
    }

    .stat-card p {
        font-size: 1.4rem;
    }

    .stat-icon {
        font-size: 1.8rem;
    }

    /* === DASHBOARD GRID: 1 column === */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    /* === POS GRID: Stack vertically === */
    .pos-grid {
        grid-template-columns: 1fr;
    }

    /* === TABLES: Better mobile experience === */
    .data-table th,
    .data-table td {
        padding: 0.65rem 0.6rem;
        font-size: 0.82rem;
    }

    .btn-small {
        padding: 5px 9px;
        font-size: 0.73rem;
    }

    /* === FILTERS: Stack vertically === */
    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-form input,
    .filter-form select {
        width: 100%;
    }

    /* === REPORT TABS: smaller on mobile === */
    .report-tab {
        padding: 0.55rem 1rem;
        font-size: 0.82rem;
    }

    /* === SETTINGS TABS: Scrollable === */
    .settings-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.75rem;
    }

    .tab-btn {
        white-space: nowrap;
    }

    /* === MODALS: Full width on small screens === */
    .modal-content {
        padding: 1.5rem;
        border-radius: 12px;
        margin: 0.5rem;
        width: calc(100% - 1rem);
    }

    /* === BOTTOM NAV: Show on mobile === */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        background: var(--bg-sidebar);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        z-index: 1050;
        justify-content: space-around;
        align-items: stretch;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    [data-theme='dark'] .bottom-nav {
        box-shadow: 0 -4px 20px rgba(0, 229, 255, 0.1);
    }

    .bottom-nav a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        text-decoration: none;
        font-size: 0.65rem;
        padding: 10px 6px 12px;
        gap: 4px;
        flex: 1;
        transition: var(--transition);
        border-top: 2px solid transparent;
        min-height: 58px;
    }

    .bottom-nav a i {
        font-size: 1.2rem;
    }

    .bottom-nav a span {
        font-size: 0.62rem;
        font-weight: 600;
        letter-spacing: 0.3px;
    }

    .bottom-nav a.active {
        color: var(--primary-color);
        border-top-color: var(--primary-color);
        background: var(--primary-light);
    }

    .bottom-nav a:hover {
        color: var(--primary-color);
    }

    /* Add bottom padding for bottom nav */
    .content {
        padding-bottom: 80px;
    }

    /* h1 size on mobile */
    h1 {
        font-size: 1.35rem;
        margin-bottom: 1rem;
    }
}

/* =====================================================
   SMALL MOBILE (≤ 400px)
   ===================================================== */
@media (max-width: 400px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .stat-card p {
        font-size: 1.2rem;
    }

    .content {
        padding: 0.75rem;
        padding-top: calc(var(--mobile-header-height) + 0.75rem);
        padding-bottom: 80px;
    }

    .modal-content {
        padding: 1.25rem;
    }
}

/* =====================================================
   PRINT STYLES
   ===================================================== */
@media print {
    .sidebar,
    .mobile-header,
    .bottom-nav,
    .btn-theme-float,
    .lang-toggle,
    .mobile-overlay {
        display: none !important;
    }

    .content {
        margin: 0 !important;
        padding: 0 !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}
