.panel-body {
  background: linear-gradient(160deg, #0f172a 0%, #1e293b 45%, #334155 100%);
  min-height: var(--tg-app-height, 100dvh);
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #e2e8f0;
}

.panel-body:has(.panel-wrap--user:not(.hidden)) {
  background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 40%, #ffffff 100%);
  color: #1e293b;
}

.panel-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(
    var(--tg-app-height, 100dvh) - var(--tg-safe-inset-top) - var(--tg-safe-inset-bottom)
  );
  gap: 1rem;
}

.panel-loading .spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #334155;
  border-top-color: #38bdf8;
  border-radius: 50%;
  animation: panel-spin 0.75s linear infinite;
}

@keyframes panel-spin {
  to { transform: rotate(360deg); }
}

.hidden {
  display: none !important;
}

.panel-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 0.75rem 0.85rem 1.5rem;
  width: 100%;
}

/* Panel: to‘liq ekran balandligi (Telegram WebApp) */
.panel-wrap--user,
.panel-wrap--admin {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  margin: 0;
  height: var(--tg-app-height, 100dvh);
  max-height: var(--tg-app-height, 100dvh);
  min-height: 0;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.panel-wrap--user {
  padding-top: 0;
}

.admin-main,
.panel-wrap--user > .panel-header,
.panel-wrap--user > .user-panel-scroll {
  box-sizing: border-box;
}

/* Admin: pastki menyu (telefon) */
.admin-sidebar.admin-nav-bar {
  flex: 0 0 auto;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0.15rem;
  width: 100%;
  max-width: 100%;
  padding: 0.35rem 0.4rem;
  padding-bottom: calc(0.4rem + var(--tg-safe-inset-bottom, env(safe-area-inset-bottom, 0px)));
  padding-left: calc(0.4rem + var(--tg-safe-inset-left, 0px));
  padding-right: calc(0.4rem + var(--tg-safe-inset-right, 0px));
  background: rgba(10, 15, 28, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-right: none;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
  z-index: 120;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.admin-sidebar.admin-nav-bar::-webkit-scrollbar {
  display: none;
}

.admin-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  flex: 0 0 auto;
  min-width: 3.4rem;
  min-height: 52px;
  padding: 0.35rem 0.45rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  font-size: 0.62rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.1;
  scroll-snap-align: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.admin-tab-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.admin-tab-label {
  font-size: 0.58rem;
  text-align: center;
  word-break: break-word;
}

.admin-tab-btn.active {
  background: rgba(245, 158, 11, 0.22);
  color: #fbbf24;
}

.admin-tab-btn.active .admin-tab-label {
  color: #fef3c7;
}

.admin-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0.65rem 0.75rem 0;
  padding-top: calc(0.35rem + var(--tg-safe-inset-top, env(safe-area-inset-top, 0px)));
  overflow: hidden;
}

.admin-panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 0.5rem;
}

.panel-wrap--admin .panel-header {
  flex-shrink: 0;
  margin-bottom: 0.75rem;
}

.admin-tab-panel {
  display: block;
}

.stats-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.stats-toolbar h2 {
  margin: 0;
}

.stats-sections {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stats-group {
  margin-bottom: 0;
}

.stats-group-title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  color: #e2e8f0;
  font-weight: 600;
}

.admin-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.crud-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.crud-actions--pay {
  align-items: center;
}

.crud-actions--pay .pay-amount {
  width: 100px;
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.25);
  color: #f1f5f9;
  font-size: 0.85rem;
}

.crud-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.35rem 0;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.panel-card textarea,
.panel-card select {
  width: 100%;
  margin: 0.35rem 0 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: #f1f5f9;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.panel-header {
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.panel-header--admin {
  border-left: 4px solid #f59e0b;
}

.panel-header--user {
  border-left: 4px solid #22c55e;
}

.panel-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: #f59e0b;
  color: #0f172a;
  margin-bottom: 0.5rem;
}

.panel-badge--user {
  background: #22c55e;
}

.panel-header h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  color: #f8fafc;
  text-align: left;
}

.panel-sub {
  margin: 0;
  font-size: 0.9rem;
  color: #94a3b8;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: #38bdf8;
}

.stat-label {
  font-size: 0.72rem;
  color: #94a3b8;
  line-height: 1.2;
}

.panel-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1.1rem;
  margin-bottom: 1rem;
}

