/* Local Vazirmatn font
   Put the uploaded font file here: assets/fonts/Vazir-Light.woff2
   Font sizes are not changed. */
@font-face {
  font-family: "Vazirmatn";
  src:
    url("fonts/Vazir-Light.woff2") format("woff2"),
    url("fonts/Vazir-Light.woff") format("woff"),
    url("fonts/Vazir-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after,
html,
body,
button,
input,
textarea,
select,
a,
table,
th,
td,
label,
span,
div,
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Vazirmatn", sans-serif !important;
}

/* ============================================================
   🎨 MODERN & BEAUTIFUL STYLES
   ============================================================ */

/* 1. Global Reset & Typography */
@font-face {
  font-family: "Vazirmatn", sans-serif !important;
  /* حفظ CDN اصلی فونت */
  src: url("https://cdn.fontcdn.ir/iranyekan/IRANYekanXVF.woff2")
    format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  /* پالت رنگی مدرن */
  --primary-blue: #1e73e2; /* برای دکمه‌های اصلی و هدر جدول */
  --success-green: #2ecc71; /* برای ثبت حضور */
  /* رنگ‌های قرمز و نارنجی اصلی حفظ شدند تا با کد JS تداخلی نداشته باشند */
  --danger-red: #ff3b30;
  --warning-orange: #da8a1b;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --text-color: #333333;
  --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.15);
  --border-radius: 10px;
}

body {
  font-family: "Vazirmatn", sans-serif !important;
  background: var(--bg-color);
  color: var(--text-color);
  padding: 20px;
  line-height: 1.6;
}
.bigger {
  font-size: 25px;
}
.title {
  text-align: center;
  font-size: 26px; /* کمی بزرگ‌تر */
  font-weight: 800;
  color: #1a202c;
  margin-bottom: 25px; /* فاصله بیشتر */
  margin-top: 0;
}

/* 2. Top Controls (Buttons & Date) - ظاهر کارت روی دسکتاپ */
.top-row {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto 30px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  direction: rtl;

  /* افکت کارت برای نوار بالا */
  background: var(--card-bg);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
}

.date-section {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.actions-left {
  display: flex;
  align-items: center;
  gap: 15px;
  direction: rtl;
}

#capacityWrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 0;
}

/* 3. Inputs & Buttons - ظاهر مدرن */
#booking-date {
  padding: 12px 18px;
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
  font-size: 15px;
  background: var(--card-bg);
  cursor: pointer;
  width: 110px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}
#booking-date:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* دکمه‌های اصلی (نمایش امکانات) */
.optionsBtn {
  background: var(--primary-blue);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}
.optionsBtn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0.9;
}

/* دکمه تکمیل ظرفیت (رنگ توسط JS تنظیم می‌شود اما استایل مدرن اعمال می‌شود) */
.capacityBtn {
  background: var(--warning-orange); /* رنگ اولیه پیش‌فرض */
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}
.capacityBtn:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0.9;
}

/* Capacity Status (X symbol) */
.capacityStatus {
  display: none;
  font-size: 40px;
  color: var(--danger-red);
  font-weight: 300;
}

/* 4. Popups - ظاهر کارت یکپارچه */
.popup-overlay {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: none;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.popup-box {
  background: var(--card-bg);
  padding: 30px;
  width: 350px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.popup-box h3 {
  margin-top: 0;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.popup-box label {
  display: flex;
  align-items: center;
  margin: 10px 0;
  cursor: pointer;
}

.popup-box input[type="checkbox"] {
  margin-left: 10px;
  transform: scale(1.2);
}

.closePopup {
  width: 100%;
  margin-top: 25px;
  background: var(--danger-red);
  padding: 12px;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  color: white;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}
.closePopup:hover {
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 5. Table - جدول مدرن */
.table-container {
  width: fit-content;
  margin: 0 auto;
  overflow-x: auto;
  display: block;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  background: var(--card-bg);
}
.table-wrapper {
  display: inline-block;
  width: fit-content;
}

table {
  width: auto !important;
  border-collapse: collapse;
  background: var(--card-bg);
  overflow: hidden;
}

th {
  background: var(--primary-blue); /* هدر آبی */
  color: white;
  padding: 12px 15px;
  border-bottom: 2px solid var(--primary-blue);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

td {
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0; /* مرز روشن‌تر */
  text-align: center;
  background: var(--card-bg);
}
tr:nth-child(even) td {
  background: #f4f6f7; /* سایه روشن بین ردیف‌ها */
}
tr:hover td {
  background: #f5faff; /* هایلایت ردیف هنگام هاور */
}

td input {
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  text-align: center;
  transition: border-color 0.2s;
}
td input:focus {
  border-color: var(--primary-blue);
  outline: none;
}

/* دکمه‌های داخل جدول */
.saveBtn,
.cancelBtn,
.checkinBtn {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  white-space: nowrap;
}
.saveBtn {
  background: var(--primary-blue); /* آبی اصلی */
}
.cancelBtn {
  background: var(--danger-red); /* قرمز اصلی */
}
.checkinBtn {
  background: #da8a1b; /* نارنجی قبل از ثبت حضور */
}
.checkinBtn.checked-in {
  background: var(--success-green); /* سبز بعد از کلیک */
}

.saveBtn:hover,
.cancelBtn:hover,
.checkinBtn:hover {
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.total-footer {
  background: #f0f0f0;
  padding: 15px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color);
  text-align: right;
  padding-right: 30px;
}
.total-footer span {
  color: var(--danger-red);
}

/* 6. Pagination - مدرن */
.pagination {
  text-align: center;
  margin-top: 20px;
  padding: 15px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.pagination button {
  background: var(--primary-blue);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  margin: 0 8px;
  font-weight: 700;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  transition: all 0.2s;
}
.pagination button:hover {
  background: var(--primary-blue);
  opacity: 0.9;
}
#pageInfo {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  padding: 0 10px;
}

/* 7. Calendar - مدرن */
.cal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.cal-modal {
  background: var(--card-bg);
  width: 340px;
  padding: 25px;
  border-radius: 15px;
  font-family: "Vazirmatn", sans-serif !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.nav-btn {
  background: #f0f0f0;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 10px;
  font-weight: bold;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-day {
  background: #f5f5f5;
  padding: 12px 0;
  text-align: center;
  cursor: pointer;
  border-radius: 8px;
  position: relative;
  user-select: none;
}
.cal-day.empty {
  background: transparent;
  cursor: default;
}
.cal-day:hover {
  background: #e9f5ff;
}
.cal-day.selected {
  background: var(--primary-blue);
  color: white;
}
.cal-day.today {
  background: var(--primary-blue);
  color: white !important;
  border: 3px solid #000000;
  border-radius: 8px;
  box-sizing: border-box;
}
.cal-day.friday {
  color: var(--danger-red);
}
.cal-day.full {
  background: #ffdbdb;
  color: var(--danger-red);
}
.cal-day.full::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: 50%;
  height: 2px;
  background: var(--danger-red);
  transform: rotate(-10deg);
}
.cal-actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}
.cal-actions button {
  flex: 1;
}

.select-today-btn {
  background: var(--primary-blue);
  color: white;
  padding: 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}
.close-cal-btn {
  background: var(--danger-red);
  color: white;
  padding: 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

/* ============================================================
   📱 MOBILE & RESPONSIVE STYLES (APP FEEL) - مدرن
============================================================ */
/* ============================================================
   🎨 MODERN & BEAUTIFUL STYLES (Desktop/Global)
   ============================================================ */

/* 1. Global Reset & Typography */
@font-face {
  font-family: "Vazirmatn", sans-serif !important;
  /* حفظ CDN شما برای فونت */
  src: url("https://cdn.fontcdn.ir/iranyekan/IRANYekanXVF.woff2")
    format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  /* پالت رنگی مدرن */
  --primary-blue: #5aa6ff;
  --success-green: #0fbf6f;
  --danger-red: #ff3b30;
  --bg-color: #f8f9fa;
  --card-bg: #ffffff;
  --text-color: #333333;
  --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 6px 20px rgba(0, 0, 0, 0.12);
  --border-radius: 10px;
}

body {
  font-family: "Vazirmatn", sans-serif !important;
  background: #bed9dd;
  color: var(--text-color);
  padding: 20px;
}

.title {
  text-align: center;
  font-size: 22px; /* بزرگتر و مدرن‌تر */
  font-weight: bold;
  color: #1a202c;
  margin-bottom: 8px;
  margin-top: 16px;
}

/* 2. Top Controls (Buttons & Date) - ظاهر کارت روی دسکتاپ */
.top-row {
  width: 95%;
  max-width: 900px; /* محدود کردن عرض برای ظاهر بهتر */
  margin: 0 auto 30px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  direction: rtl;

  /* افکت کارت */
  background: #ffffff;
  padding: 17px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  padding-right: 22px;
  padding-left: 5px;
}

.date-section {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.actions-left {
  display: flex;
  align-items: center;
  gap: 15px;
  direction: rtl;
}

#capacityWrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 0;
}

/* 3. Inputs & Buttons - ظاهر مدرن */
#booking-date {
  padding: 9px 4px;
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
  font-size: 20px;
  font-weight: bold;
  background: var(--card-bg);
  cursor: pointer;
  width: 110px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  text-align: center;
}
#booking-date:hover {
  border-color: var(--primary-blue);
}

/* دکمه‌های اصلی (نمایش امکانات) */
.optionsBtn {
  background: var(--primary-blue);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); /* حفظ سایه 3D اصلی */
  transition: all 0.1s;
}

/* دکمه تکمیل ظرفیت */
.capacityBtn {
  background: var(--danger-red); /* رنگ اصلی حفظ شد */
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  font-size: 19px;
  font-weight: 700;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); /* حفظ سایه 3D اصلی */
  transition: all 0.1s;
}

.capacityStatus {
  display: none;
  font-size: 40px;
  color: var(--danger-red);
  font-weight: 300;
}

/* 4. Popups - ظاهر کارت یکپارچه */
.popup-overlay {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  display: none;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.popup-box {
  background: var(--card-bg);
  padding: 30px;
  width: 350px;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.popup-box h3 {
  margin-top: 0;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 15px;
}

.popup-box label {
  display: flex;
  align-items: center;
  margin: 10px 0;
  cursor: pointer;
}

.popup-box input[type="checkbox"] {
  margin-left: 10px;
  transform: scale(1.2);
}

.closePopup {
  width: 100%;
  margin-top: 25px;
  background: var(--danger-red);
  padding: 12px;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  color: white;
  font-size: 16px;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  transition: all 0.1s;
}

/* 5. Table - جدول مدرن */
.table-container {
  width: fit-content;
  max-width: 95vw;
  margin: 0 auto;
  overflow-x: auto;
  display: block;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  background: var(--card-bg);
}

.table-wrapper {
  display: inline-block;
  width: fit-content;
}

table {
  width: auto !important;
  border-collapse: collapse;
  background: var(--card-bg);
  overflow: hidden;
}

th {
  background: #e9e9e9; /* رنگ هدر روشن */
  color: var(--text-color);
  padding: 12px 15px;
  border-bottom: 2px solid #ddd;
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
}

td {
  padding: 15px 13px;
  border-bottom: 1px solid #f0f0f0b8;
  text-align: center;
  background: var(--card-bg);
}
tr:hover td {
  background: #d2d4da; /* هایلایت نرم */
}

td input {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 20px;
  text-align: center;
  transition: border-color 0.2s;
}
td input:focus {
  border-color: var(--primary-blue);
  outline: none;
}

/* دکمه‌های داخل جدول */
.saveBtn,
.cancelBtn,
.checkinBtn {
  padding: 7px 19px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 19px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); /* حفظ سایه 3D اصلی */
  transition: all 0.1s;
}
.saveBtn {
  background: var(--primary-blue);
}
.cancelBtn {
  background: var(--danger-red);
}
.checkinBtn {
  background: #da8a1b;
}
.checkinBtn.checked-in {
  background: var(--success-green);
}

.total-footer {
  background: #f0f0f0;
  padding: 15px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-color);
  text-align: right;
  padding-right: 30px;
}
.total-footer span {
  color: #5aa6ff;
}

/* 6. Pagination - مدرن */
.pagination {
  text-align: center;
  margin-top: 20px;
  padding: 15px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pagination button {
  background: var(--primary-blue);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--border-radius);
  border: none;
  cursor: pointer;
  margin: 0 8px;
  font-weight: 700;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
  transition: all 0.1s;
  font-size: 16px;
}
#pageInfo {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  padding: 0 10px;
}

/* 7. Calendar - مدرن */
.cal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.cal-modal {
  background: var(--card-bg);
  width: 340px;
  padding: 25px;
  border-radius: 15px;
  font-family: "Vazirmatn", sans-serif !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.nav-btn {
  background: #f0f0f0;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 10px;
  font-weight: bold;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-day {
  background: #f5f5f5;
  padding: 12px 0;
  text-align: center;
  cursor: pointer;
  border-radius: 8px;
  position: relative;
  user-select: none;
}
.cal-day.empty {
  background: transparent;
  cursor: default;
}
.cal-day:hover {
  background: #e9f5ff;
}
.cal-day.selected {
  background: var(--primary-blue);
  color: white;
}
.cal-day.today {
  background: var(--primary-blue);
  color: white !important;
  border: 3px solid #000000;
  border-radius: 8px;
  box-sizing: border-box;
}
.cal-day.friday {
  color: var(--danger-red);
}
.cal-day.full {
  background: #ffdbdb;
  color: var(--danger-red);
}
.cal-day.full::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: 50%;
  height: 2px;
  background: var(--danger-red);
  transform: rotate(-10deg);
}
.cal-actions {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}
.cal-actions button {
  flex: 1;
}

.select-today-btn {
  background: var(--primary-blue);
  color: white;
  padding: 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 25px;
}
.close-cal-btn {
  background: var(--danger-red);
  color: white;
  padding: 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-size: 25px;
}

/* ============================================================
   📱 MOBILE & RESPONSIVE STYLES (APP FEEL)
   (کدهای شما بدون تغییر در اینجا قرار گرفته‌اند)
============================================================ */

/* Education 8-part editor */
.education-parts-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
}
.education-part-box {
  border: 1px solid #eaecf0;
  border-radius: 16px;
  background: #fcfcfd;
  padding: 16px;
}
.education-part-box textarea {
  min-height: 120px;
}
.education-image-under-text {
  margin-top: 10px;
  background: #fff;
}
.public-education-parts {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.public-education-part {
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 18px;
}
.public-education-part:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.public-education-part img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 14px;
  display: block;
  margin-top: 12px;
  background: #f8fafc;
}

@media (max-width: 768px) {
  body {
    padding: 10px;
    background: #bed9dd;
  }
  label {
    margin-bottom: 10px;
    font-size: 18px;
    margin-left: -18px;
  }

  /* 1. Stack the top controls vertically */
  .top-row /* 1. Stack the top controls vertically */
  .top-row {
    flex-direction: row; /* FIX: چینش افقی */
    flex-wrap: wrap; /* FIX: اجازه شکستن خط */
    gap: 100px; /* کاهش فاصله */
    margin-top: 5px; /* کاهش فاصله از بالا */
    margin-bottom: 10px; /* کاهش فاصله از جدول */
  }

  .date-section {
    width: 100%; /* FIX: تاریخ کل ردیف را بگیرد */
    justify-content: center;
  }
  .actions-left,
  .options-row {
    flex: 1 1 48%; /* FIX: تقسیم عرض بین دو دکمه */
    min-width: 93px;
    width: auto;
    justify-content: center;
  }
  #capacityWrapper {
    width: 100%;
    justify-content: center;
  }

  /* FIX: تغییر نام دکمه‌ها در موبایل */
  .optionsBtn,
  .capacityBtn {
    font-size: 0 !important; /* مخفی کردن متن اصلی با صفر کردن فونت */
  }

  /* دکمه نمایش امکانات: نام جدید "امکانات" */
  .optionsBtn::after {
    content: "امکانات";
    font-size: 14px;
    color: white;
    font-weight: bolder;
  }

  /* دکمه تکمیل ظرفیت: نام جدید "تکمیل" */
  .capacityBtn::after {
    content: " ظرفیت";
    font-size: 14px;
    color: white;
    font-weight: bolder;
  }
  /* 2. Bigger Touch Targets (App Feel) */
  .optionsBtn,
  .capacityBtn,
  #booking-date {
    width: 70%;
    padding: 10px;
    font-size: 16px;
    text-align: center;
    box-sizing: border-box;
    margin-top: -7px;
    margin-right: 19px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); /* سایه 3D */
  }

  #capacityWrapper {
    margin-right: 0;
    margin-bottom: 0;
    width: 100%;
    justify-content: center;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0;
  }

  .capacityBtn {
    width: 110%; /* Ensure button fills the wrapper */
    margin-left: 16px;
    margin-right: 16px;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25); /* سایه 3D */
  }

  /* Adjust the X status position for mobile layout */
  #capacityStatus {
    position: absolute;
    left: -22px;
    top: 16%;
    transform: translateY(-50%);
    margin-top: 0;
    font-size: 53px;
  }

  /* Ensure date input is flexible inside its section */
  .date-section {
    width: 100%;
    gap: 10px;
  }

  #booking-date {
    flex-grow: 1;
    width: auto;
    max-width: 120px;
  }

  /* 3. Table Responsive Container */
  .table-container {
    width: 110%;
    margin: 0 auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    overflow: hidden;
  }

  .table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    width: 100% !important;
    min-width: 1px;
  }

  /* 4. Input sizing for touch */
  td input {
    font-size: 17px;
    padding: 8px;
    min-width: 3px;
    text-align: center;
  }

  /* Buttons inside table */
  .saveBtn,
  .cancelBtn,
  .checkinBtn {
    padding: 8px 26px;
    font-size: 16px;
    white-space: nowrap;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.5); /* سایه 3D */
  }

  /* 5. Pagination Area */
  .pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px;
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  }

  .pagination button {
    flex: 1;
    margin: 0 5px;
    padding: 12px;
    font-weight: bold;
    font-size: 16px;
  }

  /* 6. Calendar & Popups Mobile Fixes */
  .popup-box,
  .cal-modal {
    width: 85%;
    max-width: 350px;
    margin-bottom: 100px;
  }

  /* Optional: Make amount input larger */
  .col-amount input {
    min-width: 100px;
    font-weight: bold;
  }
  th {
    padding: 12px 7px;

    /* 1. اجازه شکستن خطوط داده شود تا عرض ستون کاهش یابد */
    white-space: normal;

    /* 2. تضمین می‌کند حتی کلمات طولانی هم شکسته شوند */

    /* 3. حذف هرگونه حداقل عرض اجباری توسط مرورگر */
    min-width: 0;
  }
  td {
    /* 4. کاهش شدید پدینگ افقی سلول‌ها (از 39px به 5px) */
    padding: 15px 9px;
  }
}

