/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

:root {
    --primary: #1a3caa;
    --primary-dark: #0f2878;
    --secondary: #e85d04;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f97316;
    --info: #06b6d4;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a1628 0%, #1a2f5e 40%, #e85d04 100%);
    min-height: 100vh;
    color: var(--dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Login Page ===== */
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse 600px 400px at 20% 20%, rgba(37,99,235,0.25) 0%, transparent 70%),
        radial-gradient(ellipse 500px 350px at 80% 80%, rgba(232,93,4,0.2) 0%, transparent 70%);
    pointer-events: none;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    top: -100px;
    right: -100px;
    pointer-events: none;
}

.login-container {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.15);
    width: 100%;
    max-width: 430px;
    padding: 36px 28px;
    animation: slideUp 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 1;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo i {
    font-size: 52px;
    color: var(--primary);
    margin-bottom: 12px;
    display: block;
}

.login-logo h1 {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
    line-height: 1.3;
}

.login-logo p {
    color: var(--gray);
    font-size: 14px;
}

.login-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: var(--light);
    border-radius: var(--radius-sm);
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 12px 8px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray);
    touch-action: manipulation;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow);
}

.login-form {
    display: none;
}

.login-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.login-form h2 {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--dark);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
}

.form-group label i {
    margin-left: 6px;
    color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    font-size: 16px;
    transition: var(--transition);
    background: var(--white);
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    touch-action: manipulation;
    min-height: 52px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-login i {
    margin-left: 8px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-light);
}

.login-footer p {
    color: var(--gray);
    font-size: 13px;
}

/* ===== App Container ===== */
.app-container {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--light);
}

/* ===== Mobile Overlay ===== */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    backdrop-filter: blur(3px);
}

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

/* ===== Sidebar ===== */
.sidebar {
    width: 260px;
    background: var(--dark);
    color: var(--white);
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    position: fixed;
    height: 100vh;
    height: 100dvh;
    z-index: 100;
    right: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
}

.sidebar-header i {
    font-size: 26px;
    color: var(--secondary);
    flex-shrink: 0;
}

.sidebar-header span {
    font-size: 17px;
    font-weight: 700;
}

.mobile-close {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    margin-right: auto;
    padding: 4px;
}

.sidebar.collapsed .sidebar-header span,
.sidebar.collapsed .nav-item span,
.sidebar.collapsed .user-info span {
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
    margin-bottom: 4px;
    font-size: 15px;
    touch-action: manipulation;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}

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

.nav-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.user-info i {
    font-size: 22px;
    color: var(--secondary);
    flex-shrink: 0;
}

.user-info span {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.2);
    border: none;
    color: var(--danger);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    touch-action: manipulation;
}

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

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-right: 260px;
    transition: var(--transition);
    min-width: 0;
}

.sidebar.collapsed + .main-content {
    margin-right: 70px;
}

/* ===== Top Header ===== */
.top-header {
    background: var(--white);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 12px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--dark);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: none;
    touch-action: manipulation;
}

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

.header-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
}

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

.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 16px 10px 40px;
    border: 2px solid var(--gray-light);
    border-radius: 25px;
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    font-size: 14px;
    width: 220px;
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    width: 260px;
}

.search-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.notifications {
    position: relative;
    cursor: pointer;
    font-size: 20px;
    color: var(--gray);
    padding: 4px;
}

.notifications .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: var(--white);
    font-size: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ===== Content Area ===== */
.content-area {
    padding: 20px;
}

.page {
    display: none;
    animation: fadeIn 0.3s ease;
}

.page.active {
    display: block;
}