.panel-card h2 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: #f1f5f9;
}

.panel-card .hint {
  font-size: 0.82rem;
  color: #94a3b8;
  margin: 0 0 0.75rem;
}

.panel-card code {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.panel-card input[type="text"] {
  width: 100%;
  padding: 12px;
  border: 1px solid #475569;
  border-radius: 10px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.panel-card input:focus {
  outline: none;
  border-color: #38bdf8;
}

.btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
}

.btn-secondary {
  background: #334155;
  color: #e2e8f0;
}

.panel-info p {
  margin: 0.35rem 0;
  font-size: 0.88rem;
  color: #cbd5e1;
}

.panel-error {
  max-width: 400px;
  margin: 2rem auto;
  text-align: center;
}

.message {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.message.error {
  background: rgba(239, 68, 68, 0.2);
  color: #fecaca;
  display: block;
}

.message.success {
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
  display: block;
}

.panel-toolbar {
  padding: 0.65rem 1rem;
  margin-bottom: 0.5rem;
}

.btn-sm {
  padding: 10px 12px;
  font-size: 0.9rem;
  min-height: 42px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.btn-row .btn {
  flex: 1 1 auto;
  min-width: 100px;
}

.stat-card--wide {
  grid-column: 1 / -1;
}

.admin-list {
  margin-top: 0.5rem;
}

.list-empty {
  margin: 0.5rem 0 0;
}

/* Model jadvali: 1 qator = 1 yozuv, amallar yonida */
/* Admin panel — umumiy chiroyli ko‘rinish */
.panel-wrap--admin .panel-card {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.panel-wrap--admin .panel-card--table {
  padding: 0.9rem 0.85rem 1rem;
}

.panel-card__head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.panel-card__head-row h2 {
  margin: 0;
}

.panel-card__meta {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

.panel-card__hint {
  margin: 0 0 0.5rem !important;
  font-size: 0.78rem;
}

.model-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 0.35rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.2);
}

.model-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.model-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(15, 23, 42, 0.98);
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.5rem 0.55rem;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  text-align: left;
}

.model-table tbody td {
  padding: 0.55rem 0.6rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  white-space: nowrap;
}

.model-table tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.cell-text {
  font-size: 0.82rem;
  color: #e2e8f0;
}

.model-table__cell-wrap {
  white-space: normal;
  max-width: 140px;
  word-break: break-word;
}

.model-table__actions-col {
  white-space: nowrap;
}

.model-table__actions {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

/* Jadval ichidagi amallar tugmalari (width:100% emas) */
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto;
  min-width: 2.6rem;
  min-height: 34px;
  padding: 0.35rem 0.55rem;
  margin: 0;
  border: none;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.btn-action--primary {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #fff;
}

.btn-action--neutral {
  background: rgba(51, 65, 85, 0.95);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-action--success {
  background: linear-gradient(180deg, #22c55e, #16a34a);
  color: #fff;
}

.btn-action--danger {
  background: linear-gradient(180deg, #ef4444, #dc2626);
  color: #fff;
}

.btn-action:active {
  transform: scale(0.97);
  opacity: 0.92;
}

.model-table__actions .pay-amount {
  width: 76px;
  min-height: 34px;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: #f1f5f9;
  font-size: 0.85rem;
  box-sizing: border-box;
}

.panel-wrap--admin .model-table__actions .btn,
.panel-wrap--admin .model-table__actions .btn-sm {
  width: auto;
}

.model-table__row--system td {
  background: rgba(245, 158, 11, 0.07);
}

.model-table__row:hover td {
  background: rgba(255, 255, 255, 0.06);
}

.model-table__row--system:hover td {
  background: rgba(245, 158, 11, 0.12);
}

.model-table__row--interactive {
  cursor: pointer;
}

.model-table__row--interactive:active td {
  background: rgba(56, 189, 248, 0.12);
}

.table-tap-hint {
  margin: 0 0 0.4rem !important;
  font-size: 0.75rem;
}

/* —— Foydalanuvchilar bo‘limi (qidiruv + pagination) —— */
.panel-card--users {
  border: 1px solid rgba(59, 130, 246, 0.28);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.45), 0 0 0 1px rgba(59, 130, 246, 0.08);
  overflow: hidden;
}

.users-panel-intro {
  margin-bottom: 1rem;
}

.users-panel-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.users-panel-lead {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #94a3b8;
}

.users-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.users-search-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0.5rem;
}

.users-search-wrap {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.users-search-icon {
  font-size: 1rem;
  opacity: 0.75;
  flex-shrink: 0;
}

.users-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: #f1f5f9;
  font-size: 0.95rem;
  padding: 0.55rem 0;
}

.users-search-input::placeholder {
  color: #64748b;
}

.users-search-submit {
  flex-shrink: 0;
  align-self: stretch;
  min-height: 44px;
}

.users-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.users-segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 2px;
}

.users-segment {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s, background 0.15s;
}

.users-segment.active {
  background: rgba(59, 130, 246, 0.35);
  color: #f8fafc;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.users-page-size {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
}

.users-select {
  min-height: 40px;
  padding: 0.35rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.4);
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
}

.users-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.85rem 0 0.5rem;
  min-height: 1.5rem;
}

.users-meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.users-meta-pill strong {
  color: #f1f5f9;
  font-weight: 800;
}

.users-meta-pill--accent {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

.users-meta-pill--soft {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
}

.users-meta-pill--muted {
  color: #64748b;
  border-style: dashed;
}

.users-table-host {
  margin-top: 0.15rem;
}

.users-loading {
  padding: 1.25rem 0 !important;
  text-align: center;
}

.model-table-wrap--users {
  border-color: rgba(59, 130, 246, 0.2);
  background: rgba(2, 6, 23, 0.45);
}

.model-table--users thead th {
  background: linear-gradient(180deg, rgba(30, 58, 138, 0.5), rgba(15, 23, 42, 0.98));
  color: #bfdbfe;
}

.model-table--users .users-col-id {
  width: 1%;
}

.model-table--users .users-col-name {
  max-width: 160px;
}

.model-table--users .users-col-tg {
  max-width: 130px;
}

.users-cell-id {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  color: #93c5fd;
  font-weight: 700;
}

.users-cell-name {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: flex-start;
}

.users-cell-name strong {
  font-size: 0.84rem;
  color: #f8fafc;
}

.users-cell-username {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}

.users-tg-code {
  display: inline-block;
  max-width: 100%;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  font-size: 0.72rem;
  color: #e2e8f0;
  word-break: break-all;
  white-space: normal;
}

.users-balance-val {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #4ade80;
}

.users-balance-suffix {
  margin-left: 0.25rem;
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
}

.users-date-short {
  font-size: 0.78rem;
  color: #cbd5e1;
}

.users-status-stack {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  max-width: 120px;
}

.users-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1rem;
  padding: 0.65rem 0.5rem;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.users-pagination.hidden {
  display: none;
}

.users-page-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(51, 65, 85, 0.65);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  touch-action: manipulation;
  min-height: 42px;
}

.users-page-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.users-page-btn--ghost {
  padding-left: 0.55rem;
  padding-right: 0.55rem;
  min-width: auto;
  background: transparent;
  border-style: dashed;
  color: #94a3b8;
}

.users-page-indicator {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: 0 0.35rem;
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 700;
}

.users-page-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
  color: #64748b;
}

