/**
 * ??????? ???? ??? CSS ??????? Metronic ?? ??? ?? ???????? ??????
 * (???? ???? ???? Tailwind ? ???? ???????? ?????? ????? ????? ????????
 * ?? ?? ???????? .tsx).
 */

/* ??? ?????????? ?????? ???
 * ??????? ?????: ????? ???? ????? ???? letter-spacing ??????
 * ? ???????? ?????/??? ?? ??????? ? ???. */
html,
body,
#root {
  font-family: 'IranYekan', Tahoma, ui-sans-serif, system-ui, sans-serif !important;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: 0 !important;
}

.kt-btn,
.kt-input,
.kt-select,
.kt-textarea,
.kt-badge,
.kt-menu-title,
.kt-menu-link,
.kt-form-label,
.kt-card-title,
table,
th,
td,
input,
button,
select,
textarea {
  font-family: inherit !important;
  letter-spacing: 0;
}

/* textarea — ارتفاع و عرض راحت‌تر در فرم‌ها */
#scrollable_content textarea:not(.rich-text-editor-body):not(.admin-ticket-chat__input),
.kt-textarea,
textarea.kt-input {
  width: 100%;
  min-height: 5.5rem;
  resize: vertical;
  line-height: 1.65;
  padding: 0.75rem 1rem;
}

#scrollable_content textarea.admin-textarea--compact {
  min-height: 3.25rem;
}

/* ??????? ? ????? ? ???????? ????? ?? ??? ????? */
.kt-btn {
  gap: 0.5rem;
  line-height: 1.5;
  align-items: center;
}

.kt-btn > i[class*='ki-'] {
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ???? ??????? ? ???????? ??????? */
#sidebar_primary_menu .kt-menu-title {
  line-height: 1.55;
  letter-spacing: 0;
}

#sidebar_primary_menu .kt-menu-link {
  align-items: center;
}

#sidebar_primary_menu .kt-menu-icon {
  align-items: center;
  line-height: 1;
}

/* صفحات پروفایل (کاربر / هتل‌دار) — سایدبار + تب محتوا */
.admin-profile-layout {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.admin-profile-sidebar {
  position: sticky;
  top: 1rem;
}

.admin-profile-sidebar .kt-card {
  overflow: hidden;
}

.admin-profile-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 !important;
}

.admin-profile-nav__hero {
  padding: 1.25rem 1rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in oklab, var(--primary) 6%, transparent) 0%, transparent 100%);
}

.admin-profile-nav__avatar {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 0.75rem;
  border-radius: 9999px;
  background: color-mix(in oklab, var(--primary) 14%, var(--background));
  color: var(--primary);
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1;
}

.admin-profile-nav__name {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--foreground);
  word-break: break-word;
}

.admin-profile-nav__meta {
  margin: 0.375rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--secondary-foreground);
}

.admin-profile-nav__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.375rem;
  margin-top: 0.625rem;
}

.admin-profile-nav__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
}

.admin-profile-nav__stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  background: var(--muted);
  min-width: 0;
}

.admin-profile-nav__stat-label {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  line-height: 1.45;
  font-weight: 500;
}

.admin-profile-nav__stat-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.45;
  word-break: break-word;
}

.admin-profile-nav__actions {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.5rem;
  max-height: min(52vh, 28rem);
  overflow-y: auto;
}

.admin-profile-nav__tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.5625rem 0.875rem;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--secondary-foreground);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: start;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.admin-profile-nav__tab i {
  font-size: 1rem;
  opacity: 0.85;
  flex-shrink: 0;
}

.admin-profile-nav__tab:hover {
  background: var(--muted);
  color: var(--foreground);
}

.admin-profile-nav__tab.is-active {
  background: color-mix(in oklab, var(--primary) 12%, var(--background));
  color: var(--primary);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--primary);
}

.admin-profile-main .kt-card {
  min-height: 100%;
}

.admin-profile-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.admin-profile-panel__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.admin-profile-panel__title {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--foreground);
}

.admin-profile-panel__desc {
  margin: 0.375rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--secondary-foreground);
}

.admin-profile-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-profile-panel__body {
  flex: 1;
  min-width: 0;
}

.admin-profile-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: linear-gradient(135deg, color-mix(in oklab, var(--primary) 8%, var(--background)) 0%, var(--muted) 100%);
  max-width: 22rem;
}

.admin-profile-stat-card__label {
  font-size: 0.8125rem;
  color: var(--secondary-foreground);
}

.admin-profile-stat-card__value {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.35;
}

/* ── تنظیمات سایت ── */
.admin-settings-panel {
  min-height: auto !important;
}
.admin-settings-panel .admin-form {
  max-width: none;
}
.admin-settings-nav {
  padding: 0.625rem !important;
  max-height: none;
  overflow: visible;
}
.admin-settings-nav .admin-profile-nav__tab {
  align-items: flex-start;
  min-height: 3.25rem;
  padding: 0.75rem 0.875rem;
}
.admin-settings-nav__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}
.admin-settings-nav__label {
  font-size: 0.875rem;
  font-weight: inherit;
  line-height: 1.4;
}
.admin-settings-nav__desc {
  /* متن فارسی در ۱۱ پیکسل خوانا نیست */
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--muted-foreground);
}
.admin-settings-nav .admin-profile-nav__tab.is-active .admin-settings-nav__desc {
  color: color-mix(in oklab, var(--primary) 70%, var(--muted-foreground));
}

.admin-ip-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 42rem;
}
.admin-ip-panel__status {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}
.admin-ip-panel__status--off {
  background: color-mix(in oklab, var(--muted) 45%, var(--background));
}
.admin-ip-panel__status--on {
  background: color-mix(in oklab, var(--color-green-100) 55%, var(--background));
  border-color: color-mix(in oklab, var(--color-green-700) 25%, var(--border));
}
.admin-ip-panel__status-icon {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  flex-shrink: 0;
  font-size: 1.125rem;
}
.admin-ip-panel__status--off .admin-ip-panel__status-icon {
  background: color-mix(in oklab, var(--muted) 70%, var(--background));
  color: var(--secondary-foreground);
}
.admin-ip-panel__status--on .admin-ip-panel__status-icon {
  background: color-mix(in oklab, var(--color-green-600) 14%, var(--background));
  color: var(--color-green-700);
}
.admin-ip-panel__status-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--foreground);
}
.admin-ip-panel__status-text {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: var(--secondary-foreground);
}
.admin-ip-panel__info {
  padding: 0.875rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid color-mix(in oklab, var(--primary) 18%, var(--border));
  background: color-mix(in oklab, var(--primary) 5%, var(--background));
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--secondary-foreground);
}
.admin-ip-panel__info p {
  margin: 0;
}
.admin-ip-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-ip-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 2rem 1.25rem;
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
  background: color-mix(in oklab, var(--muted) 30%, var(--background));
  text-align: center;
}
.admin-ip-empty i {
  font-size: 1.75rem;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}
.admin-ip-empty__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
}
.admin-ip-empty__hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--secondary-foreground);
  line-height: 1.55;
}

.admin-ip-list {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--background);
}
.admin-ip-list__head {
  display: none;
}
.admin-ip-list__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) auto;
  gap: 0.625rem;
  align-items: end;
  padding: 0.875rem 1rem;
  border-top: 1px solid var(--border);
}
.admin-ip-list__row:first-of-type {
  border-top: none;
}
.admin-ip-list__field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}
.admin-ip-list__label {
  font-size: 0.75rem;
  color: var(--secondary-foreground);
}
.admin-ip-list__remove {
  margin-bottom: 0.125rem;
}

@media (min-width: 640px) {
  .admin-ip-list__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) 2.5rem;
    gap: 0.625rem;
    padding: 0.625rem 1rem;
    background: color-mix(in oklab, var(--muted) 40%, var(--background));
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--secondary-foreground);
  }
  .admin-ip-list__head-action {
    text-align: center;
  }
}

@media (max-width: 639px) {
  .admin-ip-list__row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .admin-ip-list__field:last-of-type {
    grid-column: 1 / -1;
  }
}

/* ویرایشگر هدر / فوتر / آب‌وهوا (بدون JSON) */
.admin-form--stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-chrome-panel {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  background: var(--muted);
}

.admin-chrome-panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-chrome-panel__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--foreground);
}

.admin-chrome-panel__hint {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--secondary-foreground);
}

.admin-chrome-empty {
  padding: 1rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 0.75rem;
  background: var(--background);
  color: var(--secondary-foreground);
  font-size: 0.8125rem;
}

.admin-chrome-list,
.admin-chrome-columns {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-chrome-list__row {
  display: grid;
  grid-template-columns: auto minmax(8rem, 0.9fr) minmax(10rem, 1.2fr) auto;
  gap: 0.625rem;
  align-items: end;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--background);
}

.admin-chrome-list__row--nested {
  background: color-mix(in srgb, var(--background) 92%, var(--muted));
}

.admin-chrome-list__row:has(.admin-chrome-list__field--href) {
  grid-template-columns: auto minmax(8rem, 0.8fr) minmax(9rem, 1fr) minmax(8rem, 1fr) auto;
}

.admin-chrome-list__ord {
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
}

.admin-chrome-list__field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-chrome-list__label {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--secondary-foreground);
}

.admin-chrome-list__remove {
  margin-bottom: 0.125rem;
}

.admin-chrome-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.875rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--background);
}

.admin-chrome-column__head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.625rem;
}

.admin-chrome-column__head .grow {
  flex: 1 1 12rem;
}

.admin-chrome-column__links {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding-inline-start: 0.25rem;
}

.admin-chrome-weather-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.75rem 0.875rem;
  border-radius: 0.625rem;
  background: var(--muted);
  font-size: 0.8125rem;
  font-weight: 700;
}

.admin-chrome-weather-preview span {
  color: var(--foreground);
}

@media (max-width: 900px) {
  .admin-chrome-list__row,
  .admin-chrome-list__row:has(.admin-chrome-list__field--href) {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .admin-chrome-list__field--page,
  .admin-chrome-list__field--href {
    grid-column: 1 / -1;
  }
}

.admin-note-compose {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--muted);
}

.admin-note-card {
  padding: 1rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--background);
}

.admin-note-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}

.admin-note-card__author {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.admin-note-card__time {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--secondary-foreground);
  margin-inline-start: 0.5rem;
}

.admin-note-card__body {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--foreground);
  white-space: pre-wrap;
}

.admin-form-grid {
  display: grid;
  gap: 1rem 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-form-grid--single {
  grid-template-columns: 1fr;
  max-width: 36rem;
}

.admin-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.admin-form-field.span-2 {
  grid-column: 1 / -1;
}

.admin-form-field__label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--secondary-foreground);
  line-height: 1.45;
}

.admin-form-field__required {
  color: var(--destructive);
}

.admin-form-field__hint {
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--muted-foreground);
}

.admin-form-field__error {
  margin: 0;
  font-size: 0.8438rem;
  line-height: 1.45;
  color: var(--destructive);
}

.admin-form-control {
  width: 100%;
  min-width: 0;
}

.admin-form-control .kt-input,
.admin-form-control textarea.kt-input,
.admin-form-control .toman-input-wrap,
.admin-form-control .searchable-select {
  width: 100%;
}

.admin-form .kt-input:not(textarea),
.admin-form-control .kt-input:not(textarea) {
  min-height: 2.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.625rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-form .kt-input:focus,
.admin-form-control .kt-input:focus {
  outline: none;
  border-color: color-mix(in oklab, var(--primary) 55%, var(--border));
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 12%, transparent);
}

.admin-form-toggle {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  background: var(--muted);
  cursor: pointer;
  user-select: none;
}

.admin-form-toggle input {
  flex-shrink: 0;
}

.admin-form-toggle__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.admin-form-toggle__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.admin-form-toggle__sub {
  font-size: 0.75rem;
  color: var(--secondary-foreground);
  line-height: 1.5;
}

.admin-form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.admin-form-alert {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.admin-form-alert.is-error {
  color: var(--destructive);
}

.admin-form-alert.is-success {
  color: var(--success, #16a34a);
}

.admin-role-dept-panel {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 0.375rem);
  background: var(--muted);
}

.admin-role-dept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem 1rem;
}

.admin-role-dept-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

/* ——— Reservation detail ——— */
.reservation-detail-code {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  word-break: break-all;
}

.reservation-detail-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.reservation-detail-grid .span-2 {
  grid-column: 1 / -1;
}

.reservation-detail-section-title {
  margin: 0 0 1rem;
  padding-bottom: 0.625rem;
  border-bottom: 2px solid var(--border);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--foreground);
}

.reservation-detail-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: 0.875rem;
  padding: 1.125rem 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: color-mix(in oklab, var(--primary) 6%, var(--background));
}

.reservation-detail-summary__item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.reservation-detail-summary__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--secondary-foreground);
  line-height: 1.4;
}

.reservation-detail-summary__value {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.45;
  color: var(--foreground);
  word-break: break-word;
}

