:root {
  color-scheme: light;
  /* 60/30/10 rang tizimi: brendbuk 2026: Tong kulrang (fon) / Tun ko'ki (matn, sarlavha) / Vaqtliy yashil (harakat, faol holat) */
  --bg: #EEF2F5;
  --surface: #ffffff;
  --line: #dbe3eb;
  --text: #020B1A;
  --muted: #5c7189;
  --accent: #00C782;
  --accent-strong: #020B1A;
  --danger: #b91c1c;
  --warning: #b45309;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Poppins, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.sidebar-toggle-input {
  display: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 240px;
  flex: 0 0 240px;
  min-height: 100vh;
  padding: 20px 14px;
  background: var(--accent-strong);
  box-shadow: 4px 0 24px rgba(2, 11, 26, 0.12);
  position: relative;
  z-index: 1;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.brand {
  color: var(--accent-strong);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
}

.brand img {
  max-width: 190px;
  max-height: 52px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.sidebar-close {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: -12px;
  cursor: pointer;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
  overflow-y: auto;
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-group-title {
  padding: 6px 10px 2px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  border-left: 3px solid transparent;
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-nav a.active {
  background: rgba(0, 199, 130, 0.16);
  border-left-color: var(--accent);
  color: #ffffff;
}

.nav-icon {
  display: inline-flex;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
}

.sidebar-backdrop {
  display: none;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sidebar-user {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px;
  color: #ffffff;
}

.sidebar-user span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

.sidebar-footer form {
  width: 100%;
}

.sidebar-footer button {
  width: 100%;
}

.app-main {
  flex: 1;
  min-width: 0;
}

.topbar {
  display: none;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.sidebar-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin: -12px;
  cursor: pointer;
  font-size: 20px;
}

.page {
  width: 100%;
  max-width: 1440px;
  box-sizing: border-box;
  margin: 24px auto 48px;
  padding: 0 32px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h2 {
  font-size: 17px;
  font-weight: 800;
}

.section-head p {
  margin-top: 4px;
  color: var(--muted);
}

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

.stat-cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 14px;
  background: #eef4ff;
  box-shadow: 0 8px 20px rgba(2, 11, 26, 0.06);
}

.stat-card[data-filter] {
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.stat-card[data-filter]:hover {
  transform: translateY(-2px);
}

.stat-card[data-filter].active {
  border-color: currentColor;
}

.stat-card span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  opacity: 0.85;
}

.stat-card strong {
  display: block;
  margin-top: 2px;
  font-size: 26px;
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.6);
  flex: 0 0 auto;
}

.stat-icon svg {
  width: 20px;
  height: 20px;
}

.stat-navy {
  background: #e3e9f5;
  color: var(--accent-strong);
}

.stat-teal {
  background: #d7f7f0;
  color: #0e8a74;
}

.stat-orange {
  background: #fef3c7;
  color: var(--warning);
}

.stat-red {
  background: #fee2e2;
  color: var(--danger);
}

.filters-pill label {
  font-size: 12px;
}

.employee-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.employee-cell-sub {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 13px;
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 18px;
}

.panel-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-preview h3 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding: 18px;
}

.toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fafb;
  font-weight: 700;
  cursor: pointer;
}

.toggle-card > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toggle-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.switch,
.toggle-card input[type="checkbox"],
.checkbox input[type="checkbox"] {
  appearance: none;
  width: 44px;
  min-width: 44px;
  height: 24px;
  min-height: 0;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e2e8f0;
  border: none;
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease;
}

.switch::after,
.toggle-card input[type="checkbox"]::after,
.checkbox input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  box-sizing: border-box;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.switch:checked,
.toggle-card input[type="checkbox"]:checked,
.checkbox input[type="checkbox"]:checked {
  background: var(--accent-soft, #d7f7f0);
}

.switch:checked::after,
.toggle-card input[type="checkbox"]:checked::after,
.checkbox input[type="checkbox"]:checked::after {
  transform: translateX(20px);
  background-color: var(--accent-strong);
  border-color: var(--accent-strong);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.entity-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 1px 2px rgba(2, 11, 26, 0.04), 0 12px 28px rgba(2, 11, 26, 0.05);
}

.entity-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.entity-card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entity-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--accent-soft, #eef4ff);
  color: var(--accent-strong);
}

.entity-icon svg {
  width: 20px;
  height: 20px;
}

.entity-card h3 {
  font-size: 16px;
  font-weight: 800;
  margin: 0;
}

.entity-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.entity-card-meta svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.entity-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.entity-card-footer form {
  display: inline-flex;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  min-height: 0;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}

.icon-button svg {
  flex-shrink: 0;
}

.icon-button:hover {
  background: #f1f5f9;
  color: var(--accent-strong);
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.switch-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch-cell form {
  display: inline-flex;
}

.form-actions {
  padding: 0 18px 18px;
}

.panel,
.form-panel,
.filters,
.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(2, 11, 26, 0.04), 0 12px 28px rgba(2, 11, 26, 0.05);
}

.panel {
  margin-top: 16px;
  overflow: hidden;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: #fafcfe;
  border-bottom: 1px solid var(--line);
}

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

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

th,
td {
  padding: 13px 16px;
  border-bottom: 1px solid #edf0f4;
  text-align: left;
  vertical-align: middle;
}

th {
  background: #fafcfe;
  color: #4b5563;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

tbody tr {
  transition: background 0.12s ease;
}

tbody tr:hover {
  background: #f7fafc;
}

tr:last-child td {
  border-bottom: 0;
}

tfoot td {
  background: #fafcfe;
  border-top: 2px solid var(--line);
  border-bottom: 0;
}

.inactive-row {
  opacity: 0.62;
  background: #f9fafb;
}

.empty {
  color: var(--muted);
  text-align: center;
}

/* Face ID qo'shish havolasi: bir marta ko'rsatiladigan panel. */
.invite-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.invite-body p {
  margin: 0;
}

.invite-link {
  width: 100%;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  background: #f9fafb;
}

/* Jadval ostidagi izoh (masalan "qoldirgan kunlar qaysi oy bo'yicha"). */
.table-footnote {
  margin: 0;
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-strong);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 199, 130, 0.22);
  transition: transform 0.1s ease, box-shadow 0.1s ease, opacity 0.1s ease;
}

.button:hover,
button:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.button:active,
button:active {
  transform: translateY(0);
}

.button.secondary,
button.secondary {
  background: #ffffff;
  color: var(--accent-strong);
  box-shadow: none;
}

button.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(185, 28, 28, 0.18);
}

