
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0b1120;
  color: #e5e7eb;
  direction: rtl;
  text-align: right;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  background: radial-gradient(circle at top,#1f2937,#020617);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.6);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.logo a {
  font-weight: 700;
  font-size: 20px;
}

.main-nav a {
  margin-right: 16px;
  font-size: 14px;
  opacity: .9;
}

.site-main {
  padding: 24px 0 40px;
}

.site-footer {
  border-top: 1px solid #1f2937;
  padding: 16px 0;
  font-size: 13px;
  color: #9ca3af;
  background: #020617;
}

.page-title {
  font-size: 24px;
  margin: 0 0 16px;
}

/* کارت اتاق‌ها */

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.room-card {
  background: radial-gradient(circle at top,#1e293b,#020617);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(15,23,42,.9);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(148,163,184,.2);
}

.room-image img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.room-body {
  padding: 12px 16px 16px;
}

.room-body h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.room-body p {
  margin: 0 0 4px;
  font-size: 14px;
  color: #cbd5f5;
}

.room-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg,#4f46e5,#6366f1);
  color: #fff;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 14px 30px rgba(79,70,229,.5);
}

.btn-ghost {
  background: #020617;
  color: #e5e7eb;
  border: 1px solid #4b5563;
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 999px;
  cursor: pointer;
}
.btn-ghost:hover {
  background: #111827;
}


/* قوانین */

.rules-section {
  background: radial-gradient(circle at top,#020617,#020617);
  border-radius: 18px;
  padding: 16px 18px 18px;
  box-shadow: 0 14px 40px rgba(15,23,42,.9);
  border: 1px solid rgba(148,163,184,.25);
}

.rules-section h2 {
  margin-top: 0;
  margin-bottom: 8px;
  font-size: 18px;
}

.rules-text {
  font-size: 14px;
  color: #e5e7eb;
  line-height: 1.9;
}

/* فرم رزرو */

.reserve-form {
  background: radial-gradient(circle at top,#020617,#020617);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 14px 40px rgba(15,23,42,.9);
  margin-bottom: 16px;
  border: 1px solid rgba(148,163,184,.2);
}

.form-row {
  margin-bottom: 12px;
}

.form-row label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: #e5e7eb;
}

.form-row input[type="text"],
.form-row input[type="date"],
.form-row input[type="file"],
.form-row select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #334155;
  font-size: 14px;
  background:#020617;
  color:#e5e7eb;
}

.form-row.two-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(140px,1fr));
  gap: 12px;
}