.reservation-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.reservation-detail-row {
  display: grid;
  grid-template-columns: minmax(6.5rem, 38%) 1fr;
  gap: 0.75rem 1rem;
  align-items: baseline;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.reservation-detail-row:last-child {
  border-bottom: 0;
}

.reservation-detail-row__label {
  color: var(--secondary-foreground);
  font-size: 0.875rem;
  font-weight: 500;
}

.reservation-detail-row__value {
  text-align: start;
  font-weight: 600;
  color: var(--foreground);
  word-break: break-word;
}

.reservation-detail-postal {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.reservation-detail-postal:last-child {
  border-bottom: 0;
}

.reservation-detail-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reservation-detail-timeline__item {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 0.375rem);
}

.reservation-detail-timeline__time {
  font-size: 0.875rem;
  color: var(--secondary-foreground);
}

@media (max-width: 640px) {
  .reservation-detail-timeline__item {
    grid-template-columns: 1fr;
    gap: 0.375rem;
  }
}

@media (max-width: 991px) {
  .admin-profile-layout {
    grid-template-columns: 1fr;
  }

  .admin-profile-sidebar {
    position: static;
  }

  .admin-profile-nav__actions {
    flex-direction: row;
    flex-wrap: nowrap;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.625rem;
    scrollbar-width: thin;
  }

  .admin-profile-nav__tab {
    flex-shrink: 0;
    width: auto;
    white-space: nowrap;
    box-shadow: none;
  }

  .admin-profile-nav__tab.is-active {
    box-shadow: none;
    border: 1px solid color-mix(in oklab, var(--primary) 35%, transparent);
  }
}

@media (max-width: 639px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

  .admin-form-field.span-2 {
    grid-column: auto;
  }

  .admin-profile-nav__stats {
    grid-template-columns: 1fr;
  }
}

/* ?????? ????? ??? ? ???????? ????? ????? ???? max-width ???? demo6 */
.admin-page-container {
  width: 100%;
  max-width: none !important;
  margin-inline: 0 !important;
  padding-inline: clamp(0.75rem, 1.5vw, 1.25rem);
}

/*
 * ?????? ????? ???? ? body ?? ?????? overflow:hidden ????? ???
 * #scrollable_content ???? ?????? ?????. ???? min-h-0 ??? ?????? flex?
 * ??? ?????? ?? ????? ?? ?????? ? ????? ?????? ?????? ???????.
 */
#root {
  min-height: 0;
}

#scrollable_content {
  min-height: 0;
  overscroll-behavior: contain;
}

/* ???? ??????? ? ?????? ???? (???? ??? ???? ?? RTL) */
#sidebar_primary_menu .kt-menu-item.active > .kt-menu-link {
  position: relative;
  background: var(--background);
  border-color: var(--border);
  font-weight: 600;
}

#sidebar_primary_menu .kt-menu-item.active > .kt-menu-link::before {
  content: '';
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  inset-inline-start: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}

#sidebar_primary_menu .kt-menu-item.here > .kt-menu-link,
#sidebar_primary_menu .kt-menu-item.show > .kt-menu-link {
  background: color-mix(in oklab, var(--primary) 6%, var(--background));
  border-color: color-mix(in oklab, var(--primary) 18%, var(--border));
}

#sidebar_primary_menu .kt-menu-accordion .kt-menu-item.active > .kt-menu-link::before {
  inset-inline-start: 0.25rem;
  width: 2px;
}
@media (min-width: 1024px) {
  .admin-page-container {
    padding-inline: clamp(1rem, 2vw, 1.5rem);
  }
}

/* جدول‌های Metronic — خط جداکننده عمودی/افقی بین همه سلول‌ها (ادمین) */
.kt-card-table table.kt-table,
.kt-table.kt-table-border,
.admin-data-table .admin-data-table-el,
.admin-dash-table,
.tour-data-table,
.admin-perm-table {
  border-collapse: collapse !important;
  width: 100%;
}

.kt-card-table table.kt-table th,
.kt-card-table table.kt-table td,
.kt-table.kt-table-border th,
.kt-table.kt-table-border td,
.kt-card-table .kt-table-border th,
.kt-card-table .kt-table-border td,
.admin-data-table .admin-data-table-el th,
.admin-data-table .admin-data-table-el td,
.admin-dash-table th,
.admin-dash-table td,
.tour-data-table th,
.tour-data-table td,
.admin-perm-table th,
.admin-perm-table td {
  border-inline-end: 1px solid var(--border, #e2e8f0) !important;
  border-block-end: 1px solid var(--border, #e2e8f0) !important;
  vertical-align: middle;
}

.kt-card-table table.kt-table th:last-child,
.kt-card-table table.kt-table td:last-child,
.kt-table.kt-table-border th:last-child,
.kt-table.kt-table-border td:last-child,
.kt-card-table .kt-table-border th:last-child,
.kt-card-table .kt-table-border td:last-child,
.admin-data-table .admin-data-table-el th:last-child,
.admin-data-table .admin-data-table-el td:last-child,
.admin-dash-table th:last-child,
.admin-dash-table td:last-child,
.tour-data-table th:last-child,
.tour-data-table td:last-child,
.admin-perm-table th:last-child,
.admin-perm-table td:last-child {
  border-inline-end-width: 0 !important;
}

.kt-card-table table.kt-table tbody tr:last-child td,
.kt-table.kt-table-border tbody tr:last-child td,
.kt-card-table .kt-table-border tbody tr:last-child td,
.admin-data-table .admin-data-table-el tbody tr:last-child td,
.admin-dash-table tbody tr:last-child td,
.tour-data-table tbody tr:last-child td,
.admin-perm-table tbody tr:last-child td {
  border-block-end-width: 0 !important;
}

.kt-card-table table.kt-table thead th,
.kt-table.kt-table-border thead th,
.kt-card-table .kt-table-border thead th,
.admin-data-table .admin-data-table-el thead th,
.admin-dash-table thead th,
.tour-data-table thead th,
.admin-perm-table thead th {
  background: color-mix(in oklab, var(--muted, #f1f5f9) 70%, transparent);
  font-weight: 600;
}

/* ???????? ???? ? ???? flex ?????? ??? td ??????? (????? ?? ???? ??????) */
.admin-data-table-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.admin-data-table-mobile {
  display: none;
}

.admin-data-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--background);
}
.admin-data-card + .admin-data-card {
  margin-top: 0.75rem;
}
.admin-data-card-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.5;
}
.admin-data-card-fields {
  display: grid;
  gap: 0.625rem;
  margin: 0;
}
.admin-data-card-field {
  display: grid;
  gap: 0.2rem;
}
.admin-data-card-field dt {
  margin: 0;
  font-size: 0.75rem;
  color: var(--secondary-foreground);
}
.admin-data-card-field dd {
  margin: 0;
  font-size: 0.875rem;
  color: var(--foreground);
  line-height: 1.5;
  word-break: break-word;
}
.admin-data-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}
.admin-data-card--skeleton {
  gap: 0.625rem;
}
.admin-data-table-mobile-status {
  margin: 0;
  padding: 1.5rem 0.5rem;
  text-align: center;
  font-size: 0.875rem;
}
.admin-data-table-mobile-skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
}

@media (max-width: 767px) {
  .admin-data-table--cards .admin-data-table-desktop {
    display: none;
  }
  .admin-data-table--cards .admin-data-table-mobile {
    display: block;
    padding: 0.75rem;
  }
}

/* ???? ???????? ??? ??????? (RichTextEditor.tsx) ? ????? ?? kt-input
   ??????? ???????? ??? ?? ???? ?? ????? ?????? ?? ?????? ???? (??px)
   ? ???? overflow:hidden ???? ?????? ????? (????????? ????? ????) ??
   ????? ????? ?????. ??? ???? ????? ???? kt-input ??? ??? ?? ????
   ????? ????? ?? ???????????? ???. */
.rich-text-editor-body {
  display: block;
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--input);
  border-radius: calc(var(--radius) - 2px);
  background-color: var(--background);
  color: var(--foreground);
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.6;
}
.rich-text-editor-body:focus {
  outline: none;
  border-color: var(--primary);
}
.rich-text-editor-body img,
.rich-text-editor-body video {
  max-width: 100%;
}
.rich-text-editor-body p.is-editor-empty:first-child::before {
  content: attr(data-placeholder);
  color: var(--muted-foreground);
  float: right;
  height: 0;
  pointer-events: none;
}

/* ???? Tailwind ??????/??? ?????? ?? ??? ??????? ????? ????? ??????????
   ????? ?????? �???? ?..?� ??? ????? ?????? ??? ??? ???????. */
.rich-text-editor-body h1 { font-size: 1.875rem; font-weight: 700; margin: 0.6em 0 0.3em; }
.rich-text-editor-body h2 { font-size: 1.5rem; font-weight: 700; margin: 0.6em 0 0.3em; }
.rich-text-editor-body h3 { font-size: 1.25rem; font-weight: 600; margin: 0.6em 0 0.3em; }
.rich-text-editor-body h4 { font-size: 1.125rem; font-weight: 600; margin: 0.6em 0 0.3em; }
.rich-text-editor-body h5 { font-size: 1rem; font-weight: 600; margin: 0.6em 0 0.3em; }
.rich-text-editor-body h6 { font-size: 0.9rem; font-weight: 600; margin: 0.6em 0 0.3em; }
.rich-text-editor-body p { margin: 0.4em 0; }
.rich-text-editor-body ul { list-style: disc; padding-inline-start: 1.5rem; margin: 0.4em 0; }
.rich-text-editor-body ol { list-style: decimal; padding-inline-start: 1.5rem; margin: 0.4em 0; }
.rich-text-editor-body blockquote {
  border-inline-start: 3px solid var(--border);
  padding-inline-start: 0.75rem;
  color: var(--secondary-foreground);
  margin: 0.5em 0;
}
.rich-text-editor-body a { color: var(--primary); text-decoration: underline; }
.rich-text-editor-body strong { font-weight: 700; }
.rich-text-editor-body em { font-style: italic; }
.rich-text-editor-body u { text-decoration: underline; }
.rich-text-editor-body s { text-decoration: line-through; }
.rich-text-editor-body mark { background: #fef08a; padding: 0 0.15em; }
/* ?????/?????? ????? ????? ?? ???? ???????? ????? ???? */
.rich-text-editor-body::after { content: ''; display: block; clear: both; }

/* ???? ?????? ????? (?????/????) ? HotelMediaTab */
.upload-progress-track {
  height: 8px;
  border-radius: 999px;
  background-color: var(--border);
  overflow: hidden;
}
.upload-progress-fill {
  height: 100%;
  border-radius: 999px;
  background-color: var(--primary);
  transition: width 0.15s ease;
}
.upload-progress-fill.is-indeterminate {
  width: 35% !important;
  animation: upload-progress-slide 1.1s ease-in-out infinite;
}
@keyframes upload-progress-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* ??? ????? ??? ? ????????? ?? ????? ?? ??? ????? */
.hotel-warning-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #fff9f0;
  border-inline-end: 4px solid #a0522d;
  border-radius: 0.5rem;
  color: #8b4513;
  font-size: 0.875rem;
  line-height: 1.75;
  text-align: start;
}
.hotel-warning-alert svg {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
  color: #a0522d;
}

.neshan-map-picker {
  height: 360px;
  width: 100%;
  border-radius: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--border);
}

/* ????????? ?????? ????? ??? ? HotelMediaTab
   Metronic ???? object-cover ?????? ???? object-fit ????? ?? ??? ?? ??????. */
.hotel-media-preview {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background-color: var(--muted);
}
.hotel-media-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hotel-media-preview__remove {
  position: absolute;
  top: 0.25rem;
  inset-inline-start: 0.25rem;
  z-index: 1;
}

.hotel-media-upload-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem;
}
.hotel-media-upload-row__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.hotel-media-upload-row__remove {
  flex-shrink: 0;
  margin-top: 0.125rem;
}
.hotel-media-upload-modal {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.hotel-media-upload-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 420px;
  overflow-y: auto;
}
.hotel-media-upload-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}
.hotel-media-upload-thumb {
  flex-shrink: 0;
  overflow: hidden;
  width: 120px;
  aspect-ratio: 4 / 3;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background-color: var(--muted);
}
.hotel-media-upload-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hotel-media-upload-filename {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--secondary-foreground);
  font-family: ui-monospace, monospace;
}

/* ?????? ??? ???/???? ? ?? ???????? ???????? ???? */
.kt-card-header:has(> .hotel-form-tabs) {
  display: block;
  padding: 0;
  border-bottom: none;
  min-height: 0;
}
.hotel-form-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: 'IranYekan', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.hotel-form-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--secondary-foreground);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.hotel-form-tab:hover:not(:disabled):not(.is-active) {
  background: var(--muted);
  color: var(--foreground);
}
.hotel-form-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
}
.hotel-form-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.hotel-form-tab .ki-filled {
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.92;
}
.hotel-form-tab span {
  white-space: nowrap;
}

/* ??? ??? ? ?????? ????????????? ??? ??????? ???????? ?????? */
.tour-form-card {
  overflow: hidden;
}
.tour-form-setup-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  margin: 1rem 1rem 0;
  padding: 0.875rem 1rem;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  border-radius: 0.625rem;
  background: color-mix(in srgb, var(--primary) 8%, var(--card));
  color: var(--foreground);
  font-size: 0.875rem;
  line-height: 1.55;
}
.tour-form-setup-banner > .ki-filled {
  flex-shrink: 0;
  margin-top: 0.125rem;
  font-size: 1.25rem;
  color: var(--primary);
}
.tour-form-setup-banner strong {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}
.tour-form-setup-banner p {
  margin: 0;
  color: var(--secondary-foreground);
}
.tour-form-tabs-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--card);
}
.tour-form-tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}
.tour-form-tab {
  flex-shrink: 0;
  min-height: 2.5rem;
}
.tour-form-tab.is-locked {
  opacity: 0.72;
  border-style: dashed;
  border-color: var(--border);
}
.tour-form-tab.is-locked:not(.is-active):hover {
  background: color-mix(in srgb, var(--muted) 80%, transparent);
}
.tour-form-tab__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  background: color-mix(in srgb, currentColor 12%, transparent);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
}
.tour-form-tab.is-active .tour-form-tab__step {
  background: color-mix(in srgb, var(--primary-foreground) 22%, transparent);
}
.tour-form-tab__label {
  white-space: nowrap;
}
.tour-form-tab__lock {
  font-size: 0.75rem;
  opacity: 0.75;
}
.tour-form-basic {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem 1.25rem 1.5rem;
}
.tour-form-section {
  margin: 0;
  padding: 1rem 1rem 1.125rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  background: color-mix(in srgb, var(--muted) 35%, var(--card));
}
.tour-form-section legend {
  padding: 0 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}