.filters,
.form-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 16px;
}

/* Rejimga bog'liq filtr maydonlari (oylik/kunbay) bir qatorda turishi uchun. */
.filters [data-mode-fields] {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.filters [data-mode-fields][hidden] {
  display: none;
}

/* Oylik ⇄ Kunbay rejimini almashtiradigan switch: chap holat — oylik, o'ng holat — kunbay. */
.mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.mode-switch-text {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  transition: color 0.15s ease;
}

/* DOM tartibi: input birinchi (holat selektorlari uchun), ko'rinishda — o'rtada. */
.mode-switch-monthly {
  order: 1;
}

.mode-switch-input {
  order: 2;
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 44px;
  min-width: 44px;
  height: 24px;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 999px;
  background: #e2e8f0;
  position: relative;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mode-switch-daily {
  order: 3;
}

.mode-switch-input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 1px 3px rgba(2, 11, 26, 0.26);
  transition: transform 0.15s ease;
}

.mode-switch-input:checked {
  background: rgba(0, 199, 130, 0.28);
}

.mode-switch-input:checked::after {
  transform: translateX(20px);
}

/* Pill'ning o'zida label:focus-within konturi bor — ichki halqa takrorlanmasin. */
.mode-switch-input:focus {
  box-shadow: none;
}

.mode-switch-input:not(:checked) ~ .mode-switch-monthly,
.mode-switch-input:checked ~ .mode-switch-daily {
  color: var(--text);
}

/* Mobil filtrda `.filters input { width: 100% }` switch'ni cho'zib yubormasin. */
.filters .mode-switch-input {
  width: 44px;
  min-width: 44px;
}

@media (max-width: 900px) {
  .filters .mode-switch {
    width: 100%;
    justify-content: center;
  }
}

.form-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  max-width: 760px;
}

.form-panel.compact {
  max-width: none;
}

label {
  display: grid;
  gap: 6px;
  color: #374151;
  font-weight: 700;
}

.field-hint {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}