/* ==============================
   PHP Auth + SMS Backend Styles
============================== */
.app-nav {
  width: min(1100px, calc(100% - 28px));
  margin: 14px auto 6px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  direction: rtl;
}

.app-nav a,
.app-nav span {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 8px 0px;
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.profile-page {
  min-height: auto;
}

.auth-card {
  width: min(420px, 100%);
  background: rgba(20, 31, 55, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 24px;
  color: #fff;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.25);
}

.auth-card h2 {
  text-align: center;
  margin: 0 0 22px;
}

.auth-card label {
  display: block;
  margin: 12px 0 6px;
}

.auth-card input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 8px;
  padding: 11px 12px;
  outline: none;
}

.auth-card button {
  width: 100%;
  margin-top: 18px;
  border: none;
  border-radius: 8px;
  padding: 12px;
  background: #5aa6ff;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  font-size: 18px;
}

.auth-link {
  text-align: center;
}

.auth-link a {
  color: #5aa6ff;
}

.alert {
  width: min(900px, calc(100% - 28px));
  margin: 12px auto;
  padding: 12px 14px;
  border-radius: 10px;
  text-align: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.alert.success {
  background: rgba(30, 120, 70, 0.9);
}

.alert.error {
  background: rgba(190, 55, 55, 0.9);
}

.dashboard-alert {
  margin-top: 10px;
}

.sms-template-panel {
  width: min(950px, calc(100% - 28px));
  margin: 14px auto;
  background: rgba(20, 31, 55, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px;
  color: #fff;
  direction: rtl;
}

.sms-template-panel label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.sms-template-panel textarea {
  width: 100%;
  min-height: 90px;
  box-sizing: border-box;
  resize: vertical;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  line-height: 1.8;
  outline: none;
}

.template-help {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.smsBtn {
  background: #2fba7c !important;
  color: #fff !important;
}

.history-container {
  margin-top: 20px;
}

.sms-status {
  display: inline-block;
  min-width: 60px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  text-align: center;
}

.sms-status.sent {
  background: #198754;
}

.sms-status.error {
  background: #dc3545;
}

.message-cell {
  max-width: 360px;
  white-space: pre-wrap;
}

/* ==============================
   Dashboard SMS buttons + Settings
============================== */
.logout-link {
  background: rgb(199 189 190 / 90%) !important;
}

.sms-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  min-width: 140px;
  white-space: nowrap;
}

.smsActionBtn {
  border: none;
  border-radius: 8px;
  padding: 9px 10px;
  background: #da8a1b;
  color: #111;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
  white-space: nowrap;
  font-size: 19px;
}

.smsActionBtn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.smsActionBtn.sms-sent {
  background: #2fba7c !important;
  color: #fff !important;
}

.settings-container {
  width: min(950px, calc(100% - 28px));
  margin: 16px auto 40px;
  color: #fff;
}

.settings-card {
  background: rgba(20, 31, 55, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.settings-card h3 {
  margin: 0 0 12px;
}

.template-block {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.template-title {
  font-weight: 800;
  margin-bottom: 7px;
}

.template-meta {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  margin-bottom: 8px;
}

.template-block textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  border-radius: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  line-height: 1.8;
  outline: none;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.settings-grid div {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 12px;
}

.settings-grid strong,
.settings-grid span {
  display: block;
}

.settings-grid span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.82);
}

.settings-form {
  display: grid;
  gap: 10px;
}

.settings-form label {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.settings-form input,
.settings-form textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: none;
  font-family: inherit;
  line-height: 1.8;
}

.settings-form input:focus,
.settings-form textarea:focus {
  border-color: #da8a1b;
  box-shadow: 0 0 0 3px rgba(218, 138, 27, 0.18);
}

.settings-save-btn {
  margin-top: 8px;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  background: #da8a1b;
  color: #111;
  font-weight: 800;
  cursor: pointer;
  font-size: 20px;
}

/* ==============================
   Super admin, service credit, database save
============================== */
.app-nav {
  color: #111 !important;
}
.app-nav a,
.app-nav span {
  color: #111 !important;
  font-weight: 800;
}
.service-credit,
.sms-credit {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
}
.big-expired-message,
.big-sms-credit-message {
  width: min(1000px, calc(100% - 28px));
  margin: 20px auto;
  padding: 22px;
  border-radius: 16px;
  text-align: center;
  font-weight: 900;
  line-height: 2;
  font-size: 22px;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}
.big-expired-message {
  background: #b42318;
}
.big-sms-credit-message {
  background: #c06a00;
}
.super-admin-wrap {
  width: min(1150px, calc(100% - 28px));
  margin: 20px auto 50px;
  display: grid;
  gap: 18px;
}
.super-user-card {
  background: rgba(20, 31, 55, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}
.super-user-title {
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 14px;
}
.super-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}
.super-user-card label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}
.super-user-card input,
.super-user-card textarea {
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  font-family: inherit;
}
.super-check {
  display: flex !important;
  align-items: center;
  grid-template-columns: none !important;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 10px !important;
}
.super-check input {
  width: auto;
}
.super-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.danger-btn {
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  background: #dc3545;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.admin-live-credit {
  margin: 12px 0 18px;
  padding: 12px 14px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 10px;
  color: #7c2d12;
  font-weight: 800;
  text-align: center;
}
.admin-live-credit b {
  color: #15803d;
  font-size: 1.05em;
}

/* ==============================
   Mobile hamburger menu for user navigation
============================== */
.desktop-nav-links {
  display: contents;
}

.mobile-hamburger-menu {
  display: none;
}

/* Education 8-part editor */
.education-parts-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
}
.education-part-box {
  border: 1px solid #eaecf0;
  border-radius: 16px;
  background: #fcfcfd;
  padding: 16px;
}
.education-part-box textarea {
  min-height: 120px;
}
.education-image-under-text {
  margin-top: 10px;
  background: #fff;
}
.public-education-parts {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.public-education-part {
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 18px;
}
.public-education-part:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.public-education-part img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 14px;
  display: block;
  margin-top: 12px;
  background: #f8fafc;
}

@media (max-width: 768px) {
  .app-nav {
    position: relative;
    justify-content: center;
    padding-top: 54px;
    gap: 8px;
  }

  .desktop-nav-links {
    display: none;
  }

  .mobile-hamburger-menu {
    display: block;
    position: absolute;
    top: 8px;
    right: 12px;
    z-index: 1000;
  }

  .mobile-hamburger-menu summary {
    list-style: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: #da8a1b; */
    color: #111;
    /* border: 1px solid rgba(0, 0, 0, 0.16); */
    border-radius: 12px;
    font-size: 40px;
    font-weight: 900;
    cursor: pointer;
    /* box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18); */
    margin-right: -16px;
    margin-top: -71px;
    user-select: none;
  }

  .mobile-hamburger-menu summary::-webkit-details-marker {
    display: none;
  }

  .mobile-hamburger-menu[open] summary {
    background: #18a558;
    color: #fff;
  }

  .mobile-hamburger-links {
    position: absolute;
    top: 52px;
    right: 0;
    width: 190px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 50px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 14px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
    width: 208px;
  }

  .mobile-hamburger-links a {
    width: 100%;
    display: block;
    text-align: center;
    margin: 0;
    background: #b9ced1 !important;
    color: #111 !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    border-radius: 10px;

    padding: 15px 2px;
    font-size: 21px;
  }

  .mobile-hamburger-links a:hover,
  .mobile-hamburger-links a:active {
    background: #da8a1b !important;
    color: #111 !important;
  }

  .app-nav .nav-user-name,
  .app-nav .service-credit,
  .app-nav .sms-credit,
  .app-nav .logout-link {
    font-size: 13px;
    padding: 7px 9px;
  }
}

/* ==============================
   v4.5 mobile nav + login helpers
============================== */
.nav-status-stack {
  display: contents;
}

.remember-login-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-top: 12px !important;
  cursor: pointer;
}

.remember-login-row input {
  width: auto !important;
  margin: 0;
}

.secondary-auth-btn {
  background: #da8a1b !important;
  color: #111 !important;
  margin-top: 10px !important;
}

.alert.info {
  background: #fff7ed;
  color: #7c2d12;
  border: 1px solid #fdba74;
}

.mobile-logout-link {
  background: #dc3545 !important;
  color: #fff !important;
}

/* Education 8-part editor */
.education-parts-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
}
.education-part-box {
  border: 1px solid #eaecf0;
  border-radius: 16px;
  background: #fcfcfd;
  padding: 16px;
}
.education-part-box textarea {
  min-height: 120px;
}
.education-image-under-text {
  margin-top: 10px;
  background: #fff;
}
.public-education-parts {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.public-education-part {
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 18px;
}
.public-education-part:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.public-education-part img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 14px;
  display: block;
  margin-top: 12px;
  background: #f8fafc;
}

@media (max-width: 768px) {
  .app-nav {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 31px;
    gap: 8px;
  }

  .nav-status-stack {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: min(280px, calc(100vw - 88px));
    order: 1;
  }

  .app-nav .nav-user-name,
  .app-nav .service-credit,
  .app-nav .sms-credit {
    display: block;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    font-size: 18px;
    padding: 8px 10px;
  }

  .desktop-nav-links,
  .desktop-logout-link {
    display: none !important;
  }

  .mobile-hamburger-menu {
    display: block;
    position: absolute;
    top: 8px;
    right: 12px;
    z-index: 1000;
    order: 0;
  }

  .mobile-hamburger-links a.mobile-logout-link:hover,
  .mobile-hamburger-links a.mobile-logout-link:active {
    background: #bb2d3b !important;
    color: #fff !important;
  }
}

