/* assets/css/style.css - التنسيقات العامة لنظام المطعم والبار (POS & Admin) */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f6f9;
    color: #333;
    direction: rtl;
    text-align: right;
}

/* شاشة تسجيل الدخول */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.login-container {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 20px;
}

.login-header h2 {
    color: #1e293b;
    margin-bottom: 5px;
}

.login-header p {
    color: #64748b;
    font-size: 14px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #475569;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 16px;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background-color: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.alert {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
    text-align: center;
}

.alert.hidden { display: none; }
.alert.success { background-color: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert.error { background-color: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* لوحة التحكم (Admin Dashboard) */
.admin-body {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background-color: #1e293b;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    background-color: #0f172a;
    border-bottom: 1px solid #334155;
}

.sidebar-header h3 { font-size: 18px; margin-bottom: 5px; }
.sidebar-header p { font-size: 13px; color: #94a3b8; }

.nav-links {
    list-style: none;
    padding: 15px 0;
    flex-grow: 1;
}

.nav-links li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #cbd5e1;
    text-decoration: none;
    transition: background 0.2s;
}

.nav-links li a i { margin-left: 10px; width: 20px; }
.nav-links li a:hover, .nav-links li a.active {
    background-color: #334155;
    color: white;
}

.nav-links li a.logout { color: #f87171; }
.nav-links li a.logout:hover { background-color: #7f1d1d; color: white; }

.main-content {
    flex-grow: 1;
    padding: 25px;
    overflow-y: auto;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.btn-sync {
    background-color: #059669;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

.card-icon {
    font-size: 30px;
    color: #2563eb;
    background: #eff6ff;
    padding: 15px;
    border-radius: 8px;
    margin-left: 15px;
}

.card-info h4 { font-size: 14px; color: #64748b; margin-bottom: 5px; }
.card-info h2 { font-size: 22px; color: #1e293b; }

.table-container {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.table-container h3 { margin-bottom: 15px; color: #1e293b; }

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: right;
}

.data-table th { background-color: #f8fafc; color: #475569; font-weight: 600; }

/* واجهة الكاشير ونقاط البيع (POS) */
.pos-body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.pos-header {
    background-color: #1e293b;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pos-actions button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin-left: 8px;
}

.btn-secondary { background-color: #475569; color: white; }
.btn-logout { background-color: #dc2626; color: white; }

.pos-container {
    display: grid;
    grid-template-columns: 280px 1fr 350px;
    flex-grow: 1;
    overflow: hidden;
}

.tables-section, .menu-section, .cart-section {
    padding: 15px;
    overflow-y: auto;
    border-left: 1px solid #e2e8f0;
    background: white;
}

.tables-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.table-card {
    background: #f8fafc;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.table-card.occupied { background-color: #fee2e2; border-color: #f87171; color: #991b1b; }
.table-card.available { background-color: #ecfdf5; border-color: #34d399; color: #065f46; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.product-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
}

.product-card:hover { background-color: #eff6ff; border-color: #2563eb; }
.product-card h4 { font-size: 15px; margin-bottom: 5px; color: #1e293b; }
.product-card p { color: #2563eb; font-weight: bold; }

.cart-section { background: #f8fafc; display: flex; flex-direction: column; }
.selected-table-info { margin: 10px 0; font-weight: bold; color: #475569; }

.cart-items {
    flex-grow: 1;
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 10px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e2e8f0;
    font-size: 14px;
}

.cart-summary {
    background: white;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #cbd5e1;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 16px;
    color: #1e293b;
}

.cart-actions {
    display: flex;
    gap: 8px;
}

.btn-success {
    flex: 2;
    background-color: #059669;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.btn-danger {
    flex: 1;
    background-color: #dc2626;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}