.avatar-photo {
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

input,
select {
  min-height: 38px;
  min-width: 160px;
  padding: 8px 12px;
  border: 1px solid #d7dfe8;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 199, 130, 0.15);
}

a:focus-visible,
button:focus-visible,
.button:focus-visible,
label:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox input {
  min-width: auto;
}

.checkbox.inline {
  min-height: 64px;
}

.form-actions,
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
}

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.grid-6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.grid-5 input,
.grid-6 input,
.grid-6 select {
  width: 100%;
  min-width: 0;
}

.schedule-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fafb;
}

.schedule-grid {
  display: grid;
  gap: 10px;
}

.schedule-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr);
  gap: 10px;
  align-items: end;
}

.schedule-row strong {
  padding-bottom: 10px;
}

.schedule-off {
  min-height: 64px;
}

.calendar-box-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calendar-box-head form {
  margin: 0;
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.calendar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: #d1d5db;
}

.calendar-dot.present {
  background: #22c55e;
}

.calendar-dot.late {
  background: #f59e0b;
}

.calendar-dot.absent {
  background: #ef4444;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekday {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #6b7280;
  padding-bottom: 2px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  background: #f3f4f6;
  color: #9ca3af;
}

.calendar-day.present {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.calendar-day.late {
  background: rgba(245, 158, 11, 0.22);
  color: #b45309;
}

.calendar-day.absent {
  background: rgba(239, 68, 68, 0.18);
  color: #b91c1c;
}

.calendar-day.off,
.calendar-day.future,
.calendar-day.is-empty {
  background: transparent;
  color: #d1d5db;
}

.pill,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.pill.check_in {
  background: #d7f7f0;
  color: #0e8a74;
}

.pill.check_out {
  background: #dcfce7;
  color: #15803d;
}

.pill.absence {
  background: #fef3c7;
  color: var(--warning);
}

.status.new {
  background: #fef3c7;
  color: var(--warning);
}

.status.sent {
  background: #d7f7f0;
  color: #0e8a74;
}

.status.failed {
  background: #fee2e2;
  color: var(--danger);
}

.status.pending {
  background: #e0e7ff;
  color: #3730a3;
}

.status.processing {
  background: #fef3c7;
  color: var(--warning);
}

.notice {
  margin-bottom: 16px;
  padding: 14px 16px;
  border-color: #99e9cd;
  background: #e6f9f2;
}

.notice-warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: var(--warning);
}

.notice-success {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.billing-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(135px, 1fr));
  gap: 12px;
  align-items: end;
}

.billing-manual-panel > summary {
  padding: 16px 20px;
  color: var(--accent-strong);
  font-weight: 800;
  cursor: pointer;
  background: #fafcfe;
}

.billing-manual-panel[open] > summary {
  border-bottom: 1px solid var(--line);
}

