/* =========================================
   Barbershop Management System Styles
   ========================================= */

:root {
    --primary: #1f2937;
    --secondary: #d4a574;
    --accent: #f59e0b;
    --light: #f8f9fa;
    --dark: #111827;
}

body {
    font-family: 'Tajawal', 'Cairo', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f3f4f6;
    color: #1f2937;
    min-height: 100vh;
}

body.rtl {
    font-family: 'Tajawal', 'Cairo', system-ui, sans-serif;
}

/* ===== Login Page ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.login-card .logo i {
    font-size: 48px;
    color: var(--secondary);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 24px;
    font-weight: 700;
}

.login-card .form-control {
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.login-card .btn-primary {
    background: var(--primary);
    border: 0;
    padding: 12px;
    border-radius: 10px;
    width: 100%;
    font-weight: 600;
    margin-top: 10px;
}

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

.lang-switcher {
    text-align: center;
    margin-top: 20px;
}

.lang-switcher a {
    margin: 0 8px;
    text-decoration: none;
    color: #6b7280;
}

.lang-switcher a.active {
    color: var(--secondary);
    font-weight: 700;
}

/* ===== Navigation ===== */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
}

/* ===== Cards ===== */
.card {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
    padding: 16px 20px;
}

/* ===== Stat Cards ===== */
.stat-card {
    padding: 24px;
    border-radius: 12px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    position: absolute;
    font-size: 80px;
    opacity: 0.15;
    top: 50%;
    transform: translateY(-50%);
}

body.rtl .stat-card .stat-icon { left: 20px; }
body.ltr .stat-card .stat-icon { right: 20px; }

.stat-card .label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.stat-card .value {
    font-size: 32px;
    font-weight: 700;
}

.stat-card.blue   { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.stat-card.green  { background: linear-gradient(135deg, #10b981, #047857); }
.stat-card.orange { background: linear-gradient(135deg, #f59e0b, #b45309); }
.stat-card.red    { background: linear-gradient(135deg, #ef4444, #b91c1c); }

/* ===== Tables ===== */
.table {
    background: #fff;
}

.table th {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    padding: 12px;
}

.table td {
    padding: 12px;
    vertical-align: middle;
}

/* ===== Badges ===== */
.badge.bg-pending   { background: #f59e0b !important; }
.badge.bg-confirmed { background: #3b82f6 !important; }
.badge.bg-completed { background: #10b981 !important; }
.badge.bg-cancelled { background: #ef4444 !important; }
.badge.bg-no_show   { background: #6b7280 !important; }

/* ===== Buttons ===== */
.btn {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 500;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 13px;
}

/* ===== Forms ===== */
.form-label {
    font-weight: 500;
    margin-bottom: 6px;
}

.form-control, .form-select {
    border-radius: 8px;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 0.25rem rgba(212, 165, 116, 0.25);
}

/* ===== Public Booking Page ===== */
.public-hero {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)),
                url('https://images.unsplash.com/photo-1503951914875-452162b0f3f1?w=1200');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 80px 20px;
    text-align: center;
}

.public-hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
}

.public-hero .lead {
    font-size: 20px;
    opacity: 0.9;
}

.public-section {
    padding: 60px 0;
}

.service-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform .2s, box-shadow .2s;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.service-card .icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
}

.service-card .price {
    color: var(--accent);
    font-size: 22px;
    font-weight: 700;
    margin-top: 12px;
}

.package-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 2px solid transparent;
    transition: all .2s;
    height: 100%;
}

.package-card:hover {
    border-color: var(--accent);
}

.package-card .package-price {
    font-size: 36px;
    font-weight: 800;
    color: var(--accent);
}

/* ===== Time Slots ===== */
.time-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.time-slot {
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all .15s;
    font-weight: 500;
}

.time-slot:hover {
    border-color: var(--accent);
    background: #fffbeb;
}

.time-slot.selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.time-slot.disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .public-hero h1 { font-size: 32px; }
    .stat-card .value { font-size: 24px; }
}

/* ===== POS Screen ===== */
.pos-container { max-width: 1600px; }

.pos-item {
    padding: 14px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: white;
    transition: all .15s ease;
    text-align: center;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    cursor: pointer;
    color: inherit;
}
.pos-item:hover {
    border-color: #d4a574;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,.08);
}
.pos-item:active { transform: translateY(0); }

.pos-item-name {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
    line-height: 1.2;
    word-break: break-word;
}
.pos-item-price {
    color: #d4a574;
    font-weight: bold;
    font-size: 15px;
    margin-bottom: 2px;
}
.pos-item-package {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
}
.pos-item-package .pos-item-price {
    color: #b45309;
}

.cart-list {
    max-height: 380px;
    overflow-y: auto;
}
.cart-row {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    gap: 8px;
}
.cart-row:last-child { border-bottom: none; }
.cart-row-name {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 2px;
}
.cart-qty {
    display: flex;
    align-items: center;
    gap: 4px;
}
.cart-qty-val {
    min-width: 26px;
    text-align: center;
    font-weight: bold;
}

/* مدخل البحث في POS */
#itemSearch {
    font-size: 16px;
    padding: 12px;
}

/* POS link highlight */
.nav-pos {
    background-color: #d4a574 !important;
    color: white !important;
    border-radius: 6px;
    margin: 0 2px;
}
.nav-pos:hover { background-color: #b8915d !important; }