/* ===== Dashboard ===== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: var(--white);
    flex-shrink: 0;
}

.stat-icon.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-icon.green { background: linear-gradient(135deg, #10b981, #059669); }
.stat-icon.orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.stat-icon.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }

.stat-info h3 {
    font-size: 22px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--gray);
    font-size: 13px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dashboard-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.dashboard-card h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-card h3 i {
    color: var(--primary);
}

.top-products,
.recent-orders {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-product-item,
.recent-order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: var(--light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.top-product-item:hover,
.recent-order-item:hover {
    background: #e2e8f0;
}

.top-product-item img,
.recent-order-item img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.top-product-info,
.recent-order-info {
    flex: 1;
    min-width: 0;
}

.top-product-info h4,
.recent-order-info h4 {
    font-size: 14px;
    color: var(--dark);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-product-info p,
.recent-order-info p {
    font-size: 12px;
    color: var(--gray);
}

.top-product-sales {
    font-weight: 700;
    color: var(--success);
    font-size: 13px;
    flex-shrink: 0;
}

.order-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    flex-shrink: 0;
}

.status-pending { background: #fef3c7; color: #d97706; }
.status-processing { background: #dbeafe; color: #2563eb; }
.status-shipped { background: #e0e7ff; color: #4f46e5; }
.status-delivered { background: #d1fae5; color: #059669; }

/* ===== Products Page ===== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid var(--gray-light);
    background: var(--white);
    border-radius: 25px;
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray);
    touch-action: manipulation;
    white-space: nowrap;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.btn-add {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 8px;
    touch-action: manipulation;
    min-height: 44px;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

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

.product-image {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.badge-new { background: var(--success); color: var(--white); }
.badge-sale { background: var(--danger); color: var(--white); }
.badge-hot { background: var(--secondary); color: var(--white); }

.product-info {
    padding: 16px;
}

.product-category {
    font-size: 11px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.product-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 4px;
}

.product-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}

.product-old-price {
    font-size: 13px;
    color: var(--gray);
    text-decoration: line-through;
    margin-right: 6px;
}

.product-stock {
    font-size: 12px;
    color: var(--success);
    font-weight: 600;
}

.product-stock.low {
    color: var(--danger);
}

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

.btn-action {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    touch-action: manipulation;
    min-height: 40px;
}

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

.btn-cart:hover {
    background: var(--primary-dark);
}

.btn-view {
    background: var(--light);
    color: var(--dark);
}

.btn-view:hover {
    background: var(--gray-light);
}

/* ===== POS Page ===== */
.pos-container {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 16px;
    height: calc(100vh - 130px);
    height: calc(100dvh - 130px);
}

.pos-products {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.pos-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.pos-cat {
    padding: 8px 16px;
    border: 2px solid var(--gray-light);
    background: var(--white);
    border-radius: 25px;
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    touch-action: manipulation;
    white-space: nowrap;
}

.pos-cat.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.pos-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
}

.pos-product-item {
    background: var(--light);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    touch-action: manipulation;
}

.pos-product-item:hover {
    border-color: var(--primary);
    transform: scale(1.03);
}

.pos-product-item:active {
    transform: scale(0.98);
}