.billing-manual-panel .billing-form {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.billing-grow {
  grid-column: span 2;
}

.billing-details summary {
  color: var(--accent-strong);
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
}

.billing-edit-form,
.billing-payment-form {
  min-width: 290px;
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.billing-payment-form input {
  width: 100%;
}

.payment-provider-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.payment-provider-grid .entity-card {
  display: grid;
  gap: 14px;
}

.integration-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

@media (max-width: 1100px) {
  .billing-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .payment-provider-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .billing-form { grid-template-columns: 1fr; }
  .billing-grow { grid-column: auto; }
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.token-display {
  width: 100%;
  background: #f9fafb;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

.msg-cell {
  display: inline-block;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.actions {
  width: 1%;
  white-space: nowrap;
}

.actions form {
  display: inline-flex;
  margin-left: 6px;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.split table {
  min-width: 0;
}

@media (max-width: 900px) {
  .topbar {
    display: flex;
    justify-content: space-between;
  }

  .topbar .brand img {
    max-height: 30px;
  }

  .sidebar-close {
    display: flex;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.12);
  }

  .sidebar-toggle-input:checked ~ .app-shell .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 15;
    background: rgba(2, 11, 26, 0);
    pointer-events: none;
    transition: background 0.2s ease;
  }

  .sidebar-toggle-input:checked ~ .app-shell .sidebar-backdrop {
    background: rgba(2, 11, 26, 0.45);
    pointer-events: auto;
  }

  .stat-cards,
  .stat-cards-3,
  .grid-5,
  .grid-6,
  .schedule-row,
  .split {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .page {
    padding: 0 16px;
    margin-top: 16px;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filters input,
  .filters select {
    width: 100%;
    min-width: 0;
  }

  .actions {
    white-space: normal;
  }

  .actions form {
    display: block;
    margin: 6px 0 0;
  }
}

@media (max-width: 900px) and (min-width: 601px) {
  .stat-cards,
  .stat-cards-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  padding-right: 44px;
}

.password-field input::-ms-reveal,
.password-field input::-ms-clear {
  display: none;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-height: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.password-toggle:hover {
  color: var(--text);
  transform: translateY(-50%);
  opacity: 1;
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle.is-visible .icon-eye {
  display: none;
}

.password-toggle.is-visible .icon-eye-off {
  display: block;
}

/* Super-admin tashkilotlar ro'yxati: egasining kontakti va demo muddati. */
.org-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.signup-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notice-danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: var(--danger);
}

.panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(2, 11, 26, 0.45);
  z-index: 40;
}

.slide-panel {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(480px, 100%);
  background: var(--surface);
  box-shadow: -8px 0 32px rgba(2, 11, 26, 0.18);
  z-index: 41;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

body.panel-open {
  overflow: hidden;
}

body.panel-open .panel-overlay {
  display: block;
}

body.panel-open .slide-panel {
  transform: translateX(0);
}

.slide-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}

.slide-panel-header h2 {
  margin: 0;
}

.slide-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.slide-panel-body .form-panel {
  max-width: none;
  padding: 0;
  border: none;
  box-shadow: none;
}

.slide-panel-body .schedule-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.slide-panel-body input:not([type="checkbox"]):not([type="radio"]),
.slide-panel-body select {
  min-width: 0;
  width: 100%;
}

@media (max-width: 640px) {
  .slide-panel {
    width: 100%;
  }
}

/* Texnik bo'lim (Texnik.png): qurilmalar va integratsiyalar kartalari. */
.tech-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px 14px 20px;
  border: 1px solid #f2b8b8;
  border-radius: 14px;
  background: #fdecec;
  color: var(--text);
}

.tech-alert p {
  flex: 1;
  min-width: 0;
  line-height: 1.5;
}

.tech-alert .tech-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #dc2626;
}

.tech-alert.is-ok {
  border-color: #99e9cd;
  background: #e6f9f2;
}

.tech-alert.is-ok .tech-dot {
  background: var(--accent);
}

.tech-alert.is-wait {
  border-color: #fde68a;
  background: #fffbeb;
}

.tech-alert.is-wait .tech-dot {
  background: #f59e0b;
}

.tech-alert-body {
  flex: 1;
  min-width: 0;
}

.tech-alert-body p {
  line-height: 1.5;
}

.tech-isup {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.94rem;
}

.tech-isup code {
  padding: 1px 6px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--text);
}

.tech-alert .button,
.tech-alert button,
.tech-card-head .button.secondary,
.tech-note .button {
  flex: 0 0 auto;
  border-color: var(--line);
}

/* Face ID qurilmasini ulash (TexQurilma.png): raqamlangan 3 qadam va yashil eslatma. */
.tech-connect-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.tech-connect-head > div {
  flex: 1;
  min-width: 0;
}

.tech-connect-form {
  display: grid;
  gap: 16px;
  padding: 4px 24px 24px;
}

.tech-connect-form > label {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 6px 10px;
  align-items: center;
  font-weight: 500;
}

.tech-connect-form > label input,
.tech-connect-form > label select,
.tech-connect-extra input {
  grid-column: 2;
  width: 100%;
  min-width: 0;
}

.tech-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e6f9f2;
  color: #00754e;
  font-size: 0.85rem;
  font-weight: 700;
}

.tech-label {
  color: var(--muted);
  font-weight: 500;
}

.tech-connect-extra {
  padding-left: 36px;
  color: var(--muted);
  font-size: 0.94rem;
}

.tech-connect-extra summary {
  cursor: pointer;
}

.tech-connect-extra label {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.tech-connect-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid #99e9cd;
  border-radius: 14px;
  background: #e6f9f2;
  line-height: 1.5;
}

.tech-connect-note .tech-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
}

.tech-connect-error {
  padding: 10px 14px;
  border: 1px solid #f2b8b8;
  border-radius: 12px;
  background: #fdecec;
  color: #b91c1c;
}

.tech-connect-form .form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.tech-exports a + a,
.tech-exports {
  white-space: normal;
}

.tech-help ol {
  margin: 0;
  padding: 20px 24px 24px 44px;
  line-height: 1.7;
}

.tech-help a {
  color: #00875a;
  font-weight: 600;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tech-card {
  min-width: 0;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(2, 11, 26, 0.04);
}

.tech-card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.tech-card-head > div {
  flex: 1;
  min-width: 0;
}

.tech-card-head h2 {
  font-size: 17px;
  font-weight: 600;
}

.tech-card-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.tech-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #ddf7ec;
  color: #00875a;
}

.tech-card-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tech-rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tech-rows li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.tech-rows li:last-child {
  border-bottom: 0;
}

.tech-rows-sync {
  border-top: 1px solid var(--line);
}

.tech-rows li > span:first-child {
  color: var(--muted);
}

.tech-state {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  overflow-wrap: anywhere;
  text-align: right;
}

.tech-state[class*="is-"]::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #94a3b8;
  transform: translateY(-1px);
}