.users-page-num {
  font-size: 1.05rem;
  color: #f1f5f9;
  font-variant-numeric: tabular-nums;
}

.users-page-sep {
  opacity: 0.5;
  padding: 0 0.05rem;
}

.users-page-total {
  font-variant-numeric: tabular-nums;
}

/* Amallar menyusi (alert o‘xshash) */
.action-sheet-root {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  pointer-events: none;
}

.action-sheet-root:not(.hidden) {
  pointer-events: auto;
}

.action-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.action-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  max-height: min(85vh, var(--tg-app-height, 100dvh));
  margin: 0 auto;
  padding: 1rem 1rem calc(1.1rem + var(--tg-safe-inset-bottom, env(safe-area-inset-bottom, 0px)));
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border-radius: 16px 16px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: action-sheet-in 0.25s ease-out;
}

@keyframes action-sheet-in {
  from {
    transform: translateY(100%);
    opacity: 0.6;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.action-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.action-sheet__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #f8fafc;
  flex: 1;
  word-break: break-word;
}

.action-sheet__close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.action-sheet__close:active {
  background: rgba(239, 68, 68, 0.35);
}

.action-sheet__fields {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.action-sheet__field {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.45rem 0.55rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
}

.action-sheet__field-label {
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.action-sheet__field-value {
  font-size: 0.88rem;
  color: #f1f5f9;
  text-align: right;
  word-break: break-word;
}

.action-sheet__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.action-sheet__actions .btn-action {
  width: 100%;
  min-height: 46px;
  font-size: 0.9rem;
  border-radius: 10px;
}

.action-sheet__form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.action-sheet__form-row label {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.action-sheet__form-row .action-sheet__input {
  margin-bottom: 0;
}

.action-sheet__form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.action-sheet__input {
  width: 100%;
  min-height: 46px;
  margin-bottom: 0.25rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: #f8fafc;
  font-size: 1rem;
  box-sizing: border-box;
}

body.action-sheet-open {
  overflow: hidden;
}

/* Foydalanuvchi panel — yorug' interfeys */
.panel-wrap--user {
  background: transparent;
}

.panel-wrap--user > .panel-header {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #3b82f6;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

.panel-wrap--user > .panel-header h1 {
  color: #0f172a;
}

.panel-wrap--user > .panel-header .panel-sub {
  color: #64748b;
}

.panel-wrap--user .panel-badge--user {
  background: #dbeafe;
  color: #1d4ed8;
}

.panel-wrap--user > .user-panel-scroll {
  background: transparent;
}

.panel-wrap--user .panel-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.06);
  color: #1e293b;
}

.panel-wrap--user .panel-card h2 {
  color: #0f172a;
}

.panel-wrap--user .panel-card .hint {
  color: #64748b;
}

.panel-wrap--user .panel-card input[type="text"] {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

.panel-wrap--user .panel-card input:focus {
  border-color: #3b82f6;
  background: #fff;
}

.panel-wrap--user .btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.panel-wrap--user .user-tabs--bottom {
  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
}

.panel-wrap--user .user-tab-btn {
  color: #64748b;
}

.panel-wrap--user .user-tab-btn.active {
  background: #eff6ff;
  color: #2563eb;
}

.panel-wrap--user .user-tab-btn.active .user-tab-label {
  color: #1d4ed8;
}

.panel-wrap--user .model-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.panel-wrap--user .model-table thead th {
  background: #f1f5f9;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

.panel-wrap--user .model-table tbody td {
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
}

.panel-wrap--user .model-table tbody tr:nth-child(even) td {
  background: #f8fafc;
}

.panel-wrap--user .model-table__row--interactive:active td {
  background: #eff6ff;
}

.panel-wrap--user .results-summary {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.panel-wrap--user .results-chart-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.panel-wrap--user .profile-row {
  border-bottom-color: #f1f5f9;
}

.panel-wrap--user .profile-row span {
  color: #64748b;
}

.panel-wrap--user .profile-row strong {
  color: #0f172a;
}

.panel-wrap--user .profile-tutor-badge {
  color: #15803d;
}

.panel-wrap--user .message.success {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.panel-wrap--user .message.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.panel-wrap--user .badge--ok {
  background: #dcfce7;
  color: #15803d;
}

.panel-wrap--user .badge--info {
  background: #e0f2fe;
  color: #0369a1;
}

.panel-wrap--user .trend-up {
  color: #15803d;
}

.panel-wrap--user .trend-down {
  color: #dc2626;
}

.model-table--user thead th {
  background: #f1f5f9;
  color: #475569;
}

.profile-grid {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-tutor-badge {
  margin-top: 0.65rem;
  color: #86efac;
  font-weight: 600;
}

.model-table__row:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge--default {
  background: rgba(148, 163, 184, 0.25);
  color: #cbd5e1;
}

.badge--ok {
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
}

.badge--done {
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
}

.badge--warn {
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
}

.badge--info {
  background: rgba(99, 102, 241, 0.22);
  color: #c4b5fd;
}

.badge--muted {
  background: rgba(71, 85, 105, 0.45);
  color: #94a3b8;
}

.badge--success {
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
}

.btn-danger-outline {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.stat-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-row:last-child {
  border-bottom: none;
}

.stat-row__label {
  font-size: 0.82rem;
  color: #94a3b8;
}

.stat-row__val {
  font-size: 0.95rem;
  font-weight: 700;
  color: #38bdf8;
}

/* Eski ro‘yxat (foydalanuvchi paneli) */
.admin-list-item {
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.admin-list-item strong {
  color: #f8fafc;
}

.panel-card .btn + .btn {
  margin-top: 0.5rem;
}

/* Foydalanuvchi panel — pastki menyu */
.panel-wrap--user > .panel-header {
  flex-shrink: 0;
  margin: 0 0.75rem 0.65rem;
  padding-top: calc(0.25rem + var(--tg-safe-inset-top, env(safe-area-inset-top, 0px)));
}

.panel-wrap--user > .user-panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  padding: 0 0.75rem;
  padding-bottom: calc(5.5rem + var(--tg-safe-inset-bottom, env(safe-area-inset-bottom, 0px)));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  position: relative;
  z-index: 1;
}

.user-tabs--bottom {
  display: flex;
  flex-shrink: 0;
  gap: 0.15rem;
  margin: 0;
  width: 100%;
  padding: 0.35rem 0.4rem;
  padding-bottom: calc(0.4rem + var(--tg-safe-inset-bottom, env(safe-area-inset-bottom, 0px)));
  padding-left: calc(0.4rem + var(--tg-safe-inset-left, 0px));
  padding-right: calc(0.4rem + var(--tg-safe-inset-right, 0px));
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
  z-index: 120;
  box-sizing: border-box;
}

.user-tab-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding: 6px 4px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: #94a3b8;
  font-size: 0.65rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 52px;
  line-height: 1.1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.user-tab-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.user-tab-label {
  font-size: 0.65rem;
  letter-spacing: 0.01em;
}

.user-tab-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
}

.user-tab-btn.active .user-tab-label {
  color: #f8fafc;
}

.user-tab-panel {
  display: block;
}

.user-queue-code-block {
  margin: 0 0 1.1rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.22);
}

.user-queue-code-hint {
  margin: 0 0 0.55rem !important;
}

.user-queue-code-input {
  width: 100%;
  margin-bottom: 0.55rem;
  box-sizing: border-box;
}

.user-queue-code-btn {
  width: 100%;
}

.user-queue-list-title {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #cbd5e1;
}

.user-queue-item {
  cursor: pointer;
}

.user-queue-item .btn-sm,
.user-result-item .btn-sm {
  margin-top: 0.5rem;
  width: auto;
  min-width: 120px;
}

.user-result-item .hint {
  display: block;
  margin-top: 0.35rem;
  line-height: 1.45;
}

.results-summary {
  margin: 0.75rem 0;
  padding: 0.65rem 0.85rem;
  background: rgba(56, 189, 248, 0.12);
  border-radius: 10px;
  font-size: 0.88rem;
  color: #e2e8f0;
  line-height: 1.5;
}

.results-charts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.results-chart-box {
  position: relative;
  height: 200px;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}

.user-result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.result-trend-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
}

.trend-up,
.result-trend-badge.trend-up {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.15);
}

.trend-down,
.result-trend-badge.trend-down {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
}

.trend-flat,
.result-trend-badge.trend-flat {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.15);
}

.result-mini-bar {
  height: 6px;
  margin: 0.5rem 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.result-mini-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #4ade80);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}

.profile-row span {
  color: #94a3b8;
}

.profile-row strong {
  color: #f1f5f9;
  text-align: right;
}

/* Keng ekran (planshet / desktop Telegram): admin menyu chapda */
@media (min-width: 769px) {
  .panel-wrap--admin {
    flex-direction: row;
  }

  .admin-sidebar.admin-nav-bar {
    flex: 0 0 5.25rem;
    flex-direction: column;
    order: 0;
    width: auto;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    border-top: none;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    scroll-snap-type: none;
    padding-top: calc(0.5rem + var(--tg-safe-inset-top, env(safe-area-inset-top, 0px)));
  }

  .admin-main {
    order: 1;
    padding-top: 0.75rem;
  }

  .admin-tab-btn {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
  }

  .panel-sub--admin {
    display: block;
  }
}

@media (max-width: 768px) {
  .panel-header h1 {
    font-size: 1.15rem;
  }

  .panel-header {
    padding: 0.85rem 1rem;
    margin-bottom: 0.65rem;
  }

  .admin-tab-label,
  .user-tab-label {
    font-size: 0.6rem;
    max-width: 4.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .panel-card input[type="text"],
  .panel-card textarea,
  .panel-card select {
    font-size: 16px;
    min-height: 48px;
  }

  .btn,
  .admin-tab-btn,
  .user-tab-btn {
    min-height: 48px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .stat-num {
    font-size: 1.15rem;
  }
}

@media (max-width: 360px) {
  .admin-tab-btn {
    min-width: 3rem;
    padding: 0.3rem 0.35rem;
  }

  .admin-tab-label {
    font-size: 0.55rem;
    max-width: 3.2rem;
  }
}

/* Ta'lim moduli — foydalanuvchi */
.edu-subjects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.edu-book-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.75rem 0.65rem;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.85);
  color: #e2e8f0;
  cursor: pointer;
  text-align: left;
  touch-action: manipulation;
}

.edu-book-card.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.12);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.edu-book-card__name {
  font-weight: 800;
  font-size: 0.9rem;
}

.edu-book-card__meta {
  font-size: 0.72rem;
  color: #94a3b8;
}

.edu-selected-subject {
  margin: 0 0 0.5rem !important;
  font-weight: 600;
}

.edu-topics-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.edu-topic-chip {
  display: block;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  text-decoration: none;
  transition: background 0.15s;
}

.edu-topic-chip:active {
  background: rgba(59, 130, 246, 0.2);
}

.edu-topic-chip__name {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
}

.edu-topic-chip__desc {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.panel-card--edu-user {
  border-color: rgba(34, 197, 94, 0.25);
}

/* Foydalanuvchi — Testlar bo'limi (yorug' mavzu + scroll) */
.user-tab-panel[data-tab-panel="tests"] {
  min-height: min-content;
}

.panel-card--edu-tests {
  background: linear-gradient(165deg, #ffffff 0%, #f1f5f9 55%, #e8f0fe 100%);
  border: 1px solid #dbeafe;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.1);
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.panel-card--edu-tests .user-tests-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.panel-card--edu-tests .user-tests-hint {
  color: #64748b !important;
  margin-bottom: 0.85rem !important;
}

.edu-subjects-grid--tests {
  margin-bottom: 0.85rem;
}

.edu-subjects-grid--tests .edu-book-card {
  background: #fff;
  border: 2px solid #e2e8f0;
  color: #0f172a;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  touch-action: pan-y;
}

.edu-subjects-grid--tests .edu-book-card.active {
  border-color: #3b82f6;
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.2);
}

.edu-subjects-grid--tests .edu-book-card__meta {
  color: #64748b;
}

.edu-selected-subject--tests {
  display: inline-block;
  margin: 0 0 0.75rem !important;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8 !important;
  font-size: 0.8rem !important;
  font-weight: 700;
}

.edu-topics-list--tests {
  gap: 0.55rem;
  padding-bottom: 0.5rem;
}

.edu-topics-list--tests .edu-test-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #3b82f6;
  color: #0f172a;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  touch-action: pan-y;
}

.edu-topics-list--tests .edu-test-card:active {
  background: #f8fafc;
  border-color: #93c5fd;
  border-left-color: #2563eb;
}

.edu-topics-list--tests .edu-test-card__name {
  color: #0f172a;
}

.edu-topics-list--tests .edu-test-card__desc {
  color: #64748b;
}

.panel-card--edu-tests .badge--info {
  background: #e0f2fe;
  color: #0369a1;
}

.panel-card--edu-tests .badge--ok {
  background: #dcfce7;
  color: #15803d;
}

.panel-card--edu-tests .hint {
  color: #64748b;
}

/* Testlar tab — qo'shimcha urg'u */
.panel-wrap--user.user-panel--tests-active .panel-card--edu-tests {
  border-color: #bfdbfe;
}

.edu-tests-page .hint:first-of-type {
  margin-bottom: 0.75rem;
}

.edu-tests-split {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.edu-tests-section {
  padding: 0.85rem 0;
}

.edu-tests-section--subjects {
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.edu-tests-section__title {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.edu-tests-section--list .edu-tests-section__title {
  color: #86efac;
}

.edu-test-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  text-decoration: none;
}

.edu-test-card:active {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.12);
}

.edu-test-card__main {
  flex: 1 1 180px;
  min-width: 0;
}

.edu-test-card__name {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
}

.edu-test-card__desc {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

.edu-test-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

/* Ta'lim moduli — admin */
.edu-admin-segments {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.75rem 0 1rem;
}

.edu-admin-segment {
  border: none;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  color: #94a3b8;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}

.edu-admin-segment.active {
  background: rgba(59, 130, 246, 0.35);
  color: #fff;
}

.edu-admin-list {
  margin-top: 0.75rem;
}

.edu-admin-row-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.edu-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.edu-test-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.edu-test-filters select {
  flex: 1 1 140px;
}

.edu-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.edu-stat-card {
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  text-align: center;
}

.edu-stat-val {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: #f8fafc;
}

.edu-stat-lbl {
  font-size: 0.72rem;
  color: #94a3b8;
  text-transform: uppercase;
}

.edu-stats-sub {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.9rem;
}

.edu-stats-list {
  margin: 0;
  padding-left: 1.1rem;
  color: #cbd5e1;
  font-size: 0.85rem;
}

.panel-card--edu-admin {
  border-color: rgba(168, 85, 247, 0.3);
}

.edu-admin-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.edu-admin-section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Admin — fan kartochkalari */
.edu-subjects-grid--admin {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.edu-fans-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1rem;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.edu-fan-card {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.9);
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.edu-fan-card--active {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.4), 0 4px 16px rgba(59, 130, 246, 0.15);
}

.edu-fan-card__select {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  width: 100%;
  padding: 0.75rem 0.7rem 0.5rem;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}

.edu-fan-card__icon {
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0.85;
}

.edu-fan-card__name {
  font-weight: 800;
  font-size: 0.92rem;
  color: #f8fafc;
  line-height: 1.25;
  word-break: break-word;
}

.edu-fan-card__badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
}

.edu-fan-card__badge--free {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

.edu-fan-card__badge--paid {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.edu-fan-card__sort {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
}

.edu-fan-card__toolbar {
  display: flex;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.edu-fan-card__tool {
  flex: 1;
  min-height: 40px;
  border: none;
  background: rgba(0, 0, 0, 0.25);
  color: #cbd5e1;
  font-size: 0.95rem;
  cursor: pointer;
  touch-action: manipulation;
}

.edu-fan-card__tool--edit:active {
  background: rgba(59, 130, 246, 0.25);
}

.edu-fan-card__tool--del {
  color: #f87171;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.edu-fan-card__tool--del:active {
  background: rgba(239, 68, 68, 0.2);
}

/* Fan qo'shish formasi */
.edu-subject-form .edu-sort-hint {
  margin: 0.25rem 0 0 !important;
  font-size: 0.72rem !important;
}

.edu-price-type-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.edu-price-type-btn {
  min-height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  color: #e2e8f0;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  touch-action: manipulation;
}

.edu-price-type-btn.active.edu-price-type-btn--free {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.2);
  color: #bbf7d0;
}

.edu-price-type-btn.active.edu-price-type-btn--paid {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

.edu-subject-price-wrap.hidden {
  display: none;
}

.action-sheet__fields:has(.edu-subject-form) {
  max-height: min(50vh, 380px);
  overflow-y: auto;
}

.edu-admin-row-card.active {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.1);
}

.edu-admin-tests-nested {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
}

.edu-nested-title {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: #93c5fd;
}

.edu-import-block {
  margin-bottom: 0.65rem;
  padding: 0.65rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.edu-import-topic-select {
  width: 100%;
  margin-bottom: 0.35rem;
}

.edu-admin-stats-details {
  margin-top: 1rem;
  font-size: 0.88rem;
}

.edu-admin-stats-details summary {
  cursor: pointer;
  font-weight: 700;
  color: #94a3b8;
  padding: 0.5rem 0;
}

/* Edu — test qo'shish formasi (action sheet) */
.action-sheet__fields:has(.edu-test-form) {
  max-height: min(58vh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.edu-test-form__topic {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
  font-size: 0.88rem;
  color: #e2e8f0;
}

.edu-test-form__topic-label {
  font-weight: 800;
  color: #93c5fd;
  margin-right: 0.35rem;
}

.edu-test-question {
  min-height: 5.5rem;
  resize: vertical;
  line-height: 1.4;
}

.edu-options-fieldset {
  margin: 0 0 0.85rem;
  padding: 0;
  border: none;
}

.edu-options-fieldset legend {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
  margin-bottom: 0.45rem;
}

.edu-options-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.edu-option-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.15s, background 0.15s;
}

.edu-option-row--correct {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.12);
}

.edu-option-letter {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(51, 65, 85, 0.9);
  font-weight: 800;
  font-size: 0.85rem;
  color: #f1f5f9;
}

.edu-option-row--correct .edu-option-letter {
  background: rgba(22, 101, 52, 0.9);
  color: #bbf7d0;
}

.edu-option-input {
  flex: 1;
  min-width: 0;
  margin: 0 !important;
}

.edu-correct-pick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}

.edu-correct-btn {
  min-height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: #e2e8f0;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  touch-action: manipulation;
}

.edu-correct-btn.active {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.25);
  color: #bbf7d0;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.4);
}

.edu-correct-hint {
  margin: 0 !important;
  font-size: 0.72rem !important;
}

.edu-sheet-error {
  margin: 0.5rem 0 0;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.85rem;
  font-weight: 600;
}

.edu-sheet-error.hidden {
  display: none;
}

/* Edu — testlar ro'yxati */
.edu-tests-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.edu-tests-panel-head .edu-nested-title {
  margin: 0;
  flex: 1 1 auto;
}

.edu-tests-count {
  font-size: 0.75rem;
  color: #94a3b8;
  font-weight: 600;
}

.edu-tests-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.edu-test-list-card {
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.edu-test-list-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.edu-test-list-card__id {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 700;
}

.edu-test-list-card__q {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #f1f5f9;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.edu-rich-text b {
  font-weight: 700;
}

.edu-rich-text i {
  font-style: italic;
}

.edu-rich-text u {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.edu-test-list-card__topic {
  margin: 0 0 0.5rem !important;
}

.edu-test-list-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Admin — mavzu kartochkalari */
.edu-topic-card {
  padding: 0.85rem;
  margin-bottom: 0.55rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.edu-topic-card--active {
  border-color: rgba(168, 85, 247, 0.55);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.25);
}

.edu-topic-card--hidden {
  opacity: 0.82;
  border-color: rgba(248, 113, 113, 0.35);
}

.edu-topic-card__vis {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
}

.edu-topic-card__vis--on {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
}

.edu-topic-card__vis--off {
  color: #f87171;
  background: rgba(248, 113, 113, 0.12);
}

.edu-topic-card__tests {
  font-size: 0.72rem;
  font-weight: 600;
  color: #94a3b8;
}

.edu-topic-visible-row {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.5rem 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  font-size: 0.82rem;
  line-height: 1.4;
  color: #e2e8f0;
  cursor: pointer;
}

.edu-topic-visible-row input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.edu-tests-vis-hint {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.edu-tests-vis-hint--on {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

.edu-tests-vis-hint--off {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.edu-topic-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.edu-topic-card__sort {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
}

.edu-topic-card__audio {
  font-size: 0.72rem;
  font-weight: 600;
  color: #38bdf8;
}

.edu-topic-card__no-audio {
  font-size: 0.72rem;
  color: #64748b;
}

.edu-topic-card__name {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: #f1f5f9;
}

.edu-topic-card__desc {
  margin: 0 0 0.6rem !important;
  font-size: 0.82rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.edu-topic-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Admin — mavzu forma */
.edu-topic-audio-fieldset {
  margin: 0.5rem 0 0;
  padding: 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.2);
}

.edu-topic-audio-fieldset legend {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0 0.25rem;
  color: #e2e8f0;
}

.edu-topic-file-input {
  width: 100%;
  font-size: 0.8rem;
  color: #cbd5e1;
}

.edu-topic-file-name {
  margin: 0.25rem 0 0 !important;
}

.edu-topic-clear-audio {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: #f87171;
  cursor: pointer;
}

.edu-topic-audio-id {
  font-size: 0.82rem;
}

.edu-tests-empty {
  text-align: center;
  padding: 1.25rem 0.75rem;
  border-radius: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.2);
}

.edu-import-card {
  margin-bottom: 0.85rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.edu-import-card__title {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
}

.edu-import-sample {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.85rem;
}

.edu-import-sample__link {
  color: #93c5fd;
  font-weight: 700;
  text-decoration: none;
}

.edu-import-sample__link:active {
  color: #bfdbfe;
}

.edu-import-card__row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.edu-import-card__row .edu-import-topic-select {
  flex: 1 1 140px;
  min-width: 0;
}

.edu-file-label {
  position: relative;
  cursor: pointer;
}

.edu-file-input {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
}

.edu-import-filename {
  margin: 0.35rem 0 0 !important;
  font-size: 0.78rem !important;
}