.pos-product-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.pos-product-item h4 {
    font-size: 12px;
    margin-bottom: 4px;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pos-product-item p {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.pos-cart {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.pos-cart h3 {
    font-size: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-cart h3 i {
    color: var(--primary);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 16px;
    -webkit-overflow-scrolling: touch;
}

.empty-cart {
    text-align: center;
    padding: 32px 16px;
    color: var(--gray);
}

.empty-cart i {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--light);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: var(--transition);
}

.cart-item:hover {
    background: #e2e8f0;
}

.cart-item img {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-info h4 {
    font-size: 13px;
    color: var(--dark);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-info p {
    font-size: 12px;
    color: var(--primary);
    font-weight: 700;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--primary);
    color: var(--white);
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    touch-action: manipulation;
    font-family: 'Cairo', sans-serif;
}

.qty-btn:hover {
    background: var(--primary-dark);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-value {
    font-weight: 700;
    font-size: 14px;
    min-width: 18px;
    text-align: center;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
    transition: var(--transition);
    touch-action: manipulation;
    flex-shrink: 0;
}

.cart-item-remove:hover {
    transform: scale(1.2);
}

.cart-summary {
    border-top: 2px solid var(--gray-light);
    padding-top: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    border-top: 1px solid var(--gray-light);
    padding-top: 10px;
    margin-top: 10px;
}

.btn-checkout {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 12px;
    box-shadow: var(--shadow);
    touch-action: manipulation;
    min-height: 48px;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-checkout i {
    margin-left: 8px;
}

/* ===== Map Page ===== */
.map-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 16px;
    height: calc(100vh - 130px);
    height: calc(100dvh - 130px);
}

.map-sidebar {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    overflow-y: auto;
    box-shadow: var(--shadow);
    -webkit-overflow-scrolling: touch;
}

.map-sidebar h3 {
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.map-sidebar h3 i {
    color: var(--primary);
}

.store-item {
    padding: 12px;
    background: var(--light);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
    border-right: 3px solid transparent;
    touch-action: manipulation;
}

.store-item:hover,
.store-item.active {
    border-right-color: var(--primary);
    background: #e2e8f0;
}

.store-item h4 {
    font-size: 14px;
    color: var(--dark);
    margin-bottom: 4px;
}

.store-item p {
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 2px;
}

.store-item .store-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    margin-top: 6px;
}

.status-active { background: #d1fae5; color: #059669; }
.status-inactive { background: #fee2e2; color: #dc2626; }

.map-area {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    min-height: 300px;
}

.map-area iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 15px;
}

/* ===== Orders Page ===== */
.orders-header {
    margin-bottom: 20px;
}

.order-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.order-filter {
    padding: 8px 16px;
    border: 2px solid var(--gray-light);
    background: var(--white);
    border-radius: 25px;
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    touch-action: manipulation;
    white-space: nowrap;
}

.order-filter.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.orders-table-container {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.orders-table th {
    background: var(--light);
    padding: 14px;
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    color: var(--dark);
    border-bottom: 2px solid var(--gray-light);
    white-space: nowrap;
}

.orders-table td {
    padding: 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--gray-light);
    white-space: nowrap;
}

.orders-table tr:hover {
    background: var(--light);
}

.order-actions {
    display: flex;
    gap: 6px;
}

.btn-action-sm {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    touch-action: manipulation;
}

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

.btn-edit-order {
    background: var(--warning);
    color: var(--white);
}

/* ===== Customers Page ===== */
.customers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.customer-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.customer-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.customer-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    flex-shrink: 0;
}

.customer-info h4 {
    font-size: 16px;
    color: var(--dark);
    margin-bottom: 3px;
}

.customer-info p {
    font-size: 12px;
    color: var(--gray);
}

.customer-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.customer-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray);
}

.customer-detail i {
    color: var(--primary);
    width: 18px;
    flex-shrink: 0;
}

.customer-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-light);
}

.customer-stat {
    text-align: center;
}

.customer-stat h5 {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
}

.customer-stat p {
    font-size: 11px;
    color: var(--gray);
}

/* ===== Analytics Page ===== */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.analytics-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.analytics-card h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: var(--dark);
}

.analytics-card canvas {
    max-height: 280px;
}

.analytics-card:last-child {
    grid-column: 1 / -1;
}

/* ===== Modal ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(5px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    max-height: 90dvh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
    -webkit-overflow-scrolling: touch;
}

.modal-close {
    position: absolute;
    top: 12px;
    left: 12px;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    touch-action: manipulation;
}

.modal-close:hover {
    background: var(--light);
    color: var(--danger);
}

.modal-content h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-content h2 i {
    color: var(--primary);
}

/* Product Detail Modal */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.product-detail-image {
    background: var(--light);
    border-radius: var(--radius);
    overflow: hidden;
}

.product-detail-image img {
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.product-detail-info h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.product-detail-info .category {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.product-detail-info .price {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 16px;
}

.product-detail-info .description {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 14px;
}

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

.spec-item {
    background: var(--light);
    padding: 10px;
    border-radius: var(--radius-sm);
}

.spec-item label {
    font-size: 11px;
    color: var(--gray);
    display: block;
    margin-bottom: 3px;
}

.spec-item span {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark);
}

.btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    touch-action: manipulation;
    min-height: 48px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Checkout Modal */
.checkout-summary {
    margin-bottom: 20px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-light);
    font-size: 14px;
}

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

.checkout-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-top: 2px solid var(--dark);
    font-size: 18px;
    font-weight: 800;
    color: var(--dark);
    margin-top: 8px;
}

.checkout-actions {
    display: flex;
    gap: 12px;
}