.tech-state.is-ok::before {
  background: var(--accent);
}

.tech-state.is-bad::before {
  background: #dc2626;
}

.tech-state.is-wait::before {
  background: #f59e0b;
}

.tech-state.is-none,
.tech-state.is-off {
  color: var(--muted);
}

.tech-state code {
  font-size: 13px;
}

.tech-link {
  color: #00875a;
  font-weight: 600;
}

.tech-more {
  display: inline-block;
  margin-top: 6px;
  color: #00875a;
  font-weight: 600;
  text-decoration: none;
}

.tech-more:hover,
.tech-link:hover {
  text-decoration: underline;
}

.tech-empty,
.tech-note {
  padding-top: 16px;
  color: var(--muted);
}

.tech-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 1100px) {
  .tech-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .tech-alert {
    flex-wrap: wrap;
  }

  .tech-alert p {
    flex-basis: calc(100% - 30px);
  }

  .tech-card {
    padding: 18px 16px;
  }

  .tech-card-head {
    flex-wrap: wrap;
  }

  .tech-card-head > .button {
    width: 100%;
  }

  .tech-state {
    text-align: left;
  }
}

/* Sozlamalar → Korxona va filiallar (SozKorxona.png). */
.set-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.set-card {
  display: grid;
  align-content: start;
  gap: 14px;
}

.set-card h2 {
  font-size: 17px;
  font-weight: 600;
}

.set-card label {
  font-weight: 500;
  color: var(--muted);
}

.set-card input:not([type="checkbox"]),
.set-card select {
  width: 100%;
  min-width: 0;
  color: var(--text);
}

.set-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.set-field {
  display: grid;
  gap: 4px;
}

.set-label {
  color: var(--muted);
  font-weight: 500;
}

.set-hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.set-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.set-card-head h2 {
  flex: 0 1 auto;
}

.set-card-head .button {
  margin-left: auto;
  border-color: var(--line);
}

.set-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.set-branches {
  margin: 0;
  padding: 0;
  list-style: none;
}

.set-branches li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.set-branches li:last-child {
  border-bottom: 0;
}

.set-branches li > div {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.set-branches li > div span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.set-branches li.is-inactive {
  opacity: 0.6;
}

.set-toggles {
  padding: 0;
}

.set-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

@media (max-width: 1100px) {
  .set-grid,
  .set-pair {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .set-card-head {
    flex-wrap: wrap;
  }

  .set-actions button {
    width: 100%;
  }
}

/* Sozlamalar → Tarif va to'lov (SozTarif.png). */
.pay-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 14px 16px 14px 20px;
  border: 1px solid #8fe3c4;
  border-radius: 14px;
  background: #e3f8ef;
}

.pay-banner.is-wait {
  border-color: #f5d49a;
  background: #fff6e5;
}

.pay-banner.is-bad {
  border-color: #f2b8b8;
  background: #fdecec;
}

.pay-banner p {
  flex: 1;
  min-width: 0;
  line-height: 1.5;
}

.pay-banner-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: #00875a;
}

.pay-banner.is-wait .pay-banner-icon {
  color: var(--warning);
}

.pay-banner.is-bad .pay-banner-icon {
  color: var(--danger);
}

.pay-banner-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pay-banner-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.pay-banner-actions form {
  margin: 0;
}