/* Modern navbar */
.app-nav {
  max-width: 1180px;
  margin: 0 auto 22px auto;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(30, 115, 226, 0.12);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  backdrop-filter: blur(10px);
}
.desktop-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.desktop-nav-links a,
.desktop-nav-links .nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 7px;
  color: #1f2937;
  text-decoration: none;
  font-weight: 800;
  border-radius: 12px;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}
.desktop-nav-links a::after,
.desktop-nav-links .nav-link::after {
  content: "";
  position: absolute;
  right: 12px;
  left: 12px;
  bottom: 5px;
  height: 3px;
  border-radius: 999px;
  background: var(--primary-blue);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.22s ease;
}
.desktop-nav-links a:hover,
.desktop-nav-links .nav-link:hover,
.desktop-nav-links .nav-link.active {
  color: var(--primary-blue);
  background: rgba(30, 115, 226, 0.07);
  transform: translateY(-1px);
}
.desktop-nav-links a:hover::after,
.desktop-nav-links .nav-link:hover::after,
.desktop-nav-links .nav-link.active::after {
  transform: scaleX(1);
}
.logout-link {
  background: #fff1f0;
  color: #d92d20 !important;
  border: 1px solid #ffd4d1;
  padding: 11px 13px !important;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
}
.mobile-hamburger-links a {
  text-decoration: none;
}

/* Education pages */
.education-page {
  max-width: 1050px;
  margin: 0 auto;
}
.education-title,
.education-card h1,
.education-card h2 {
  color: #111827;
}
.education-card {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  padding: 24px;
  margin-bottom: 22px;
}
.education-muted {
  color: #667085;
  font-size: 14px;
}
.education-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.education-action-card,
.education-edit-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid #dbeafe;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 900;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.education-action-card:hover,
.education-edit-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(30, 115, 226, 0.14);
}
.education-action-card small,
.education-edit-card small {
  color: #667085;
  font-weight: 600;
}
.education-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.education-back {
  text-decoration: none;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 900;
}
.education-form label {
  display: block;
  font-weight: 900;
  margin: 14px 0 8px;
}
.education-form .education-text-title {
  font-size: 50%;
  line-height: 1.6;
}
.education-form .education-text-title small {
  font-size: 100%;
  font-weight: 700;
}
.education-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid #d0d5dd;
  border-radius: 14px;
  padding: 14px;
  font-family: inherit;
  font-size: 16px;
  resize: vertical;
}
.education-images-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.education-image-box {
  border: 1px solid #eaecf0;
  border-radius: 14px;
  padding: 12px;
  background: #fcfcfd;
}
.education-image-box img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
  margin-bottom: 8px;
}
.education-image-box input[type="file"] {
  max-width: 100%;
  font-size: 12px;
}
.remove-check {
  display: flex !important;
  align-items: center;
  gap: 6px;
  color: #d92d20;
  font-size: 13px;
}
.education-save {
  margin-top: 20px;
  background: var(--primary-blue);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 13px 22px;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
}
.public-education-body {
  background: #f5f8ff;
}
.public-education-page {
  max-width: 820px;
  margin: 30px auto;
  padding: 0 16px;
}
.public-education-card {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 12px 34px rgba(16, 24, 40, 0.1);
  padding: 28px;
}
.public-education-text {
  white-space: normal;
  font-size: 17px;
  line-height: 2;
  color: #1f2937;
}
.public-education-images {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.public-education-images img {
  width: 100%;
  border-radius: 14px;
  display: block;
}

/* Education 8-part editor */
.education-parts-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 16px;
}
.education-part-box {
  border: 1px solid #eaecf0;
  border-radius: 16px;
  background: #fcfcfd;
  padding: 16px;
}
.education-part-box textarea {
  min-height: 120px;
}
.education-image-under-text {
  margin-top: 10px;
  background: #fff;
}
.public-education-parts {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.public-education-part {
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 18px;
}
.public-education-part:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.public-education-part img {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
  border-radius: 14px;
  display: block;
  margin-top: 12px;
  background: #f8fafc;
}

@media (max-width: 768px) {
  .app-nav {
    flex-wrap: wrap;
    border-radius: 14px;
    margin-top: 63px;
  }
  .education-grid,
  .education-images-grid,
  .public-education-images {
    grid-template-columns: 1fr;
  }
  .sms-actions {
    min-width: 140px;
    overflow-x: auto;
    justify-content: flex-start;
  }
}

/* Character counter for education editor */
.education-char-counter {
  margin-top: 6px;
  font-size: 12px;
  color: #667085;
  text-align: left;
  direction: rtl;
}

/* Mobile nav credit row fix: keep username size, put service + SMS credits side by side */
@media (max-width: 768px) {
  .nav-status-stack {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    width: min(320px, calc(100vw - 76px));
  }

  .app-nav .nav-user-name {
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }

  .app-nav .service-credit,
  .app-nav .sms-credit {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    box-sizing: border-box;
    text-align: center;
    font-size: 12px;
    line-height: 1.35;
    padding: 7px 5px;
    white-space: nowrap;
  }
}

/* Mobile: keep دفتر آنلاین logo/title at the top center without changing font sizes */
@media (max-width: 768px) {
  .title {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: max-content;
    max-width: calc(100vw - 24px);
    margin: 0 !important;
    z-index: 20;
    white-space: nowrap;
  }

  .title img {
    flex: 0 0 auto;
  }

  .app-nav {
           margin-top: 50px;
  }
}

/* v2.13s.end4 reminder SMS column and popup */
.sms-info-actions,
.sms-reminder-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.sms-reminder-actions {
  min-width: 140px;
}

.smsActionBtn.sms-scheduled {
  background: #8b8f98 !important;
  color: #fff !important;
}

.smsActionBtn.sms-scheduled::after {
  content: " ⏰";
  font-size: 0.95em;
}

.reminder-sms-box label {
  display: block;
  margin: 10px 0;
  color: inherit;
  line-height: 1.9;
}

.reminder-popup-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
}

/* v2.16.3 education editable part titles */
.education-part-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 900;
  color: #111827;
}
.education-part-title input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 900;
  color: #111827;
  background: #fff;
}
.public-education-card h2 {
  margin: 0 0 18px;
  color: #111827;
  font-size: 26px;
  font-weight: 900;
}
.public-education-part-title {
  margin: 0 0 10px;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.8;
}

/* v2.17.2 - mobile responsive fix for نمایش امکانات popup */
@media (max-width: 768px) {
  #optionsPopup.popup-overlay {
    align-items: flex-start;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #optionsPopup .popup-box {
    width: min(94vw, 390px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 24px);
    margin: 0 auto !important;
    padding: 16px 14px !important;
    box-sizing: border-box;
    overflow-y: auto;
    border-radius: 16px;
  }

  #optionsPopup .popup-box h3 {
    position: sticky;
    top: 0;
    background: var(--card-bg);
    z-index: 2;
    margin: -16px -14px 12px;
    padding: 14px;
    text-align: center;
    font-size: 18px;
  }

  #optionsPopup .popup-box label {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 8px 0 !important;
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.75);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    font-size: 15px;
    line-height: 1.5;
  }

  #optionsPopup .popup-box input[type="checkbox"] {
    flex: 0 0 auto;
    margin: 0 !important;
    width: 18px;
    height: 18px;
    transform: none !important;
  }

  #optionsPopup .closePopup {
    position: sticky;
    bottom: 0;
    width: 100%;
    margin-top: 12px !important;
    padding: 12px !important;
    font-size: 16px;
    z-index: 2;
  }
}

/* v2.17.3 - reminder popup action buttons and mobile label fix */
.reminder-popup-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
}

.reminder-popup-actions button {
  flex: 1 1 0;
  min-width: 0;
  max-width: 180px;
  box-sizing: border-box;
  text-align: center;
  white-space: nowrap;
}

@media (max-width: 768px) {
  /* Only rename the main dashboard options button; do not affect popup action buttons. */
  #showOptionsBtn.optionsBtn,
  .capacityBtn {
    font-size: 0 !important;
  }

  #showOptionsBtn.optionsBtn::after {
    content: "ارسال" !important;
    font-size: 14px;
    color: white;
    font-weight: bolder;
  }

  #confirmReminderSmsBtn.optionsBtn {
    font-size: 16px !important;
  }

  #confirmReminderSmsBtn.optionsBtn::after {
    content: none !important;
  }

  .reminder-popup-actions {
    gap: 8px;
  }

  .reminder-popup-actions button {
    flex: 1 1 50%;
    max-width: none;
    width: 50%;
    padding: 12px 10px !important;
    font-size: 15px !important;
  }
}

/* v2.17.4 - requested mobile options label, reminder popup button sizing, education video uploads */
@media (max-width: 768px) {
  #showOptionsBtn.optionsBtn::after {
    content: "امکانات" !important;
  }
}

.popup-box.reminder-sms-box .reminder-popup-actions #confirmReminderSmsBtn,
.popup-box.reminder-sms-box .reminder-popup-actions #cancelReminderSmsBtn {
  padding: 8px 26px !important;
  font-size: 16px !important;
}

.education-upload-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

.education-upload-btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px !important;
  border-radius: 10px;
  border: 1px solid rgba(90, 166, 255, 0.35);
  background: rgba(90, 166, 255, 0.1);
  color: #1f2937 !important;
  font-weight: 800;
  font-size: 14px !important;
  cursor: pointer;
  margin: 0 !important;
  line-height: 1.4 !important;
}

.education-upload-video-btn {
  border-color: rgba(218, 138, 27, 0.35);
  background: rgba(218, 138, 27, 0.12);
}

.education-upload-btn input[type="file"] {
  display: none;
}

.education-upload-help {
  display: block;
  margin-top: 8px;
  color: #667085;
  font-size: 13px;
  line-height: 1.7;
}

.education-video-player,
.public-education-video-player {
  display: block;
  width: 576px;
  height: 576px;
  max-width: 100%;
  object-fit: contain;
  margin-top: 12px;
  border-radius: 14px;
  background: #111827;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

@media (max-width: 768px) {
  .education-video-player,
  .public-education-video-player {
    width: 306px;
    height: 306px;
    max-width: 100%;
    object-fit: contain;
  }

  .education-upload-actions {
    gap: 8px;
  }

  .education-upload-btn {
    flex: 1 1 120px;
    padding: 8px 10px !important;
    font-size: 13px !important;
  }

  .popup-box.reminder-sms-box .reminder-popup-actions #confirmReminderSmsBtn,
  .popup-box.reminder-sms-box .reminder-popup-actions #cancelReminderSmsBtn {
    padding: 8px 26px !important;
    font-size: 16px !important;
  }
}

/* v2.18.5 - public education layout fixes */
.public-education-text {
  text-align: justify;
  text-align-last: auto;
}

.public-education-part-title {
  background: #bed9dd;
  border-radius: 12px;
  padding: 8px 12px;
}

.public-education-part > img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 0 12px;
}

/* v2.24.1 - group SMS / phonebook */
.dashboard-actions-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.group-sms-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2f7d63;
}

.phonebook-page {
  width: min(1180px, calc(100% - 24px));
  margin: 18px auto 40px;
  direction: rtl;
}

