/* نظام إدارة مطعم دار اليمن - ملف التنسيقات الاحترافي */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&display=swap');

:root {
    /* ألوان مطعم دار اليمن - مستوحاة من القائمة الأصلية */
    /* أزرق ملكي داكن + ذهبي + كريمي */
    --primary-color: #1a2744;
    --primary-light: #2a3a5c;
    --primary-dark: #0f1a2e;
    --primary-gradient: linear-gradient(135deg, #1a2744 0%, #2a3a5c 100%);
    --secondary-color: #c9a227;
    --secondary-light: #d4b84a;
    --accent-color: #c9a227;
    --gold-color: #c9a227;
    --cream-color: #f5f0e1;
    --bg-color: #faf6eb;
    --bg-dark: #f0ead6;
    --card-bg: #ffffff;
    --text-color: #1a2744;
    --text-light: #4a5568;
    --text-muted: #6a7280;
    --border-color: #d4c9a8;
    --border-light: #e8e0c8;
    --success-color: #2d8a4e;
    --danger-color: #c44536;
    --warning-color: #c9a227;
    --info-color: #3b82f6;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --shadow-xl: 0 25px 60px rgba(0,0,0,0.2);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ==================== التخطيط الرئيسي ==================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ==================== القائمة الجانبية ==================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-gradient);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.sidebar-header {
    padding: 30px 25px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.1);
}

.sidebar-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.sidebar-header h2 i {
    font-size: 1.6rem;
    color: var(--secondary-color);
}

.sidebar-header p {
    font-size: 0.9rem;
    opacity: 0.85;
    font-weight: 300;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 28px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: var(--transition);
    border-right: 4px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.sidebar-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background: rgba(255,255,255,0.1);
    transition: var(--transition);
}

.sidebar-nav a:hover::before,
.sidebar-nav a.active::before {
    width: 100%;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: white;
    border-right-color: var(--secondary-color);
    background: rgba(255,255,255,0.05);
}

.sidebar-nav a i {
    width: 24px;
    font-size: 1.2rem;
    text-align: center;
    transition: var(--transition);
}

.sidebar-nav a:hover i {
    transform: scale(1.1);
    color: var(--secondary-color);
}

/* ==================== المحتوى الرئيسي ==================== */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    padding: 30px 40px;
    min-height: 100vh;
    transition: var(--transition);
}

/* ==================== الهيدر العلوي ==================== */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid var(--border-light);
}

.top-header h1 {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-header h1 i {
    font-size: 1.6rem;
    opacity: 0.9;
}

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

.date-display {
    color: var(--text-light);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    padding: 10px 18px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* ==================== الأزرار ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 26, 26, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(26, 26, 26, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
    color: #1a1a2e;
    box-shadow: 0 4px 15px rgba(212, 165, 40, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* ==================== بطاقات الإحصائيات ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 35px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent 50%, rgba(0,0,0,0.02) 50%);
    border-radius: 0 0 0 100%;
}

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

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

.bg-blue { background: linear-gradient(135deg, #1a2744, #2a3a5c); }
.bg-green { background: linear-gradient(135deg, #c9a227, #d4b84a); }
.bg-purple { background: linear-gradient(135deg, #2a3a5c, #3d4f6f); }
.bg-orange { background: linear-gradient(135deg, #c9a227, #e8c547); }

.stat-info h3 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 8px;
    font-weight: 500;
}

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

/* ==================== البطاقات ==================== */
.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 28px;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(to bottom, #fafbfc, #ffffff);
}

.card-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-color);
}

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

.card-body {
    padding: 25px 28px;
}

/* ==================== الجداول ==================== */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 16px 18px;
    text-align: right;
    border-bottom: 1px solid var(--border-light);
}

.table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: var(--bg-color);
}

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

/* ==================== شبكة لوحة التحكم ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

/* ==================== رسائل فارغة ==================== */
.empty-message {
    text-align: center;
    color: var(--text-muted);
    padding: 50px 30px;
    font-size: 1.05rem;
}

.empty-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
    display: block;
}

/* ==================== النماذج ==================== */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--card-bg);
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

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

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a5a72' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    padding-left: 40px;
}

/* ==================== نقطة البيع ==================== */
.pos-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    height: calc(100vh - 140px);
}

.pos-products {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
}

.pos-categories {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: linear-gradient(to bottom, #fafbfc, #ffffff);
    border-bottom: 1px solid var(--border-light);
    overflow-x: auto;
    flex-wrap: nowrap;
}

.pos-categories::-webkit-scrollbar {
    height: 6px;
}

.pos-categories::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.category-btn {
    padding: 12px 24px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: var(--radius-xl);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    white-space: nowrap;
    transition: var(--transition);
    color: var(--text-light);
}

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

.category-btn.active {
    background: var(--primary-gradient);
    color: var(--secondary-color);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(26, 26, 26, 0.3);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 180px));
    gap: 15px;
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    justify-content: start;
}