.tour-form-basic__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.625rem;
  padding-top: 0.25rem;
}
.tour-form-tab-panel {
  display: flex;
  flex-direction: column;
  min-height: 18rem;
}
.tour-form-tab-panel__header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--muted) 40%, var(--card));
}
.tour-form-tab-panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
}
.tour-form-tab-panel__desc {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--secondary-foreground);
}
.tour-form-tab-panel__body {
  padding: 1.25rem;
}
.tour-form-tab-panel__body > .flex.flex-col {
  padding: 0 !important;
}
.tour-form-tab-panel__body .tour-data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}
.tour-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.tour-data-table th,
.tour-data-table td {
  padding: 0.625rem 0.75rem;
  text-align: right;
}
.tour-data-table th {
  color: var(--secondary-foreground);
  white-space: nowrap;
}
.tour-form-tab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.jalali-date-picker.is-disabled .jalali-date-picker-trigger {
  opacity: 0.6;
  cursor: not-allowed;
}
.jalali-date-picker-panel {
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.14);
}

/* ????? ???? ????? ? ??? LTR? ????? �?????� ??? ?? (inline-end ?? RTL) */
.toman-input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}
.toman-input-field {
  flex: 1;
  width: 100%;
  direction: ltr;
  text-align: right;
  font-variant-numeric: tabular-nums;
  /* �?????� visually on the left ? pad left only; right pad was causing empty gap */
  padding-left: 4.25rem !important;
  padding-right: 0.75rem !important;
}
.toman-input-suffix {
  position: absolute;
  left: 0.75rem;
  right: auto;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--secondary-foreground);
  pointer-events: none;
  white-space: nowrap;
}

/* ?????? ???? ???? ? ????????? ? ????? ???? ????? ???? */
.table-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.625rem;
}
.table-row-actions-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
}
.table-row-actions-sep {
  flex-shrink: 0;
  width: 1px;
  height: 1.625rem;
  background: var(--border);
  margin-inline: 0.125rem;
}
.table-row-actions .kt-btn-sm {
  gap: 0.375rem;
  white-space: nowrap;
}
.table-row-actions-danger {
  border-color: rgb(254 202 202);
  color: rgb(185 28 28);
  background: rgb(254 242 242);
}
.table-row-actions-danger:hover {
  border-color: rgb(248 113 113);
  background: rgb(254 226 226);
  color: rgb(153 27 27);
}
.table-row-actions-muted {
  color: var(--secondary-foreground);
}

/* ????? ????? ??? */
.confirm-dialog-root {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  font-family: 'IranYekan', ui-sans-serif, system-ui, sans-serif;
}
.confirm-dialog-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgb(15 23 42 / 0.45);
  backdrop-filter: blur(2px);
  cursor: pointer;
  animation: confirm-dialog-fade-in 0.2s ease-out;
}
.confirm-dialog-card {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--background);
  box-shadow: 0 24px 48px rgb(15 23 42 / 0.18);
  padding: 1.5rem 1.5rem 1.25rem;
  text-align: center;
  animation: confirm-dialog-scale-in 0.24s ease-out;
}
.confirm-dialog-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-inline: auto;
  margin-bottom: 0.875rem;
  border-radius: 9999px;
  background: rgb(254 242 242);
  color: rgb(220 38 38);
}
.confirm-dialog-icon svg {
  width: 1.625rem;
  height: 1.625rem;
}
.confirm-dialog-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--foreground);
  line-height: 1.5;
}
.confirm-dialog-message {
  margin: 0.625rem 0 0;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--secondary-foreground);
}
.confirm-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 1.25rem;
}
.confirm-dialog-icon-primary {
  background: rgb(236 253 245);
  color: rgb(5 150 105);
}
.confirm-dialog-btn-danger {
  background: rgb(220 38 38);
  border-color: rgb(220 38 38);
  color: #fff;
  gap: 0.375rem;
}
.confirm-dialog-btn-danger:hover {
  background: rgb(185 28 28);
  border-color: rgb(185 28 28);
  color: #fff;
}
.confirm-dialog-btn-primary {
  background: rgb(5 150 105);
  border-color: rgb(5 150 105);
  color: #fff;
  gap: 0.375rem;
}
.confirm-dialog-btn-primary:hover {
  background: rgb(4 120 87);
  border-color: rgb(4 120 87);
  color: #fff;
}
@keyframes confirm-dialog-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes confirm-dialog-scale-in {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ????? ?????? ? ???? ???? ?? */
.operation-alert {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  box-shadow: 0 10px 30px rgb(15 23 42 / 0.12);
  font-family: 'IranYekan', ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
  animation: operation-alert-in 0.28s ease-out;
}
.operation-alert--success {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}
.operation-alert--error {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}
.operation-alert-icon {
  display: flex;
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
}
.operation-alert-text {
  margin: 0;
  flex: 1;
  font-weight: 500;
}
.operation-alert-close {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.operation-alert-close:hover {
  opacity: 1;
}
@keyframes operation-alert-in {
  from {
    opacity: 0;
    transform: translateY(-0.5rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ????? ? z-index ? backdrop ???????? ?? ???????? absolute ???? ??? ???? ????? */
.kt-modal.open {
  z-index: 1000;
}
.kt-modal-backdrop {
  z-index: 0;
  background-color: rgb(0 0 0 / 0.55) !important;
}
.kt-modal-content {
  position: relative;
  z-index: 1;
}

/* ??? ?????? ??????? ??? ??? */
#root {
  width: 100%;
  min-height: 100vh;
  flex-direction: column;
}

.panel-page-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 2rem 1rem;
  box-sizing: border-box;
  background: color-mix(in oklab, var(--background) 88%, var(--muted));
}
.panel-page-loader-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  width: min(100%, 320px);
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--background);
  box-shadow: 0 10px 40px rgb(0 0 0 / 0.06);
  animation: panel-loader-in 0.35s ease;
}
.panel-page-loader-brand {
  position: relative;
  width: 4rem;
  height: 4rem;
  display: grid;
  place-items: center;
}
.panel-page-loader-logo {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  background: var(--primary);
  color: var(--primary-foreground);
  font-size: 1.25rem;
  font-weight: 700;
  z-index: 1;
}
.panel-page-loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 2px solid transparent;
  border-top-color: var(--primary);
  border-right-color: color-mix(in oklab, var(--primary) 35%, transparent);
  animation: panel-loader-spin 0.85s linear infinite;
}
.panel-page-loader-title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--foreground);
}
.panel-page-loader-sub {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--secondary-foreground);
}
.panel-page-loader-bars {
  display: flex;
  gap: 0.375rem;
  width: 100%;
  margin-top: 0.25rem;
}
.panel-page-loader-bars span {
  flex: 1;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--muted);
  animation: panel-loader-bar 1.1s ease-in-out infinite;
}
.panel-page-loader-bars span:nth-child(2) {
  animation-delay: 0.15s;
}
.panel-page-loader-bars span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes panel-loader-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes panel-loader-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes panel-loader-bar {
  0%,
  100% {
    opacity: 0.45;
    transform: scaleY(0.85);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
}

/* ??????? ???? */
.table-skeleton-row td {
  padding-block: 0.875rem !important;
}
.table-skeleton-cell {
  display: block;
  height: 0.75rem;
  border-radius: 0.375rem;
  background: linear-gradient(
    90deg,
    var(--muted) 0%,
    color-mix(in oklab, var(--muted) 65%, var(--background)) 50%,
    var(--muted) 100%
  );
  background-size: 200% 100%;
  animation: table-skeleton-shimmer 1.25s ease-in-out infinite;
}
@keyframes table-skeleton-shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

/* ???? ?????? ????? refetch ????? */
.kt-card-table {
  position: relative;
}
.kt-card-table.is-fetching::before {
  content: '';
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  z-index: 2;
  background: linear-gradient(
    90deg,
    transparent,
    var(--primary),
    transparent
  );
  background-size: 200% 100%;
  animation: panel-fetch-bar 1s linear infinite;
  pointer-events: none;
}
@keyframes panel-fetch-bar {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ???? ??? ????? */
.clear-filters-btn {
  align-self: flex-end;
  white-space: nowrap;
  color: var(--destructive);
  border-color: color-mix(in oklab, var(--destructive) 35%, var(--border));
}
.clear-filters-btn:hover {
  background: color-mix(in oklab, var(--destructive) 8%, var(--background));
  border-color: var(--destructive);
  color: var(--destructive);
}

/* ?? ??? ???? ? ??????? ?? ??? ??? (Metronic / kt-input ?????????) ?? */
.room-form-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  width: 100%;
  box-sizing: border-box;
}

.room-form-section-full {
  width: 100%;
}

.room-form-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .room-form-split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }
}

.room-form-alert {
  margin: 0;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 40%, var(--background));
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--secondary-foreground);
}

.room-form-section {
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  background: var(--background);
  overflow: hidden;
}

.room-form-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 45%, var(--background));
}

.room-form-section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
  border-radius: 0.375rem;
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--primary);
}

.room-form-section-icon .ki-filled {
  font-size: 0.875rem;
  line-height: 1;
}

.room-form-section-heading {
  min-width: 0;
  flex: 1;
}

.room-form-section-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--foreground);
}

.room-form-section-desc {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--secondary-foreground);
}

.room-form-section-body {
  padding: 1rem;
}

.room-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  width: 100%;
}

@media (min-width: 640px) {
  .room-form-grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-form-grid-cols-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-form-grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .room-form-grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .room-form-grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.room-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  min-width: 0;
}

.room-form-field-full {
  grid-column: 1 / -1;
}

.room-form-control {
  width: 100%;
}

.room-form-control .kt-input,
.room-form-control select.kt-input,
.room-form-control .toman-input-wrap {
  width: 100%;
}

.room-form-label {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--secondary-foreground);
  line-height: 1.35;
}

.room-form-required {
  margin-inline-start: 0.15rem;
  color: var(--destructive);
}

.room-form-hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--secondary-foreground);
}

.room-form-error {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--destructive);
}

.room-form-check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 35%, var(--background));
}

.room-form-check-row label {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--secondary-foreground);
  cursor: pointer;
}

.room-form-discount-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 0.875rem;
  border-radius: 0.5rem;
  border: 1px dashed var(--border);
  background: color-mix(in oklab, var(--muted) 30%, var(--background));
}

@media (min-width: 640px) {
  .room-form-discount-box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .room-form-discount-box {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.room-form-preview {
  margin: 0;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: color-mix(in oklab, var(--primary) 8%, var(--background));
  color: var(--primary);
  border: 1px solid color-mix(in oklab, var(--primary) 20%, var(--border));
}

.room-form-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--background);
}

.room-form-footer-error {
  flex: 1;
  align-self: center;
  margin: 0;
  font-size: 0.8125rem;
  color: var(--destructive);
}

.hotel-context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 30%, var(--background));
  font-size: 0.875rem;
  line-height: 1.45;
}

.hotel-context-bar-muted {
  color: var(--secondary-foreground);
  background: var(--muted);
  border-color: var(--border);
}

.hotel-context-bar-main {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-width: 0;
  flex: 1;
}

.hotel-context-bar-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 0.375rem;
  background: var(--background);
  border: 1px solid var(--border);
  color: var(--primary);
}

.hotel-context-bar-icon .ki-filled {
  font-size: 0.9375rem;
  line-height: 1;
}

.hotel-context-bar-text {
  min-width: 0;
}

.hotel-context-bar-name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--foreground);
}

.hotel-context-bar-caption {
  margin: 0.2rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--secondary-foreground);
}

.hotel-context-bar-id-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  flex-shrink: 0;
  padding: 0.5rem 0.875rem;
  border-radius: 0.625rem;
  background: var(--background);
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px color-mix(in oklab, var(--foreground) 5%, transparent);
}

.hotel-context-bar-id-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--secondary-foreground);
  white-space: nowrap;
}

.hotel-context-bar-id {
  font-family: inherit;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
  unicode-bidi: plaintext;
  padding-inline: 0.125rem;
}

.hotel-context-bar-loading {
  justify-content: center;
}

.hotel-context-bar-skeleton {
  display: block;
  width: min(100%, 28rem);
  height: 2.75rem;
  margin-inline: auto;
  border-radius: 0.5rem;
  background: color-mix(in oklab, var(--muted) 80%, var(--background));
  animation: pulse 1.5s ease-in-out infinite;
}

.room-page-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 14rem;
  padding: 3rem 1.5rem;
}

.room-page-loading-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  width: 100%;
  max-width: 24rem;
  margin-inline: auto;
  text-align: center;
}

.room-page-loading-spinner {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  border: 3px solid color-mix(in oklab, var(--primary) 18%, var(--border));
  border-top-color: var(--primary);
  animation: room-page-spin 0.75s linear infinite;
}

.room-context-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 30%, var(--background));
}

.room-context-bar-name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
}

@keyframes room-page-spin {
  to {
    transform: rotate(360deg);
  }
}