.phonebook-header-card,
.phonebook-card {
  background: var(--card-bg, #fff);
  border-radius: 16px;
  box-shadow: var(--shadow-soft, 0 10px 24px rgba(0, 0, 0, 0.08));
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.phonebook-header-card {
  padding: 18px;
  text-align: center;
  margin-bottom: 16px;
  position: relative;
}

.phonebook-header-card h1 {
  margin: 12px 0 6px;
  font-size: 26px;
}

.phonebook-header-card p {
  margin: 0;
  color: #555;
  line-height: 1.9;
}

.phonebook-title-btn,
.phonebook-back-btn,
.phonebook-card button {
  border: none;
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 800;
  cursor: pointer;
  background: var(--primary-blue, #5aa6ff);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.phonebook-back-btn {
  position: absolute;
  left: 14px;
  top: 14px;
  background: #2f7d63;
}

.phonebook-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.phonebook-card {
  padding: 18px;
  margin-bottom: 16px;
}

.phonebook-card h2 {
  margin: 0 0 14px;
  font-size: 21px;
}

.phonebook-create-form,
.phonebook-import-form,
.phonebook-inline-edit {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.phonebook-create-form input,
.phonebook-inline-edit input,
.phonebook-import-form textarea,
.phonebook-import-form input,
.phonebook-table input,
.phonebook-table select {
  border: 1px solid #d7d7d7;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 15px;
  box-sizing: border-box;
}

.phonebook-create-form input,
.phonebook-import-form textarea,
.phonebook-import-form input[type="file"] {
  flex: 1 1 220px;
  width: 100%;
}

.phonebook-import-form {
  flex-direction: column;
  align-items: stretch;
}

.phonebook-import-form label {
  margin: 6px 0 0;
  font-weight: 800;
}

.phonebook-import-form small {
  color: #666;
  line-height: 1.8;
}

.phonebook-groups-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.phonebook-group-item {
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: #fafafa;
}

.phonebook-group-item.active {
  border-color: var(--primary-blue, #5aa6ff);
  background: #f0f7ff;
}

.phonebook-group-item > a {
  color: #1f2937;
  font-weight: 900;
  text-decoration: none;
  font-size: 17px;
}

.phonebook-card button.danger,
.phonebook-group-item button.danger,
.phonebook-table button.danger {
  background: #ff3b30;
}

.phonebook-alert {
  width: auto;
  margin: 0 0 16px;
}

.phonebook-empty {
  padding: 14px;
  border-radius: 12px;
  background: #f6f6f6;
  color: #555;
  text-align: center;
}

.phonebook-table-card {
  overflow: hidden;
}

.phonebook-table-wrap {
  overflow-x: auto;
}

.phonebook-table {
  width: 100% !important;
  min-width: 820px;
}

.phonebook-table th,
.phonebook-table td {
  padding: 10px;
  white-space: nowrap;
}

.phonebook-table input,
.phonebook-table select {
  width: 150px;
}

.phonebook-table button {
  padding: 9px 14px;
}

@media (max-width: 768px) {
  .dashboard-actions-row {
    width: 100%;
    gap: 8px;
  }

  #groupSmsBtn.group-sms-btn {
    font-size: 13px !important;
    width: auto;
    min-width: 132px;
    flex: 1 1 140px;
    padding: 10px 8px;
    margin: 0;
  }

  #groupSmsBtn.group-sms-btn::after {
    content: none !important;
  }

  .phonebook-page {
    width: calc(100% - 14px);
    margin-top: 10px;
  }

  .phonebook-header-card {
    padding: 16px 10px;
  }

  .phonebook-back-btn {
    position: static;
    margin-bottom: 10px;
  }

  .phonebook-header-card h1 {
    font-size: 22px;
  }

  .phonebook-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .phonebook-card {
    padding: 14px;
  }

  .phonebook-create-form,
  .phonebook-inline-edit {
    flex-direction: column;
    align-items: stretch;
  }

  .phonebook-create-form input,
  .phonebook-inline-edit input,
  .phonebook-card button {
    width: 100%;
  }
}

/* v2.24.2 - group SMS page refinements */
.group-sms-compose-card,
.group-sms-report-card {
  margin-bottom: 16px;
}

.group-sms-top-actions {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.group-sms-message-form {
  display: grid;
  gap: 10px;
}

.group-sms-message-form label,
.phonebook-filter-form label {
  font-weight: 800;
}

.group-sms-message-form textarea,
.group-sms-message-form select,
.phonebook-filter-form input,
.phonebook-filter-form select,
.phonebook-import-form select {
  border: 1px solid #d7d7d7;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 15px;
  box-sizing: border-box;
  width: 100%;
}

.group-sms-message-form textarea {
  min-height: 140px;
  resize: vertical;
}

.group-sms-message-form button {
  justify-self: start;
  min-width: 150px;
}

.manual-number-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr);
  gap: 10px;
  width: 100%;
}

.manual-number-head {
  font-weight: 900;
  background: #bed9dd;
  border-radius: 10px;
  padding: 9px 12px;
  text-align: center;
}

.manual-number-grid input {
  width: 100%;
}

.phonebook-filter-form {
  display: grid;
  grid-template-columns:
    auto minmax(160px, 220px) auto minmax(160px, 220px)
    auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.phonebook-filter-form button {
  min-width: 100px;
}

.group-sms-report-table .message-preview-btn {
  background: #2f7d63;
  padding: 8px 14px;
}

.phonebook-table {
  min-width: 680px;
}

@media (max-width: 768px) {
  .group-sms-top-actions {
    justify-content: center;
  }

  .group-sms-message-form button,
  .phonebook-title-btn {
    width: 100%;
  }

  .manual-number-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .manual-number-head {
    font-size: 13px;
    padding: 8px 6px;
  }

  .phonebook-filter-form {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .phonebook-filter-form button,
  .phonebook-filter-form input,
  .phonebook-filter-form select,
  .phonebook-import-form select,
  .group-sms-message-form select,
  .group-sms-message-form textarea {
    width: 100%;
  }

  .phonebook-table {
    min-width: 620px;
  }

  .phonebook-table th,
  .phonebook-table td {
    padding: 8px 6px;
    font-size: 13px;
  }

  .phonebook-table input {
    width: 120px;
  }
}

/* v2.24.3 - admin requests and phonebook accordion */
.phonebook-section-collapsed {
  display: none;
}

.super-users-table-card {
  background: rgba(20, 31, 55, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 18px;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.super-users-table-card h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.super-users-table {
  min-width: 760px;
  background: #fff;
  color: #1f2937;
  border-radius: 14px;
  overflow: hidden;
}

.admin-request-btn,
.admin-detail-btn,
.admin-request-actions button {
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.admin-request-btn.request-default,
.admin-detail-btn {
  background: #5aa6ff;
}

.admin-request-btn.request-pending {
  background: #f59e0b;
}

.admin-request-btn.request-approved,
.admin-request-actions .approve-btn {
  background: #16a34a;
}

.admin-request-btn.request-rejected,
.admin-request-actions .reject-btn {
  background: #dc2626;
}

.account-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 7px 12px;
  font-weight: 900;
}

.account-status.active {
  background: #dcfce7;
  color: #166534;
}

.account-status.inactive {
  background: #fee2e2;
  color: #991b1b;
}

.admin-requests-card h2 {
  line-height: 1.8;
}

.admin-request-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.admin-request-actions form {
  margin: 0;
}

.admin-requests-table {
  min-width: 880px;
}

@media (max-width: 768px) {
  .super-users-table-card {
    padding: 12px;
  }
  .super-users-table {
    min-width: 700px;
  }
  .admin-request-btn,
  .admin-detail-btn,
  .admin-request-actions button {
    padding: 8px 10px;
    font-size: 13px;
  }
}

/* v2.24.5 - responsive dashboard top row, group SMS phonebook button, simplified phonebook group editor, hamburger overlay fix */
.group-phonebook-entry-btn {
  padding: 12px 181px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.phonebook-group-editor-box {
  margin-top: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 16px;
  background: rgba(190, 217, 221, 0.22);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.phonebook-group-editor-box h3 {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 900;
  color: #1f2937;
}

.phonebook-group-editor-box label {
  font-weight: 800;
  color: #1f2937;
}

.phonebook-group-select,
.phonebook-group-edit-form input {
  width: 100%;
  border: 1px solid #d7d7d7;
  border-radius: 10px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 15px;
  box-sizing: border-box;
}

.phonebook-group-edit-form,
.phonebook-group-delete-form {
  display: grid;
  gap: 10px;
}

.phonebook-group-editor-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

.phonebook-group-editor-actions button {
  min-width: 120px;
}

.app-nav,
.mobile-hamburger-menu,
.mobile-hamburger-links {
  overflow: visible !important;
}

@media (max-width: 768px) {
  .top-row {
    width: calc(100% - 14px) !important;
    max-width: none !important;
    box-sizing: border-box !important;
    padding: 12px 10px !important;
    gap: 10px !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: stretch !important;
  }

  .top-row .date-section {
    width: 100% !important;
    flex: 1 1 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }

  .top-row .date-section label {
    margin: 0 !important;
    white-space: nowrap !important;
    font-size: 16px !important;
  }

  .top-row #booking-date {
    width: min(230px, 70vw) !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .top-row .actions-left,
  .top-row .options-row,
  .top-row .dashboard-actions-row {
    width: 100% !important;
    flex: 1 1 100% !important;
    min-width: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }

  .top-row #capacityWrapper {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  .top-row .optionsBtn,
  .top-row .group-sms-btn,
  .top-row #showOptionsBtn,
  .top-row #groupSmsBtn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    width: auto !important;
    box-sizing: border-box !important;
    white-space: nowrap !important;
    font-size: 13px !important;
    padding: 10px 6px !important;
  }

  .group-phonebook-entry-btn {
    width: 100% !important;
    padding: 12px 16px !important;
    box-sizing: border-box !important;
  }

  .phonebook-group-editor-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .phonebook-group-editor-actions button {
    width: 100%;
  }

  .mobile-hamburger-menu {
    z-index: 999999 !important;
  }

  .mobile-hamburger-links {
    position: fixed !important;
    top: 64px !important;
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    max-width: none !important;
    z-index: 999999 !important;
  }
}

/* v2.24.6 - mobile responsive top row, hamburger overlay, phonebook input size, phonebook button outside card */
.group-sms-top-actions-outside {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 14px 0;
}

@media (max-width: 768px) {
  html,
  body,
  .container,
  main,
  .dashboard-card,
  .table-container,
  .phonebook-page {
    overflow-x: visible !important;
  }

  .top-row {
    width: min(100%, calc(100vw - 16px)) !important;
    max-width: calc(100vw - 16px) !important;
    margin: 8px auto 12px auto !important;
    padding: 10px 8px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    overflow: visible !important;
  }

  .top-row .date-section {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 auto !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: stretch !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }

  .top-row .date-section label {
    margin: 0 !important;
    white-space: nowrap !important;
    font-size: 15px !important;
  }

  .top-row #booking-date {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding: 10px 12px !important;
  }

  .top-row .actions-left,
  .top-row .options-row,
  .top-row .dashboard-actions-row {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .top-row #capacityWrapper {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }

  .top-row #capacityBtn {
    width: 100% !important;
    max-width: 260px !important;
    box-sizing: border-box !important;
  }

  .top-row .options-row,
  .top-row .dashboard-actions-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }

  .top-row .optionsBtn,
  .top-row .group-sms-btn,
  .top-row #showOptionsBtn,
  .top-row #groupSmsBtn {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: none !important;
    box-sizing: border-box !important;
    white-space: normal !important;
    text-align: center !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    padding: 9px 5px !important;
  }

  .app-nav {
    position: relative !important;
    z-index: 99999900 !important;
    overflow: visible !important;
    isolation: isolate !important;
  }

  .mobile-hamburger-menu {
    position: absolute !important;
    z-index: 99999950 !important;
    overflow: visible !important;
  }

  .mobile-hamburger-menu[open],
  .mobile-hamburger-menu[open] summary {
    z-index: 99999980 !important;
  }

  .mobile-hamburger-links {
    position: fixed !important;
    top: 58px !important;
    right: 10px !important;
    left: 10px !important;
    width: auto !important;
    max-width: none !important;
    z-index: 2147483647 !important;
    transform: translateZ(0) !important;
  }

  .phonebook-create-form {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  .phonebook-create-form input[name="group_name"] {
    flex: 0 0 100px !important;
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    padding: 8px 8px !important;
    box-sizing: border-box !important;
  }

  .group-sms-top-actions-outside {
    margin-bottom: 12px !important;
    padding: 0 !important;
  }

  .group-phonebook-entry-btn {
    width: auto !important;
    max-width: 100% !important;
    padding: 10px 18px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 380px) {
  .top-row .options-row,
  .top-row .dashboard-actions-row {
    grid-template-columns: 1fr !important;
  }
}

/* v2.24.7 - final mobile top-row stacking and hamburger front layer */
@media (max-width: 768px) {
  body {
    overflow-x: hidden !important;
  }

  .title {
    width: 100% !important;
    max-width: 330px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  .top-row {
    width: calc(100vw - 48px) !important;
    max-width: 330px !important;
    min-width: 0 !important;
    margin: 10px auto 14px auto !important;
    padding: 10px 8px !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  .top-row .date-section {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }

  .top-row .date-section label {
    white-space: nowrap !important;
    font-size: 14px !important;
    margin: 0 !important;
  }

  .top-row #booking-date {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .top-row .actions-left,
  .top-row #capacityWrapper,
  .top-row .options-row,
  .top-row .dashboard-actions-row {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    align-items: stretch !important;
    justify-content: stretch !important;
    box-sizing: border-box !important;
  }

  .top-row #capacityBtn,
  .top-row #showOptionsBtn,
  .top-row #groupSmsBtn,
  .top-row .optionsBtn,
  .top-row .group-sms-btn {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: auto !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    white-space: normal !important;
    line-height: 1.45 !important;
    padding: 10px 8px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  .app-nav {
    position: relative !important;
    z-index: 2147483000 !important;
    overflow: visible !important;
    isolation: auto !important;
  }

  .mobile-hamburger-menu {
    position: absolute !important;
    top: 8px !important;
    right: 12px !important;
    z-index: 2147483600 !important;
    overflow: visible !important;
  }

  .mobile-hamburger-menu[open] {
    z-index: 2147483646 !important;
  }

  .mobile-hamburger-menu[open]::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2147483645;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
  }

  .mobile-hamburger-menu[open] .mobile-hamburger-links {
    position: fixed !important;
    top: 72px !important;
    right: 18px !important;
    left: 18px !important;
    width: auto !important;
    max-width: 340px !important;
    margin: 0 auto !important;
    z-index: 2147483647 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 18px !important;
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35) !important;
  }

  .mobile-hamburger-menu[open] .mobile-hamburger-links a {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    position: relative !important;
    z-index: 2147483647 !important;
  }

  .phonebook-page,
  .phonebook-header-card,
  .phonebook-card,
  .group-sms-compose-card,
  .group-sms-report-card,
  .table-container,
  .pagination {
    position: relative !important;
    z-index: 1 !important;
  }
}

/* v2.24.8 - requested dashboard button colors, mobile options popup layer, public education title size */
.top-row #capacityBtn,
.top-row #showOptionsBtn,
.top-row #groupSmsBtn,
.top-row .capacityBtn,
.top-row .optionsBtn,
.top-row .group-sms-btn {
  background-color: rgb(88 117 152) !important;
}

.public-education-card > h2 {
  font-size: 20px !important;
}

@media (max-width: 768px) {
  .top-row #showOptionsBtn.optionsBtn {
    font-size: 0 !important;
  }

  .top-row #showOptionsBtn.optionsBtn::after {
    content: "امکانات" !important;
    display: inline-block !important;
    font-size: 15px !important;
    color: #fff !important;
    font-weight: 900 !important;
    line-height: 1.45 !important;
  }

  #optionsPopup.popup-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 2147483647 !important;
    isolation: isolate !important;
  }

  #optionsPopup.popup-overlay .popup-box {
    position: relative !important;
    z-index: 2147483647 !important;
  }
}

/* v2.24.9 - settings/education/admin SMS templates and capacity mobile fixes */
.settings-support-note {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 700;
  color: rgba(31, 41, 55, 0.82);
  line-height: 1.9;
}

.education-labels-card .education-labels-form {
  max-width: 520px;
  margin: 18px auto 0;
}

.sms-template-admin-card {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.admin-nav-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#capacityWrapper.capacity-hidden {
  display: none !important;
}

#capacityBtn.capacityBtn {
  gap: 8px;
}

#capacityBtn .capacity-btn-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
}

#capacityBtn #capacityStatus.capacityStatus {
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  color: #fff;
  font-weight: 900;
  margin-inline-start: 4px;
}

@media (max-width: 768px) {
  .top-row #capacityBtn.capacityBtn {
    font-size: 15px !important;
    gap: 7px !important;
  }

  .top-row #capacityBtn.capacityBtn::after {
    content: none !important;
  }

  .top-row #capacityBtn .capacity-btn-text {
    display: inline-flex !important;
    font-size: 15px !important;
    color: #fff !important;
    font-weight: 900 !important;
  }

  .top-row #capacityBtn #capacityStatus.capacityStatus {
    font-size: 20px !important;
    color: #fff !important;
    margin-inline-start: 4px !important;
  }

  #capacityWrapper.capacity-hidden {
    display: none !important;
  }
}