.products-grid::-webkit-scrollbar {
    width: 8px;
}

.products-grid::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 0;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--border-light);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

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

/* صورة المنتج */
.product-image {
    width: 100%;
    height: 100px;
    overflow: hidden;
    background: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

/* أيقونة بديلة عند عدم وجود صورة */
.product-icon {
    width: 100%;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    font-size: 2rem;
}

/* معلومات المنتج */
.product-info {
    padding: 12px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    line-height: 1.4;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .price {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
    padding: 6px 12px;
    border-radius: var(--radius);
    display: inline-block;
    margin-top: auto;
}

/* ==================== سلة المشتريات ==================== */
.pos-cart {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-light);
    overflow: hidden;
    height: fit-content;
    max-height: calc(100vh - 120px);
}

.cart-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, #fafbfc, #ffffff);
    position: sticky;
    top: 0;
    z-index: 10;
}

.cart-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
}

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

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    min-height: 150px;
    max-height: calc(100vh - 350px);
}

.cart-items::-webkit-scrollbar {
    width: 6px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

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

.cart-item:hover {
    border-color: var(--border-color);
}

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

.cart-item-info h4 {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: var(--secondary-color);
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--secondary-light);
    transform: scale(1.1);
}

.qty-value {
    min-width: 25px;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.remove-item {
    background: var(--danger-color);
    color: white;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.7rem;
}

.remove-item:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.item-total {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.85rem;
    min-width: 60px;
    text-align: left;
}

.cart-summary {
    padding: 12px 15px;
    border-top: 2px solid var(--border-light);
    background: linear-gradient(to top, var(--bg-color), var(--card-bg));
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary-color);
    padding-top: 10px;
    margin-top: 10px;
    border-top: 2px dashed var(--border-color);
}

.cart-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
}

/* ==================== التنبيهات ==================== */
.alert {
    padding: 18px 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* ==================== المودال ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(to bottom, #fafbfc, #ffffff);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: var(--bg-color);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.modal-body {
    padding: 28px;
}

.modal-footer {
    padding: 20px 28px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-color);
}

/* ==================== الفلاتر ==================== */
.filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filters .form-group {
    margin-bottom: 0;
}

.filters .form-control {
    min-width: 160px;
}

/* ==================== الباجات ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: var(--radius-xl);
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.badge-danger {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
}

.badge-warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

/* ==================== أزرار الإجراءات ==================== */
.actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1rem;
}

.action-btn.edit {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1d4ed8;
}

.action-btn.delete {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #dc2626;
}

.action-btn.print {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #059669;
}

.action-btn:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow);
}

/* ==================== التقارير ==================== */
.report-filters {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.report-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 35px;
}