.room-list-search {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.room-list-search .kt-input {
  max-width: none;
}

/* ???????? ??????? ? ???????? */
.room-form-section-full .room-form-section-body > .flex.flex-col {
  width: 100%;
}

.room-form-section-full .rich-text-editor-body,
.room-form-section-full .ProseMirror {
  min-height: 10rem;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* ???? ??? ? ????? ??? ??????? ???? ???????. ???? Metronic ???? success ?????. */
.kt-btn-success {
  border-color: var(--color-green-500);
  background-color: var(--color-green-500);
  color: var(--color-white);
}
.kt-btn-success:hover {
  background-color: var(--color-green-600, var(--color-green-500));
  border-color: var(--color-green-600, var(--color-green-500));
}

.room-form-tab-panel {
  min-height: 8rem;
  padding: 0 1.25rem 1.25rem;
}

/*
 * ????????? ???? ??? ?????.
 *
 * ??? ?? Tailwind ???? ????? ? styles.css ??? ?????? ???? ????????
 * utility ?? ??? ???? Metronic ??????? ???? ?? ????? ?? sm:/md:/lg:
 * ??? grid-cols/hidden/flex-row ? ????? ????? ??????? ????? ???????
 * ???? ? ??? ?? JSX ????? ???? ????????. ??????: ??? ???????? ????
 * (grid-cols-2, grid-cols-3, ...) ?? ?? ???? ??????? ?? ??? ??
 * breakpoint ????? (?????? ?? @media) ???????? ??????? ? ??? ???
 * ????? ??? ??????? ????? ??? ????????? ???? ???? ?? ????? ????? ??????.
 */
@media (max-width: 767px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: 1fr;
  }

  /* ???????? kt-card-content ?? ??? ???? ?????? ????? (??????? ???????/?????) */
  .kt-card-content.flex-wrap > [style*='width'] {
    width: 100% !important;
    min-width: 0 !important;
  }

  .admin-page-container {
    padding-inline: 0.5rem;
  }

  /* ???????? DataTable ?? ?????? ???? ???????? ???? ?????? ???? ????????. */
  .kt-table th,
  .kt-table td {
    padding-inline: 0.5rem;
  }

  /* ??? ???? td ?? flex ?????? border ???? ???? */
  .kt-table > tbody > tr > td.flex {
    display: table-cell !important;
  }
  .kt-table > tbody > tr > td.flex > .kt-btn,
  .kt-table > tbody > tr > td.flex > a.kt-btn {
    display: inline-flex;
    margin-inline-end: 0.5rem;
    margin-block: 0.25rem;
  }
}

@media (max-width: 480px) {
  .kt-modal-content {
    width: calc(100vw - 1.5rem) !important;
    max-width: calc(100vw - 1.5rem) !important;
    inset-inline-start: 0.75rem !important;
  }
}

/* -----------------------------------------------------------
   فاکتور رسمی — مشاهده، چاپ A4 و PDF
   ----------------------------------------------------------- */
.no-print {
  /* در چاپ با @media print مخفی می‌شود */
}

.invoice-viewport {
  min-height: 100vh;
  height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

html.invoice-page-active,
html.invoice-page-active body {
  overflow: auto !important;
  height: auto !important;
  min-height: 100%;
}

html.invoice-page-active #root {
  min-height: 100vh;
  height: auto;
}

.invoice-toolbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(8px);
}

.invoice-toolbar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  max-width: 860px;
  margin-inline: auto;
  padding: 0.75rem 1rem;
}

.invoice-stage {
  padding: 1.5rem 1rem 2.5rem;
}

.invoice-paper {
  max-width: 210mm;
  margin-inline: auto;
}

.tax-invoice-sheet {
  color: #111827;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  box-shadow: 0 8px 30px rgb(15 23 42 / 0.08);
  font-family: 'IranYekan', Tahoma, ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  line-height: 1.65;
  overflow: visible;
}

.tax-invoice-sheet--loading {
  padding: 3rem;
  text-align: center;
  color: #64748b;
}

.tax-invoice-sheet__header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 2px solid #1d4ed8;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.tax-invoice-sheet__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.tax-invoice-sheet__logo {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.85rem;
  background: #1d4ed8;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
}

.tax-invoice-sheet__company {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.tax-invoice-sheet__subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

.tax-invoice-sheet__site-url {
  margin: 0.25rem 0 0;
  font-size: 0.68rem;
  color: #64748b;
}

.tax-invoice-sheet__meta {
  text-align: end;
}

.tax-invoice-sheet__meta h1 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.tax-invoice-sheet__meta dl {
  display: grid;
  gap: 0.25rem;
  margin: 0;
}

.tax-invoice-sheet__meta dl > div {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.tax-invoice-sheet__meta dt {
  margin: 0;
  color: #64748b;
}

.tax-invoice-sheet__meta dd {
  margin: 0;
  font-weight: 700;
  color: #0f172a;
}

.tax-invoice-sheet__parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #e2e8f0;
}

.tax-invoice-sheet__party {
  padding: 1rem 1.25rem;
}

.tax-invoice-sheet__party:first-child {
  border-inline-end: 1px solid #e2e8f0;
}

.tax-invoice-sheet__party h2,
.tax-invoice-sheet__lines h2,
.tax-invoice-sheet__settlements h2,
.tax-invoice-sheet__payment h2,
.tax-invoice-sheet__reservation h2 {
  margin: 0 0 0.75rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #64748b;
  text-transform: uppercase;
}

.tax-invoice-sheet__party dl,
.tax-invoice-sheet__reservation dl,
.tax-invoice-sheet__payment dl {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.tax-invoice-sheet__party dl > div,
.tax-invoice-sheet__reservation dl > div,
.tax-invoice-sheet__payment dl > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.5rem;
}

.tax-invoice-sheet__party dt,
.tax-invoice-sheet__reservation dt,
.tax-invoice-sheet__payment dt {
  margin: 0;
  color: #64748b;
}

.tax-invoice-sheet__party dd,
.tax-invoice-sheet__reservation dd,
.tax-invoice-sheet__payment dd {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
  word-break: break-word;
}

.tax-invoice-sheet__party-wide {
  grid-column: 1 / -1;
  display: grid !important;
  grid-template-columns: 5.5rem 1fr !important;
}

.tax-invoice-sheet__reservation {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.tax-invoice-sheet__reservation dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}

.tax-invoice-sheet__reservation dl > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tax-invoice-sheet__reservation .tax-invoice-sheet__party-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 0.5rem;
}

.tax-invoice-sheet__lines,
.tax-invoice-sheet__settlements {
  padding: 1rem 1.25rem;
}

.tax-invoice-sheet__table-wrap {
  overflow-x: auto;
}

.tax-invoice-sheet table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #cbd5e1;
}

.tax-invoice-sheet th,
.tax-invoice-sheet td {
  border: 1px solid #cbd5e1;
  padding: 0.5rem 0.45rem;
  vertical-align: top;
  text-align: start;
}

.tax-invoice-sheet thead th {
  background: #f1f5f9;
  font-size: 0.72rem;
  font-weight: 700;
  color: #334155;
}

.tax-invoice-sheet .col-row { width: 2.5rem; }
.tax-invoice-sheet .col-qty { width: 3.5rem; }
.tax-invoice-sheet .col-unit { width: 3.5rem; }
.tax-invoice-sheet .col-pct { width: 3.75rem; }
.tax-invoice-sheet .col-money { width: 6.75rem; white-space: nowrap; }

.tax-invoice-sheet__line-title {
  margin: 0;
  font-weight: 700;
  color: #0f172a;
}

.tax-invoice-sheet__line-meta {
  margin: 0.2rem 0 0;
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.55;
}

.tax-invoice-sheet__line-total {
  font-weight: 800;
}

.tax-invoice-sheet__bottom {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  align-items: start;
}

.tax-invoice-sheet__legal {
  font-size: 0.72rem;
  color: #64748b;
  line-height: 1.75;
}

.tax-invoice-sheet__legal p {
  margin: 0 0 0.45rem;
}

.tax-invoice-sheet__totals {
  margin: 0;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  overflow: hidden;
}

.tax-invoice-sheet__totals > div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid #e2e8f0;
}

.tax-invoice-sheet__totals > div:last-child {
  border-bottom: 0;
}

.tax-invoice-sheet__totals dt {
  margin: 0;
  color: #475569;
}

.tax-invoice-sheet__totals dd {
  margin: 0;
  font-weight: 700;
  text-align: end;
  color: #0f172a;
}

.tax-invoice-sheet__discount {
  color: #dc2626 !important;
}

.tax-invoice-sheet__payable {
  background: #eff6ff;
}

.tax-invoice-sheet__payable dt,
.tax-invoice-sheet__payable dd {
  color: #1d4ed8;
  font-size: 0.9rem;
  font-weight: 800;
}

.tax-invoice-sheet__words {
  flex-direction: column !important;
  align-items: flex-start !important;
  background: #f8fafc;
}

.tax-invoice-sheet__words dd {
  text-align: start !important;
  font-weight: 700;
  line-height: 1.7;
}

.tax-invoice-sheet__payment {
  padding: 0.85rem 1.25rem 1rem;
  border-top: 1px solid #e2e8f0;
}

.tax-invoice-sheet__payment dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem 1rem;
}

.tax-invoice-sheet__payment dl > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.tax-invoice-sheet__voucher {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  background: #f0fdf4;
}

.tax-invoice-sheet__voucher-title {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  color: #166534;
}

.tax-invoice-sheet__voucher-text {
  margin: 0.35rem 0 0;
  max-width: 34rem;
  font-size: 0.72rem;
  line-height: 1.7;
  color: #166534;
}

.tax-invoice-sheet__voucher-code {
  min-width: 8.5rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #bbf7d0;
  border-radius: 0.65rem;
  background: #ffffff;
  text-align: center;
}

.tax-invoice-sheet__voucher-code span {
  display: block;
  font-size: 0.68rem;
  color: #64748b;
}

.tax-invoice-sheet__voucher-code strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1rem;
  color: #0f172a;
}

.tax-invoice-sheet__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.tax-invoice-sheet__footer-main {
  flex: 1;
  min-width: 14rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.tax-invoice-sheet__site-contact h2 {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #64748b;
  text-transform: uppercase;
}

.tax-invoice-sheet__site-contact dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1rem;
  margin: 0;
}

.tax-invoice-sheet__site-contact dl > div {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.35rem;
}

.tax-invoice-sheet__site-contact dt {
  margin: 0;
  color: #64748b;
  font-size: 0.68rem;
}

.tax-invoice-sheet__site-contact dd {
  margin: 0;
  font-weight: 600;
  color: #0f172a;
  font-size: 0.72rem;
  word-break: break-word;
}

.tax-invoice-sheet__footer-main > p {
  max-width: 28rem;
  margin: 0;
  font-size: 0.68rem;
  line-height: 1.7;
  color: #94a3b8;
}

.tax-invoice-sheet__stamp {
  text-align: center;
}

.tax-invoice-sheet__stamp span {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.72rem;
  color: #64748b;
}

.tax-invoice-sheet__stamp div {
  width: 8rem;
  height: 4rem;
  border: 1px dashed #94a3b8;
  border-radius: 0.5rem;
}

.tax-invoice-sheet__closing {
  display: flex;
  flex-direction: column;
}