.pay-banner-actions .secondary {
  border-color: var(--line);
  background: var(--surface);
}

/* Tarif kartalari (Elbek 2026-11-11 rasmi): Standart — Tong kulrang, Full — Tun ko'ki, "Hammasi kiradi". */
.pay-tariffs {
  margin-bottom: 22px;
}

.pay-tariffs [hidden] {
  display: none !important;
}

.pay-tariffs-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 920px;
  margin-bottom: 16px;
}

.pay-tariffs-head h2 {
  font-size: 24px;
  font-weight: 700;
}

.pay-cycle {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.pay-cycle label {
  position: relative;
  cursor: pointer;
}

.pay-cycle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pay-cycle span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
}

.pay-cycle em {
  padding: 1px 7px;
  border-radius: 999px;
  background: #d5f6e8;
  color: #00875a;
  font-size: 12px;
  font-style: normal;
}

.pay-cycle input:checked + span {
  background: #020B1A;
  color: #fff;
}

.pay-cycle input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pay-plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  max-width: 920px;
}

.pay-plan {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px 30px;
  border: 2px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: #020B1A;
}

.pay-plan.is-full {
  border-color: #020B1A;
  background: #020B1A;
  color: #fff;
}

.pay-plan.is-current {
  border-color: var(--accent);
}

.pay-plan header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.pay-plan h3,
.pay-plan p,
.pay-tariffs-head h2 {
  margin: 0;
}

.pay-plan h3 {
  color: #00875a;
  font-size: 22px;
  font-weight: 700;
}

.pay-plan.is-full h3 {
  color: #00C782;
}

.pay-badge {
  padding: 6px 14px;
  border-radius: 999px;
  background: #00C782;
  color: #020B1A;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pay-badge.is-current {
  letter-spacing: 0;
  text-transform: none;
  font-size: 12px;
}

.pay-price {
  font-size: 22px;
  font-weight: 700;
}

.pay-price strong {
  font-size: 30px;
  letter-spacing: -0.01em;
}

.pay-price small {
  display: block;
  color: #5c7189;
  font-size: 13px;
  font-weight: 500;
}

.pay-plan.is-full .pay-price small,
.pay-plan.is-full .pay-subtitle {
  color: #C7D0DC;
}

.pay-limits {
  margin-top: 6px;
  color: #00875a;
  font-weight: 700;
}

.pay-plan.is-full .pay-limits {
  color: #00C782;
}

.pay-subtitle {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  color: #5c7189;
}

.pay-plan.is-full .pay-subtitle {
  border-bottom-color: #24324A;
}

.pay-plan ul {
  display: grid;
  gap: 14px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.pay-plan li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.pay-plan li svg {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  fill: none;
  stroke: #00875a;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pay-plan.is-full li svg {
  stroke: #00C782;
}

.pay-plan-cta {
  width: 100%;
  margin-top: auto;
  min-height: 46px;
}

.pay-plan ul + .pay-plan-cta {
  margin-top: 24px;
}

.pay-plan:not(.is-full) .pay-plan-cta {
  background: #020B1A;
  border-color: #020B1A;
  color: #fff;
}

.pay-plan.is-full .pay-plan-cta {
  background: #00C782;
  border-color: #00C782;
  color: #020B1A;
}

.pay-change {
  margin: 12px 0 0;
}

.pay-parts {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.pay-subscribe-plan {
  margin: 0 0 14px;
  font-size: 18px;
}

.pay-cycle.is-wide {
  display: flex;
  margin-bottom: 16px;
}

.pay-cycle.is-wide label {
  flex: 1;
}

.pay-cycle.is-wide span {
  justify-content: center;
  width: 100%;
}

.pay-promo {
  display: grid;
  gap: 6px;
}

.pay-promo-row {
  display: flex;
  gap: 8px;
}

.pay-promo-row input {
  flex: 1;
  min-width: 0;
  text-transform: uppercase;
}

.pay-promo-note {
  color: var(--muted);
  font-size: 12px;
}

.pay-promo-note.is-ok {
  color: #00875a;
  font-weight: 600;
}

.pay-promo-note.is-bad {
  color: var(--danger);
}

.pay-total {
  display: grid;
  gap: 8px;
  margin: 18px 0 4px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--bg);
}

.pay-total div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.pay-total dt {
  color: var(--muted);
}

.pay-total dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}