/* v2.24.10 - profile title, education labels visibility, booking date size, logs */
.education-labels-card .settings-form label {
  color: #1f2937 !important;
}

.education-labels-card .settings-form input {
  color: #111827 !important;
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
}

.education-labels-card .settings-form input:focus {
  border-color: rgb(88 117 152) !important;
  box-shadow: 0 0 0 3px rgba(88, 117, 152, 0.16) !important;
}

.top-row #booking-date {
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
  height: 47px !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  .top-row .date-section {
    grid-template-columns: auto 150px !important;
    justify-content: center !important;
  }

  .top-row #booking-date {
    width: 150px !important;
    min-width: 150px !important;
    max-width: 150px !important;
    height: 47px !important;
  }
}

.login-logs-page {
  max-width: 1150px;
  margin: 0 auto;
  padding: 22px 12px;
}

.login-logs-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid #eef2f7;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  padding: 22px;
  overflow-x: auto;
}

.login-logs-card h1 {
  margin: 0 0 18px;
  font-size: 24px;
  color: #111827;
  text-align: center;
}

.login-logs-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.login-logs-table th,
.login-logs-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 10px;
  text-align: center;
  color: #111827;
  font-weight: 700;
}

.login-logs-table th {
  background: #bed9dd;
}

@media (max-width: 768px) {
  .login-logs-page {
    padding: 12px 8px;
  }

  .login-logs-card {
    padding: 14px;
  }
}

/* v2.24.11 - online assistant pages + admin mobile responsiveness */
.assistant-page {
  width: min(1100px, calc(100% - 28px));
  margin: 20px auto 50px;
}

.assistant-card {
  background: rgba(20, 31, 55, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 20px;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.assistant-card h1 {
  margin: 0 0 18px;
  text-align: center;
  font-size: 24px;
  font-weight: 900;
}

.assistant-textarea-label {
  display: grid;
  gap: 10px;
  font-weight: 900;
}

.assistant-admin-textarea {
  width: 100%;
  min-height: 420px;
  resize: vertical;
  box-sizing: border-box;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.9;
}

.assistant-save-btn {
  margin-top: 14px;
}

.assistant-public-content {
  background: #ffffff;
  color: #1f2937;
  border-radius: 16px;
  padding: 18px;
  line-height: 2.1;
  font-size: 17px;
  white-space: normal;
  text-align: justify;
  min-height: 240px;
}

.assistant-empty {
  background: #fff7ed;
  color: #7c2d12;
  border: 1px solid #fdba74;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  font-weight: 900;
}

.assistant-updated-at {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  text-align: center;
}

.login-logs-page,
.settings-container,
.super-admin-wrap {
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
}

.login-logs-card,
.sms-template-admin-card,
.super-users-table-card,
.admin-requests-card,
.super-user-card {
  max-width: 100%;
  box-sizing: border-box;
}

.login-logs-card {
  overflow-x: auto;
}

.login-logs-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.admin-nav-links {
  flex-wrap: wrap;
  justify-content: center;
}

.admin-nav-links .nav-link {
  white-space: nowrap;
}

@media (max-width: 768px) {
  .assistant-page {
    width: calc(100% - 16px);
    margin: 12px auto 32px;
  }

  .assistant-card {
    padding: 14px;
    border-radius: 16px;
  }

  .assistant-card h1 {
    font-size: 20px;
  }

  .assistant-admin-textarea {
    min-height: 360px;
    font-size: 15px;
    line-height: 1.8;
  }

  .assistant-public-content {
    font-size: 15px;
    line-height: 2;
    padding: 14px;
  }

  .admin-mobile-menu {
    display: block !important;
  }

  .admin-nav-links {
    display: none !important;
  }

  .super-admin-wrap,
  .login-logs-page,
  .settings-container {
    width: calc(100% - 12px) !important;
    max-width: calc(100vw - 12px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .super-users-table-card,
  .admin-requests-card,
  .super-user-card,
  .login-logs-card,
  .sms-template-admin-card {
    padding: 12px !important;
    border-radius: 14px !important;
    overflow-x: auto !important;
  }

  .super-grid {
    grid-template-columns: 1fr !important;
  }

  .super-actions {
    flex-direction: column !important;
  }

  .super-actions button,
  .super-actions .settings-save-btn,
  .super-actions .danger-btn {
    width: 100% !important;
  }

  .login-logs-table,
  .super-users-table,
  .admin-requests-table {
    min-width: 680px !important;
  }

  .template-block textarea {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* v2.24.12 - dashboard mobile date sizing, assistant button label, rich editor */
.top-row #onlineAssistantBtn.online-assistant-btn,
.top-row #onlineAssistantBtn.online-assistant-btn:link,
.top-row #onlineAssistantBtn.online-assistant-btn:visited,
.top-row #onlineAssistantBtn.online-assistant-btn:hover,
.top-row #onlineAssistantBtn.online-assistant-btn:focus {
  text-decoration: none !important;
  border-bottom: 0 !important;
}

.top-row #onlineAssistantBtn.online-assistant-btn::after {
  content: none !important;
  display: none !important;
}

.assistant-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0 0 10px;
}

.assistant-editor-toolbar button,
.assistant-editor-toolbar select {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: inherit;
  font-weight: 900;
  padding: 8px 12px;
  cursor: pointer;
}

.assistant-editor-toolbar select option {
  color: #111827;
  background: #ffffff;
}

.assistant-rich-editor {
  width: 100%;
  min-height: 420px;
  box-sizing: border-box;
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #ffffff;
  color: #1f2937;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.9;
  overflow-y: auto;
  outline: none;
}

.assistant-rich-editor:focus {
  border-color: #bed9dd;
  box-shadow: 0 0 0 3px rgba(190, 217, 221, 0.28);
}

.assistant-public-content * {
  max-width: 100%;
}

@media (max-width: 768px) {
  .top-row #booking-date {
    width: 110px !important;
    min-width: 108px !important;
    max-width: 150px !important;
    height: 47px !important;
  }

  .top-row .date-section label {
    white-space: nowrap !important;
    font-size: 14px !important;
    margin: -60px !important;
  }

  .top-row #onlineAssistantBtn.optionsBtn,
  .top-row #onlineAssistantBtn.online-assistant-btn {
    font-size: 15px !important;
    color: #fff !important;
    text-decoration: none !important;
    border-bottom: 0 !important;
  }

  .top-row #onlineAssistantBtn.optionsBtn::after,
  .top-row #onlineAssistantBtn.online-assistant-btn::after {
    content: none !important;
    display: none !important;
  }

  .assistant-editor-toolbar {
    justify-content: center;
  }

  .assistant-editor-toolbar button,
  .assistant-editor-toolbar select {
    flex: 1 1 44%;
    min-width: 120px;
    text-align: center;
  }

  .assistant-rich-editor {
    min-height: 360px;
    font-size: 15px;
    line-height: 1.8;
  }
}

/* v2.28.2 - Dashboard phonebook group selector */
.col-phonebook-group select,
.phonebook-group-select-dashboard {
  min-width: 140px;
  max-width: 180px;
  height: 38px;
  padding: 6px 10px;
  border: 1px solid #d5dce7;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.col-phonebook-group select:focus,
.phonebook-group-select-dashboard:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(90, 166, 255, 0.18);
}

.phonebook-group-editor-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

@media (max-width: 768px) {
  .col-phonebook-group select,
  .phonebook-group-select-dashboard {
    min-width: 120px;
    max-width: 140px;
    height: 36px;
    font-size: 13px;
    padding: 5px 8px;
  }
}

/* v2.28.3 - installment reminders and moved service credit */
.settings-service-credit-box {
  max-width: 900px;
  margin: 0 auto 18px auto;
  background: #ffffff;
  border: 1px solid #dce7ee;
  border-radius: 14px;
  padding: 14px 18px;
  text-align: center;
  font-weight: 800;
  color: #1f3342;
  box-shadow: var(--shadow-light);
}

.top-row #installmentReminderBtn.installment-reminder-btn,
.top-row #installmentReminderBtn.installment-reminder-btn:link,
.top-row #installmentReminderBtn.installment-reminder-btn:visited,
.top-row #installmentReminderBtn.installment-reminder-btn:hover,
.top-row #installmentReminderBtn.installment-reminder-btn:focus {
  background-color: rgb(88 117 152) !important;
  color: #ffffff !important;
  text-decoration: none !important;
  text-align: center;
}

.installment-page {
  width: min(1100px, calc(100% - 28px));
  margin: 0 auto 40px auto;
}

.installment-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--shadow-light);
  padding: 22px;
  margin-bottom: 22px;
  border: 1px solid #e6eef4;
}

.installment-card h3,
.installment-popup-box h3,
.installment-popup-box h4 {
  margin: 0 0 16px 0;
  color: #14243a;
  font-weight: 900;
  text-align: center;
}

.installment-create-card {
  text-align: center;
}

.installment-open-btn,
.installment-detail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none !important;
}

.installment-popup-overlay {
  z-index: 999999999 !important;
}

.installment-popup-box {
  width: min(860px, calc(100% - 26px));
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
}

.installment-fields-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.installment-fields-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 800;
  color: #26384a;
}

.installment-fields-grid input,
.installment-items-table input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd7e1;
  background: #ffffff;
  color: #111827;
  border-radius: 10px;
  padding: 7px;
  font-size: 15px;
  outline: none;
}

.installment-items-table-wrap {
  overflow-x: auto;
}

.installment-items-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
}

.installment-items-table th,
.installment-items-table td {
  border-bottom: 1px solid #edf2f7;
  padding: 8px;
  text-align: center;
width: 110px;
}

.installment-items-table th {
  background: #bed9dd;
  font-weight: 900;
  color: #172033;
  width: 110px;
}

.installment-add-row,
.installment-remove-row {
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 900;
}

.installment-add-row {
  width: 48px;
  height: 42px;
  margin: 12px 0;
  background: #2f855a;
  color: #ffffff;
  font-size: 24px;
}

.installment-remove-row {
  width: 34px;
  height: 34px;
  background: #ff3b30;
  color: #ffffff;
  font-size: 18px;
}

.installment-popup-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.installment-popup-actions button {
  min-width: 140px;
}

.installment-report-table .installment-detail-btn {
  padding: 9px 16px;
}

@media (max-width: 768px) {
  .settings-service-credit-box {
    width: calc(100% - 24px);
    margin: 0 auto 14px auto;
    font-size: 14px;
    padding: 12px;
  }

  .top-row #installmentReminderBtn.installment-reminder-btn {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 12px 10px !important;
    white-space: normal !important;
  }

  .installment-page {
    width: calc(100% - 20px);
  }

  .installment-card,
  .installment-popup-box {
    padding: 16px 12px;
  }

  .installment-fields-grid {
    grid-template-columns: 1fr;
  }

  .installment-popup-actions {
    flex-direction: column;
  }

  .installment-popup-actions button {
    width: 100%;
  }
}

/* v2.28.4 - installment layout, calendar layer, and desktop dashboard actions row */
@media (min-width: 769px) {
  .top-row .options-row.dashboard-actions-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: auto !important;
    max-width: none !important;
  }

  .top-row .options-row.dashboard-actions-row .optionsBtn,
  .top-row .options-row.dashboard-actions-row a.optionsBtn {
    width: auto !important;
    min-width: max-content !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }
}

.installment-cal-overlay {
  z-index: 2147483647 !important;
}

.installment-tables-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
}

.installment-table-panel {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
}

.installment-table-panel .installment-items-table-wrap {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.installment-summary-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: min(100%, 360px);
  margin: 10px auto 0 auto;
  padding: 10px 14px;
  border: 1px solid #d5e1ea;
  border-radius: 12px;
  background: #f8fbfd;
  color: #14243a;
  font-weight: 900;
  box-sizing: border-box;
}

.installment-summary-field strong {
  direction: ltr;
  color: #1f5f78;
  font-weight: 900;
}

.installment-add-payment-row {
  width: 48px;
  height: 42px;
  margin: 12px 0;
  background: #2c7a7b;
  color: #ffffff;
  font-size: 24px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 900;
}

@media (max-width: 768px) {
  .installment-tables-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .installment-table-panel .installment-items-table-wrap {
    max-width: 100%;
  }

  .installment-items-table {
    min-width: 430px;
  }

  .installment-summary-field {
    width: 100%;
    font-size: 14px;
  }
}

/* v2.28.6 - requested dashboard labels and top-row/nav refinements */
.desktop-nav-links .nav-home,
.mobile-hamburger-links .nav-home,
.app-nav a.nav-home {
  font-weight: 900 !important;
}

.top-row {
  max-width: 1040px !important;
}

@media (max-width: 768px) {
  .top-row #showOptionsBtn.optionsBtn::after {
    content: "آیتم ها" !important;
  }
}

/* v2.28.7 - selected SMS popup, mobile top-row labels, phonebook manual add */
.smsSelectBtn {
  background: rgb(88 117 152);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  font-size: 16px;
}

.smsSelectBtn.sms-sent {
  background: #16a34a;
}

.sms-info-select-box {
  max-width: 420px;
}

.sms-info-select-box h3 {
  margin-top: 0;
  text-align: center;
}

.sms-info-choice {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin: 10px 0;
  font-weight: 800;
}

.sms-info-select-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.sms-info-select-actions button {
  min-width: 120px;
  padding: 8px 26px;
  font-size: 16px;
}

.manual-number-grid {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.manual-number-row {
  display: contents;
}

.manual-add-row-btn {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  padding: 0 !important;
  font-size: 22px;
  line-height: 1;
}

.manual-number-row-placeholder {
  width: 42px;
  height: 1px;
}

.phonebook-groups-card h2 {
  color: #1f2937;
}

@media (max-width: 768px) {
  .top-row #phonebookTopBtn.optionsBtn,
  .top-row #installmentReminderBtn.optionsBtn {
    font-size: 14px !important;
    color: #fff !important;
    text-decoration: none !important;
  }

  .top-row #phonebookTopBtn.optionsBtn::after,
  .top-row #installmentReminderBtn.optionsBtn::after {
    content: none !important;
    display: none !important;
  }

  .app-nav a.nav-home,
  .desktop-nav-links .nav-home,
  .mobile-hamburger-links .nav-home {
    font-size: 20px !important;
  }

  .manual-number-grid {
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
  }

  .manual-number-grid input {
    min-width: 0;
    width: 100%;
  }

  .sms-info-select-box {
    width: min(92vw, 420px);
  }

  .sms-info-select-actions {
    flex-direction: row;
  }

  .sms-info-select-actions button {
    flex: 1 1 0;
    min-width: 0;
  }
}