.btn-print,
.btn-confirm {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    touch-action: manipulation;
    min-height: 48px;
}

.btn-print {
    background: var(--light);
    color: var(--dark);
    border: 2px solid var(--gray-light);
}

.btn-print:hover {
    background: var(--gray-light);
}

.btn-confirm {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--white);
    box-shadow: var(--shadow);
}

.btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: var(--dark);
    color: var(--white);
    padding: 14px 22px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 2000;
    font-weight: 600;
    font-size: 14px;
    max-width: 90vw;
}

.toast.active {
    transform: translateY(0);
    opacity: 1;
}

.toast i {
    color: var(--success);
    font-size: 18px;
    flex-shrink: 0;
}

/* ===== Receipt ===== */
.receipt {
    background: var(--white);
    padding: 24px;
    max-width: 380px;
    margin: 0 auto;
}

.receipt-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px dashed var(--gray-light);
}

.receipt-header h2 {
    font-size: 20px;
    margin-bottom: 4px;
}

.receipt-header p {
    color: var(--gray);
    font-size: 12px;
}

.receipt-items {
    margin-bottom: 16px;
}

.receipt-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
}

.receipt-total {
    border-top: 2px solid var(--dark);
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 800;
}

.receipt-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px dashed var(--gray-light);
}

.receipt-footer p {
    font-size: 11px;
    color: var(--gray);
}

/* ===== Responsive - Tablet ===== */
@media (max-width: 1024px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .pos-container {
        grid-template-columns: 1fr 320px;
    }
}