.pay-total .is-sum dd {
  font-size: 18px;
  font-weight: 700;
}

.pay-grid.is-single {
  grid-template-columns: minmax(0, 920px);
}

.pay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pay-methods span {
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 600;
}

.pay-saved {
  color: #00875a;
  font-size: 13px;
  font-weight: 500;
}

.pay-saved::before {
  content: "✓ ";
}

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

.pay-table {
  min-width: 0;
}

.pay-table td:first-child,
.pay-table td:last-child {
  white-space: nowrap;
}

.pay-table th {
  background: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.pay-table th,
.pay-table td {
  padding: 12px 10px;
}

.pay-table td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.pay-table .tech-state {
  margin-left: 4px;
  font-size: 12px;
}

.pay-num {
  text-align: right;
  white-space: nowrap;
}

.pay-table th.pay-num {
  text-align: right;
}

.pay-invoices ul {
  margin: 0;
  padding: 8px 24px 20px;
  list-style: none;
}

.pay-invoices li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.pay-invoices li:last-child {
  border-bottom: 0;
}

.pay-invoices li > div:first-child {
  display: grid;
  flex: 1 1 200px;
  min-width: 0;
  gap: 2px;
}

.pay-invoices li > div span,
.pay-invoice-sum span {
  color: var(--muted);
  font-size: 13px;
}

.pay-invoice-sum {
  display: grid;
  text-align: right;
}

.pay-invoices form {
  margin: 0;
}

.pay-invoices-empty {
  padding: 20px 24px 24px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .pay-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .pay-plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .pay-plan {
    padding: 22px 20px;
  }

  .pay-plan ul {
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  .pay-banner {
    flex-wrap: wrap;
  }

  .pay-banner p {
    flex-basis: calc(100% - 36px);
  }

  .pay-banner-actions {
    flex-wrap: wrap;
    width: 100%;
  }

  .pay-banner-actions > *,
  .pay-banner-actions button {
    flex: 1 1 auto;
    width: 100%;
  }

  .pay-invoices ul {
    padding: 4px 16px 16px;
  }

  .pay-invoice-sum {
    text-align: left;
  }

  /* Telefonda tarix ikki qatorli ro'yxat: nima uchun va summa, ostida sana va usul. */
  .pay-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .pay-table tbody {
    display: block;
  }

  .pay-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "purpose amount" "date method";
    gap: 2px 12px;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f4;
  }

  .pay-table tr:last-child {
    border-bottom: 0;
  }

  .pay-table td {
    padding: 0;
    border: 0;
  }

  .pay-table td:nth-child(1) {
    grid-area: date;
    color: var(--muted);
    font-size: 13px;
  }

  .pay-table td:nth-child(2) {
    grid-area: purpose;
    font-weight: 500;
  }

  .pay-table td:nth-child(3) {
    grid-area: amount;
    font-weight: 600;
  }

  .pay-table td:nth-child(4) {
    grid-area: method;
    color: var(--muted);
    font-size: 13px;
    text-align: right;
  }
}

/* Filial xaritadagi joyi (Zoom 31-okt): tahrirlash oynasida Yandex vidjeti. */
.branch-map { display: grid; gap: 6px; }
.branch-map iframe { width: 100%; height: 220px; border: 1px solid var(--line, #E3E8EF); border-radius: 10px; }
.branch-map a { font-size: 13px; }

/* API tokenlar: ruxsatlar */
.token-scopes { border: 1px solid var(--line, #e2e8f0); border-radius: 8px; padding: 10px 14px; margin-top: 12px; display: grid; gap: 6px; }
.token-scopes legend { font-weight: 600; padding: 0 4px; }
.token-note { color: var(--muted, #64748b); font-size: 13px; margin: 2px 0 0; }
.token-scope { display: inline-block; margin: 0 4px 4px 0; font-size: 12px; }

/* Super admin → CRM (AI diagnostika) */
.crm-stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.crm-stats .stat-card { text-decoration: none; color: inherit; }
.crm-dl { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 6px 14px; margin: 0; }
.crm-dl dt { color: var(--muted, #64748b); font-size: 13px; }
.crm-dl dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.crm-section { margin: 18px 16px 8px; font-size: 15px; }
.crm-qa td:first-child { width: 60%; }
.crm-raw { max-height: 420px; overflow: auto; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