@media (max-width: 767px) {
  .tax-invoice-sheet__parties,
  .tax-invoice-sheet__bottom {
    grid-template-columns: 1fr;
  }

  .tax-invoice-sheet__party:first-child {
    border-inline-end: 0;
    border-bottom: 1px solid #e2e8f0;
  }

  .tax-invoice-sheet__reservation dl,
  .tax-invoice-sheet__payment dl {
    grid-template-columns: 1fr;
  }

  .tax-invoice-sheet__reservation dl > div,
  .tax-invoice-sheet__payment dl > div {
    flex-direction: row;
    display: grid;
    grid-template-columns: 5.5rem 1fr;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  html,
  body,
  html.invoice-page-active,
  html.invoice-page-active body {
    background: #ffffff !important;
    color: #111111 !important;
    height: auto !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  html.invoice-printing .invoice-viewport {
    height: auto !important;
    overflow: visible !important;
  }

  body {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .no-print {
    display: none !important;
  }

  .invoice-viewport,
  .invoice-stage,
  .invoice-paper {
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    max-width: none !important;
    overflow: visible !important;
    height: auto !important;
  }

  .tax-invoice-sheet,
  .tax-invoice-sheet--fit-page {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    max-width: none !important;
    width: 100% !important;
    font-size: 8.5px !important;
    line-height: 1.35 !important;
    page-break-after: avoid !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .tax-invoice-sheet__header {
    padding: 0.4rem 0.55rem !important;
    gap: 0.35rem !important;
  }

  .tax-invoice-sheet__logo {
    width: 1.75rem !important;
    height: 1.75rem !important;
    font-size: 0.85rem !important;
    border-radius: 0.4rem !important;
  }

  .tax-invoice-sheet__company {
    font-size: 0.82rem !important;
  }

  .tax-invoice-sheet__subtitle,
  .tax-invoice-sheet__site-url {
    font-size: 0.62rem !important;
    margin-top: 0.1rem !important;
  }

  .tax-invoice-sheet__meta h1 {
    font-size: 0.82rem !important;
    margin-bottom: 0.25rem !important;
  }

  .tax-invoice-sheet__meta dl {
    gap: 0.1rem !important;
  }

  .tax-invoice-sheet__party,
  .tax-invoice-sheet__lines,
  .tax-invoice-sheet__settlements,
  .tax-invoice-sheet__payment,
  .tax-invoice-sheet__reservation {
    padding: 0.35rem 0.55rem !important;
  }

  .tax-invoice-sheet__party h2,
  .tax-invoice-sheet__lines h2,
  .tax-invoice-sheet__settlements h2,
  .tax-invoice-sheet__payment h2,
  .tax-invoice-sheet__reservation h2,
  .tax-invoice-sheet__site-contact h2 {
    margin-bottom: 0.3rem !important;
    font-size: 0.62rem !important;
  }

  .tax-invoice-sheet__party dl,
  .tax-invoice-sheet__reservation dl,
  .tax-invoice-sheet__payment dl,
  .tax-invoice-sheet__site-contact dl {
    gap: 0.15rem !important;
  }

  .tax-invoice-sheet__party dl > div,
  .tax-invoice-sheet__reservation dl > div,
  .tax-invoice-sheet__payment dl > div,
  .tax-invoice-sheet__site-contact dl > div {
    grid-template-columns: 4.25rem 1fr !important;
    gap: 0.25rem !important;
  }

  .tax-invoice-sheet__reservation dl {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 0.25rem 0.4rem !important;
  }

  .tax-invoice-sheet__reservation .tax-invoice-sheet__party-wide {
    grid-column: 1 / -1 !important;
  }

  .tax-invoice-sheet__line-meta {
    display: none !important;
  }

  .tax-invoice-sheet th,
  .tax-invoice-sheet td {
    padding: 0.2rem 0.25rem !important;
    font-size: 0.62rem !important;
  }

  .tax-invoice-sheet thead th {
    font-size: 0.6rem !important;
  }

  .tax-invoice-sheet__bottom {
    padding: 0.35rem 0.55rem !important;
    gap: 0.35rem !important;
    grid-template-columns: 1fr 0.9fr !important;
  }

  .tax-invoice-sheet__legal {
    font-size: 0.58rem !important;
    line-height: 1.45 !important;
  }

  .tax-invoice-sheet__legal p {
    margin-bottom: 0.2rem !important;
  }

  .tax-invoice-sheet__totals > div {
    padding: 0.22rem 0.35rem !important;
  }

  .tax-invoice-sheet__totals dt,
  .tax-invoice-sheet__totals dd {
    font-size: 0.62rem !important;
  }

  .tax-invoice-sheet__words dd {
    font-size: 0.58rem !important;
    line-height: 1.4 !important;
  }

  .tax-invoice-sheet__closing {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.25rem 0.45rem !important;
    align-items: start !important;
  }

  .tax-invoice-sheet__payment {
    margin: 0 !important;
    border-bottom: none !important;
  }

  .tax-invoice-sheet__payment dl {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.2rem 0.35rem !important;
  }

  .tax-invoice-sheet__payment dl > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.05rem !important;
  }

  .tax-invoice-sheet__settlements {
    grid-column: 1 / -1 !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
  }

  .tax-invoice-sheet__voucher {
    margin: 0 !important;
    padding: 0.35rem 0.55rem !important;
    gap: 0.35rem !important;
  }

  .tax-invoice-sheet__voucher-title {
    font-size: 0.68rem !important;
    margin-bottom: 0.15rem !important;
  }

  .tax-invoice-sheet__voucher-text {
    font-size: 0.58rem !important;
    line-height: 1.4 !important;
  }

  .tax-invoice-sheet__voucher-code {
    min-width: 5.5rem !important;
    padding: 0.25rem 0.35rem !important;
  }

  .tax-invoice-sheet__voucher-code strong {
    font-size: 0.75rem !important;
  }

  .tax-invoice-sheet__footer {
    grid-column: 1 / -1 !important;
    padding: 0.35rem 0.55rem !important;
    gap: 0.35rem !important;
  }

  .tax-invoice-sheet__footer-main {
    gap: 0.25rem !important;
  }

  .tax-invoice-sheet__footer-main > p {
    font-size: 0.56rem !important;
    line-height: 1.4 !important;
    margin: 0 !important;
  }

  .tax-invoice-sheet__site-contact dl {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.2rem 0.35rem !important;
  }

  .tax-invoice-sheet__site-contact dl > div {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.05rem !important;
  }

  .tax-invoice-sheet__site-contact .tax-invoice-sheet__party-wide {
    grid-column: 1 / -1 !important;
    flex-direction: row !important;
    gap: 0.25rem !important;
  }

  .tax-invoice-sheet__stamp div {
    width: 5rem !important;
    height: 2.5rem !important;
  }

  .tax-invoice-sheet__stamp span {
    font-size: 0.58rem !important;
  }

  .tax-invoice-sheet table {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .tax-invoice-sheet tr {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .tax-invoice-sheet__totals,
  .tax-invoice-sheet__footer,
  .tax-invoice-sheet__voucher,
  .tax-invoice-sheet__parties,
  .tax-invoice-sheet__header,
  .tax-invoice-sheet__bottom {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }
}

/* نقش‌ها و ماتریس دسترسی‌ها */
.admin-roles-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.875rem;
  margin-bottom: 1.25rem;
}
.admin-roles-guide__step {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: color-mix(in oklab, var(--primary) 4%, var(--background));
}
.admin-roles-guide__num {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-foreground, #fff);
  font-size: 0.8125rem;
  font-weight: 700;
  flex-shrink: 0;
}
.admin-roles-guide__step strong {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.2rem;
  color: var(--foreground);
}
.admin-roles-guide__step p {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--secondary-foreground);
}

.admin-roles-layout {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.admin-roles-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.admin-roles-sidebar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}
.admin-roles-sidebar__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--foreground);
}
.admin-roles-sidebar__count {
  font-size: 0.75rem;
  color: var(--secondary-foreground);
  white-space: nowrap;
}
.admin-roles-sidebar__hint {
  margin: 0 0 0.875rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--secondary-foreground);
}

.admin-roles-main__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.admin-roles-main__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--foreground);
}
.admin-roles-main__desc {
  margin: 0.375rem 0 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--secondary-foreground);
}

.admin-roles-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--secondary-foreground);
}
.admin-roles-empty i {
  font-size: 2rem;
  opacity: 0.45;
}
.admin-roles-empty__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
}
.admin-roles-empty__hint {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 22rem;
}

.admin-roles-list__item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  background: var(--background);
  text-align: start;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.admin-roles-list__item:hover {
  background: var(--muted);
}

.admin-roles-list__item.is-active {
  border-color: color-mix(in oklab, var(--primary) 40%, var(--border));
  background: color-mix(in oklab, var(--primary) 8%, var(--background));
}

.admin-roles-list__title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.admin-roles-list__meta {
  font-size: 0.75rem;
  color: var(--secondary-foreground);
}

.admin-role-editor__identity {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: color-mix(in oklab, var(--muted) 35%, var(--background));
}
.admin-role-editor__identity-main {
  flex: 1;
  min-width: 0;
}
.admin-role-editor__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--secondary-foreground);
  margin-bottom: 0.375rem;
}
.admin-role-editor__name-input {
  max-width: 20rem;
}
.admin-role-editor__slug {
  margin: 0.375rem 0 0;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.admin-role-editor__stats {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}
.admin-role-editor__stat {
  text-align: end;
}
.admin-role-editor__stat-label {
  display: block;
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}
.admin-role-editor__stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--foreground);
}
.admin-role-editor__dirty-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-amber-700);
  background: color-mix(in oklab, var(--color-amber-100) 80%, var(--background));
  border: 1px solid color-mix(in oklab, var(--color-amber-500) 30%, var(--border));
  border-radius: 999px;
  padding: 0.2rem 0.625rem;
}

.admin-role-editor__notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid color-mix(in oklab, var(--primary) 25%, var(--border));
  background: color-mix(in oklab, var(--primary) 6%, var(--muted));
  font-size: 0.8125rem;
  color: var(--secondary-foreground);
}
.admin-role-editor__notice i {
  font-size: 1.125rem;
  color: var(--primary);
  margin-top: 0.125rem;
  flex-shrink: 0;
}
.admin-role-editor__notice strong {
  display: block;
  font-size: 0.875rem;
  color: var(--foreground);
  margin-bottom: 0.2rem;
}
.admin-role-editor__notice p {
  margin: 0;
  line-height: 1.6;
}
.admin-role-editor__notice--info {
  border-color: color-mix(in oklab, var(--color-green-600) 25%, var(--border));
  background: color-mix(in oklab, var(--color-green-100) 40%, var(--background));
}
.admin-role-editor__notice--info i {
  color: var(--color-green-700);
}

.admin-role-editor__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: color-mix(in oklab, var(--background) 92%, transparent);
  backdrop-filter: blur(6px);
  z-index: 2;
}
.admin-role-editor__footer-note {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--secondary-foreground);
}

.admin-role-dept-panel__head {
  margin-bottom: 0.75rem;
}
.admin-role-dept-panel__title {
  margin: 0 0 0.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--foreground);
}
.admin-role-dept-panel__desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--secondary-foreground);
}

.admin-perm-table__action-label {
  display: block;
  font-weight: 700;
}
.admin-perm-table__action-hint {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--muted-foreground);
  line-height: 1.35;
}
.admin-perm-table__group-hint {
  margin-inline-start: auto;
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--muted-foreground);
}
.admin-perm-table__cell-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  cursor: pointer;
}
.admin-perm-table tbody tr:hover td {
  background: color-mix(in oklab, var(--muted) 30%, var(--background));
}

.admin-perm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.875rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  background: var(--muted);
}

.admin-perm-toolbar__check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-perm-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.admin-perm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.admin-perm-table th,
.admin-perm-table td {
  padding: 0.625rem 0.75rem;
  text-align: center;
}

.admin-perm-table th:first-child,
.admin-perm-table td:first-child {
  text-align: start;
  min-width: 12rem;
}

.admin-perm-table thead th {
  background: var(--muted);
  font-weight: 700;
  color: var(--foreground);
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-perm-table__group-row td {
  background: color-mix(in oklab, var(--primary) 5%, var(--muted));
  font-weight: 700;
}

.admin-perm-table__group-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  cursor: pointer;
}

.admin-perm-table__module {
  padding-inline-start: 1.5rem !important;
  color: var(--foreground);
}

.admin-perm-table__na {
  color: var(--muted-foreground);
}

@media (max-width: 991px) {
  .admin-roles-guide {
    grid-template-columns: 1fr;
  }
  .admin-roles-layout {
    grid-template-columns: 1fr;
  }
}

/* جزئیات لاگ فعالیت مدیران */
.activity-log-detail {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.activity-log-detail__meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.activity-log-detail__label {
  display: block;
  font-size: 0.75rem;
  color: var(--secondary-foreground);
  margin-bottom: 0.25rem;
}

.activity-log-detail__value {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

.activity-log-detail__summary {
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  background: var(--muted);
}

.activity-log-detail__changes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.activity-log-detail__block {
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  overflow: hidden;
}

.activity-log-detail__block-title {
  margin: 0;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 700;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}

.activity-log-detail__empty {
  margin: 0;
  padding: 0.875rem;
  font-size: 0.8125rem;
  color: var(--secondary-foreground);
}

.activity-log-detail__dl {
  margin: 0;
  padding: 0.5rem 0;
}

.activity-log-detail__row {
  display: grid;
  grid-template-columns: minmax(6rem, 38%) 1fr;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
}

.activity-log-detail__row:last-child {
  border-bottom: none;
}

.activity-log-detail__row dt {
  color: var(--secondary-foreground);
  font-weight: 500;
}

.activity-log-detail__row dd {
  margin: 0;
  color: var(--foreground);
  word-break: break-word;
  white-space: pre-wrap;
}

.activity-log-detail__technical {
  font-size: 0.8125rem;
  color: var(--secondary-foreground);
}

.activity-log-detail__technical summary {
  cursor: pointer;
  user-select: none;
}

@media (max-width: 767px) {
  .activity-log-detail__meta-grid,
  .activity-log-detail__changes {
    grid-template-columns: 1fr;
  }
}

/* ——— Readable typography — entire admin panel ——— */
#scrollable_content {
  font-size: 0.9375rem;
  line-height: 1.65;
}

#scrollable_content .text-sm {
  font-size: 0.9375rem !important;
  line-height: 1.6 !important;
}

#scrollable_content .text-xs {
  font-size: 0.8125rem !important;
  line-height: 1.55 !important;
}

#scrollable_content .kt-table,
#scrollable_content .admin-data-table-el,
#scrollable_content table.text-sm,
#scrollable_content table.text-xs {
  font-size: 0.875rem !important;
}

#scrollable_content .kt-table th,
#scrollable_content .kt-table td,
#scrollable_content .admin-data-table-el th,
#scrollable_content .admin-data-table-el td {
  font-size: inherit !important;
}

#scrollable_content .kt-form-label,
#scrollable_content label.text-sm {
  font-size: 0.9375rem !important;
}

#scrollable_content .kt-badge-sm {
  font-size: 0.8125rem !important;
  padding: 0.3125rem 0.625rem !important;
  line-height: 1.4 !important;
}

#scrollable_content .kt-btn-sm {
  font-size: 0.875rem !important;
  min-height: 2.375rem;
}

#scrollable_content .kt-card-title,
#scrollable_content h3.text-sm {
  font-size: 1rem !important;
}

#scrollable_content .kt-input,
#scrollable_content .kt-select,
#scrollable_content .kt-textarea {
  font-size: 0.9375rem !important;
}

#scrollable_content .admin-data-card-title {
  font-size: 1rem !important;
}

#scrollable_content .admin-data-card-field dt {
  font-size: 0.8125rem !important;
}

#scrollable_content .admin-data-card-field dd {
  font-size: 0.9375rem !important;
}

#sidebar_primary_menu .kt-menu-title {
  font-size: 0.875rem !important;
}

@media (max-width: 639px) {
  .reservation-detail-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .reservation-detail-row__value {
    padding-inline-start: 0.25rem;
  }
}

/* Dropdown panels — portal on body تا از overflow:hidden والد بیرون نزنند */
.admin-dropdown-panel,
.searchable-select-dropdown,
.checkbox-multi-select-dropdown {
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: var(--popover, var(--background));
  color: var(--popover-foreground, var(--foreground));
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
  max-height: min(400px, calc(100vh - 16px));
  overflow-y: auto;
}