/* ===== Responsive - Mobile ===== */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .login-container {
        padding: 24px 16px;
        margin: 8px;
    }

    .login-logo i {
        font-size: 44px;
    }

    .login-logo h1 {
        font-size: 22px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Sidebar Mobile */
    .sidebar {
        width: 280px;
        transform: translateX(100%);
        right: 0;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .mobile-close {
        display: block;
    }

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

    .menu-toggle {
        display: block;
    }

    /* Header Mobile */
    .top-header {
        padding: 10px 14px;
    }

    .header-title {
        font-size: 16px;
    }

    .search-box {
        display: none;
    }

    /* Content Mobile */
    .content-area {
        padding: 12px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .stat-info h3 {
        font-size: 18px;
    }

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

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

    .product-image {
        height: 140px;
    }

    .product-info {
        padding: 12px;
    }

    .product-name {
        font-size: 13px;
    }

    .product-price {
        font-size: 15px;
    }

    .product-actions {
        flex-direction: column;
    }

    .btn-action {
        padding: 8px;
        font-size: 12px;
    }

    /* POS Mobile */
    .pos-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .pos-products {
        min-height: 300px;
    }

    .pos-products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .pos-product-item {
        padding: 8px;
    }

    .pos-product-item img {
        width: 50px;
        height: 50px;
    }

    .pos-cart {
        max-height: 350px;
        position: sticky;
        bottom: 0;
    }

    /* Map Mobile */
    .map-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .map-sidebar {
        max-height: 250px;
        order: 2;
    }

    .map-area {
        height: 300px;
        order: 1;
    }

    /* Orders Mobile */
    .orders-table-container {
        border-radius: var(--radius-sm);
    }

    /* Customers Mobile */
    .customers-grid {
        grid-template-columns: 1fr;
    }

    /* Analytics Mobile */
    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .analytics-card canvas {
        max-height: 220px;
    }

    /* Modal Mobile */
    .modal-content {
        padding: 20px 16px;
        margin: 8px;
        max-height: 95vh;
        max-height: 95dvh;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .product-detail-image img {
        height: 200px;
    }

    .checkout-actions {
        flex-direction: column;
    }

    .btn-print,
    .btn-confirm {
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
    }

    .filter-btn {
        flex-shrink: 0;
    }
}

/* ===== Small Mobile ===== */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

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

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

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

    .stat-card {
        flex-direction: row;
        text-align: right;
    }

    .login-logo h1 {
        font-size: 20px;
    }

    .login-tabs {
        gap: 6px;
    }

    .tab-btn {
        padding: 10px 6px;
        font-size: 14px;
    }
}

/* ===== Print Styles ===== */
@media print {
    .sidebar,
    .top-header,
    .pos-container,
    .modal,
    .toast,
    .mobile-overlay {
        display: none !important;
    }
    .main-content {
        margin: 0 !important;
    }
    .receipt {
        box-shadow: none;
    }
}

/* ===== Admin Only Elements ===== */
.admin-only {
    display: none;
}

body.admin .admin-only {
    display: flex;
}

body.admin .nav-item.admin-only {
    display: flex;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: var(--gray);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark);
}

/* Selection */
::selection {
    background: var(--primary);
    color: var(--white);
}

/* ===== IMPROVEMENTS & NEW FEATURES ===== */

/* Dark Mode */
body.dark-mode {
    --dark: #e2e8f0;
    --light: #1e293b;
    --white: #0f172a;
    --gray-light: #334155;
    --gray: #94a3b8;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--dark);
}
body.dark-mode .sidebar { background: #1e293b; border-color: #334155; }
body.dark-mode .top-header { background: #1e293b; border-color: #334155; }
body.dark-mode .product-card, body.dark-mode .dashboard-card,
body.dark-mode .stat-card, body.dark-mode .analytics-card,
body.dark-mode .customer-card, body.dark-mode .modal-content {
    background: #1e293b;
    border: 1px solid #334155;
    color: var(--dark);
}
body.dark-mode .filter-btn, body.dark-mode .pos-cat,
body.dark-mode .order-filter { background: #334155; color: #94a3b8; }
body.dark-mode .login-container { background: #1e293b; color: #e2e8f0; }
body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}
body.dark-mode .orders-table th { background: #1e293b; }
body.dark-mode .orders-table td { border-color: #334155; }
body.dark-mode .orders-table tr:hover td { background: #334155; }
body.dark-mode .pos-cart { background: #1e293b; }
body.dark-mode .cart-item { background: #0f172a; }

/* Theme Toggle */
.theme-toggle {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: var(--transition);
    margin-left: auto;
}
.theme-toggle:hover { color: white; background: rgba(255,255,255,0.1); }

/* Cart Badge in Sidebar */
.cart-nav-badge {
    background: var(--danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 20px;
    margin-right: auto;
    min-width: 18px;
    text-align: center;
}

/* Password toggle */
.password-wrapper { position: relative; display: flex; }
.password-wrapper input { padding-left: 42px; flex: 1; }
.toggle-pw {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
}
.toggle-pw:hover { color: var(--primary); }

/* Discount badge */
.discount-pct {
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
}

/* Out of stock overlay */
.out-of-stock-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    border-radius: var(--radius) var(--radius) 0 0;
}
.pos-product-item.out-of-stock { opacity: 0.5; cursor: not-allowed; }
.pos-product-item.out-of-stock:hover { transform: none; }

/* Critical stock */
.product-stock.critical { color: var(--danger); font-weight: 700; }
.stock-info { padding: 8px 12px; border-radius: var(--radius-sm); background: var(--light); margin: 12px 0; font-size: 14px; }
.stock-info.low { background: #fef9c3; color: #854d0e; }
.stock-info.critical { background: #fee2e2; color: #991b1b; }

/* btn-action disabled */
.btn-action:disabled { opacity: 0.4; cursor: not-allowed; }

/* Sort select */
.sort-select {
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    color: var(--dark);
    background: var(--white);
    cursor: pointer;
}

/* page-header-actions */
.page-header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
    grid-column: 1 / -1;
}
.empty-state i { font-size: 48px; display: block; margin-bottom: 12px; opacity: 0.4; }

/* POS search */
.pos-search {
    position: relative;
    margin-bottom: 12px;
}
.pos-search i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}
.pos-search input {
    width: 100%;
    padding: 10px 36px 10px 12px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
}

/* POS category - heating */
.pos-cat[data-cat="heating"] { /* already styled */ }

/* Cart header */
.cart-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cart-header h3 { margin: 0; }
.btn-clear-cart {
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 14px;
}
.btn-clear-cart:hover { color: var(--danger); background: #fee2e2; }

/* Cart buttons */
.cart-buttons { display: flex; gap: 8px; }
.btn-print-receipt {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--gray-light);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--dark);
    font-family: 'Cairo', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: var(--transition);
}
.btn-print-receipt:hover { background: var(--gray-light); }
.btn-checkout { flex: 2; }

/* Orders search */
.orders-search { min-width: 200px; }

/* Order detail */
#orderDetailContent { padding: 4px 0; line-height: 2; }
#orderDetailContent p { margin: 4px 0; }
#orderDetailContent hr { border: none; border-top: 1px solid var(--gray-light); margin: 16px 0; }

/* Detail discount */
.detail-discount {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--danger);
    color: white;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
}
.product-detail-image { position: relative; }

/* Price group */
.price-group { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.old-price { text-decoration: line-through; color: var(--gray); font-size: 16px; }

/* Customer card improvements */
.customer-card.inactive { opacity: 0.65; }
.customer-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-light);
}
.btn-delete { background: #fee2e2 !important; color: var(--danger) !important; border-color: transparent !important; }
.btn-delete:hover { background: var(--danger) !important; color: white !important; }

/* Sidebar footer layout fix */
.sidebar-footer { display: flex; align-items: center; gap: 8px; padding: 16px; border-top: 1px solid rgba(255,255,255,0.1); }
.sidebar-footer .user-info { flex: 1; min-width: 0; }
.sidebar-footer .user-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100px; }

/* Toast improvements */
.toast.error { border-right-color: var(--danger); }
.toast.success { border-right-color: var(--success); }

/* Tab btn icon */
.tab-btn i { margin-left: 6px; }

/* Responsive - sort select */
@media (max-width: 768px) {
    .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .page-header-actions { width: 100%; }
    .sort-select { flex: 1; }
    .orders-header { flex-direction: column; gap: 12px; }
    .orders-search { width: 100%; }
    .cart-buttons { flex-direction: column; }
    .btn-print-receipt, .btn-checkout { flex: none; width: 100%; }
}

/* ===== AWRAS ELECTRO BRANDING ===== */

/* Login logo */
.brand-logo {
    width: 240px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto 12px;
    filter: drop-shadow(0 6px 20px rgba(37, 99, 235, 0.35)) drop-shadow(0 2px 8px rgba(232, 93, 4, 0.2));
    transition: transform 0.4s ease, filter 0.4s ease;
    animation: logoPulse 3s ease-in-out infinite;
}

.brand-logo:hover {
    transform: scale(1.04);
    filter: drop-shadow(0 8px 28px rgba(37, 99, 235, 0.5)) drop-shadow(0 4px 12px rgba(232, 93, 4, 0.35));
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 6px 20px rgba(37, 99, 235, 0.35)) drop-shadow(0 2px 8px rgba(232, 93, 4, 0.2)); }
    50% { filter: drop-shadow(0 8px 28px rgba(37, 99, 235, 0.55)) drop-shadow(0 4px 14px rgba(232, 93, 4, 0.4)); }
}

.brand-subtitle {
    color: #e85d04;
    font-size: 13px;
    font-weight: 700;
    margin-top: 6px;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.85;
}

.login-logo {
    text-align: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid linear-gradient(90deg, transparent, var(--primary), transparent);
    position: relative;
}

.login-logo::after {
    content: '';
    display: block;
    height: 2px;
    margin-top: 20px;
    background: linear-gradient(90deg, transparent, #2563eb 40%, #e85d04 60%, transparent);
    border-radius: 2px;
}

/* Sidebar logo */
.sidebar-header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    min-height: 72px;
    background: linear-gradient(135deg, rgba(37,99,235,0.15) 0%, rgba(232,93,4,0.08) 100%);
}

.sidebar-logo {
    width: 140px;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0,0,0,0.4));
    transition: transform 0.3s ease;
}

.sidebar-logo:hover {
    transform: scale(1.05);
}

/* Footer branding */
.login-footer p {
    font-size: 12px;
    color: var(--gray);
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Dark mode logo adjustments */
body.dark-mode .brand-logo {
    filter: drop-shadow(0 6px 20px rgba(96, 165, 250, 0.4)) drop-shadow(0 2px 8px rgba(251, 146, 60, 0.3));
}