.alert {
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-success {
  background: #022c22;
  color: #bbf7d0;
  border: 1px solid #16a34a;
}

.alert-error {
  background: #450a0a;
  color: #fee2e2;
  border: 1px solid #fecaca;
}

.payment-info {
  background: radial-gradient(circle at top,#020617,#020617);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 14px 40px rgba(15,23,42,.7);
  border: 1px solid rgba(148,163,184,.2);
}

.payment-info h2 {
  margin-top: 0;
}

/* تقویم فرانت */

/* تقویم (فرانت و ادمین – مشترک) */

.calendar-wrapper {
  background: radial-gradient(circle at top,#020617,#020617);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 14px 40px rgba(15,23,42,.9);
  border: 1px solid rgba(148,163,184,.3);
  margin-bottom: 20px;
  display: inline-block;
}

/* هدر تقویم */
.calendar-header {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}

.cal-title {
  font-size:16px;
  font-weight:600;
}

.cal-nav {
  font-size:13px;
  color:#a5b4fc;
}

/* افسانه رنگ‌ها */
.calendar-legend {
  margin-bottom:10px;
  font-size:12px;
  color:#cbd5f5;
}
.calendar-legend .legend-item {
  margin-left:16px;
}
.calendar-legend .box {
  display:inline-block;
  width:12px;
  height:12px;
  border-radius:3px;
  margin-left:4px;
}
.calendar-legend .box.free    { background:#16a34a; }
.calendar-legend .box.booked  { background:#dc2626; }
.calendar-legend .box.selected{ background:#facc15; }

/* خود جدول تقویم */
.calendar-table {
  border-collapse: separate;
  border-spacing: 4px;
  font-size:13px;
  margin: 0 auto;
}

.calendar-table th,
.calendar-table td {
  width: 40px;
  height: 38px;
  text-align:center;
}

.calendar-table th {
  background:#020617;
  color:#9ca3af;
}

.calendar-table td.empty {
  background:transparent;
  border:none;
}

.calendar-table td.day {
  border-radius:10px;
  border:1px solid #1f2937;
}

/* روزهای آزاد */
.calendar-table td.day.free {
  background:#16a34a;
  color:#ffffff;
}

/* روزهای رزرو شده */
.calendar-table td.day.booked {
  background:#dc2626;
  color:#ffffff;
}

/* شماره روز */
.day-number {
  font-size:14px;
  font-weight:500;
}

/* برای صفحه رزرو (انتخاب بازه) */
.reserve-calendar .calendar-table td.day.free {
  cursor: pointer;
}

.reserve-calendar .calendar-table td.day.selected {
  box-shadow: 0 0 0 2px #facc15 inset;
}

.reserve-calendar .calendar-table td.day.in-range {
  background:#0f766e;
  color:#bbf7d0;
}

.selected-range-label {
  font-size: 13px;
  margin-bottom: 8px;
  color: #e5e7eb;
}

.calendar-footer-note {
  margin-top: 8px;
  font-size: 12px;
  color: #9ca3af;
}



/* ریسپانسیو */

@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .room-card {
    border-radius:16px;
  }
}
/* چیدمان فرم رزرو کنار تقویم */
.reserve-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: flex-start;
}

@media (max-width: 768px) {
  .reserve-layout {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .reserve-calendar .calendar-wrapper {
    width: 100%;
  }

  .reserve-form {
    padding: 12px;
  }

  .form-row.two-cols {
    grid-template-columns: 1fr;
  }
}


/* انتخاب بازه روی تقویم رزرو فرم */
.reserve-calendar .calendar-table td.day.free {
  cursor: pointer;
}

/* روز شروع / پایان که کاربر انتخاب می‌کند */
.reserve-calendar .calendar-table td.day.selected {
  box-shadow: 0 0 0 2px #facc15 inset;
}

/* روزهای بین شروع و پایان (بازه) */
.reserve-calendar .calendar-table td.day.in-range {
  background: linear-gradient(to bottom, #065f46, #022c22);
  color: #bbf7d0;
}

/* توضیح بالای تقویم */
.selected-range-label {
  font-size: 13px;
  margin-bottom: 8px;
  color: #e5e7eb;
}

/* توضیح پایین تقویم */
.calendar-footer-note {
  margin-top: 8px;
  font-size: 12px;
  color: #9ca3af;
}

/* رنگ باکس افسانه برای روز انتخاب‌شده */
.calendar-legend .box.selected {
  background: #facc15;
}
/* =========================
   استایل پنل مدیریت
   ========================= */

.admin-layout {
  display: flex;
  min-height: 100vh;
  background: #020617;
}

.admin-sidebar {
  width: 220px;
  background: #020617;
  border-left: 1px solid #1f2937;
  padding: 20px 16px;
  font-size: 14px;
}

.admin-logo {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 16px;
}

.admin-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-menu li {
  margin-bottom: 8px;
}

.admin-menu a {
  color: #e5e7eb;
  text-decoration: none;
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-menu a:hover {
  background: #111827;
  color: #a5b4fc;
}

.admin-main {
  flex: 1;
  padding: 24px 24px 40px;
}

/* کارت‌های داخل پنل */

.admin-card {
  background: radial-gradient(circle at top,#020617,#020617);
  border-radius: 18px;
  padding: 16px 18px 18px;
  box-shadow: 0 14px 40px rgba(15,23,42,.9);
  border: 1px solid rgba(148,163,184,.25);
  margin-bottom: 20px;
}

/* جدول‌های پنل */

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  border: 1px solid #1f2937;
  padding: 8px 10px;
  text-align: right;
}

.admin-table th {
  background: #020617;
  color: #9ca3af;
}

.admin-table tr:nth-child(even) td {
  background: rgba(15,23,42,0.6);
}

/* دکمه‌های کوچک در پنل */

.btn-sm {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg,#4f46e5,#6366f1);
  color: #fff;
}

.btn-outline,
.btn-sm.btn-outline {
  background: transparent;
  border: 1px solid rgba(148,163,184,.7);
  color: #e5e7eb;
}

/* برچسب وضعیت */

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.badge-pending {
  background: #1f2937;
  color: #e5e7eb;
}

.badge-approved {
  background: #065f46;
  color: #bbf7d0;
}

.badge-cancelled,
.badge-rejected {
  background: #7f1d1d;
  color: #fee2e2;
}

.badge-paid {
  background: #14532d;
  color: #bbf7d0;
}

/* ریسپانسیو پنل ادمین */

@media (max-width: 768px) {
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    border-left: none;
    border-bottom: 1px solid #1f2937;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }
  .admin-logo {
    margin-bottom: 0;
    margin-left: auto;
  }
  .admin-main {
    padding: 16px;
  }
}
/* =========================
   بهبود نمایش روی موبایل
   ========================= */

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .rooms-grid {
    grid-template-columns: 1fr;
  }

  .reserve-layout {
    grid-template-columns: 1fr;
  }

  .calendar-wrapper {
    padding: 12px;
    margin-bottom: 16px;
  }

  .calendar-table {
    font-size: 11px;
  }

  .calendar-table th,
  .calendar-table td {
    padding: 4px 3px;
  }

  /* پنل ادمین روی موبایل */
  .admin-layout {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    border-left: none;
    border-bottom: 1px solid #1f2937;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
  }

  .admin-main {
    padding: 16px;
  }

  .admin-card {
    overflow-x: auto;
  }

  .admin-table {
    min-width: 600px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 13px;
  }

  .calendar-table {
    font-size: 10px;
  }

  .calendar-table th,
  .calendar-table td {
    padding: 3px 2px;
  }

  .reserve-form,
  .payment-info {
    padding: 12px;
  }
}

@media (max-width: 480px) {
  .room-card {
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15,23,42,.9);
  }

  .room-image img {
    height: 160px;
  }

  .room-body h2 {
    font-size: 16px;
    margin-bottom: 4px;
  }

  .room-body p {
    font-size: 13px;
    line-height: 1.7;
  }

  .room-actions {
    flex-direction: column;
  }

  .room-actions .btn,
  .room-actions .btn-ghost {
    width: 100%;
    text-align: center;
  }
}

.admin-menu-toggle {
  display: none;
  border-radius: 999px;
  border: 1px solid #4b5563;
  background: #020617;
  color: #e5e7eb;
  font-size: 13px;
  padding: 4px 12px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .admin-menu-toggle {
    display: inline-block;
  }

  .admin-menu {
    width: 100%;
    display: none;
  }

  body.admin-menu-open .admin-menu {
    display: block;
  }
}
/* روزهای گذشته در تقویم (غیرقابل رزرو) */
.calendar-table td.day.past {
  background: #111827;
  color: #4b5563;
  cursor: default;
}

/* روز شروع / پایان انتخابی */
.reserve-calendar .calendar-table td.day.selected {
  background: #facc15 !important;
  color: #111827 !important;
}

/* روزهای بین شروع و پایان */
.reserve-calendar .calendar-table td.day.in-range {
  background: linear-gradient(to bottom,#fde68a,#fbbf24) !important;
  color: #111827 !important;
}
.weekly-table th.today-col,
.weekly-table td.today-col {
  background: #7f1d1d;
  color: #fee2e2;
}
@media print {
  .site-header,
  .site-footer,
  .admin-card > div:first-child { /* نوار بالا و دکمه‌ها */
    display: none !important;
  }
  body {
    background: #ffffff;
    color: #000000;
  }
}

.weekly-table th.today-col,
.weekly-table td.today-col {
  background: #7f1d1d;
  color: #fee2e2;
}

/* پرینت افقی */
@media print {
  @page {
    size: landscape;
  }
  body {
    background: #ffffff;
    color: #000000;
  }
  .site-header,
  .site-footer,
  .admin-card > div:first-child {
    display: none !important;
  }
}
.day-weekday {
  font-size: 11px;
  opacity: 0.8;
  margin-top: 2px;
}
.companion-error input[type="text"] {
  border-color: #f97373;
  background: #450a0a;
}

.companions-warning-error {
  color: #fecaca;
}

.companions-warning-ok {
  color: #22c55e;
}