.admin-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: calc(var(--radius) - 4px);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.4;
  cursor: pointer;
  text-align: start;
}

.admin-dropdown-item:hover,
.admin-dropdown-item.is-active,
.searchable-select-dropdown .kt-menu-link:hover {
  background: var(--muted);
}

.admin-dropdown-separator {
  height: 1px;
  margin: 0.375rem 0.5rem;
  background: var(--border);
}

.searchable-select-dropdown .kt-menu-link {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* ── داشبورد: کاشی KPI ── */
.dashboard-stat-tile {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dashboard-stat-tile:hover {
  border-color: color-mix(in oklab, var(--primary) 25%, var(--border));
}
.dashboard-stat-tile--alert {
  border-color: color-mix(in oklab, var(--destructive) 35%, var(--border));
}
.dashboard-stat-tile__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  background: color-mix(in oklab, var(--primary) 10%, var(--muted));
  color: var(--primary);
  font-size: 1.125rem;
}
.dashboard-stat-tile__icon--alert {
  background: color-mix(in oklab, var(--destructive) 12%, var(--muted));
  color: var(--destructive);
}
.dashboard-stat-tile__title {
  font-size: 0.8125rem;
  color: var(--secondary-foreground);
}
.dashboard-stat-tile__value {
  font-size: 1.625rem;
  font-weight: 600;
  line-height: 1.2;
}
.dashboard-stat-tile__hint {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.5;
}

/* ── داشبورد: نمودارها ── */
.admin-chart {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}
.admin-chart .recharts-wrapper {
  font-family: inherit !important;
}
.admin-chart .recharts-cartesian-axis-tick text,
.admin-chart .recharts-label {
  font-family: inherit !important;
  letter-spacing: 0;
}
.admin-chart-bar-label {
  fill: var(--muted-foreground) !important;
  font-size: 10px !important;
  font-family: inherit !important;
}

.admin-chart-tooltip {
  min-width: 11rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  background: color-mix(in oklab, var(--background) 94%, transparent);
  backdrop-filter: blur(8px);
  padding: 0.625rem 0.75rem;
  box-shadow: 0 8px 24px rgb(15 23 42 / 0.12);
  font-size: 0.75rem;
}
.admin-chart-tooltip__title {
  margin: 0 0 0.5rem;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--foreground);
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--border);
}
.admin-chart-tooltip__body {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.admin-chart-tooltip__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
}
.admin-chart-tooltip__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.admin-chart-tooltip__label {
  color: var(--secondary-foreground);
}
.admin-chart-tooltip__value {
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
}

.admin-chart-legend {
  list-style: none;
  margin: 0;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  background: color-mix(in oklab, var(--muted) 28%, var(--background));
}
.admin-chart-legend--row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}
.admin-chart-legend--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.625rem 1rem;
}
.admin-chart-legend__item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
}
.admin-chart-legend__dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 999px;
  margin-top: 0.25rem;
  flex-shrink: 0;
}
.admin-chart-legend__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
  flex: 1;
}
.admin-chart-legend__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--foreground);
  line-height: 1.35;
}
.admin-chart-legend__hint {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  line-height: 1.35;
}
.admin-chart-legend__value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--foreground);
  white-space: nowrap;
  margin-inline-start: auto;
}

.admin-chart-donut-wrap {
  position: relative;
  width: 100%;
}
.admin-chart-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  gap: 0.125rem;
  padding: 0 2rem;
}
.admin-chart-donut-center__label {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}
.admin-chart-donut-center__value {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.35;
}

@media (max-width: 639px) {
  .admin-chart-legend--row {
    flex-direction: column;
    gap: 0.625rem;
  }
  .admin-chart-legend__value {
    margin-inline-start: 0;
  }
}

.dashboard-skeleton {
  position: relative;
  overflow: hidden;
  background: color-mix(in oklab, var(--muted) 45%, var(--background));
}
.dashboard-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--background) 70%, transparent), transparent);
  animation: dashboard-shimmer 1.4s infinite;
}
@keyframes dashboard-shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* ══════════════════════════════════════════════════════════════
   داشبورد ادمین — چیدمان بدون Tailwind (CSS خالص)
   ══════════════════════════════════════════════════════════════ */

.admin-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.admin-dash-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.admin-dash-toolbar__updated {
  font-size: 0.75rem;
  color: var(--secondary-foreground);
}

.admin-dash-error {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--destructive);
}

/* ── Hero KPI ── */
.admin-dash-hero {
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: linear-gradient(
    135deg,
    color-mix(in oklab, var(--primary) 8%, var(--background)) 0%,
    var(--background) 55%,
    color-mix(in oklab, var(--primary) 4%, var(--background)) 100%
  );
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.admin-dash-hero__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}
.admin-dash-hero__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  color: var(--secondary-foreground);
}
.admin-dash-hero__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
}
.admin-dash-hero__head-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.admin-dash-hero__alert-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--destructive);
  background: color-mix(in oklab, var(--destructive) 10%, var(--background));
  border: 1px solid color-mix(in oklab, var(--destructive) 25%, var(--border));
  text-decoration: none;
}
.admin-dash-hero__alert-link:hover {
  background: color-mix(in oklab, var(--destructive) 16%, var(--background));
}
.admin-dash-hero__ok-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--color-green-700);
  background: color-mix(in oklab, var(--color-green-100) 80%, var(--background));
  border: 1px solid color-mix(in oklab, var(--color-green-800) 20%, var(--border));
  border-radius: 999px;
  padding: 0.375rem 0.75rem;
}

.admin-dash-hero__kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.875rem;
}
.admin-dash-hero__kpi {
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  background: var(--background);
  padding: 1rem 1.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
  min-height: 6.5rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
}
.admin-dash-hero__kpi-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.admin-dash-hero__kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  flex-shrink: 0;
}
.admin-dash-hero__kpi--primary .admin-dash-hero__kpi-icon {
  background: color-mix(in oklab, var(--primary) 12%, var(--muted));
  color: var(--primary);
}
.admin-dash-hero__kpi--success .admin-dash-hero__kpi-icon {
  background: color-mix(in oklab, var(--color-green-600) 12%, var(--muted));
  color: var(--color-green-700);
}
.admin-dash-hero__kpi--info .admin-dash-hero__kpi-icon {
  background: color-mix(in oklab, var(--color-blue-600) 12%, var(--muted));
  color: var(--color-blue-700);
}
.admin-dash-hero__kpi--warning .admin-dash-hero__kpi-icon {
  background: color-mix(in oklab, var(--color-amber-500) 14%, var(--muted));
  color: var(--color-amber-700);
}
.admin-dash-hero__kpi-label {
  font-size: 0.8125rem;
  color: var(--secondary-foreground);
  line-height: 1.35;
}
.admin-dash-hero__kpi-value {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--foreground);
}
.admin-dash-hero__pill {
  display: inline-block;
  font-size: 0.6875rem;
  line-height: 1.4;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-dash-hero__pill--up {
  color: var(--color-green-800);
  background: color-mix(in oklab, var(--color-green-100) 90%, transparent);
}
.admin-dash-hero__pill--down {
  color: var(--color-red-800);
  background: color-mix(in oklab, var(--color-red-100) 90%, transparent);
}
.admin-dash-hero__pill--muted {
  color: var(--muted-foreground);
  background: color-mix(in oklab, var(--muted) 60%, transparent);
}

.admin-dash-hero__secondary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.875rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
}
.admin-dash-hero__secondary-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}
.admin-dash-hero__secondary-heading {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--secondary-foreground);
}
.admin-dash-hero__secondary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.admin-dash-hero__stat {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--background);
  padding: 0.75rem 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  min-height: 5.5rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.03);
}
.admin-dash-hero__stat-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.admin-dash-hero__stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.45rem;
  font-size: 0.875rem;
  flex-shrink: 0;
}
.admin-dash-hero__stat--in .admin-dash-hero__stat-icon {
  background: color-mix(in oklab, var(--color-green-600) 12%, var(--muted));
  color: var(--color-green-700);
}
.admin-dash-hero__stat--out .admin-dash-hero__stat-icon {
  background: color-mix(in oklab, var(--color-blue-600) 12%, var(--muted));
  color: var(--color-blue-700);
}
.admin-dash-hero__stat--money-in .admin-dash-hero__stat-icon {
  background: color-mix(in oklab, var(--color-green-600) 12%, var(--muted));
  color: var(--color-green-700);
}
.admin-dash-hero__stat--money-out .admin-dash-hero__stat-icon {
  background: color-mix(in oklab, var(--color-amber-500) 14%, var(--muted));
  color: var(--color-amber-700);
}
.admin-dash-hero__stat--system .admin-dash-hero__stat-icon {
  background: color-mix(in oklab, var(--primary) 12%, var(--muted));
  color: var(--primary);
}
.admin-dash-hero__stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.35;
}
.admin-dash-hero__stat-value {
  margin: 0.125rem 0 0;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--foreground);
  word-break: break-word;
}
.admin-dash-hero__stat-hint {
  margin: 0;
  font-size: 0.6875rem;
  line-height: 1.45;
  color: var(--muted-foreground);
}

/* legacy selectors removed */

/* ── Main grid ── */
.admin-dashboard__main {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr);
  gap: 1.25rem;
  align-items: start;
}
.admin-dashboard__primary {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}
.admin-dashboard__side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}
.admin-dashboard__charts-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

/* ── Panels ── */
.admin-dash-section-in {
  display: flex;
  flex-direction: column;
  min-width: 0;
  animation: admin-dash-fade-in 0.45s ease both;
}
.admin-dash-section-in > .admin-dash-panel,
.admin-dash-section-in > .admin-dash-hero {
  flex: 1;
}

.admin-dash-panel {
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  background: var(--background);
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.admin-dash-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1.125rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 25%, var(--background));
  flex-shrink: 0;
}
.admin-dash-panel__header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.admin-dash-panel__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--foreground);
}
.admin-dash-panel__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--destructive);
  background: color-mix(in oklab, var(--destructive) 12%, var(--background));
  border: 1px solid color-mix(in oklab, var(--destructive) 25%, var(--border));
}
.admin-dash-panel__chip {
  font-size: 0.75rem;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  color: var(--secondary-foreground);
  background: var(--muted);
  border: 1px solid var(--border);
}
.admin-dash-panel__body {
  padding: 1rem 1.125rem 1.125rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.admin-dash-panel__body--chart {
  padding: 0.5rem 0.75rem 1rem;
  min-height: 340px;
}
.admin-dash-panel__body--chart-sm {
  padding: 0.5rem 0.75rem 1rem;
  min-height: 280px;
}
.admin-dash-panel__body--list {
  min-height: 280px;
}
.admin-dash-panel__body--rank-list {
  padding: 0.75rem 1rem 1rem;
  min-height: 280px;
}
.admin-dash-panel__body--finance {
  min-height: 300px;
}
.admin-dash-panel__body--ops {
  min-height: 240px;
}
.admin-dash-panel__body--table {
  min-height: 360px;
  padding: 0;
}
.admin-dash-panel__body--chart > .admin-chart,
.admin-dash-panel__body--chart-sm > .admin-chart {
  flex: 1 1 auto;
  min-height: 12rem;
}
.admin-dash-panel__body--rank-list > .admin-dash-rank-list {
  flex: 1 1 auto;
}

/* ── Ranked metric list (dashboard) ── */
.admin-dash-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.admin-dash-rank-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
}
.admin-dash-rank-item__rank {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--primary) 10%, var(--background));
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.125rem;
}
.admin-dash-rank-item__content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.admin-dash-rank-item__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.admin-dash-rank-item__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  line-height: 1.45;
  word-break: break-word;
}
.admin-dash-rank-item__value {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--foreground);
  white-space: nowrap;
  flex-shrink: 0;
}
.admin-dash-rank-item__track {
  height: 0.5rem;
  border-radius: 999px;
  background: color-mix(in oklab, var(--muted) 55%, var(--background));
  overflow: hidden;
}
.admin-dash-rank-item__fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d9488, #14b8a6);
  transition: width 0.45s ease;
}
.admin-dash-rank-item__fill--occupancy {
  background: linear-gradient(90deg, #6366f1, #818cf8);
}
.admin-dash-panel__body--flush {
  padding: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 360px;
}
.admin-dash-panel__body--flush .admin-dash-empty {
  min-height: 100%;
}
.admin-dash-panel__body--flush .admin-dash-table-wrap {
  flex: 1 1 auto;
}

.admin-dash-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-height: 12rem;
  padding: 2rem 1rem;
  margin: 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--secondary-foreground);
}
.admin-dash-chart-empty {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 12rem;
}
.admin-dash-chart-empty .admin-dash-empty {
  min-height: 0;
  padding: 1.5rem 1rem;
}
.admin-dash-empty i {
  font-size: 1.5rem;
  color: var(--color-green-600);
}

/* ── Action queue ── */
.admin-dash-actions {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.admin-dash-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  background: var(--background);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.admin-dash-action:hover {
  background: color-mix(in oklab, var(--muted) 50%, var(--background));
}
.admin-dash-action--high {
  border-inline-start: 3px solid var(--destructive);
}
.admin-dash-action--medium {
  border-inline-start: 3px solid var(--color-amber-500);
}
.admin-dash-action--low {
  border-inline-start: 3px solid var(--primary);
}
.admin-dash-action__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: var(--muted);
  flex-shrink: 0;
  color: var(--secondary-foreground);
}
.admin-dash-action__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
  flex: 1;
}
.admin-dash-action__title {
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
}
.admin-dash-action__hint {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}
.admin-dash-action__count {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  background: var(--muted);
  flex-shrink: 0;
}