.report-card {
    background: var(--card-bg);
    padding: 28px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

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

.report-card h4 {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.report-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ==================== الاستجابة للشاشات ==================== */

/* شاشات كبيرة جداً */
@media (min-width: 1600px) {
    .main-content {
        padding: 40px 60px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* شاشات متوسطة - تابلت أفقي */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .report-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pos-container {
        grid-template-columns: 1fr 350px;
    }
}

/* تابلت عمودي */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 80px;
    }
    
    .sidebar-header h2 span,
    .sidebar-header p {
        display: none;
    }
    
    .sidebar-header h2 {
        font-size: 1.8rem;
    }
    
    .sidebar-nav a {
        justify-content: center;
        padding: 18px;
    }
    
    .sidebar-nav a span {
        display: none;
    }
    
    .sidebar-nav a i {
        font-size: 1.4rem;
    }
    
    .main-content {
        margin-right: 80px;
        padding: 25px;
    }
    
    .pos-container {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .pos-cart {
        max-height: 500px;
    }
}

/* موبايل كبير */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        right: -100%;
        width: 280px;
        transition: right 0.3s ease;
    }
    
    .sidebar.open {
        right: 0;
    }
    
    .main-content {
        margin-right: 0;
        padding: 20px;
    }
    
    .top-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .top-header h1 {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .report-summary {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 15px;
    }
    
    .product-card {
        padding: 15px 10px;
    }
    
    .product-card h4 {
        font-size: 0.85rem;
        min-height: 40px;
    }
    
    .product-card .price {
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    .cart-actions {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .filters .form-control {
        width: 100%;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 12px 10px;
    }
    
    .modal-content {
        max-width: 95%;
    }
}

/* موبايل صغير */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .card-body {
        padding: 18px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pos-categories {
        padding: 15px;
        gap: 8px;
    }
    
    .category-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .cart-item {
        flex-wrap: wrap;
    }
    
    .item-total {
        width: 100%;
        text-align: right;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px dashed var(--border-color);
    }
}

/* ==================== طباعة ==================== */
@media print {
    body * {
        visibility: hidden;
    }
    
    .receipt, .receipt * {
        visibility: visible;
    }
    
    .receipt {
        position: absolute;
        top: 0;
        right: 0;
    }
    
    .sidebar,
    .no-print {
        display: none !important;
    }
}

/* ==================== إضافات متنوعة ==================== */

/* زر القائمة للموبايل */
.menu-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.menu-toggle:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* تأثيرات التحميل */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* تأثير النبض */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Scrollbar مخصص */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

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

/* ==================== الصفحة الرئيسية الجديدة ==================== */
.home-page {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.home-container {
    width: 100%;
    max-width: 900px;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.home-header {
    background: var(--primary-gradient);
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 70px;
    height: 70px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
}

.logo-text h1 {
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo-text p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.header-stats {
    display: flex;
    gap: 20px;
}

.mini-stat {
    background: rgba(255,255,255,0.15);
    padding: 12px 20px;
    border-radius: var(--radius);
    text-align: center;
}

.mini-stat .stat-label {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.mini-stat .stat-number {
    display: block;
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: 700;
}

.home-menu {
    padding: 40px 30px;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.menu-item {
    background: var(--bg-color);
    border-radius: var(--radius-lg);
    padding: 25px 15px;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

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

.menu-item.primary {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-light));
    grid-column: span 1;
}

.menu-item.primary .menu-icon {
    background: white;
    color: var(--secondary-color);
}

.menu-item.primary .menu-label {
    color: white;
}

.menu-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.menu-item:hover .menu-icon {
    transform: scale(1.1);
}

.menu-icon.orange { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: white; }
.menu-icon.green { background: linear-gradient(135deg, #10b981, #34d399); color: white; }
.menu-icon.purple { background: linear-gradient(135deg, #8b5cf6, #a78bfa); color: white; }
.menu-icon.blue { background: linear-gradient(135deg, #3b82f6, #60a5fa); color: white; }
.menu-icon.gray { background: linear-gradient(135deg, #6b7280, #9ca3af); color: white; }

.menu-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.home-footer {
    background: var(--bg-dark);
    padding: 15px 30px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-light);
}

.home-footer i {
    margin-left: 5px;
    color: var(--secondary-color);
}

/* استجابة للموبايل */
@media (max-width: 600px) {
    .home-page {
        padding: 10px;
    }
    
    .home-header {
        padding: 20px;
        flex-direction: column;
        text-align: center;
    }
    
    .logo-section {
        flex-direction: column;
    }
    
    .logo-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .logo-text h1 {
        font-size: 1.3rem;
    }
    
    .header-stats {
        width: 100%;
        justify-content: center;
    }
    
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .home-menu {
        padding: 25px 15px;
    }
    
    .menu-icon {
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }
    
    .menu-label {
        font-size: 0.9rem;
    }
}

/* ==================== شريط العودة للصفحات الداخلية ==================== */
.page-header-bar {
    background: var(--primary-gradient);
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.15);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.back-btn:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.page-title {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title i {
    color: var(--secondary-color);
}

/* تعديل الصفحات الداخلية بدون قائمة جانبية */
.page-container {
    min-height: 100vh;
    background: var(--bg-color);
}

.page-content {
    padding: 25px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ==================== مودال إتمام الطلب ==================== */

.checkout-modal-content {
    max-width: 600px;
    width: 95%;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.checkout-section {
    background: var(--bg-color);
    padding: 15px;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.checkout-section.full-width {
    grid-column: 1 / -1;
}

.section-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.order-type-btns {
    display: flex;
    gap: 8px;
}

.order-type-btn {
    flex: 1;
    padding: 10px 8px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.order-type-btn:hover {
    border-color: var(--secondary-color);
}

.order-type-btn.active {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.order-type-btn i {
    font-size: 1rem;
}

.extra-field {
    margin-top: 10px;
}

.payment-btns {
    display: flex;
    gap: 8px;
}

.payment-btn {
    flex: 1;
    padding: 12px 10px;
    border: 2px solid var(--border-color);
    background: var(--card-bg);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

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

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

.payment-btn i {
    font-size: 1.2rem;
}

.discount-input-group {
    display: flex;
    gap: 10px;
}

.discount-input-group select {
    flex: 1;
}

.discount-input-group input {
    flex: 1;
}

.change-display {
    background: linear-gradient(135deg, var(--success-color), #34d399);
    color: white;
    padding: 12px 15px;
    border-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-top: 10px;
}

.change-display strong {
    font-size: 1.3rem;
}

.checkout-summary {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 20px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.summary-line.total-line {
    font-size: 1.3rem;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid rgba(255,255,255,0.3);
    border-bottom: none;
}

.summary-line.total-line strong {
    color: var(--secondary-color);
}

.text-danger {
    color: #ff6b6b !important;
}

.modal-footer {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding: 20px 25px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-color);
}

.btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
}

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

/* ==================== تحسينات صفحة الفواتير ==================== */

/* فلاتر متقدمة */
.filters-advanced {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filters-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.filter-actions .btn {
    white-space: nowrap;
}

/* شبكة إحصائيات 5 أعمدة */
.stats-grid-5 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat-detail {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 5px;
}

/* إحصائيات سريعة */
.quick-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.quick-stat-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.quick-stat-box h4 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-stat-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quick-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: var(--bg-color);
    border-radius: var(--radius-sm);
}

.quick-stat-item .label {
    font-weight: 500;
    color: var(--text-color);
}

.quick-stat-item .value {
    color: var(--text-light);
    font-size: 0.9rem;
}

.quick-stat-item .amount {
    font-weight: 600;
    color: var(--primary-color);
}

/* ألوان خلفية إضافية */
.bg-purple {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
}

.bg-orange {
    background: linear-gradient(135deg, #f97316, #fb923c);
}

.bg-teal {
    background: linear-gradient(135deg, #14b8a6, #2dd4bf);
}

/* رأس البطاقة مع أزرار */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* مودال تفاصيل الطلب */
.order-detail-modal {
    max-width: 700px;
}

.order-detail-grid {
    margin-bottom: 20px;
}

.order-info-section {
    background: var(--bg-color);
    padding: 20px;
    border-radius: var(--radius);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-light);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.info-value {
    font-weight: 500;
    color: var(--text-color);
}

.order-items-section {
    margin: 20px 0;
}

.order-items-section h4,
.order-notes-section h4 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-sm {
    font-size: 0.9rem;
}

.table-sm th,
.table-sm td {
    padding: 10px 12px;
}

.order-totals-section {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    border-radius: var(--radius);
    margin: 20px 0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.total-row:last-child {
    border-bottom: none;
}

.total-row.grand-total {
    font-size: 1.2rem;
    font-weight: 700;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid rgba(255,255,255,0.3);
}

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

.order-notes-section {
    background: #fff8e1;
    padding: 15px 20px;
    border-radius: var(--radius);
    border-right: 4px solid #ffc107;
}

.order-notes-section p {
    margin: 0;
    color: var(--text-color);
}

/* ==================== تحسينات صفحة التقارير ==================== */

/* بطاقات التقارير مع المقارنات */
.report-summary-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.report-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.report-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.report-card-header i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.report-card-header h4 {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    margin: 0;
}

.report-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.report-card .comparison {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.report-card .comparison.positive {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.report-card .comparison.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.report-card .prev-value {
    font-size: 0.8rem;
    color: var(--text-light);
}

.report-card .sub-info {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 10px;
}

/* قسم KPIs */
.kpi-section {
    margin-bottom: 25px;
}

.section-title {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.kpi-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

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

.kpi-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 3px;
}

.kpi-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}

/* ألوان إضافية */
.bg-pink {
    background: linear-gradient(135deg, #ec4899, #f472b6);
}

/* الملخص المالي */
.financial-summary {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 20px;
}

.fin-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.fin-row:last-child {
    border-bottom: none;
}

.fin-row.total {
    font-size: 1.1rem;
    font-weight: 700;
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid var(--primary-color);
    border-bottom: none;
}

.fin-row.total .fin-value {
    color: var(--primary-color);
}

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

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

/* تحسين فلاتر التقارير */
.report-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.report-filters .form-group {
    min-width: 150px;
}

/* ==================== صفحة إتمام الطلب ==================== */

.checkout-page-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 25px;
    align-items: start;
}

@media (max-width: 1024px) {
    .checkout-page-grid {
        grid-template-columns: 1fr;
    }
}

.checkout-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.checkout-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.checkout-card-header {
    padding: 18px 25px;
    background: linear-gradient(to bottom, #fafbfc, #ffffff);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkout-card-header i {
    font-size: 1.3rem;
    color: var(--primary-color);
}

.checkout-card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.checkout-card-body {
    padding: 25px;
}

/* أزرار نوع الطلب */
.order-type-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    border: 2px solid var(--border-color);
    background: var(--bg-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    gap: 10px;
}

.type-btn:hover {
    border-color: var(--secondary-color);
    background: rgba(201, 162, 39, 0.05);
}

.type-btn.active {
    border-color: var(--secondary-color);
    background: var(--secondary-color);
    color: white;
}

.type-btn .type-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(26, 39, 68, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
}

.type-btn.active .type-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.type-btn .type-info {
    text-align: center;
}

.type-btn .type-name {
    display: block;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 3px;
}

.type-btn .type-desc {
    display: block;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* الحقول الإضافية */
.extra-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.extra-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.extra-section label i {
    margin-left: 8px;
    color: var(--primary-color);
}

.delivery-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.field-group label {
    font-size: 0.9rem;
}

/* أزرار طريقة الدفع */
.payment-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.payment-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid var(--border-color);
    background: var(--bg-color);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    gap: 10px;
}

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

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

.payment-btn .payment-icon {
    font-size: 2rem;
    color: var(--success-color);
}

.payment-btn.active .payment-icon {
    color: white;
}

.payment-btn span {
    font-weight: 600;
}

/* قسم الدفع النقدي */
.cash-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border-color);
}

.cash-section label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
}

.cash-section label i {
    margin-left: 8px;
    color: var(--secondary-color);
}

.quick-amounts {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.quick-amount-btn {
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.quick-amount-btn:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.change-box {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, var(--success-color), #34d399);
    border-radius: var(--radius);
    color: white;
    text-align: center;
}

.change-box .change-label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    opacity: 0.9;
}

.change-box .change-value {
    font-size: 2rem;
    font-weight: 700;
}

/* قسم الخصم */
.discount-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.discount-type-btns {
    display: flex;
    gap: 10px;
}

.discount-type-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    background: var(--bg-color);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.discount-type-btn.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

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

.discount-input-wrapper input {
    padding-left: 50px;
}

.discount-suffix {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: var(--text-light);
}

/* ملخص الطلب */
.checkout-summary-section {
    position: relative;
}

.sticky-card {
    position: sticky;
    top: 20px;
}

.order-items-list {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-left: 10px;
}

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

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

.checkout-item .item-qty {
    width: 35px;
    height: 35px;
    background: var(--secondary-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.checkout-item .item-details {
    flex: 1;
}

.checkout-item .item-name {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 2px;
}

.checkout-item .item-price {
    font-size: 0.85rem;
    color: var(--text-light);
}

.checkout-item .item-total {
    font-weight: 700;
    color: var(--primary-color);
}

/* الإجماليات */
.checkout-totals {
    background: var(--bg-color);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.checkout-totals .total-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.checkout-totals .total-line:last-child {
    border-bottom: none;
}

.checkout-totals .grand-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    padding-top: 15px;
    margin-top: 10px;
    border-top: 2px solid var(--primary-color);
}

/* أزرار الإجراءات */
.checkout-actions {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
}

.checkout-actions .btn {
    padding: 15px 20px;
    font-size: 1rem;
}

.checkout-actions .btn-success {
    font-size: 1.1rem;
}

/* حقول كبيرة */
.form-control-lg {
    padding: 15px 20px;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .order-type-buttons,
    .payment-buttons {
        grid-template-columns: 1fr;
    }
    
    .delivery-fields {
        grid-template-columns: 1fr;
    }
    
    .checkout-actions {
        grid-template-columns: 1fr;
    }
}