/* v2.28.8 - options popup two-column labels, reminder popup layout, installment mobile fixes */
#optionsPopup.popup-overlay .popup-box {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px 10px !important;
  align-items: stretch !important;
}

#optionsPopup.popup-overlay .popup-box h3,
#optionsPopup.popup-overlay .popup-box .closePopup {
  grid-column: 1 / -1 !important;
}

#optionsPopup.popup-overlay .popup-box label {
  width: auto !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.reminder-popup-actions {
  display: block !important;
  text-align: center !important;
  gap: 0 !important;
  width: 100% !important;
  margin-top: 16px !important;
}

.reminder-popup-actions button {
  display: inline-block !important;
  flex: none !important;
  width: auto !important;
  min-width: 120px !important;
  max-width: none !important;
  margin: 0 6px !important;
  text-align: center !important;
  vertical-align: middle !important;
}

@media (max-width: 768px) {
  #optionsPopup.popup-overlay {
    z-index: 2147483647 !important;
  }

  #optionsPopup.popup-overlay .popup-box {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: min(96vw, 430px) !important;
    max-width: calc(100vw - 14px) !important;
  }

  #optionsPopup.popup-overlay .popup-box label {
    padding: 9px 7px !important;
    font-size: 13px !important;
    line-height: 1.45 !important;
    min-height: 46px !important;
  }

  #optionsPopup.popup-overlay .popup-box input[type="checkbox"] {
    width: 17px !important;
    height: 17px !important;
  }

  .reminder-popup-actions {
    display: block !important;
    text-align: center !important;
  }

  .reminder-popup-actions button {
    width: 36% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-left: 23px !important;
    margin-right: 0 !important;
    padding: 8px 8px !important;
    font-size: 16px !important;
    display: inline-block !important;
  }

  .installment-page-body .app-nav {
    display: none !important;
  }

  .installment-page {
    width: calc(100% - 14px) !important;
    max-width: 100% !important;
    margin: 12px auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  .installment-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto 14px auto !important;
    padding: 14px 10px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .installment-popup-overlay {
    padding: 8px !important;
    align-items: flex-start !important;
    overflow-y: auto !important;
  }

  .installment-popup-box {
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100vh - 16px) !important;
    margin: 0 auto !important;
    padding: 14px 8px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
  }

  .installment-fields-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .installment-fields-grid input,
  .installment-form input {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .installment-tables-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 18px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .installment-table-panel {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    overflow: hidden !important;
  }

  .installment-table-panel .installment-items-table-wrap,
  .installment-items-table-wrap,
  .phonebook-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }

  .installment-items-table,
  .installment-payments-table {
    min-width: 360px !important;
    width: 100% !important;
  }

  .installment-items-table input {
    width: 118px !important;
    max-width: 118px !important;
    box-sizing: border-box !important;
  }

  .installment-summary-field {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    font-size: 13px !important;
  }

  .installment-report-table {
    min-width: 520px !important;
  }
}

/* v2.29.1 - installment page mobile button labels and cleanup */
@media (max-width: 768px) {
  .installment-page .installment-open-btn.optionsBtn::after {
    content: "ایجاد پرونده اقساط" !important;
    font-size: 14px !important;
    color: #fff !important;
    font-weight: bolder !important;
    display: inline-block !important;
  }

  .installment-popup-actions .installment-submit-btn.optionsBtn::after {
    content: "ثبت" !important;
    font-size: 14px !important;
    color: #fff !important;
    font-weight: bolder !important;
    display: inline-block !important;
  }
}

/* v2.29.3 - installment report filters, debt column, and delete action */
.installment-report-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 260px);
  gap: 12px;
  align-items: end;
  margin: 0 auto 16px auto;
  max-width: 760px;
}

.installment-report-filters label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 900;
  color: #14243a;
}

.installment-report-filters input,
.installment-report-filters select {
  width: 55%;
  height: 44px;
  border: 1px solid #cbd7e1;
  border-radius: 10px;
  background: #ffffff;
  color: #111827;
  font-family: inherit;
  font-size: 15px;
  padding: 8px 0px;
  box-sizing: border-box;
}

.installment-debt-cell {
  direction: ltr;
  font-weight: 900;
  border-radius: 8px;
}

.installment-debt-positive {
  color: #d71414 !important;
  padding: 2px;
  border-bottom: 1px solid #f0f0f0b8;
}

.installment-debt-zero {
  background: #ffffff !important;
  color: #111827 !important;
}

.installment-delete-form {
  margin: 0;
}

.installment-delete-case-btn {
  border: none;
  border-radius: 10px;
  background: #ef4444;
  color: #ffffff;
  font-family: inherit;
  font-weight: 900;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
}

.installment-delete-case-btn:hover {
  filter: brightness(0.95);
}

@media (max-width: 768px) {
  .installment-report-filters {
    grid-template-columns: 1fr;
    gap: 10px;
    max-width: 100%;
  }

  .installment-report-table {
    min-width: 760px !important;
  }
}

/* v2.29.5 - appointment table title/date row */
.appointment-date-title-row {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  width: 100% !important;
  max-width: 1040px !important;
  margin: 0 auto 14px auto !important;
  direction: rtl !important;
}

.appointment-date-title {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #1f2937 !important;
  font-weight: 900 !important;
  font-size: 19px !important;
  white-space: nowrap !important;
}

.appointment-date-title-row #booking-date {
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
  height: 47px !important;
  margin: 0 !important;
  text-align: center !important;
}

@media (max-width: 768px) {
  .appointment-date-title-row {
    gap: 8px !important;
    margin: 8px auto 12px auto !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
  }

  .appointment-date-title {
    font-size: 16px !important;
  }

  .appointment-date-title-row #booking-date {
    width: 110px !important;
    min-width: 108px !important;
    max-width: 150px !important;
    height: 47px !important;
  }
}

/* v2.29.6 - installment SMS countdown timer */
.installment-sms-timer-cell {
  min-width: 120px;
  text-align: center;
  font-weight: 800;
  white-space: nowrap;
  color: #2d3748;
}

.installment-sms-timer-cell.installment-sms-sent {
  color: #17803d;
}

.installment-sms-timer-cell.installment-sms-due-now {
  color: #d48a00;
}

.installment-sms-timer-cell.installment-sms-failed {
  color: #d71414;
}

.installment-sms-failed-btn {
  border: 0;
  border-radius: 10px;
  background: #d71414;
  color: #fff;
  padding: 7px 10px;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
}

.installment-sms-failed-btn:hover {
  filter: brightness(0.95);
}

@media (max-width: 768px) {
  .installment-sms-timer-cell {
    min-width: 110px;
    font-size: 13px;
  }

  .installment-sms-failed-btn {
    padding: 7px 8px;
    font-size: 12px;
  }
}

/* v2.29.9 - keep installment details button label visible on mobile */
@media (max-width: 768px) {
  .installment-report-table .installment-detail-btn.optionsBtn {
    font-size: 14px !important;
    color: #fff !important;
    text-decoration: none !important;
  }

  .installment-report-table .installment-detail-btn.optionsBtn::after {
    content: none !important;
    display: none !important;
  }
}

/* v2.29.10 - stop global mobile optionsBtn label overrides on popup action buttons */
@media (max-width: 768px) {
  #confirmSmsInfoSelectBtn.optionsBtn,
  #confirmReminderSmsBtn.optionsBtn,
  .installment-popup-actions .installment-submit-btn.optionsBtn {
    font-size: 16px !important;
    color: #fff !important;
    text-decoration: none !important;
  }

  #confirmSmsInfoSelectBtn.optionsBtn::after,
  #confirmReminderSmsBtn.optionsBtn::after,
  .installment-popup-actions .installment-submit-btn.optionsBtn::after {
    content: none !important;
    display: none !important;
  }

  .installment-popup-actions button {
    width: 90% !important;
  }

  .closePopup {
    margin-right: 20px !important;
  }
}

/* v2.29.11 - options popup spacing and SMS select button */
#optionsPopup.popup-overlay .popup-box label {
  width: auto !important;
  margin: -4px !important;
  box-sizing: border-box !important;
}

.smsSelectBtn {
  background: rgb(88 117 152) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  font-family: inherit !important;
  font-weight: 900 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
  font-size: 16px !important;
}

@media (max-width: 768px) {
  .closePopup {
    margin-right: 3px !important;
    margin-bottom: 10px !important;
  }

  #optionsPopup .popup-box {
    width: min(94vw, 390px) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 24px) !important;
    margin: 0 auto !important;
    padding: 8px 0px !important;
    padding-top: 0px !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
    border-radius: 16px !important;
  }
}

/* v2.29.12 - register visitors page split and nav status mobile row */
.nav-status-separator {
  display: none;
}

@media (max-width: 768px) {
  .nav-status-stack {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .app-nav .nav-user-name.bigger,
  .app-nav .sms-credit {
    flex: 0 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    font-size: 13px !important;
    padding: 6px 7px !important;
    margin: 0 !important;
  }

  .app-nav .nav-user-name.bigger {
    font-size: 16px !important;
  }

  .nav-status-separator {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-weight: 900 !important;
    padding: 0 2px !important;
  }

  .top-row #showOptionsBtn.optionsBtn::after {
    content: "نمایش ستون آیتم ها" !important;
  }

  .top-row #registerVisitorsBtn.optionsBtn::after {
    content: none !important;
    display: none !important;
  }
}

/* v2.29.13 - mobile hamburger blur + close icon and dashboard action spacing */
@media (max-width: 768px) {
  .mobile-hamburger-menu[open]::before {
    background: rgba(255, 255, 255, 0.38) !important;
    -webkit-backdrop-filter: blur(7px) !important;
    backdrop-filter: blur(7px) !important;
    pointer-events: none !important;
  }

  .mobile-hamburger-menu[open] summary {
    font-size: 0 !important;
    line-height: 1 !important;
  }

  .mobile-hamburger-menu[open] summary::after {
    content: "×" !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 34px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }
}

.options-row.dashboard-actions-row {
  gap: 20px !important;
}

.options-row.dashboard-actions-row .optionsBtn,
.options-row.dashboard-actions-row a.optionsBtn,
.top-row .options-row.dashboard-actions-row .optionsBtn,
.top-row .options-row.dashboard-actions-row a.optionsBtn {
  font-size: 20px !important;
  text-decoration: none !important;
}

.options-row.dashboard-actions-row .optionsBtn::after,
.options-row.dashboard-actions-row a.optionsBtn::after {
  text-decoration: none !important;
}

/* v2.29.14 - modern icons for dashboard home top-row buttons */
.dashboard-home-top-row .dashboard-actions-row .dashboard-action-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 9px !important;
  text-decoration: none !important;
  line-height: 1.4 !important;
}

.dashboard-action-icon {
  width: 26px;
  height: 26px;
  min-width: 26px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.17);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.14);
}

.dashboard-action-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-action-text {
  display: inline-block;
}

.dashboard-home-top-row
  .dashboard-actions-row
  .dashboard-action-btn:hover
  .dashboard-action-icon {
  transform: translateY(-1px) scale(1.04);
  background: rgba(255, 255, 255, 0.24);
}

@media (max-width: 768px) {
  .dashboard-home-top-row .dashboard-actions-row .dashboard-action-btn {
    gap: 7px !important;
  }

  .dashboard-action-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 9px;
  }

  .dashboard-action-icon svg {
    width: 17px;
    height: 17px;
  }
}

/* v2.29.15 - bigger dashboard home icons with labels under icons */
.dashboard-home-top-row .dashboard-actions-row .dashboard-action-btn {
  flex-direction: column !important;
  gap: 10px !important;
  text-align: center !important;
  min-height: 132px !important;
  padding-top: 18px !important;
  padding-bottom: 16px !important;
}

.dashboard-home-top-row .dashboard-action-icon {
  width: 78px !important;
  height: 78px !important;
  min-width: 78px !important;
  border-radius: 22px !important;
}

.dashboard-home-top-row .dashboard-action-icon svg {
  width: 54px !important;
  height: 54px !important;
}

.dashboard-home-top-row .dashboard-action-text {
  display: block !important;
  width: 100% !important;
  line-height: 1.45 !important;
}

.dashboard-home-top-row
  .dashboard-actions-row
  .dashboard-action-btn:hover
  .dashboard-action-icon {
  transform: translateY(-2px) scale(1.05) !important;
}

@media (max-width: 768px) {
  .dashboard-home-top-row .dashboard-actions-row .dashboard-action-btn {
    flex-direction: column !important;
    gap: 8px !important;
    min-height: 122px !important;
    padding-top: 15px !important;
    padding-bottom: 14px !important;
  }

  .dashboard-home-top-row .dashboard-action-icon {
    width: 72px !important;
    height: 72px !important;
    min-width: 72px !important;
    border-radius: 20px !important;
  }

  .dashboard-home-top-row .dashboard-action-icon svg {
    width: 51px !important;
    height: 51px !important;
  }
}

/* v2_29_16 dashboard action layout and group SMS phonebook button fixes */
.top-row .optionsBtn,
.top-row .group-sms-btn,
.top-row #showOptionsBtn,
.top-row #groupSmsBtn,
.options-row.dashboard-actions-row .optionsBtn,
.options-row.dashboard-actions-row a.optionsBtn,
.top-row .options-row.dashboard-actions-row .optionsBtn,
.top-row .options-row.dashboard-actions-row a.optionsBtn,
.top-row #phonebookTopBtn.optionsBtn,
.top-row #installmentReminderBtn.optionsBtn {
  font-size: 17px !important;
}

.top-row #capacityBtn,
.top-row #showOptionsBtn,
.top-row #groupSmsBtn,
.top-row .optionsBtn,
.top-row .group-sms-btn {
  max-width: 42% !important;
}