/* ── Finance summary ── */
.admin-dash-finance-head {
  margin-bottom: 0.75rem;
}
.admin-dash-finance-head__label {
  font-size: 0.75rem;
  color: var(--secondary-foreground);
}
.admin-dash-finance-head__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}
.admin-dash-finance-head__value {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--foreground);
}
.admin-dash-finance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
}
.admin-dash-finance-grid__label {
  font-size: 0.6875rem;
  color: var(--muted-foreground);
}
.admin-dash-finance-grid__value {
  margin: 0.125rem 0 0;
  font-size: 0.875rem;
  font-weight: 600;
}

/* ── Today ops + quick links ── */
.admin-dash-ops-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
  margin-bottom: 0.875rem;
}
.admin-dash-ops-stat {
  border-radius: 0.625rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
}
.admin-dash-ops-stat--in {
  background: color-mix(in oklab, var(--color-green-100) 50%, var(--background));
}
.admin-dash-ops-stat--out {
  background: color-mix(in oklab, var(--color-blue-100) 50%, var(--background));
}
.admin-dash-ops-stat__label {
  display: block;
  font-size: 0.6875rem;
  color: var(--secondary-foreground);
  margin-bottom: 0.25rem;
}
.admin-dash-ops-stat__value {
  font-size: 1.25rem;
  font-weight: 700;
}
.admin-dash-quick-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
.admin-dash-quick-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--foreground);
  text-decoration: none;
  background: color-mix(in oklab, var(--muted) 30%, var(--background));
  transition: background 0.15s ease;
}
.admin-dash-quick-link:hover {
  background: color-mix(in oklab, var(--primary) 8%, var(--background));
  border-color: color-mix(in oklab, var(--primary) 20%, var(--border));
}
.admin-dash-quick-link i {
  color: var(--primary);
  font-size: 1rem;
}

/* ── Recent reservations table ── */
.admin-dash-table-wrap {
  overflow-x: auto;
}
.admin-dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.admin-dash-table th,
.admin-dash-table td {
  padding: 0.75rem 1rem;
  text-align: start;
}
.admin-dash-table th {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--secondary-foreground);
  white-space: nowrap;
}
.admin-dash-table tbody tr:hover {
  background: color-mix(in oklab, var(--muted) 25%, var(--background));
}
.admin-dash-table__code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.admin-dash-table__code:hover {
  text-decoration: underline;
}
.admin-dash-table__stack {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.admin-dash-table__muted {
  color: var(--secondary-foreground);
  font-size: 0.75rem;
}

/* ── Loading skeletons ── */
.admin-dash-panel__body--skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.admin-dash-panel__body--skeleton-chart {
  min-height: 340px;
}
.admin-dash-panel__body--skeleton-chart-sm,
.admin-dash-panel__body--skeleton-list {
  min-height: 280px;
}
.admin-dash-panel__body--skeleton-finance {
  min-height: 300px;
}
.admin-dash-panel__body--skeleton-ops {
  min-height: 240px;
}
.admin-dash-panel__body--skeleton-table {
  min-height: 360px;
}

@keyframes admin-dash-fade-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-dash-sk-line,
.admin-dash-sk-kpi,
.admin-dash-sk-secondary {
  display: block;
  border-radius: 0.375rem;
  background: color-mix(in oklab, var(--muted) 55%, var(--background));
  position: relative;
  overflow: hidden;
}
.admin-dash-sk-line::after,
.admin-dash-sk-kpi::after,
.admin-dash-sk-secondary::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--background) 75%, transparent), transparent);
  animation: dashboard-shimmer 1.4s infinite;
}

.admin-dash-sk-line--eyebrow { width: 5rem; height: 0.625rem; margin-bottom: 0.5rem; }
.admin-dash-sk-line--title { width: 11rem; height: 1.125rem; }
.admin-dash-sk-line--badge { width: 9rem; height: 2rem; border-radius: 999px; }
.admin-dash-sk-line--panel-title { width: 7rem; height: 0.875rem; }
.admin-dash-sk-line--btn { width: 4.5rem; height: 1.75rem; border-radius: 0.375rem; }
.admin-dash-sk-line--kpi-label { width: 60%; height: 0.75rem; margin-bottom: 0.625rem; }
.admin-dash-sk-line--kpi-value { width: 75%; height: 1.375rem; margin-bottom: 0.5rem; }
.admin-dash-sk-line--kpi-pill { width: 55%; height: 1.125rem; border-radius: 999px; }
.admin-dash-sk-line--secondary-heading { width: 5.5rem; height: 0.75rem; margin-bottom: 0.25rem; }
.admin-dash-sk-line--secondary-label { width: 55%; height: 0.75rem; margin-bottom: 0.375rem; }
.admin-dash-sk-line--secondary-value { width: 70%; height: 1rem; margin-bottom: 0.375rem; }
.admin-dash-sk-line--secondary-hint { width: 85%; height: 0.625rem; }
.admin-dash-sk-stat {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--background);
  padding: 0.75rem 0.875rem;
  min-height: 5.5rem;
}
.admin-dash-sk-line--chart-block { width: 100%; height: 280px; border-radius: 0.625rem; }
.admin-dash-sk-line--chart-block-sm { height: 220px; }
.admin-dash-sk-line--icon { width: 2rem; height: 2rem; border-radius: 0.5rem; flex-shrink: 0; }
.admin-dash-sk-line--row-title { width: 100%; height: 0.75rem; margin-bottom: 0.375rem; }
.admin-dash-sk-line--row-sub { width: 65%; height: 0.625rem; }
.admin-dash-sk-line--count { width: 1.75rem; height: 1.25rem; border-radius: 999px; flex-shrink: 0; }
.admin-dash-sk-line--th { height: 0.75rem; flex: 1; min-width: 2.5rem; }
.admin-dash-sk-line--td { height: 0.75rem; flex: 1; min-width: 2.5rem; }
.admin-dash-sk-line--finance-value { width: 45%; height: 1.5rem; margin-bottom: 1rem; }
.admin-dash-sk-line--cell-label { width: 70%; height: 0.625rem; margin-bottom: 0.375rem; }
.admin-dash-sk-line--cell-value { width: 55%; height: 0.875rem; }
.admin-dash-sk-line--ops-stat { flex: 1; height: 4rem; border-radius: 0.625rem; }
.admin-dash-sk-line--ops-link { height: 2.5rem; border-radius: 0.5rem; }

.admin-dash-hero--skeleton {
  pointer-events: none;
}
.admin-dash-sk-kpi {
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  background: var(--background);
  padding: 1rem 1.125rem;
  min-height: 6.5rem;
}
.admin-dash-sk-secondary {
  padding: 0.5rem 0.625rem;
  min-height: 3.25rem;
}

.admin-dash-panel--skeleton {
  pointer-events: none;
}
.admin-dash-panel__body--skeleton-list {
  gap: 0.625rem;
}
.admin-dash-sk-list-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
}
.admin-dash-sk-list-row:last-child {
  border-bottom: none;
}
.admin-dash-sk-list-row__text {
  flex: 1;
  min-width: 0;
}
.admin-dash-sk-table-head,
.admin-dash-sk-table-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: center;
}
.admin-dash-sk-table-head {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.admin-dash-sk-table-row {
  padding: 0.625rem 0;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}
.admin-dash-sk-finance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--border);
}
.admin-dash-sk-ops-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
}
.admin-dash-sk-ops-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.admin-dash-panel__body--loading {
  position: relative;
  min-height: 120px;
}
.admin-dash-panel__body--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--background) 70%, transparent), transparent);
  animation: dashboard-shimmer 1.4s infinite;
  pointer-events: none;
}

.admin-dash-skeleton {
  border-radius: 0.875rem;
  background: color-mix(in oklab, var(--muted) 45%, var(--background));
  position: relative;
  overflow: hidden;
}
.admin-dash-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--background) 70%, transparent), transparent);
  animation: dashboard-shimmer 1.4s infinite;
}
.admin-dash-skeleton--hero {
  height: 220px;
}
.admin-dash-skeleton--chart {
  min-height: 360px;
}
.admin-dash-skeleton--side {
  min-height: 480px;
}

.admin-deposit-accounts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.admin-deposit-accounts__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

@media (max-width: 1279px) {
  .admin-dash-hero__kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .admin-dash-hero__secondary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .admin-dashboard__main {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .admin-dash-hero {
    padding: 1rem;
  }
  .admin-dash-hero__kpis {
    grid-template-columns: 1fr;
  }
  .admin-dash-hero__secondary {
    grid-template-columns: 1fr;
  }
  .admin-dash-hero__secondary-grid {
    grid-template-columns: 1fr;
  }
  .admin-dashboard__charts-row {
    grid-template-columns: 1fr;
  }
  .admin-dash-quick-links {
    grid-template-columns: 1fr;
  }
}

/* ── Ticket chat (Telegram desktop style) ── */
.admin-scroll--chat {
  overflow: hidden !important;
  padding-top: 0 !important;
}

.admin-page-container--chat {
  padding: 0 !important;
  max-width: none !important;
}

.admin-ticket-chat {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: calc(100dvh - var(--header-height));
  overflow: hidden;
  background: var(--background);
}

.admin-ticket-chat__header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--background);
  flex-shrink: 0;
  min-height: 3.5rem;
  box-shadow: 0 1px 6px rgb(0 0 0 / 0.04);
  z-index: 2;
}

.admin-ticket-chat__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  color: var(--secondary-foreground);
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.admin-ticket-chat__back:hover {
  background: color-mix(in oklab, var(--muted) 60%, transparent);
  color: var(--foreground);
}

.admin-ticket-chat__avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  background: linear-gradient(145deg, color-mix(in oklab, var(--primary) 18%, white) 0%, color-mix(in oklab, var(--primary) 10%, var(--background)) 100%);
  border: 2px solid color-mix(in oklab, var(--primary) 20%, transparent);
  flex-shrink: 0;
}

.admin-ticket-chat__peer-info {
  flex: 1;
  min-width: 0;
}

.admin-ticket-chat__peer-top {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
}

.admin-ticket-chat__peer-name {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-ticket-chat__peer-mobile {
  font-size: 0.75rem;
  color: var(--secondary-foreground);
  flex-shrink: 0;
}

.admin-ticket-chat__peer-subject {
  margin: 0.125rem 0 0;
  font-size: 0.8125rem;
  color: var(--secondary-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-ticket-chat__peer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.375rem;
}

.admin-ticket-chat__header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.admin-ticket-chat__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  height: 2.375rem;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: var(--secondary-foreground);
  cursor: pointer;
  text-decoration: none;
  font-size: 1.125rem;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.admin-ticket-chat__icon-btn:hover {
  background: color-mix(in oklab, var(--muted) 60%, transparent);
  color: var(--foreground);
}

.admin-ticket-chat__icon-btn--danger:hover {
  background: color-mix(in oklab, var(--destructive) 12%, transparent);
  color: var(--destructive);
}

.admin-ticket-chat__messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background-color: #c8d8e4;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%239bb3c4' fill-opacity='0.22'%3E%3Ccircle cx='18' cy='22' r='3'/%3E%3Ccircle cx='78' cy='14' r='2'/%3E%3Ccircle cx='102' cy='48' r='2.5'/%3E%3Ccircle cx='34' cy='68' r='2'/%3E%3Ccircle cx='92' cy='88' r='3'/%3E%3Cpath d='M8 52h8v8H8zM56 36h6v6h-6zM64 92h7v7h-7z'/%3E%3Cpath d='M44 18c4 0 7 3 7 7s-3 7-7 7-7-3-7-7 3-7 7-7zm52 44c3 0 5 2 5 5s-2 5-5 5-5-2-5-5 2-5 5-5z'/%3E%3C/g%3E%3C/svg%3E"),
    radial-gradient(ellipse 80% 60% at 15% 10%, rgb(255 255 255 / 0.45) 0, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 90%, rgb(255 255 255 / 0.35) 0, transparent 50%),
    linear-gradient(165deg, #d4e3ed 0%, #b8ccd9 48%, #c5d6e2 100%);
}

.admin-ticket-chat__empty {
  margin: auto;
  text-align: center;
  color: var(--secondary-foreground);
  font-size: 0.875rem;
}

.admin-ticket-chat__date {
  align-self: center;
  margin: 0.5rem 0 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.72);
  color: var(--secondary-foreground);
  font-size: 0.75rem;
  font-weight: 500;
  box-shadow: 0 1px 1px rgb(0 0 0 / 0.06);
}

.admin-ticket-chat__block {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.25rem;
}

.admin-ticket-chat__row {
  display: flex;
  max-width: min(68%, 36rem);
}

.admin-ticket-chat__row--in {
  align-self: flex-start;
}

.admin-ticket-chat__row--out {
  align-self: flex-end;
}

.admin-ticket-chat__msg-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 100%;
}

.admin-ticket-chat__row--in .admin-ticket-chat__msg-wrap {
  align-items: flex-start;
}

.admin-ticket-chat__row--out .admin-ticket-chat__msg-wrap {
  align-items: flex-end;
}

.admin-ticket-chat__bubble {
  position: relative;
  padding: 0.5rem 0.75rem;
  border-radius: 0.875rem;
  box-shadow: 0 1px 1.5px rgb(0 0 0 / 0.1);
  word-break: break-word;
  max-width: 100%;
}

.admin-ticket-chat__bubble--in {
  background: var(--background);
  border-end-start-radius: 0.3rem;
}

