@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 400;
  src: url('/assets/fonts/tajawal/Tajawal-400.ttf') format('truetype');
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 500;
  src: url('/assets/fonts/tajawal/Tajawal-500.ttf') format('truetype');
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 700;
  src: url('/assets/fonts/tajawal/Tajawal-700.ttf') format('truetype');
}
@font-face {
  font-family: 'Tajawal';
  font-style: normal;
  font-weight: 800;
  src: url('/assets/fonts/tajawal/Tajawal-800.ttf') format('truetype');
}

:root {
  --brand-1: #0ea5e9;  /* sky-500 */
  --brand-2: #6366f1;  /* indigo-500 */
  --brand-3: #14b8a6;  /* teal-500 */
  --bg-soft: #f8fafc;
  --text-muted: #6b7280;
  --card-radius: .8rem;
  --shadow-sm: 0 2px 10px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 22px rgba(15, 23, 42, .08);
}
input.form-check-input {
  margin-right: 5px !important;
}
html, body {
  font-family: 'Tajawal', system-ui, -apple-system, Segoe UI, Roboto, Tahoma, Arial, sans-serif;
  background: var(--bg-soft);
  line-height: 1.6;
}
.app-topbar { background: linear-gradient(90deg, var(--brand-2), var(--brand-1)); }
.app-main { min-height: 100vh; }
.app-main .container-fluid { max-width: 1240px; margin-inline: auto; }
.app-sidebar { width: 260px; min-height: 100vh; background: #fff; border-inline-start: 1px solid #e5e7eb; }
.app-sidebar .brand { color: var(--brand-2); border-bottom: 1px solid #eef2f7; font-size: 1.05rem; }
.sidebar-menu .menu-link { display: block; color: #334155; text-decoration: none; border-radius: .5rem; padding: .6rem .9rem; margin: .15rem .35rem; font-weight: 600; }
.sidebar-menu .menu-link:hover { background-color: #f1f5f9; }
.sidebar-menu .menu-link.active { background: linear-gradient(90deg, #eef2ff, #e0f2fe); color: #0f172a; border: 1px solid #e6e9ff; }

.form-switch .form-check-input { width: 3em; }
.badge-status { font-size: .85rem; }

/* Cards & sections */
.card { border: 1px solid #e5e7eb; border-radius: var(--card-radius); box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 1rem; }
.card .card-title { font-weight: 800; color: #0f172a; margin-bottom: .75rem; }
.card .card-body { padding: 1.25rem 1.25rem; }
.card-add {
    border: 1px solid #bae6fd;
    background: linear-gradient(123deg, #6367f1, #12a3e8);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-md);
}.card-add .card-title { color: #0c4a6e; display: flex; align-items: center; gap: 8px; font-weight: 800; color: #fff; }
.card-add .card-title i { color: #ffffff; }
.card-add label.form-label {
    color: #fff;
}.card-add button.btn.btn-primary {
    background: #47d4a0 !important;
}

.topbar-notify-btn .bi-bell {
  font-size: 1.3rem;
}
.topbar-notify-btn:hover {
  color: #ffffff;
}

/* Calendar */
.calendar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.calendar-header { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 6px; }
.calendar-header .cal-head { text-align: center; font-weight: 700; color: var(--text-muted); font-size: .9rem; }
.calendar-day { position: relative; border: 1px solid #e5e7eb; min-height: 90px; padding: 8px; border-radius: .5rem; background: #fff; transition: box-shadow .2s, background-color .2s, border-color .2s; user-select: none; cursor: pointer; }
.calendar-day:hover { box-shadow: 0 1px 8px rgba(0,0,0,.05); }
.calendar-day.selected { background: #eff6ff; border-color: #bfdbfe; box-shadow: 0 0 0 2px #bfdbfe inset; }
.calendar-day.disabled { background: #f3f4f6; color: #9ca3af; cursor: default; }
.calendar-day.disabled:hover { box-shadow: none; }
.calendar-day .day-num { font-weight: 700; color: var(--text-muted); }
.calendar-event { display: block; position: relative; font-size: .75rem; background: #e0f2fe; color: #0369a1; padding: 4px 8px 4px 8px; margin-top: 4px; border-radius: .35rem; line-height: 1.2; }
.calendar-event .ev-line { display: flex; align-items: center; gap: .25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calendar-event .ev-line i { flex: 0 0 auto; }
.calendar-event .ev-edit { position: absolute; inset-inline-end: 4px; top: 4px; opacity: 0; cursor: pointer; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); transition: opacity .15s ease; }
.calendar-event .ev-del { position: absolute; inset-inline-end: 4px; top: 28px; opacity: 0; cursor: pointer; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35); transition: opacity .15s ease; }
.calendar-event:hover .ev-edit, .calendar-event:hover .ev-del { opacity: 1; }
.calendar-day.disabled .calendar-event { opacity: .6; }
.calendar-day.disabled .calendar-event .ev-edit,
.calendar-day.disabled .calendar-event .ev-del { display: none !important; }
.calendar-day:hover .calendar-event .ev-edit, .calendar-day:hover .calendar-event .ev-del { opacity: 1; }
.day-action { position: absolute; inset-inline-end: 4px; top: 4px; 
  opacity: 0; background: linear-gradient(90deg, var(--brand-1), var(--brand-2)); color: #fff;
  border: none; border-radius: 999px; width: 28px; height: 28px; display: grid; place-items: center; cursor: pointer;
  font-size: 25px; box-shadow: 0 2px 10px rgba(2,132,199,.25); transition: opacity .15s ease, transform .15s ease, box-shadow .15s ease; z-index: 2; }
.calendar-day:hover .day-action { opacity: 1; box-shadow: 0 3px 12px rgba(2,132,199,.35); transform: scale(1.04); }
.calendar-day.disabled .day-action { display: none !important; }

.cal-actions { display: none; flex-direction: column; align-items: stretch; gap: 10px; padding: 8px 12px; border: 1px dashed #c7d2fe; background: #eef2ff; color: #111827; border-radius: .5rem; margin: 12px 0; }
.cal-actions.show { display: flex; }
.cal-actions .d-flex { justify-content: flex-start; }

.flag-icon { width: 16px; height: 12px; object-fit: cover; border: 1px solid #e5e7eb; border-radius: 2px; vertical-align: -2px; }
.flag-emoji { font-size: .9rem; }

/* Fancy specialty filter (below calendar) */
.filter-hero { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 16px; border-radius: .75rem;
  background: linear-gradient(90deg, var(--brand-2), var(--brand-1)); color: #fff; box-shadow: 0 6px 18px rgba(2,132,199,.15); margin-bottom: 12px; }
.filter-hero .filter-title { font-weight: 800; letter-spacing: .5px; }
.filter-hero .filter-select {
  min-width: 240px;
  max-width: 360px;
  font-size: 1rem;
  height: 42px;
  border-radius: 999px;
  padding-inline: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
/* reset icon inside filter-hero */
.filter-hero .filter-reset {
  background: transparent;
  border: 0;
  color: #fff;
  width: 34px; height: 34px;
  border-radius: 999px;
  display: inline-grid; place-items: center;
}.flatpickr-calendar.open {
    padding-bottom: 5px;
}
button.btn.btn-sm.btn-outline-primary.js-edit-row {
    border-radius: 15px !important;
    padding-top: 8px;
    padding-bottom: 2px;
}button.btn.btn-sm.btn-outline-danger.js-del-row {
    border-radius: 20px;
    padding-top: 10px;
    width: 35px;
}
.filter-hero .filter-reset:hover { background: rgba(255,255,255,.12); }
/* Ensure auxiliary labels/controls look right in hero */
.filter-hero .form-label { color: #fff; font-weight: 800; }
.filter-hero .form-control,
.filter-hero .form-select { box-shadow: 0 2px 10px rgba(0,0,0,.08); }

/* Buttons */
.btn-primary { background: linear-gradient(90deg, var(--brand-2), var(--brand-1)); border: none; box-shadow: 0 6px 14px rgba(2,132,199,.15); }
.btn-primary:hover { filter: brightness(.98); box-shadow: 0 8px 18px rgba(2,132,199,.22); }
.btn-success { background: linear-gradient(90deg, #22c55e, #16a34a); border: none; box-shadow: 0 6px 14px rgba(22,163,74,.15); }
.btn-success:hover { filter: brightness(.98); box-shadow: 0 8px 18px rgba(22,163,74,.22); }
.btn-outline-secondary { border-color: #cbd5e1; color: #334155; }
.btn-outline-secondary:hover {
    background: #f87315;
    border-color: #fbbf23;
}a.btn.btn-sm.btn-outline-secondary.me-1.booking-edit-btn.edit-timer-pill {
    padding: 0;
}i.bi.bi-pencil {
    padding-top: 5px;
}
.edit-timer-pill .edit-timer-text:hover {
    color: #fff;
}#form-search label.form-label {
    color: #000000;
}
/* Small round icon button */
.btn-icon { width: 30px; height: 30px; padding: 0 !important; border-radius: 999px; display: inline-grid; place-items: center; }
.btn-icon i { font-size: 1rem; line-height: 1; padding: 6px;}

/* Booking edit timer pill */
.edit-timer-pill {
  border-radius: 999px !important;
  padding: 2px 10px 2px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-color: #e5e7eb;
  background-color: #ffffff;
}
.edit-timer-pill.disabled,
.edit-timer-pill[aria-disabled="true"] {
  opacity: .6;
  cursor: default;
}
.edit-timer-pill .edit-timer-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #fbbf24;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffcd00;
    font-size: 0.85rem;
}
.edit-timer-pill .edit-timer-circle::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: conic-gradient(#f97316 var(--edit-timer-deg, 360deg), #fefce8 0deg);
}
.edit-timer-pill .edit-timer-circle i {
  position: relative;
  z-index: 1;
}
.edit-timer-pill .edit-timer-text {
    font-size: 0.75rem;
    letter-spacing: .03em;
    color: #111827;
    min-width: 46px;
    text-align: right !important;
    padding-top: 4px;
}

/* Forms */
.form-label { font-weight: 700; color: #334155; }
.form-control, .form-select { border-color: #e5e7eb; }
.form-control:focus, .form-select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 .2rem rgba(99,102,241,.12); }
button.btn.btn-outline-primary {
    border-radius: 15px !important;
    margin-left: 4px;
    padding-top: 7px;
    padding-bottom: 2px;
}
/* SlimSelect (searchable dropdowns) RTL tweaks */
.ss-main { direction: rtl; text-align: right; border-radius: 34px !important; padding: 9px;}
.ss-main .ss-values .ss-single { text-align: right; }
.ss-main .ss-arrow { display: none !important; }
.ss-content { direction: rtl; text-align: right; }
.ss-search input { text-align: right; }
/* Hide native select after SlimSelect attaches to prevent double arrow */
select.ss-native-hide { display: none !important; }
/* Ensure SlimSelect doesn't inherit Bootstrap's background arrow if classes are copied */
.ss-main { background-image: none !important; }

/* شركة الفلتر في التوب بار (SlimSelect حجم صغير) */
.company-filter-select + .ss-main.ss-main {
  min-width: 180px;
  max-width: 220px;
  border-radius: 0 !important;
}

/* Header search toggles */
.search-wrap { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.search-wrap .search-input { display: none; min-width: 0; }
.search-wrap .search-input.open { display: block; width: 240px; }
.search-wrap .search-toggle { background: transparent; border: 0; padding: 0; cursor: pointer; color: #64748b; width: 28px; height: 28px; border-radius: 999px; display: inline-grid; place-items: center; }
.search-wrap .search-toggle:hover { color: #334155; background: rgba(2, 132, 199, .08); }
.search-wrap .icon-input { display: none; }
.search-wrap .icon-input.open { display: block; }
.search-wrap .search-reset { background: transparent; border: 0; padding: 0; cursor: pointer; color: #64748b; width: 28px; height: 28px; border-radius: 999px; display: inline-grid; place-items: center; }
.search-wrap .search-reset:hover { color: #334155; background: rgba(239, 68, 68, .08); }

.booking-actions-wrap {
  position: relative;
  display: inline-block;
}
.booking-actions-toggle {
  width: 32px;
  height: 32px;
  border-radius: 999px !important;
  display: inline-grid;
  place-items: center;
  padding: 0;
}
.card .form-switch {
    width: 100%;
    text-align: right;
    display: block;
    border-top: 1px solid;
    padding-top: 9px;
    padding-bottom: 4px;
}
.booking-actions-menu {
    position: absolute;
    inset-inline-end: 0;
    top: -5px;
    left: 32px;
    padding: 4px 6px;
    background: #ffffff;
    border-radius: 999px;
    box-shadow: var(--shadow-md);
    display: none;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    z-index: 1050;
}
.booking-actions-wrap.open .booking-actions-menu {
  display: inline-flex;
}

/* Overlay مخصص لحالات طلبات الاسترداد والتعديلات */
.cr-status-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.cr-status-overlay.d-none {
  display: none;
}
.cr-status-dialog {
  background: #ffffff;
  border-radius: .85rem;
  padding: 1.25rem 1.35rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
}

/* عرض قائمة الإجراءات في صفحة طلبات الاسترداد والتعديلات عند المرور */

/* Inputs with inline icons (RTL-aware) */
.icon-input { position: relative; }
.icon-input .icon { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; font-size: 1rem; }
.icon-input .form-control { padding-inline-start: 2rem; }
.icon-input .flatpickr-input { padding-inline-start: 2rem; }

/* Flatpickr clear button inside calendar */
.flatpickr-calendar .flatpickr-clear-btn {
  margin: 8px;
}

/* Public */
.hero { background: linear-gradient(120deg, var(--brand-3), var(--brand-1)); color: #fff; border-radius: .75rem; padding: 1.5rem; margin-bottom: 1rem; }
.hero-actions { flex-direction: row; }
.hero-actions .hero-icon-btn {
  display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: none;
    color: #0f172a;
    background: rgba(248, 250, 252, 0.98);
    box-shadow: var(--shadow-md);
    transition: background-color .18s 
ease, color .18s 
ease, box-shadow .18s 
ease, transform .12s 
ease;
    text-decoration: none;
    padding-top: 7px;
    padding-left: 0px;
    padding-right: 1px;
}
.hero-actions .hero-icon-btn i {
  font-size: 1.5rem;
}
.hero-actions .hero-icon-btn:hover {
  background: #066a8e;
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .35);
  transform: translateY(-1px);
  text-decoration: none;
}
.hero-actions .hero-icon-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(15, 23, 42, .28);
}

/* Inline search row */
.search-inline { display: flex; flex-direction: row; align-items: flex-end; justify-content: center; flex-wrap: wrap; gap: 10px; padding: 6px 4px; }
.search-inline > .col-auto { width: auto; flex: 0 0 auto; }
.search-inline .form-control,
.search-inline .form-select { min-width: 0; width: 100%; }
.search-inline #dayBox .form-control,
.search-inline #fromBox .form-control,
.search-inline #toBox .form-control { min-width: 170px; }
.search-inline .btn { white-space: nowrap; }

/* Filter form look (admin/forms.php) */
.search-inline .form-control,
.search-inline .form-select {
  border-radius: 34px;
  padding: 13px 16px;
  box-shadow: var(--shadow-sm);
  border-color: #d1d5db;
}
.search-inline .btn {
  border-radius: 34px;
  box-shadow: 0 8px 20px rgba(16,185,129,.35);
    padding-top: 10px;
}

/* Invoice list filters (admin/invoices.php) */
.invoice-filters-row .invoice-filter-field.field-code .form-control{
  min-width: 200px;
  max-width: 200px;
}
.invoice-filters-row .invoice-filter-field.field-status{
  min-width: 140px;
  max-width: 140px;
}
.invoice-filters-row .invoice-filter-field.field-status .form-select,
.invoice-filters-row .invoice-filter-field.field-status .ss-main{
  width: 100%;
}
.invoice-filters-row .invoice-filter-field.field-user .form-select{
  min-width: 200px;
}
.invoice-filters-row .invoice-filter-field.field-date .form-control{
  min-width: 170px;
  max-width: 190px;
}

/* Booking status tabs (admin/bookings.php) */
.booking-status-tabs .nav-link {
  border-radius: 10px;
  padding: 0.45rem 1.1rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 130px;
  background: #f9fafb;
  color: #0f172a;
  border: 1px solid #e5e7eb;
  box-shadow: var(--shadow-sm);
  transition: all .18s ease;
  text-align: center;
  font-weight: 600;
}
.booking-status-tabs .nav-link .status-count{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  font-size:.9rem;
  color:#1d4ed8;
}
.booking-status-tabs .nav-link .status-count .num{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:28px;
  min-height:24px;
  padding:0 6px;
  border-radius:999px;
  background:#e0f2fe;
}
.booking-status-tabs .nav-link .status-label{
  font-size:.86rem;
}
.booking-status-tabs .nav-link.active{
  background:linear-gradient(120deg, var(--brand-2), var(--brand-1));
  color:#f9fafb;
  border-color:transparent;
  box-shadow:0 10px 24px rgba(37,99,235,.35);
}
.booking-status-tabs .nav-link.active.status-cancelled{
  background:linear-gradient(120deg,#ef4444,#b91c1c);
  box-shadow:0 10px 24px rgba(220,38,38,.45);
}
.booking-status-tabs .nav-link.active.status-test_completed{
  background:linear-gradient(120deg,#22c55e,#15803d);
  box-shadow:0 10px 24px rgba(22,163,74,.45);
}
.booking-status-tabs .nav-link.active.status-change-modify{
  background:linear-gradient(120deg,#facc15,#eab308);
  box-shadow:0 10px 24px rgba(234,179,8,.45);
}
.booking-status-tabs .nav-link.active .status-count{
  color:#bfdbfe;
}
.booking-status-tabs .nav-link.active .status-count .num{
  background:rgba(15,23,42,.2);
  color:#f9fafb;
}
.booking-status-tabs .nav-link:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 18px rgba(15,23,42,.14);
}

/* Change request type buttons (modify / cancel) */
.cr-type-btn{
  border-radius:999px !important;
  padding:.3rem .9rem;
  font-weight:600;
  border:0;
  color:#111827 !important;
  display:inline-flex;
  align-items:center;
  gap:4px;
  box-shadow:var(--shadow-sm);
}
.cr-type-btn i{
  font-size:.9rem;
}
.cr-type-btn-modify{
  background:linear-gradient(120deg,#e5e7eb,#cbd5e1);
  box-shadow:0 4px 10px rgba(148,163,184,.35);
}
.cr-type-btn-cancel{
  background:linear-gradient(120deg,#e5e7eb,#d1d5db);
  box-shadow:0 4px 10px rgba(148,163,184,.35);
}
.cr-type-btn.active{
  transform:translateY(-1px);
}
.cr-type-btn-modify.active{
  background:linear-gradient(120deg,#facc15,#eab308);
  color:#111827 !important;
  box-shadow:0 8px 20px rgba(234,179,8,.55);
}
.cr-type-btn-cancel.active{
  background:linear-gradient(120deg,#ef4444,#b91c1c);
  color:#f9fafb !important;
  box-shadow:0 8px 20px rgba(220,38,38,.65);
}

/* بطاقة تفاصيل الطلب حسب نوعه */
.cr-card-modify{
  background:#fffbeb;
  border-color:#fed7aa;
}
.cr-card-cancel{
  background:#fef2f2;
  border-color:#fecaca;
}

/* Status change buttons in bookings modal */
.status-step-row{
  border-bottom:1px solid #e5e7eb;
}
.status-step-row:last-child{
  border-bottom:0;
}
.status-step-btn{
  background:#ffffff;
  border:0;
  border-radius:0;
  padding:.45rem .25rem;
  font-weight:600;
  color:#0f172a;
  display:flex;
  align-items:center;
  justify-content:space-between;
  width:100%;
  text-align:right;
}
.status-step-btn.active{
  background:#eef2ff;
}
.status-step-btn .status-step-date{
  margin:0;
  padding-inline-start:8px;
  font-size:.75rem;
  color:#6b7280;
  white-space:nowrap;
}

/* ألوان الحالات في قائمة التغيير */
.status-step-btn[data-status-option="booking_confirmed"],
.status-step-btn[data-status-option="test_completed"]{
  color:#15803d;
}
.status-step-btn[data-status-option="no_show"],
.status-step-btn[data-status-option="cancelled"]{
  color:#b91c1c;
}
.status-step-btn[data-status-option="converted"]{
  color:#92400e; /* brown */
}

.status-error{
  background:#ef4444;
  color:#ffffff;
  border-radius:8px;
  padding:4px 8px;
  font-size:.8rem;
  display:flex;
  align-items:center;
  gap:4px;
}

.status-step-check{
  color:#16a34a;
  font-size:1.3rem;
}

.status-step-comment {
    color: #ffffff;
    font-size: 1.1rem;
    cursor: pointer;
    margin-left: 6px;
    margin-right: 1px;
    background-color: #0ca5e9;
    border-radius: 21px;
    padding: 8px;
    padding-bottom: 0px;
    padding-top: 6px;
    margin-top: -9px;
}

.status-current-badge{
  background:#e5e7eb;
  color:#0f172a;
}
.status-current-badge.status-booking_confirmed,
.status-current-badge.status-test_completed{
  background:#d1fae5;
  color:#166534;
}
.status-current-badge.status-no_show,
.status-current-badge.status-cancelled{
  background:#fee2e2;
  color:#b91c1c;
}
.status-current-badge.status-converted{
  background:#fef3c7;
  color:#92400e;
}

/* Badges for statuses in bookings table */
.status-badge{
  border-radius:999px;
  padding:.25rem .7rem;
  font-weight:600;
}
.status-badge.status-pending{
  background:#e5e7eb;
  color:#374151;
}
.status-badge.status-payment_confirmed{
  background:#dbeafe;
  color:#1d4ed8;
}
.status-badge.status-converted{
  background:#fef3c7;
  color:#92400e;
}
.status-badge.status-booking_confirmed,
.status-badge.status-test_completed{
  background:#d1fae5;
  color:#166534;
}
.status-badge.status-no_show,
.status-badge.status-cancelled{
  background:#fee2e2;
  color:#b91c1c;
}

/* Invoice status colors (under_review / confirmed / cancelled) */
.status-badge.status-under_review{
  background:#e0f2fe;
  color:#0369a1;
}
.status-badge.status-confirmed{
  background:#d1fae5;
  color:#166534;
}
.status-badge.status-cancelled{
  background:#fee2e2;
  color:#b91c1c;
}

.status-comment-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    border-radius: 999px;
    background: #0ea5e9;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 20px;
    padding-top: 6px;
}

/* Booking table row hover effect (admin/bookings.php) */
table.table tbody tr.booking-row {
  transition: background-color .15s ease, box-shadow .15s ease;
}
table.table tbody tr.booking-row:hover {
  background-color: #f1f5f9;
  box-shadow: inset 0 0 0 1px rgba(148,163,184,.4);
}

/* Booking view icon button */
.booking-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #2563eb; /* blue */
  color: #ffffff !important;
  text-decoration: none;
  border: none;
  box-shadow: 0 6px 16px rgba(37,99,235,.35);
  transition: background-color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.booking-view-btn i {
  font-size: 1rem;
  padding-top: 6px;
}
.booking-view-btn:hover {
  background: #22c55e; /* green on hover */
  box-shadow: 0 8px 20px rgba(34,197,94,.4);
  transform: translateY(-1px);
}

/* Booking delete icon button */
.booking-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #e5e7eb; /* gray */
  color: #6b7280;
  border: none;
  margin-inline-start: 4px;
  box-shadow: 0 0 0 1px rgba(148,163,184,.6);
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .1s ease;
}
.booking-delete-btn i {
  font-size: 1rem;
  padding-top: 6px;
}
.booking-delete-btn:hover {
  background: #ef4444; /* red */
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(239,68,68,.4);
  transform: translateY(-1px);
}

/* Copy code badge */
.js-copy-code {
  position: relative;
  cursor: pointer;
}
.js-copy-code::after {
  content: "";
}

/* Center copy notification */
.copy-toast {
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.96);
  background: rgba(15,23,42,.96);
  color: #f9fafb;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: .9rem;
  box-shadow: 0 10px 25px rgba(15,23,42,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 9999;
}
.copy-toast.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.02);
}

/* Highlight comments card when navigated from list */
.comments-highlight {
  box-shadow: 0 0 0 3px rgba(56,189,248,.7);
  animation: commentsPulse 1.5s ease-out 1;
}
@keyframes commentsPulse{
  0%{ box-shadow:0 0 0 0 rgba(56,189,248,.0); }
  30%{ box-shadow:0 0 0 4px rgba(56,189,248,.7); }
  100%{ box-shadow:0 0 0 0 rgba(56,189,248,.0); }
}

/* Highlight + slide animation for a single comment after adding/updating */
.comment-item.comment-highlight {
  box-shadow: 0 0 0 3px rgba(56,189,248,.7);
  animation: commentSlideDown .4s ease-out, commentsPulse 1.5s ease-out 1;
}
.comment-item.comment-main.comment-highlight {
  background-color: #ecfdf3; /* أخضر فاتح يوضح أنه تعليق جديد */
}
.comment-item.comment-reply.comment-highlight {
  background-color: #e0f2fe; /* أزرق فاتح للرد */
}
@keyframes commentSlideDown{
  0%{
    opacity:0;
    transform:translateY(-10px) scale(.97);
  }
  100%{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

/* Red dot on comments icon when there are comments */
.status-comment-pill.position-relative {
  position: relative;
}
.comment-unread-dot {
  position: absolute;
  top: -1px;
  inset-inline-end: 2px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 2px rgba(15,23,42,.4);
}
/* Comment like button */
.comment-like-btn {
  color: #64748b;
}
.comment-actions i {
  font-size: 1.1rem;
}
.comment-item .comment-actions {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity .15s ease, transform .15s ease;
}
.comment-bubble:hover .comment-actions,
.comment-bubble:focus-within .comment-actions {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.comment-like-btn i {
  font-size: 1.2rem;
}
.comment-like-btn .like-count {
  font-size: 0.8rem;
}
.comment-like-btn.liked {
  color: #2563eb;
}

.comment-item.comment-main {
  background: #ffffff;
  border-radius: 14px;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 20px rgba(15,23,42,.06);
  margin-bottom: 1rem;
}
.comment-item.comment-reply {
  background: #f3f4f6;
  border-radius: 10px;
  padding: 6px 8px;
}
.comment-thread {
  position: relative;
  margin-top: 6px;
}
.comment-thread::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 1rem;
  border-inline-start: 1px solid #e5e7eb;
}
.comment-item.comment-main.comment-has-replies .comment-header,
.comment-item.comment-reply.comment-has-replies .comment-header {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 6px;
  margin-bottom: 4px;
}
.comment-item.comment-reply {
  position: relative;
}
.comment-item.comment-reply::before {
  content: '';
  position: absolute;
  top: 1.1rem;
  inset-inline-start: -.55rem;
  width: .8rem;
  border-top: 1px solid #e5e7eb;
}
.comment-deleted-box {
  background: #f9fafb;
  border-radius: 10px;
  padding: 6px 8px;
}
.comment-deleted-text {
  color: #9ca3af;
  font-style: italic;
}
.comment-deleted-meta {
  margin-top: 2px;
  font-size: .8rem;
  color: #9ca3af;
}
.comment-share-qr {
    display: inline-flex;
    align-items: center;
    margin-top: 0;
    margin-inline-start: 8px;
    text-align: start;
    flex-direction: column;
    background-color: #fff;
    padding: 10px;
    border-radius: 10px;
    padding-bottom: 0px;
}.btn .badge {
    position: relative;
    top: 8px !important;
}.rigsd {
    display: flex;
    flex-direction: row-reverse;
}.active .wiio {
    color: #fff !important;
}.dropdown-item.active, .dropdown-item:active {
    color: var(--bs-dropdown-link-active-color);
    text-decoration: none;
    background-color: var(--bs-dropdown-link-active-bg);
    color: #fff !important;
}
button.btn.btn-outline-secondary.qr-scan-btn {
    color: #fff;
    padding: 8px;
    border-radius: 15px;
    padding-top: 8px;
    background-color: #6267f1;
}
.comment-share-qr-code {
  margin-inline: 0;
}
.comment-share-qr-text {
  font-size: .8rem;
  margin-top: 0;
  font-weight: 600;
  letter-spacing: .08em;
}
span.comment-share-qr img {
  width: 70px;
}
.comment-actions a,
.comment-actions button {
  text-decoration: none;
}

.mention-tag {
  display: inline-block;
  background: #e0f2fe;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 0 6px;
  font-weight: 500;
}

.like-count-pill {
  color: #6b7280;
  text-decoration: none !important;
}
.like-count-pill:hover {
  color: #111827;
  text-decoration: none !important;
}
.like-count-pill i {
  color: #2563eb !important;
  font-size: 1.2rem;
}

/* Modern comment composer (booking_view.php) */
.comment-composer-box {
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand-1));
  box-shadow: 0 8px 20px rgba(15,23,42,.06);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.comment-input-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.comment-input-row .comment-body-input {
  resize: vertical;
  border: none;
  background: #ffffff;
  box-shadow: none;
  font-size: .95rem;
  color: #0f172a;
}
.comment-input-row .comment-body-input:focus {
  box-shadow: none;
}
.comment-composer-box:focus-within {
  border-color: rgba(255,255,255,.9);
  box-shadow: 0 0 0 2px rgba(255,255,255,.4), 0 10px 25px rgba(15,23,42,.25);
  background: linear-gradient(90deg, var(--brand-2), var(--brand-1));
}
.comment-toolbar .btn {
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: .95rem;
  background: #ffffff;
  color: #0f172a;
}
.comment-toolbar .btn:hover {
  background: #e5e7eb;
}
.comment-toolbar .btn .bi {
    font-size: 1.1rem;
    padding-top: 9px;
    padding-right: 3px;
}
.comment-toolbar .btn strong,
.comment-toolbar .btn em,
.comment-toolbar .btn span {
  line-height: 1;
}

/* Toggle line + icon for main comment composer */
.comment-main-toggle-wrapper {
  margin-top: 1rem;
}
.comment-main-toggle {
  position: relative;
  cursor: pointer;
  margin-bottom: .75rem;
}
.comment-main-toggle-line {
  height: 1px;
  background-color: #e5e7eb;
}
.comment-main-toggle-icon {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(15,23,42,.18);
  color: var(--brand-2);
  transition: background-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.comment-main-toggle-icon i {
  font-size: 1.25rem;
  padding-top: 4px;
}
.comment-main-toggle.is-open .comment-main-toggle-icon,
.comment-main-toggle:hover .comment-main-toggle-icon {
  background: linear-gradient(90deg, var(--brand-2), var(--brand-1));
  color: #ffffff;
  transform: translate(-50%, -50%) scale(1.05);
  box-shadow: 0 10px 24px rgba(15,23,42,.28);
}
.bi-reply-fill::before {
    font-size: 24px;
}
button.btn.btn-sm.btn-link.text-muted.px-1.comment-mention-btn {
    font-size: 30px;
}
/* Send / Save buttons: circular icons */
.btn-send,
.btn-save {
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn-send i,
.btn-save i {
  font-size: 1.1rem;
}
.btn-send:hover {
  background-color: #22c55e !important;
  border-color: #16a34a !important;
  color: #ffffff !important;
}
.btn-send:hover i {
  color: #ffffff;
}
.btn-save {
  background-color: #22c55e !important;
  border-color: #16a34a !important;
  color: #ffffff !important;
}
.btn-save:hover {
  background-color: #16a34a !important;
  border-color: #15803d !important;
  color: #ffffff !important;
}
.comment-attachment-preview i {
  color: #2563eb;
}

/* Cancel buttons in comment composer */
.comment-cancel-btn,
.comment-edit-cancel-btn {
  border-radius: 999px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background-color: #ef4444;
  border: none;
  color: #ffffff !important;
}
.comment-cancel-btn i,
.comment-edit-cancel-btn i {
  font-size: 1.1rem;
}
.comment-cancel-btn:hover,
.comment-edit-cancel-btn:hover {
  background-color: #b91c1c !important;
  color: #ffffff !important;
  text-decoration: none;
}
.comment-attachment-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
}
.comment-attachment-preview.d-none {
  display: none !important;
}
.comment-attachment-preview-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.comment-attachment-preview-item .file-size {
  font-size: .8rem;
  color: #6b7280;
}
.comment-attachment-preview-item .comment-attachment-remove {
  color: #dc2626;
  cursor: pointer;
}

/* Current attachments list in edit form */
.comment-current-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}
.comment-current-attachment-list .text-muted {
  flex-basis: 100%;
}
.comment-current-attachment {
  position: relative;
  display: inline-block;
}
.comment-current-attachment .comment-file-delete-btn {
  position: absolute;
  top: 4px;
  inset-inline-start: 4px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #de0000;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(15,23,42,.25);
  color: #ffffff;
  padding: 0;
  padding-top: 8px;
}
.comment-current-attachment .comment-file-delete-btn i {
  font-size: 16px;
}
.comment-current-attachment .comment-file-delete-btn:hover {
  background: #fee2e2;
  color: #b91c1c;
}
.comment-emoji-btn {
  border-radius: 999px;
  border: 0;
  background: #ffffff;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.comment-emoji-btn:hover {
  background: #d1d5db;
}
.emoji-picker {
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.emoji-picker.d-none {
  display: none !important;
}
.emoji-btn {
  border: 0;
  background: transparent;
  font-size: 1.1rem;
  cursor: pointer;
}

.comment-attachment {
  margin-top: 6px;
  display: inline-block;
  margin-inline-end: 8px;
}
.comment-attachment-link {
  font-size: .85rem;
  text-decoration: none;
}
.comment-attachment-link i {
  color: #2563eb;
}
.comment-attachment-image {
  display: block;
  max-width: 220px;
  max-height: 160px;
  border-radius: .5rem;
}

/* Dashboard cards */
.dashboard-card {
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}

/* Status log blocks (booking_view.php) */
.status-log-card {
  border-radius: 14px;
  padding: 10px 14px;
  margin-bottom: 1rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  position: relative;
}
.status-log-card .status-badge {
  box-shadow: none;
}
.status-log-title {
  font-size: 1rem;
  font-weight: 700;
}
.status-log-title.badge {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.status-log-status-payment_confirmed {
  background: #eff6ff;
}
.status-log-status-converted {
  background: #fffbeb;
}
.status-log-status-booking_confirmed,
.status-log-status-test_completed {
  background: #ecfdf3;
}
.status-log-status-no_show,
.status-log-status-cancelled {
  background: #fef2f2;
}

/* Status log blocks for change requests */
.status-log-status-pending {
  background: #fffbeb;
}
.status-log-status-under_review {
  background: #eff6ff;
}
.status-log-status-confirmed {
  background: #ecfdf3;
}

/* Comment footer row: swap likes/actions positions */
.comment-footer-row {
  flex-direction: row !important;
}
.comment-footer-row .comment-footer-likes {
  order: 2;
}
.comment-footer-row .comment-actions {
  order: 1;
}

/* Toast لعرض أسماء من قاموا بالريأكت */
.reaction-toast {
  position: fixed;
  top: 25%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.96);
  background: rgba(15,23,42,.96);
  color: #f9fafb;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: .85rem;
  box-shadow: 0 10px 25px rgba(15,23,42,.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 10000;
  max-width: 320px;
  text-align: center;
  white-space: pre-line;
}
.reaction-toast.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.02);
}

/* Mention dropdown for @user in comments */
.mention-dropdown {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  max-height: 260px;
  overflow-y: auto;
  box-shadow: 0 10px 25px rgba(15,23,42,.12);
}
.mention-dropdown .mention-item {
  border-radius: 0;
  padding: 4px 8px;
  font-size: .85rem;
}
.mention-dropdown .mention-item.active,
.mention-dropdown .mention-item:hover {
  background: #eff6ff;
}

/* Timeline for tracking booking status (track.php) - horizontal */
.status-timeline{
  position:relative;
  display:flex;
  flex-direction:row;
  direction:rtl;
  gap:1.5rem;
  padding-top:3px;
  margin:0;
}
.status-timeline::before{
  content:'';
  position:absolute;
  top:10px;
  left:0;
  right:0;
  height:2px;
  background:#e5e7eb;
}
.status-timeline-item{
  position:relative;
  flex:1 1 0;
  text-align:center;
}
.status-timeline-dot{
  width:16px;
  height:16px;
  border-radius:50%;
  background:#e5e7eb;
  border:2px solid #fff;
  box-shadow:0 0 0 2px rgba(148,163,184,.4);
  margin:0 auto 8px auto;
  position:relative;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#9ca3af;
  font-size:17px;
}
.status-timeline-item.reached .status-timeline-dot {
    background: #22c55e;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, .35);
    padding-top: 8px;
    padding-right: 1px;
    width: 24px;
    height: 23px;
    margin-top: -4px;
}
.status-timeline-content{
  font-size:.85rem;
}
.status-timeline-date{
  font-size:.8rem;
  color:#6b7280;
  margin-top:2px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.25rem;
}
.status-timeline-status{
  font-weight:600;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:.35rem;
}

/* Booking track code input - large centered pill */
.booking-code-input{
  border-radius:999px;
  padding:0.9rem 1.4rem;
  font-size:1.1rem;
  box-shadow:0 10px 25px rgba(15,23,42,.10);
  border:1px solid #d1d5db;
  background-color:#ffffff;
}
.booking-code-input:focus{
  border-color:var(--brand-2);
  box-shadow:0 0 0 3px rgba(79,70,229,.25);
}
.booking-code-group .booking-code-input{
  border-radius:0 999px 999px 0;
  height: 38px;
}
.booking-code-group .qr-scan-btn {
    border-radius: 0 20px 20px 0;
    height: 38px;
    padding-top: 7px;
    padding-bottom: 7px;
}
.booking-code-input {
    width: 89% !important;
    border-radius: 20px 0 0 20px !important;
}
input.form-control.flatpickr-input {
    border-radius: 21px;
    height: 45px;
}
/* Passport issuer select without rounded corners */
.passport-issuer-select{
  border-radius:6px !important;
}

/* Scanner switch + close button */
.scanner-switch .form-check-input{
  cursor:pointer;
}
.scanner-switch .form-check-label{
  cursor:pointer;
}
.booking-close-btn{
  width:32px;
  height:32px;
  border-radius:999px;
  border:none;
  background:#ef4444;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 4px 10px rgba(239,68,68,.35);
}
.booking-close-btn:hover{
  background:#dc2626;
  color:#fff;
}
.booking-close-btn i{
  font-size:0.9rem;
      padding-top: 6px;
}

/* Switch hero styling */
.switch-hero .form-check-input { width: 3.1em; height: 1.6em; border-color: #94a3b8; background-color: #e2e8f0; }
.switch-hero .form-check-input:checked { background-color: var(--brand-2); border-color: var(--brand-2); }
.switch-hero .form-check-label { font-weight: 700; color: var(--brand-2); }

/* Improved switches (global) */
.form-switch .form-check-input {
  width: 3.2rem; height: 1.6rem; border-radius: 999px;
  background-color: #e5e7eb; border-color: #cbd5e1;
  transition: background-color .2s ease, border-color .2s ease, box-shadow .15s ease;
}
.form-switch .form-check-input:checked {
  background-color: #66d479; border-color: var(--brand-2);
}
.form-switch .form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(99,102,241,.15); }
.form-switch .form-check-label { margin-inline-start: .5rem; font-weight: 700; color: #334155; }

/* Role permissions switches (roles.php) */
.role-permission-switch {
  display: block;
  border-top: 1px solid #e5e7eb;
  padding-top: 6px;
}
.role-permission-switch:first-of-type {
  border-top: 0;
}
.role-permission-sub {
  display: block;
  font-size: 14px;
  font-weight: 200;
}

/* Switch container look inside cards (lightweight, no extra width) */
.card .form-switch { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; border-radius: 0; }

/* Flatpickr alt input should not look disabled when readonly */
.flatpickr-input[readonly] { background-color: #fff; opacity: 1; cursor: pointer; }

/* Dropzone attachments */
.dropzone { border: 2px dashed #93c5fd; background: #f0f9ff; border-radius: .75rem; padding: 18px; text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.dropzone .dz-icon { font-size: 2rem; color: var(--brand-2); }
.dropzone .dz-text { font-weight: 700; margin-top: 6px; }
.dropzone.dragover { background: #e0f2fe; border-color: #60a5fa; }
.dz-list li { background: #fff; }

/* Booking details view */
.booking-detail-table th {
  font-weight: 700;
  color: #475569;
  padding-top: .4rem;
  padding-bottom: .4rem;
  white-space: nowrap;
}
.booking-detail-table td {
  padding-top: .4rem;
  padding-bottom: .4rem;
}
.booking-detail-table tr + tr td,
.booking-detail-table tr + tr th {
  border-top: 1px dashed #e5e7eb;
}
.booking-detail-table i.bi {
  font-size: .95rem;
}

/* Ensure form fields fit within cards on all screens */
.card { overflow: hidden; }
.card .row > [class*='col-'] { min-width: 0; }
.card .form-control,
.card .form-select,
.card .form-control-color { max-width: 100%; width: 100%; }
input.form-control-color { height: 2.5rem; padding: 0; }
span.text-muted.small {
  display: block;
  margin-top: 20px;
}
/* إعدادات المواعيد: ترتيب النموذج داخل الكروت */
/* ترتيب نموذج التخصصات/الدول: الحقول فوق، والسويتش + زر الإضافة تحت جنب بعض */
/* اجعل الحقول الأساسية (الاسم، اللون/الكود) كاملة العرض في الصف الأول */
.card form.row.g-2.align-items-end.mb-3 > .col-md-6,
.card form.row.g-2.align-items-end.mb-3 > .col-md-5,
.card form.row.g-2.align-items-end.mb-3 > .col-md-4,
.card form.row.g-2.align-items-end.mb-3 > .col-md-3 {
  flex: 0 0 100%;
  max-width: 100%;
}
/* السويتش والزر إلى السطر الثاني بنصف العرض لكل منهما */
.card form.row.g-2.align-items-end.mb-3 > .col-md-2.form-switch,
.card form.row.g-2.align-items-end.mb-3 > .form-switch.col-md-2 {
  order: 99;
  flex: 0 0 50%;
  max-width: 50%;
  margin-top: .4rem;
}
.card form.row.g-2.align-items-end.mb-3 > .col-md-1 {
  order: 100;
  flex: 0 0 50%;
  max-width: 50%;
  margin-top: .4rem;
}
.card form.row.g-2.align-items-end.mb-3 > .col-md-1 .btn { width: 100%; }
.card form.row.g-2.align-items-end.mb-3 > .col-md-1 .btn-icon { width: 30px; }
.card form.row.g-2.align-items-end.mb-3.editing > .col-md-1 .btn { width: auto; }

/* تخصيص بوكس التخصصات: اجعل "الاسم" (col-md-6) و"اللون" (col-md-3) جنب بعض في الصف الأول */
@media (min-width: 768px) {
  .row.g-3 > .col-12.col-xl-6:first-child .card form.row.g-2.align-items-end.mb-3 > .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .row.g-3 > .col-12.col-xl-6:first-child .card form.row.g-2.align-items-end.mb-3 > .col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  /* بوكس الدول: الاسم والكود جنب بعض */
  .row.g-3 > .col-12.col-xl-6:nth-child(2) .card form.row.g-2.align-items-end.mb-3 > .col-md-5,
  .row.g-3 > .col-12.col-xl-6:nth-child(2) .card form.row.g-2.align-items-end.mb-3 > .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

/* Steps (wizard) */
.steps { display: flex; gap: 14px; align-items: center; justify-content: center; padding: 10px; border-radius: .75rem; background: linear-gradient(90deg, #eef2ff, #e0f2fe); border: 1px solid #c7d2fe; }
.step { display: flex; align-items: center; gap: 8px; color: #475569; opacity: .7; }
.step .step-index { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #e2e8f0; color: #334155; }
.step.active { opacity: 1; color: #0f172a; }
.step.active .step-index { background: linear-gradient(90deg, var(--brand-1), var(--brand-2)); color: #fff; box-shadow: 0 2px 8px rgba(2,132,199,.25); }
.step .step-label { font-weight: 700; font-size: .95rem; }

/* Booking summary */
.booking-summary { border: 1px dashed #93c5fd; background: #f0f9ff; }
.booking-summary .badge { font-size: .9rem; }

/* فلاتر حجز الموعد - طابع حديث */
.filter-modern {
  background: linear-gradient(145deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  padding: 12px 14px;
      margin-top: 10px;
}
.filter-modern .form-label {
  font-weight: 700;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.filter-modern .form-control,
.filter-modern .form-select {
  border-radius: 10px;
  border-color: #d6d8dd;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}.search-inline .form-control, .search-inline .form-select {
    border-radius: 34px !important;
    padding: 10px 16px !important;
    box-shadow: var(--shadow-sm);
    border-color: #d1d5db;
}
.filter-modern .form-control:focus,
.filter-modern .form-select:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.filter-modern .form-check-input {
  box-shadow: none;
}
.filter-modern .btn-primary {
  border-radius: 23px;
  padding: 8px 18px;
}

/* Invoice filter row (admin/invoice_new.php) */
.invoice-filter-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  padding: 6px 4px;
}
.invoice-filter-row > [class*="col-"] {
  flex: 1 1 33%;
  min-width: 0;
}
.invoice-filter-row.filter-modern {
  border-radius: 40px;
}
.invoice-filter-row .ss-main {
  height: 40px;
  display: flex;
  align-items: center;
}
.invoice-filter-row .booking-code-group .qr-scan-btn {
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-top: 15px !important;
}
.invoice-filter-row .booking-code-group .booking-code-input {
  height: 40px;
  width: 132px !important;
}
.invoice-filter-row input[name="customer"] {
  border-radius: 25px;
  height: 40px;
}

/* Invoice paid amount input */
.invoice-paid-group {
  display: flex;
  flex-direction: row;
}
.invoice-paid-group .invoice-paid-currency,
.invoice-paid-group .invoice-paid-input {
  height: 43px;
}
.invoice-paid-group .invoice-paid-input {
  width: auto;
  border-radius: 20px 0 3px 20px;
}

/* Invoice status label under customer name */
.invoice-status-pill {
  margin-top: 0 !important;
}

/* Associated invoices block in booking view */
.booking-invoices-card {
  border-width: 1px;
}
.booking-invoices-card.status-under_review {
  background: #e0f2fe;
  border-color: #bae6fd;
}
.booking-invoices-card.status-confirmed {
  background: #d1fae5;
  border-color: #6ee7b7;
}
.booking-invoices-card.status-cancelled {
  background: #fee2e2;
  border-color: #fecaca;
}
.booking-invoices-card .card-title {
  font-weight: 800;
}

/* QR code in invoice view */
.invoice-qrcode {
  width: 80px;
  height: 80px;
}
.invoice-qrcode canvas,
.invoice-qrcode img {
  max-width: 100%;
  max-height: 100%;
}

/* (حذفنا أنماط أداة تحديد الباسبور بعد إلغاء OCR) */

/* Tables */
.table thead th { background: #f1f5f9; color: #334155; font-weight: 800; }
.table tbody tr:hover { background: #f8fafc; }

/* إشعارات الحجوزات والفواتير */
.notification-list-item.notif-booking {
  border-right: 3px solid #0d6efd;
}
.notification-list-item.notif-invoice {
  border-right: 3px solid #ffc107;
}
.notification-list-item.notif-change-request {
  border-right: 3px solid #22c55e;
}

/* Utilities */
.shadow-soft { box-shadow: var(--shadow-sm); }
.rounded-card { border-radius: var(--card-radius); }
.btn-sm {
font-size: .84rem;
    padding: 8px;
    border-radius: 18px;
    padding-top: 6px;
    padding-bottom: 3px !important;
}