.dashboard-home-top-row .dashboard-actions-row {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
  gap: 20px !important;
  align-items: stretch !important;
  justify-content: center !important;
  width: min(1040px, 100%) !important;
  margin: 0 auto !important;
}

.dashboard-home-top-row .dashboard-actions-row .dashboard-action-btn {
  width: 100% !important;
  max-width: none !important;
  min-height: 128px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  text-align: center !important;
  text-decoration: none !important;
}

.group-sms-phonebook-btn {
  width: min(420px, 100%) !important;
  margin: 0 auto 16px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  text-align: center !important;
  text-decoration: none !important;
}

@media (max-width: 768px) {
  .dashboard-home-top-row .dashboard-actions-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px !important;
  }

  .dashboard-home-top-row .dashboard-actions-row .dashboard-action-btn {
    min-height: 112px !important;
    font-size: 17px !important;
  }

  .top-row #capacityBtn,
  .top-row #showOptionsBtn,
  .top-row #groupSmsBtn,
  .top-row .optionsBtn,
  .top-row .group-sms-btn {
    max-width: 42% !important;
  }
}

/* v2.29.17 - dashboard action layout fixes */
@media (max-width: 768px) {
  .top-row #capacityBtn,
  .top-row #showOptionsBtn,
  .top-row #groupSmsBtn,
  .top-row .optionsBtn,
  .top-row .group-sms-btn {
    max-width: 100% !important;
  }

  .title {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: max-content;
    max-width: calc(100vw - 24px);
    margin: 0 !important;
    z-index: 20;
    white-space: nowrap;
  }
}

/* v2.29.18 - remove unwanted mobile "امکانات" pseudo labels and button/icon fixes */
@media (max-width: 768px) {
  .optionsBtn::after,
  .dashboard-action-btn::after,
  .dashboard-home-top-row .optionsBtn::after,
  .dashboard-home-top-row .dashboard-action-btn::after,
  #confirmSmsInfoSelectBtn.optionsBtn::after,
  #onlineAssistantBtn.optionsBtn::after,
  #educationUploadTopBtn.optionsBtn::after {
    content: none !important;
    display: none !important;
  }

  .dashboard-home-top-row .optionsBtn,
  .dashboard-home-top-row .dashboard-action-btn,
  #confirmSmsInfoSelectBtn.optionsBtn,
  #onlineAssistantBtn.optionsBtn,
  #educationUploadTopBtn.optionsBtn {
    font-size: 17px !important;
  }

  .top-row #onlineAssistantBtn.optionsBtn,
  .top-row #onlineAssistantBtn.online-assistant-btn {
    font-size: 18px !important;
    color: #fff !important;
    text-decoration: none !important;
    border-bottom: 0 !important;
    font-weight: bold !important;
  }
}

.top-row #onlineAssistantBtn.optionsBtn,
.top-row #onlineAssistantBtn.online-assistant-btn {
  text-decoration: none !important;
  border-bottom: 0 !important;
}

.dashboard-home-top-row a[href="education.php"],
.dashboard-home-top-row a[href="education.php"] .dashboard-action-text,
.dashboard-home-top-row a[href="education.php"] .dashboard-action-icon,
.dashboard-home-top-row a[href="education.php"] .dashboard-action-icon svg,
.dashboard-home-top-row
  a[href="education.php"]
  .dashboard-action-icon
  svg
  path {
  color: #fff !important;
  stroke: #fff !important;
}

/* v2.29.19 - remove unwanted mobile pseudo labels and education/assistant button fixes */
@media (max-width: 768px) {
  .optionsBtn::after,
  .top-row .optionsBtn::after,
  .dashboard-home-top-row .optionsBtn::after,
  .dashboard-home-top-row .dashboard-action-btn::after,
  #educationUploadBtn.optionsBtn::after,
  #onlineAssistantBtn.optionsBtn::after,
  #confirmSmsInfoSelectBtn.optionsBtn::after {
    content: none !important;
    display: none !important;
  }

  .top-row #onlineAssistantBtn.optionsBtn,
  .top-row #onlineAssistantBtn.online-assistant-btn {
    font-size: 18px !important;
    color: #fff !important;
    text-decoration: none !important;
    border-bottom: 0 !important;
    font-weight: bold !important;
  }
}

.dashboard-home-top-row #educationUploadBtn,
.dashboard-home-top-row #educationUploadBtn .dashboard-action-text,
.dashboard-home-top-row #educationUploadBtn .dashboard-action-icon,
.dashboard-home-top-row #educationUploadBtn .dashboard-action-icon svg,
.dashboard-home-top-row #educationUploadBtn .dashboard-action-icon svg path {
  color: #fff !important;
  stroke: #fff !important;
}

.dashboard-home-top-row #educationUploadBtn .dashboard-action-icon svg path {
  fill: none !important;
}

/* v2.30.3 - dashboard home buttons, SMS select popup, full page hamburger blur, installment mobile fixes */
@media (min-width: 769px) {
  .dashboard-home-top-row .dashboard-actions-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: min(1180px, 100%) !important;
    gap: 28px !important;
  }

  .dashboard-home-top-row .dashboard-actions-row .dashboard-action-btn {
    min-height: 256px !important;
    padding: 34px 22px !important;
    gap: 18px !important;
  }

  .dashboard-home-top-row .dashboard-action-icon {
    width: 126px !important;
    height: 126px !important;
  }

  .dashboard-home-top-row .dashboard-action-icon svg {
    width: 108px !important;
    height: 108px !important;
  }

  .dashboard-home-top-row .dashboard-action-text {
    font-size: 22px !important;
    line-height: 1.7 !important;
  }
}

@media (max-width: 768px) {
  body:has(.mobile-hamburger-menu[open])::before {
    content: "" !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 9990 !important;
    background: rgba(255, 255, 255, 0.38) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    pointer-events: none !important;
  }

  .app-nav,
  .mobile-hamburger-menu,
  .mobile-hamburger-menu summary,
  .mobile-hamburger-links {
    position: relative !important;
    z-index: 10000 !important;
  }

  .installment-popup-box {
    margin-right: 15px !important;
  }

  .installment-fields-grid input,
  .installment-form input {
    width: 63% !important;
    max-width: 61% !important;
    box-sizing: border-box !important;
    font-size: 20px !important;
  }
}

#confirmSmsInfoSelectBtn.optionsBtn {
  width: 169px !important;
  min-width: 169px !important;
  max-width: 169px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 40px !important;
  box-sizing: border-box !important;
}

.installment-add-payment-row,
.installment-add-row {
  width: 100px !important;
}

/* v2.30.4 - requested installment and group SMS refinements */
.installment-fields-grid input,
.installment-items-table input {
  padding: 16px !important;
}

.installment-add-payment-row,
.installment-add-row {
  width: 100px !important;
}

.group-sms-help-note {
  font-size: 15px;
  line-height: 1.9;
  margin: 10px auto 0;
  width: min(1180px, calc(100% - 24px));
  color: #32465a;
  font-weight: 800;
}

.group-sms-type-section {
  display: grid;
  gap: 8px;
}

.group-sms-type-section-title {
  font-weight: 900;
  color: #172033;
}

.group-message-custom-wrap {
  display: none;
  gap: 8px;
}

.group-message-custom-wrap.is-visible {
  display: grid;
}

@media (max-width: 768px) {
  .closePopup {
    margin-right: 21px !important;
    margin-bottom: 10px !important;
  }

  .installment-popup-actions .closePopup {
    width: 100% !important;
    margin-top: 9px !important;
    background: var(--danger-red) !important;
    padding: 11px !important;
    border-radius: var(--border-radius) !important;
    border: none !important;
    cursor: pointer !important;
    color: white !important;
    font-size: 16px !important;
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25) !important;
    transition: all 0.1s !important;
  }
}

/* v2.30.5 - requested mobile table, SMS popup, and installment input refinements */
@media (max-width: 768px) {
  th {
    padding: 0px 7px !important;
  }

  .installment-fields-grid input,
  .installment-form input {
    font-size: 15px !important;
  }

  .closePopup {
    margin-right: 20px !important;
    margin-bottom: 10px !important;
  }
}

.sms-info-select-box .sms-info-select-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
}

.sms-info-select-box .sms-info-select-actions #confirmSmsInfoSelectBtn,
.sms-info-select-box .sms-info-select-actions #cancelSmsInfoSelectBtn {
  width: 169px !important;
  max-width: 169px !important;
  min-width: 0 !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 40px !important;
  box-sizing: border-box !important;
}

.installment-date-input,
.installment-amount-input {
  width: 130px !important;
  min-width: 130px !important;
  max-width: 130px !important;
  height: 76px !important;
  min-height: 76px !important;
  box-sizing: border-box !important;
  padding:7px !important;
}