.admin-ticket-chat__bubble--out {
  background: linear-gradient(145deg, #e8f9d8 0%, #dcf8c6 100%);
  border-end-end-radius: 0.3rem;
}

.admin-ticket-chat__text {
  margin: 0;
  white-space: pre-wrap;
  font-size: 0.9375rem;
  line-height: 1.6;
}

.admin-ticket-chat__meta {
  display: block;
  font-size: 0.6875rem;
  line-height: 1.3;
  color: color-mix(in oklab, var(--foreground) 50%, transparent);
  font-family: var(--font-mono, ui-monospace, monospace);
  padding-inline: 0.25rem;
  white-space: nowrap;
}

.admin-ticket-chat__attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: var(--primary);
  text-decoration: none;
}

.admin-ticket-chat__attachment-link:hover {
  text-decoration: underline;
}

.admin-ticket-chat__composer {
  flex-shrink: 0;
  padding: 0.625rem 0.875rem 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--background);
  box-shadow: 0 -2px 10px rgb(0 0 0 / 0.04);
  z-index: 2;
}

.admin-ticket-chat__composer-bar {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.admin-ticket-chat__attach-btn,
.admin-ticket-chat__send-btn {
  width: 2.625rem;
  height: 2.625rem;
  border-radius: 9999px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s ease, opacity 0.15s ease, transform 0.12s ease;
  font-size: 1.125rem;
}

.admin-ticket-chat__attach-btn {
  background: color-mix(in oklab, var(--primary) 8%, var(--muted));
  color: var(--primary);
}

.admin-ticket-chat__attach-btn:hover {
  background: color-mix(in oklab, var(--primary) 14%, var(--muted));
  transform: scale(1.04);
}

.admin-ticket-chat__input-wrap {
  flex: 1;
  min-width: 0;
  background: color-mix(in oklab, var(--muted) 45%, var(--background));
  border: 1px solid var(--border);
  border-radius: 1.25rem;
  padding: 0.375rem 0.875rem;
}

.admin-ticket-chat__input {
  display: block;
  width: 100%;
  min-height: 1.5rem !important;
  max-height: 40vh;
  padding: 0.25rem 0 !important;
  margin: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  resize: none;
  overflow-y: hidden;
  line-height: 1.5;
  font-size: 0.9375rem;
  outline: none;
}

.admin-ticket-chat__input:focus-visible {
  outline: none;
  box-shadow: none !important;
}

.admin-ticket-chat__send-btn {
  background: linear-gradient(145deg, color-mix(in oklab, var(--primary) 92%, white) 0%, var(--primary) 100%);
  color: var(--primary-foreground);
  box-shadow: 0 2px 8px color-mix(in oklab, var(--primary) 35%, transparent);
}

.admin-ticket-chat__send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}

.admin-ticket-chat__send-btn:not(:disabled):hover {
  filter: brightness(1.06);
  transform: scale(1.04);
}

.admin-ticket-chat__send-icon {
  font-size: 1rem;
  font-weight: 700;
}

.admin-ticket-chat__send-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgb(255 255 255 / 0.35);
  border-top-color: currentColor;
  border-radius: 9999px;
  animation: admin-ticket-chat-spin 0.7s linear infinite;
}

@keyframes admin-ticket-chat-spin {
  to {
    transform: rotate(360deg);
  }
}

.admin-ticket-chat__attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  max-width: 100%;
  margin-bottom: 0.375rem;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  background: color-mix(in oklab, var(--primary) 10%, var(--muted));
  font-size: 0.75rem;
}

.admin-ticket-chat__attachment-remove {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.125rem;
  color: var(--secondary-foreground);
}

.admin-ticket-chat__composer-hint {
  margin: 0;
  font-size: 0.6875rem;
  color: var(--secondary-foreground);
  text-align: center;
}

.admin-ticket-chat__composer-error {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--destructive);
}

.admin-ticket-chat__closed-banner {
  flex-shrink: 0;
  padding: 0.875rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--secondary-foreground);
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 35%, var(--background));
}

@media (max-width: 639px) {
  .admin-ticket-chat {
    height: calc(100dvh - var(--header-height) - 0.5rem);
  }

  .admin-ticket-chat__header {
    padding: 0.5rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .admin-ticket-chat__avatar {
    width: 2.375rem;
    height: 2.375rem;
    font-size: 0.75rem;
  }

  .admin-ticket-chat__peer-name {
    font-size: 0.875rem;
  }

  .admin-ticket-chat__peer-mobile {
    display: none;
  }

  .admin-ticket-chat__peer-subject {
    font-size: 0.75rem;
  }

  .admin-ticket-chat__messages {
    padding: 0.75rem 0.625rem 1rem;
  }

  .admin-ticket-chat__row {
    max-width: 90%;
  }

  .admin-ticket-chat__meta {
    font-size: 0.625rem;
    white-space: normal;
    text-align: inherit;
  }

  .admin-ticket-chat__composer {
    padding: 0.5rem 0.625rem calc(0.625rem + env(safe-area-inset-bottom, 0px));
  }

  .admin-ticket-chat__attach-btn,
  .admin-ticket-chat__send-btn {
    width: 2.375rem;
    height: 2.375rem;
    font-size: 1rem;
  }

  .admin-ticket-chat__input-wrap {
    padding: 0.3125rem 0.625rem;
  }

  .admin-ticket-chat__peer-meta .kt-badge {
    display: none;
  }

  .admin-ticket-chat__peer-meta .kt-badge:first-child,
  .admin-ticket-chat__peer-meta .kt-badge:nth-child(3) {
    display: inline-flex;
  }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .admin-ticket-chat__row {
    max-width: 78%;
  }
}

/* ── Broadcast form & reports ── */
.admin-broadcast-form__grid {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .admin-broadcast-form__grid {
    grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
  }
}

.admin-broadcast-form__side {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-broadcast-channel {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: var(--background);
  text-align: start;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-broadcast-channel:hover {
  border-color: color-mix(in oklab, var(--primary) 35%, var(--border));
}

.admin-broadcast-channel.is-active {
  border-color: var(--primary);
  background: color-mix(in oklab, var(--primary) 6%, var(--background));
}

.admin-broadcast-channel__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in oklab, var(--muted) 70%, var(--background));
  color: var(--primary);
  flex-shrink: 0;
}

.admin-broadcast-channel__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.admin-broadcast-channel__title {
  font-size: 0.875rem;
  font-weight: 600;
}

.admin-broadcast-channel__hint {
  font-size: 0.75rem;
  color: var(--secondary-foreground);
}

.admin-broadcast-channel__check {
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 9999px;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.admin-broadcast-channel__check.is-on {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 3px var(--background);
}

.admin-broadcast-audience {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.admin-broadcast-audience:hover {
  background: color-mix(in oklab, var(--muted) 35%, var(--background));
}

.admin-broadcast-audience.is-active {
  border-color: var(--primary);
  background: color-mix(in oklab, var(--primary) 6%, var(--background));
}

.admin-broadcast-audience__label {
  font-size: 0.875rem;
  line-height: 1.45;
}

.admin-broadcast-audience-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  border: 1px dashed var(--border);
  background: color-mix(in oklab, var(--primary) 5%, var(--background));
}

.admin-broadcast-audience-count__label {
  font-size: 0.8125rem;
  color: var(--secondary-foreground);
}

.admin-broadcast-audience-count__value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.admin-broadcast-form__body {
  min-height: 16rem;
}

.admin-broadcast-form__footer {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

.admin-broadcast-report-summary {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 640px) {
  .admin-broadcast-report-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.admin-broadcast-report-summary__item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem;
  border-radius: 0.625rem;
  background: color-mix(in oklab, var(--muted) 40%, var(--background));
  border: 1px solid var(--border);
}

.admin-broadcast-report-summary__item--wide {
  grid-column: 1 / -1;
}

.admin-broadcast-report-summary__label {
  font-size: 0.75rem;
  color: var(--secondary-foreground);
}

.admin-broadcast-report-summary__value {
  font-size: 0.875rem;
  font-weight: 600;
}

.admin-broadcast-report-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
}

/* --- ویرایش رزرو (صفحه اختصاصی) --- */
.reservation-edit-layout {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .reservation-edit-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  }

  .reservation-edit-aside {
    position: sticky;
    top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
}

.reservation-edit-summary {
  padding: 0.875rem 1rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 35%, var(--background));
}

.reservation-edit-section {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.reservation-edit-section__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.reservation-edit-rooms {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 16rem;
  overflow-y: auto;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.625rem;
  background: var(--background);
}

.reservation-edit-room {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.375rem;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 80%, transparent);
  cursor: pointer;
  font-size: 0.875rem;
}

.reservation-edit-room:last-child {
  border-bottom: 0;
}

.reservation-edit-reason {
  padding: 1rem;
  border-radius: 0.625rem;
  border: 1px solid color-mix(in oklab, var(--color-orange-500) 35%, var(--border));
  background: color-mix(in oklab, var(--color-orange-500) 8%, var(--background));
}

.reservation-edit-finance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.reservation-edit-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reservation-edit-log-list li {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.reservation-edit-log-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

/* ══════════════════════════════════════════════════════════════
   کف اندازهٔ متن — خوانایی فارسی
   ──────────────────────────────────────────────────────────────
   خط فارسی در اندازهٔ یکسان ریزتر از لاتین دیده می‌شود؛ نقطه‌ها و
   کشیدگی‌ها در ارتفاع کم گم می‌شوند. مقیاس پیش‌فرض Tailwind
   (۱۲ و ۱۴ پیکسل) برای متن فارسی این پنل خیلی کوچک بود، پس
   پله‌های کوچک بالا برده شده و ارتفاع خطشان بازتر شده است.
   ══════════════════════════════════════════════════════════════ */
.text-\[10px\],
.text-\[11px\],
.text-2xs {
  font-size: 0.8125rem !important; /* ۱۳ پیکسل */
  line-height: 1.7 !important;
}

.text-xs {
  font-size: 0.8438rem !important; /* ۱۳.۵ پیکسل */
  line-height: 1.7 !important;
}

.text-sm {
  font-size: 0.9375rem !important; /* ۱۵ پیکسل */
  line-height: 1.65 !important;
}

/* اندازهٔ متن نسخهٔ کوچک اجزای Metronic — ۱۱/۱۲ پیکسل برای فارسی کم بود */
.kt-badge-sm,
.kt-btn-sm,
.kt-menu-item-sm .kt-menu-title {
  font-size: 0.8125rem !important; /* ۱۳ پیکسل */
  line-height: 1.5 !important;
}

.kt-badge-xs,
.kt-btn-xs {
  font-size: 0.78rem !important; /* ۱۲.۵ پیکسل */
  line-height: 1.45 !important;
}

/*
 * فلش باز/بستهٔ زیرمنوی سایدبار.
 *
 * واریانت‌های `kt-menu-item-show:*` در باندل مترونیک به‌صورت سلکتور
 * هم‌عنصری کامپایل شده‌اند (`.kt-menu-item-show\:hidden.kt-menu-item.show`)
 * و روی آیکنی که داخل لینک است هرگز مچ نمی‌شوند؛ نتیجه این بود که فلش
 * با باز و بسته شدن زیرمنو تغییر نمی‌کرد. اینجا صریح می‌نویسیم.
 *
 * ترکیب‌کنندهٔ `>` عمدی است: در منوی تودرتو باز شدن والد نباید فلش
 * فرزندِ بسته را برگرداند.
 */
.kt-menu-arrow .kt-arrow-closed {
  display: inline-flex;
}

.kt-menu-arrow .kt-arrow-open {
  display: none;
}

.kt-menu-item.show > .kt-menu-link .kt-menu-arrow .kt-arrow-closed {
  display: none;
}

.kt-menu-item.show > .kt-menu-link .kt-menu-arrow .kt-arrow-open {
  display: inline-flex;
}

/*
 * دراور سایدبار در موبایل و تبلت باید از سمت راست باز شود.
 *
 * مترونیک موقعیت را جهت‌آگاه گرفته — `.kt-drawer-start { inset-inline-end: auto }`
 * یعنی در RTL دراور به لبهٔ راست می‌چسبد — اما ترنسلیتِ پنهان‌کردنش فیزیکی
 * مانده: `--tw-translate-x: -100%`. در LTR درست است (بیرونِ لبهٔ چپ)، ولی در
 * RTL دراور را به سمت چپِ صفحه می‌کشد و بعد از چپ به راست باز می‌شود.
 * برای RTL علامت باید مثبت باشد تا بیرونِ لبهٔ راست پنهان شود.
 *
 * قانونِ حالت باز (`.kt-drawer-start[data-kt-drawer-initialized].open`) در
 * باندل مترونیک specificity بالاتری دارد، پس این override فقط حالت بسته را
 * عوض می‌کند و باز شدن دست‌نخورده می‌ماند.
 */
[dir='rtl'] .kt-drawer-start {
  --tw-translate-x: 100%;
}

[dir='rtl'] .kt-drawer-start.open {
  --tw-translate-x: 0;
}

/*
 * منوی سایدبار باید داخل ارتفاع سایدبار جمع شود تا اسکرول کار کند.
 *
 * آیتم فلکس به‌طور پیش‌فرض `min-height: auto` دارد و کوچک‌تر از محتوایش
 * نمی‌شود، پس ظرفِ اسکرول به اندازهٔ کل منو کش می‌آمد (بلندتر از خودِ
 * سایدبار) و `overflow-y: auto` چیزی برای بریدن نداشت؛ در موبایل و تبلت
 * آیتم‌های پایینی از دسترس خارج می‌شدند.
 *
 * این را به‌جای کلاس `min-h-0` صریح می‌نویسیم چون آن کلاس در باندل آمادهٔ
 * مترونیک وجود ندارد و پنل ادمین اصلاً بیلد Tailwind ندارد.
 */
#sidebar_menu,
#sidebar_menu > .kt-scrollable-y-auto {
  min-height: 0;
}
