body {
    zoom: 0.9; /* بيصغر الموقع بنسبة 10% */
}

/* لو عايز تخلي التصغير يشتغل على الشاشات الكبيرة بس ويفضل زي ما هو على الموبايل: */
@media (min-width: 1024px) {
    body {
        zoom: 0.85; 
    }
} 


/* ============================================================
   TMS Central — Shared Stylesheet
   /public/css/styles.css
   Loaded by all app pages. Tailwind CDN handles utilities;
   this file owns custom component styles & design tokens.
   ============================================================ */

/* ── Google Font is loaded via <link> in HTML heads ─────────── */
* { font-family: 'Inter', sans-serif; box-sizing: border-box; }

/* ── Base ───────────────────────────────────────────────────── */
body {
    background-color: #f8fafc;
    color: #1f2937;
}

/* ─────────────────────────────────────────────────────────────
   SIDEBAR
   ───────────────────────────────────────────────────────────── */
.sidebar-item {
    border-left: 3px solid transparent;
    transition: background-color 0.15s, color 0.15s;
}
.sidebar-item.active {
    background-color: #131b2b;
    color: #ab8038;
    border-left: 3px solid #ab8038;
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────────────────────── */

/* Primary — solid gold */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #ab8038;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(171, 128, 56, 0.25);
    transition: background-color 0.15s, transform 0.1s;
}
.btn-primary:hover  { background-color: #96702f; }
.btn-primary:active { transform: scale(0.98); }

/* Secondary — outlined / ghost */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #ffffff;
    color: #374151;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, border-color 0.15s;
}
.btn-secondary:hover { background-color: #f9fafb; border-color: #d1d5db; }

/* Dark — deep navy */
.btn-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #0a0e17;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s, transform 0.1s;
}
.btn-dark:hover  { background-color: #1a2333; }
.btn-dark:active { transform: scale(0.98); }

/* ─────────────────────────────────────────────────────────────
   CARDS
   ───────────────────────────────────────────────────────────── */
.card {
    background-color: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* KPI / Stat card */
.stat-card {
    background-color: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.8);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 130px;
    overflow: hidden;
    position: relative;
}
.stat-card-label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.stat-card-value {
    font-size: 36px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
    margin-top: 12px;
    margin-bottom: 4px;
}

/* ─────────────────────────────────────────────────────────────
   STATUS BADGES (pills)
   ───────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.badge-green   { background-color: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-red     { background-color: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; }
.badge-amber   { background-color: #fffbeb; color: #d97706; border: 1px solid #fde68a; }
.badge-gray    { background-color: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }

/* ─────────────────────────────────────────────────────────────
   DATA TABLE
   ───────────────────────────────────────────────────────────── */
.data-table th {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    padding: 14px 24px;
    background-color: rgba(249, 250, 251, 0.5);
    border-bottom: 1px solid #f3f4f6;
}
.data-table td {
    padding: 14px 24px;
    font-size: 14px;
    border-bottom: 1px solid #f9fafb;
}
.data-table tbody tr:hover {
    background-color: rgba(249, 250, 251, 0.5);
}

/* ─────────────────────────────────────────────────────────────
   FORM INPUTS
   ───────────────────────────────────────────────────────────── */
.form-input {
    width: 100%;
    padding: 11px 16px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    color: #111827;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-input:focus {
    outline: none;
    border-color: #ab8038;
    box-shadow: 0 0 0 3px rgba(171, 128, 56, 0.12);
}
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

/* ─────────────────────────────────────────────────────────────
   CUSTOM CHECKBOX
   ───────────────────────────────────────────────────────────── */
.custom-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
    background-color: #fff;
}
.custom-checkbox:checked {
    background-color: #ab8038;
    border-color: #ab8038;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
    background-size: contain;
}

/* ─────────────────────────────────────────────────────────────
   TOGGLE SWITCH  (Settings page)
   ───────────────────────────────────────────────────────────── */
.toggle-checkbox {
    position: absolute;
    right: 0;
    z-index: 1;
    border: 4px solid #e2e8f0;
    border-radius: 9999px;
    appearance: none;
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}
.toggle-checkbox:checked {
    right: 0;
    border-color: #ab8038;
}
.toggle-checkbox:checked + .toggle-label {
    background-color: #ab8038;
}
.toggle-label {
    display: block;
    overflow: hidden;
    height: 24px;
    border-radius: 9999px;
    background-color: #cbd5e1;
    cursor: pointer;
    transition: background-color 0.3s;
}

/* ─────────────────────────────────────────────────────────────
   INLINE FIELD ERROR
   ───────────────────────────────────────────────────────────── */
.field-error {
    color: #dc2626;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}
.field-error.visible { display: block; }

/* ─────────────────────────────────────────────────────────────
   AUTH PAGES — branding panel orbs
   ───────────────────────────────────────────────────────────── */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.18;
    animation: orb-drift 10s ease-in-out infinite alternate;
}
@keyframes orb-drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(30px, 40px) scale(1.08); }
}

/* ─────────────────────────────────────────────────────────────
   QUICK ACTION BUTTONS  (Dashboard page)
   ───────────────────────────────────────────────────────────── */
.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background-color: #ffffff;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}
.quick-action-btn:hover {
    background-color: #fdf8f0;
    border-color: #ab8038;
    color: #ab8038;
}
.qa-icon {
    color: #ab8038;
    flex-shrink: 0;
    transition: color 0.15s;
}

/* ─────────────────────────────────────────────────────────────
   PASSWORD STRENGTH BAR  (Register page)
   ───────────────────────────────────────────────────────────── */
.strength-bar-fill {
    transition: width 0.35s ease, background-color 0.35s ease;
    height: 100%;
    border-radius: 9999px;
}

/* ============================================== */
/* 🎨 تنسيقات زرار وفورم الفاتورة (Invoicing) */
/* ============================================== */

/* زرار الفاتورة اللي هيظهر في الجدول */
.btn-invoice-action {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}
.btn-invoice-action:hover {
    background-color: #e5e7eb;
    color: #111827;
}

/* خلفية الشاشة المنبثقة الشفافة */
.invoice-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none; /* مخفية في البداية عشان متظهرش غير لما ندوس على الزرار */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

/* صندوق الفورم نفسه */
.invoice-modal-content {
    background-color: #ffffff;
    width: 100%;
    max-width: 450px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
}

/* الهيدر (العنوان والأيقونة) */
.invoice-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f6;
}
.invoice-modal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}
.invoice-icon-box {
    background-color: #e6f4ea;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.invoice-modal-title-wrapper h3 {
    margin: 0;
    font-size: 16px;
    color: #111827;
    font-weight: 600;
}
.invoice-close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: #6b7280;
    cursor: pointer;
}
.invoice-close-btn:hover {
    color: #111827;
}

/* محتوى الفورم */
.invoice-modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.invoice-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.invoice-form-group label {
    font-size: 13px;
    color: #374151;
    font-weight: 600;
}
.invoice-form-group input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}
.invoice-form-group input:focus {
    border-color: #00875a;
    box-shadow: 0 0 0 3px rgba(0, 135, 90, 0.1);
}

/* الفوتر (الأزرار) */
.invoice-modal-footer {
    padding: 16px 24px;
    background-color: #f9fafb;
    border-top: 1px solid #f3f4f6;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
.invoice-btn-cancel {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
}
.invoice-btn-cancel:hover {
    background-color: #f3f4f6;
}
.invoice-btn-save {
    background-color: #111827;
    border: none;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
}
.invoice-btn-save:hover {
    background-color: #374151;
}