/* v2.30.6 - education order, installment responsive fixes, hamburger top-right fix */
@media (max-width: 768px) {
  .mobile-hamburger-menu {
    position: fixed !important;
    top: 8px !important;
    right: 12px !important;
    left: auto !important;
    z-index: 10050 !important;
    margin: 0 !important;
  }

  .mobile-hamburger-menu summary {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    left: auto !important;
    margin: 0 !important;
    transform: none !important;
  }

  .mobile-hamburger-links {
    position: fixed !important;
    top: 58px !important;
    right: 12px !important;
    left: auto !important;
    z-index: 10040 !important;
    max-height: calc(100vh - 80px) !important;
    overflow-y: auto !important;
  }

  .installment-page {
    width: calc(100% - 12px) !important;
    max-width: calc(100% - 12px) !important;
    margin: 0 auto 30px !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .installment-card {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 8px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .installment-popup-box {
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
    margin: 0 auto !important;
    padding: 12px 6px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .installment-fields-grid {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 10px !important;
  }

  .installment-fields-grid label,
  .installment-form label {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .installment-fields-grid input,
  .installment-form input {
            width: 71% !important;
        max-width: 71% !important
    min-width: 0 !important;
    box-sizing: border-box !important;
    font-size: 15px !important;
  }

  .installment-tables-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 14px !important;
  }

  .installment-table-panel,
  .installment-items-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .installment-items-table,
  .installment-payments-table {
    width: 100% !important;
    min-width: 520px !important;
  }

  .installment-date-input,
  .installment-amount-input {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    height: 76px !important;
    min-height: 76px !important;
    box-sizing: border-box !important;
  }

  .installment-summary-field {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* v2.31.1 - shared mobile header and installment precise input sizes */
@media (max-width: 768px) {
  .title {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: max-content !important;
    max-width: calc(100vw - 110px) !important;
    margin: 0 !important;
    z-index: 10020 !important;
    white-space: nowrap !important;
  }

  .mobile-hamburger-menu {
    position: fixed !important;
    top: 20px !important;
    right: 12px !important;
    left: auto !important;
    z-index: 10050 !important;
    margin: 0 !important;
  }

  .mobile-hamburger-menu summary {
    margin: 0 !important;
    margin-top: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
  }

  .mobile-hamburger-links {
    position: fixed !important;
    top: 72px !important;
    right: 12px !important;
    left: auto !important;
    z-index: 10040 !important;
  }

  body {
    padding-top: 0px;

  }
}

.installment-patient-main-input {
  width: 200px !important;
  min-width: 200px !important;
  max-width: 200px !important;
  height: 50px !important;
  min-height: 50px !important;
  box-sizing: border-box !important;
}

.installment-installment-small-input {
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px !important;
  height: 50px !important;
  min-height: 50px !important;
  box-sizing: border-box !important;
}

button.closePopup.installment-close-popup {
  width: 365px !important;
  min-width: 365px !important;
  max-width: 365px !important;
  height: 45px !important;
  min-height: 45px !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  .installment-patient-main-input {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    height: 50px !important;
  }

  .installment-installment-small-input {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    height: 50px !important;
  }

  button.closePopup.installment-close-popup {
    width: min(365px, calc(100vw - 32px)) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 32px) !important;
    height: 45px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* v2.31.2 - force exact installment input/button sizes with higher specificity */
.installment-fields-grid input.installment-patient-main-input,
.installment-form .installment-fields-grid input.installment-patient-main-input,
.popup-box.installment-popup-box
  .installment-fields-grid
  input.installment-patient-main-input {
  width: 200px !important;
  min-width: 200px !important;
  max-width: 200px !important;
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  padding: 7px !important;
  box-sizing: border-box !important;
}

.installment-items-table input.installment-installment-small-input,
.installment-items-table
  input.installment-date-input.installment-installment-small-input,
.installment-items-table
  input.installment-amount-input.installment-installment-small-input,
.installment-items-table
  input.installment-paid-amount-input.installment-installment-small-input,
.popup-box.installment-popup-box
  .installment-items-table
  input.installment-installment-small-input {
  width: 100px !important;
  min-width: 100px !important;
  max-width: 100px !important;
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  padding: 7px !important;
  box-sizing: border-box !important;
}

.installment-popup-actions button.closePopup.installment-close-popup,
.popup-box.installment-popup-box
  .installment-popup-actions
  button.closePopup.installment-close-popup {
  width: 365px !important;
  min-width: 365px !important;
  max-width: 365px !important;
  height: 45px !important;
  min-height: 45px !important;
  max-height: 45px !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  .installment-fields-grid input.installment-patient-main-input,
  .installment-form
    .installment-fields-grid
    input.installment-patient-main-input,
  .popup-box.installment-popup-box
    .installment-fields-grid
    input.installment-patient-main-input {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
  }

  .installment-items-table input.installment-installment-small-input,
  .installment-items-table
    input.installment-date-input.installment-installment-small-input,
  .installment-items-table
    input.installment-amount-input.installment-installment-small-input,
  .installment-items-table
    input.installment-paid-amount-input.installment-installment-small-input,
  .popup-box.installment-popup-box
    .installment-items-table
    input.installment-installment-small-input {
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
  }

  .installment-popup-actions button.closePopup.installment-close-popup,
  .popup-box.installment-popup-box
    .installment-popup-actions
    button.closePopup.installment-close-popup {
    width: min(365px, calc(100vw - 32px)) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 32px) !important;
    height: 45px !important;
    min-height: 45px !important;
    max-height: 45px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* v2.31.4 - final input font size and installment small inputs 130x50 */
input,
textarea,
select {
  font-size: 16px !important;
}

.installment-items-table input.installment-installment-small-input,
.installment-items-table
  input.installment-date-input.installment-installment-small-input,
.installment-items-table
  input.installment-amount-input.installment-installment-small-input,
.installment-items-table
  input.installment-paid-amount-input.installment-installment-small-input,
.popup-box.installment-popup-box
  .installment-items-table
  input.installment-installment-small-input {
  width: 130px !important;
  min-width: 130px !important;
  max-width: 130px !important;
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  padding: 7px !important;
  box-sizing: border-box !important;
  font-size: 16px !important;
}

@media (max-width: 768px) {
  input,
  textarea,
  select {
    font-size: 16px !important;
  }

  .installment-items-table input.installment-installment-small-input,
  .installment-items-table
    input.installment-date-input.installment-installment-small-input,
  .installment-items-table
    input.installment-amount-input.installment-installment-small-input,
  .installment-items-table
    input.installment-paid-amount-input.installment-installment-small-input,
  .popup-box.installment-popup-box
    .installment-items-table
    input.installment-installment-small-input {
    width: 130px !important;
    min-width: 130px !important;
    max-width: 130px !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    font-size: 16px !important;
  }
}
/* v2.31.4 - mobile global title and burger position */
@media (max-width: 768px) {
  .app-nav {
    position: relative !important;
    padding-top: 70px !important;
  }

  .app-nav > .title {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: max-content !important;
    max-width: calc(100vw - 110px) !important;
    margin: 0 !important;
    z-index: 10020 !important;
    white-space: nowrap !important;
    font-size: 22px !important;
    font-weight: 900 !important;
  }

  .mobile-hamburger-menu {
    position: fixed !important;
    top: 20px !important;
    right: 12px !important;
    left: auto !important;
    z-index: 10050 !important;
    margin: 0 !important;
  }

  .mobile-hamburger-menu summary {
    margin: 0 !important;
    margin-top: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
  }

  .mobile-hamburger-links {
    position: fixed !important;
    top: 72px !important;
    right: 12px !important;
    left: auto !important;
    z-index: 10040 !important;
  }
}

.input.installment-amount-input {

  padding:7px  !important;
}
.installment-amount-input{
  padding:7px !important;
}

/* v3.1.2 - buy account requests in super admin */
.buy-account-requests-table {
  min-width: 760px;
}

.buy-request-note-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.buy-request-note-form textarea {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  padding: 8px 10px;
  font-family: inherit;
  resize: vertical;
  color: #111827;
  background: #ffffff;
}

.buy-request-note-form button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  background: rgb(88 117 152);
  color: #ffffff;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
}

@media (max-width: 768px) {
  .buy-request-note-form {
    grid-template-columns: 1fr;
  }

  .buy-request-note-form button {
    width: 100%;
  }
}

/* v3.1.5 - referral code settings/register */
.admin-referral-code-card {
  margin-top: 16px;
}
.admin-referral-code-form {
  max-width: 520px;
  margin: 0 auto;
}
.admin-referral-code-form .referral-code-input,
.auth-card #referralCodeInput {
  direction: ltr;
  text-align: center;
  font-weight: 800;
  letter-spacing: 1px;
}


/* modernteb_v3_2_3 - requested dashboard desktop action buttons and mobile hamburger clarity */
@media (min-width: 769px) {
  .dashboard-home-top-row {
    max-width: 1040px !important;
    width: 100% !important;
  }

  .dashboard-home-top-row .dashboard-actions-row {
    display: grid !important;
    grid-template-columns: repeat(3, 324px) !important;
    width: 100% !important;
    max-width: 1040px !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 24px !important;
    margin: 0 auto !important;
  }

  .dashboard-home-top-row .dashboard-actions-row .dashboard-action-btn,
  .dashboard-home-top-row .dashboard-actions-row .optionsBtn {
    width: 324px !important;
    min-width: 324px !important;
    max-width: 324px !important;
    height: 324px !important;
    min-height: 324px !important;
    max-height: 324px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 768px) {
  .mobile-hamburger-menu[open] summary,
  .mobile-hamburger-menu summary {
    filter: none !important;
    -webkit-filter: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 2147483647 !important;
  }
}

/* modernteb_v3_2_4 - FIX desktop dashboard buttons: exactly 3 per row, 324x324. Mobile untouched. */
@media (min-width: 769px) {
  body .top-row.dashboard-home-top-row {
    width: 100% !important;
    max-width: 1040px !important;
    display: block !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box !important;
  }

  body .top-row.dashboard-home-top-row > .options-row.dashboard-actions-row,
  body .top-row.dashboard-home-top-row > .dashboard-actions-row {
    display: grid !important;
    grid-template-columns: 324px 324px 324px !important;
    grid-auto-columns: 324px !important;
    justify-content: center !important;
    align-items: stretch !important;
    justify-items: stretch !important;
    gap: 24px !important;
    width: 1020px !important;
    max-width: 1020px !important;
    min-width: 1020px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  body .top-row.dashboard-home-top-row > .dashboard-actions-row > a.dashboard-action-btn,
  body .top-row.dashboard-home-top-row > .dashboard-actions-row > a.optionsBtn,
  body .top-row.dashboard-home-top-row .dashboard-actions-row #registerVisitorsBtn,
  body .top-row.dashboard-home-top-row .dashboard-actions-row #phonebookTopBtn,
  body .top-row.dashboard-home-top-row .dashboard-actions-row #groupSmsBtn,
  body .top-row.dashboard-home-top-row .dashboard-actions-row #installmentReminderBtn,
  body .top-row.dashboard-home-top-row .dashboard-actions-row #educationUploadBtn,
  body .top-row.dashboard-home-top-row .dashboard-actions-row #onlineAssistantBtn {
    width: 324px !important;
    min-width: 324px !important;
    max-width: 324px !important;
    height: 324px !important;
    min-height: 324px !important;
    max-height: 324px !important;
    flex: 0 0 324px !important;
    box-sizing: border-box !important;
    padding: 34px 22px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
}

/* modernteb_v3_2_5 - desktop dashboard home top row size update. Mobile untouched. */
@media (min-width: 769px) {
  body .top-row.dashboard-home-top-row {
    max-width: 1095px !important;
  }

  body .top-row.dashboard-home-top-row > .options-row.dashboard-actions-row,
  body .top-row.dashboard-home-top-row > .dashboard-actions-row {
    grid-template-columns: 200px 200px 200px !important;
    grid-auto-columns: 200px !important;
    width: 648px !important;
    max-width: 648px !important;
    min-width: 648px !important;
  }

  body .top-row.dashboard-home-top-row > .dashboard-actions-row > a.dashboard-action-btn,
  body .top-row.dashboard-home-top-row > .dashboard-actions-row > a.optionsBtn,
  body .top-row.dashboard-home-top-row .dashboard-actions-row #registerVisitorsBtn,
  body .top-row.dashboard-home-top-row .dashboard-actions-row #phonebookTopBtn,
  body .top-row.dashboard-home-top-row .dashboard-actions-row #groupSmsBtn,
  body .top-row.dashboard-home-top-row .dashboard-actions-row #installmentReminderBtn,
  body .top-row.dashboard-home-top-row .dashboard-actions-row #educationUploadBtn,
  body .top-row.dashboard-home-top-row .dashboard-actions-row #onlineAssistantBtn,
  body .dashboard-home-top-row .dashboard-actions-row .dashboard-action-btn,
  body .dashboard-home-top-row .dashboard-actions-row .optionsBtn {
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    height: 200px !important;
    min-height: 200px !important;
    max-height: 200px !important;
    flex: 0 0 200px !important;
    box-sizing: border-box !important;
    padding: 22px 14px !important;
  }
}

/* modernteb_v3.4 - register visitors filters and desktop button max-width */
.register-visitors-filter-panel {
  width: min(1120px, calc(100% - 28px));
  margin: 12px auto 16px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 14px;
  direction: rtl;
}
.register-visitors-filter-panel label {
  font-weight: 900;
  color: #1f2937;
}
.visitor-date-filter {
  display: flex;
  gap: 10px;
  align-items: end;
}
.register-visitors-filter-panel input {
  display: block;
  margin-top: 6px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  box-sizing: border-box;
  background: #fff;
  color: #111827;
  font-family: inherit;
}
.visitor-filter-date {
  width: 150px;
}
.visitor-search-filter input {
  width: 320px;
}
.contact-result-select {
  min-width: 130px;
  border: 1px solid #d5dce7;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  padding: 7px 9px;
  font-family: inherit;
  font-weight: 800;
}
@media (min-width: 769px) {
  body.register-visitors-page .top-row #capacityBtn,
  body.register-visitors-page .top-row #showOptionsBtn,
  body.register-visitors-page .top-row #groupSmsBtn,
  body.register-visitors-page .top-row .optionsBtn,
  body.register-visitors-page .top-row .group-sms-btn {
    max-width: 100% !important;
  }
}
@media (max-width: 768px) {
  .register-visitors-filter-panel {
    width: calc(100% - 16px);
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .visitor-date-filter {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .visitor-filter-date,
  .visitor-search-filter input {
    width: 100%;
  }
}

/* modernteb_v3.5 - settings insurance list and visitor insurance dropdown */
.contract-insurances-list {
  display: grid;
  gap: 10px;
}
.contract-insurance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
}
.contract-insurance-add {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 10px;
  background: #2f7d63;
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}
.insurance-type-select {
  min-width: 130px;
  border: 1px solid #d5dce7;
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  padding: 7px 9px;
  font-family: inherit;
  font-weight: 800;
}
.col-date {
  white-space: nowrap;
  font-weight: 800;
}
@media (max-width: 768px) {
  .contract-insurance-row {
    grid-template-columns: minmax(0, 1fr) 44px;
  }
}


/* v3.8 - register visitors day close and report phone */
.visitor-day-closed {
  opacity: 1;
}
.visitor-day-closed input,
.visitor-day-closed select,
.visitor-day-closed button {
  cursor: not-allowed !important;
}
.close-day-account-btn {
  background: rgb(88 117 152) !important;
}
@media (min-width: 769px) {
  .register-visitors-page .top-row #capacityBtn,
  .register-visitors-page .top-row #showOptionsBtn,
  .register-visitors-page .top-row #groupSmsBtn,
  .register-visitors-page .top-row .optionsBtn,
  .register-visitors-page .top-row .group-sms-btn {
    max-width: 100% !important;
  }
}

/* modernteb_v3.9 - register visitors time picker and date input sizing */
.register-visitors-page .appointment-date-title-row #booking-date {
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  box-sizing: border-box !important;
}

.visit-time-popup {
  z-index: 2147483647 !important;
}

.visit-time-box {
  max-width: 420px !important;
  text-align: center;
}

.visit-time-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  direction: rtl;
}

.visit-time-controls label {
  display: grid !important;
  gap: 7px;
  margin: 0 !important;
  font-weight: 900;
  color: #1f2937;
}

.visit-time-controls select {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #111827;
  text-align: center;
  font-size: 16px;
  font-family: inherit;
  font-weight: 800;
}

.visit-time-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.visit-time-actions button {
  flex: 1 1 0;
  max-width: 160px;
  margin: 0 !important;
}

.visit-time-select-input {
  cursor: pointer;
  background: #fff !important;
}


/* modernteb_v4.1 - register visitors manual 12h time popup fixes */
.visit-time-controls input.visit-time-manual-input,
.visit-time-controls select {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #111827;
  text-align: center;
  font-size: 16px;
  font-family: inherit;
  font-weight: 800;
  box-sizing: border-box;
}
.visit-time-confirm-btn {
  font-size: 16px !important;
  color: #fff !important;
}
.visit-time-confirm-btn::after {
  content: none !important;
  display: none !important;
}
.register-visitors-page .visitor-day-closed,
.register-visitors-page .visitor-day-closed .table-wrapper,
.register-visitors-page .visitor-day-closed table {
  opacity: 1 !important;
  filter: none !important;
}


/* v4.5 - Super admin assistant/admin accounts UI fix */
.admin-accounts-title {
  margin-top: 22px !important;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.admin-accounts-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 12px;
}
.admin-account-row {
  display: grid;
  grid-template-columns: 90px minmax(180px, 1fr) minmax(180px, 1fr) 110px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
}
.admin-account-row-title {
  align-self: center;
  font-weight: 900;
  color: #fff;
  text-align: center;
  white-space: nowrap;
}
.admin-account-row label {
  display: grid;
  gap: 7px;
  font-weight: 800;
}
.admin-account-row input[type="text"],
.admin-account-row input[type="password"],
.admin-account-row input:not([type]) {
  width: 100%;
  box-sizing: border-box;
}
.admin-account-row .admin-account-active {
  align-self: center;
  justify-content: center;
  margin: 0 !important;
}
@media (max-width: 768px) {
  .admin-account-row {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }
  .admin-account-row-title {
    text-align: right;
  }
  .admin-account-row .admin-account-active {
    justify-content: flex-start;
  }
}


/* v4.6 register visitors financial totals */
.register-total-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 10px;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .register-total-item {
    display: block;
    margin: 4px 0;
  }
}


/* v4.8 - doctors management and visitor doctor column */
.admin-doctors-title { margin-top: 18px; }
.admin-doctors-list { display: grid; gap: 10px; margin-bottom: 16px; }
.admin-doctor-row { display: grid; grid-template-columns: minmax(220px, 1fr) 48px; gap: 10px; align-items: end; }
.admin-doctor-row label { display: grid; gap: 7px; font-weight: 800; }
.admin-doctor-add { width: 48px; height: 44px; border: none; border-radius: 10px; background: #2f855a; color: #fff; font-size: 24px; font-weight: 900; cursor: pointer; }
.doctor-name-select, #visitorDoctorFilter { min-width: 150px; height: 38px; border: 1px solid #d5dce7; border-radius: 8px; background: #fff; color: #1f2937; font-size: 14px; font-weight: 700; text-align: center; }
@media (max-width: 768px) { .admin-doctor-row { grid-template-columns: 1fr 44px; } }


/* modernteb_v5.0 - therapist column persistence/mobile filter layout */
@media (max-width: 768px) {
  body.register-visitors-page .visitor-date-filter {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  body.register-visitors-page .visitor-date-filter .col-doctor-name {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    order: -1 !important;
  }

  body.register-visitors-page .visitor-date-filter .col-doctor-name select {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}
