/* App Container */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Base Screen */
.screen {
  flex: 1;
  padding: var(--space-md);
  overflow-y: auto;
  display: none;
}

.screen.active {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Home Screen */
#screen-home .balance-card {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
}

#screen-home .balance-card .balance-amount {
  font-size: var(--text-2xl);
  font-weight: bold;
}

#screen-home .balance-card .balance-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

#screen-home .quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

#screen-home .action-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  gap: 8px;
  padding: 16px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--glass-radius);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

#screen-home .action-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

#screen-home .action-card .action-icon {
  font-size: 28px;
}

#screen-home .action-card .action-arrow {
  font-size: 16px;
  color: var(--accent-purple);
  background: rgba(167, 139, 250, 0.15);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

#screen-home .action-card .action-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

#screen-home .action-card .action-price {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

#screen-home .action-card-btn {
  background: var(--accent-gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 8px 12px;
  border-radius: 8px;
  margin-top: 4px;
  box-shadow: var(--accent-glow);
}

#screen-home .action-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent-purple);
  transform: translateY(-2px);
}

#screen-home .action-card:active {
  transform: scale(0.97);
  background: rgba(255, 255, 255, 0.12);
}

#screen-home .action-card:hover .action-arrow {
  transform: translateX(3px);
}


#screen-home .promo-banner {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--warning);
}

/* Order Screen */
#screen-order .order-steps {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

#screen-order .step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--glass-border);
  transition: all 0.3s ease;
}

#screen-order .step-dot.active {
  background: var(--accent-purple);
  box-shadow: var(--accent-glow);
  width: 20px;
  border-radius: 10px;
}

#screen-order .step-content {
  display: none;
}
#screen-order .step-content.active {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

#screen-order .type-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

#screen-order .form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

#screen-order .summary-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

#screen-order .generation-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-xl) 0;
}

#screen-order .success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--space-lg);
  padding: var(--space-xl) var(--space-md);
}

/* History Screen */
#screen-history .orders-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

#screen-history .history-filters {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  padding-bottom: var(--space-xs);
}

#screen-history .filter-tab {
  padding: 6px 16px;
  border-radius: 20px;
  background: var(--glass-bg);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  white-space: nowrap;
  cursor: pointer;
}

#screen-history .filter-tab.active {
  background: var(--accent-gradient);
  color: #fff;
}

/* Referral Screen */
#screen-referral .referral-link-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

#screen-referral .referral-link-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-family: monospace;
  font-size: 13px;
  color: var(--accent-purple-light);
  word-break: break-all;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
  cursor: pointer;
  transition: border-color 0.2s;
}

#screen-referral .referral-link-box:hover {
  border-color: var(--accent-purple);
}

#screen-referral .referral-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

#screen-referral .referral-actions .btn {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

#screen-referral .referral-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

#screen-referral .referral-rules ul {
  padding-left: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  color: var(--text-secondary);
}

/* Admin Screen */
#screen-admin {
  gap: var(--space-md);
}

#screen-admin.active {
  display: flex !important;
  flex-direction: column;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
}

.admin-subnav-container {
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin: -4px 0;
  padding: 4px 0;
}

.admin-subnav-container::-webkit-scrollbar {
  display: none;
}

.admin-subnav {
  display: flex;
  gap: 8px;
  min-width: max-content;
}

.admin-subnav-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 10px 16px;
  min-height: 44px;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  white-space: nowrap;
  font-family: inherit;
}

.admin-subnav-btn:active {
  transform: scale(0.96);
}

.admin-subnav-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--accent-glow);
  font-weight: 600;
}

.subnav-badge {
  background: var(--warning);
  color: #0F0C29;
  font-weight: 700;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
}

.admin-subscreen {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

#screen-admin .admin-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
}

.backup-action-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.admin-search-bar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-item-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  transition: transform 0.2s ease;
}

.admin-item-card:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

.admin-item-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.admin-item-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.admin-item-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

.admin-item-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.admin-item-actions .btn {
  flex: 1;
  min-height: 40px;
  font-size: 13px;
  padding: 8px 12px;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(15, 12, 41, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-card {
  max-width: 440px;
  width: 100%;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.modal-icon {
  font-size: 2.8rem;
  line-height: 1;
}

.modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-text {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}

.modal-actions .btn {
  flex: 1;
  min-height: 44px;
}

.receipt-modal-card,
.detail-modal-card {
  max-width: 520px;
  text-align: left;
  align-items: stretch;
}

.receipt-image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 12px;
}

.error-traceback-box {
  max-height: 360px;
  overflow-y: auto;
  background: rgba(0, 0, 0, 0.5);
  padding: 14px;
  border-radius: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #ff8b8b;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Progress and Indicators */
.progress-bar-track {
  width: 100%;
  height: 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #8B5CF6, #10B981);
  border-radius: 6px;
  transition: width 0.35s ease;
}

.broadcast-metrics-flex {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
}

.pulse {
  animation: live-pulse 1.8s infinite;
}

@keyframes live-pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* Skeleton Loading State */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.04) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 12px;
}

.skeleton-card {
  height: 84px;
  width: 100%;
  margin-bottom: 10px;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* SVG Chart Styling */
.chart-container svg {
  width: 100%;
  height: auto;
  max-height: 220px;
  overflow: visible;
}


/* Browser Landing & Banned Screens */
.fullscreen-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-lg);
  text-align: center;
  box-sizing: border-box;
}

.landing-card {
  max-width: 440px;
  width: 100%;
  padding: var(--space-xl) var(--space-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  border-radius: var(--radius-lg);
}

.landing-logo {
  font-size: 3.5rem;
  line-height: 1;
  filter: drop-shadow(0 8px 16px rgba(108, 92, 231, 0.4));
  margin-bottom: var(--space-xs);
}

.landing-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(108, 92, 231, 0.2);
  border: 1px solid rgba(108, 92, 231, 0.4);
  color: #a29bfe;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.landing-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, #fff 0%, #a29bfe 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.landing-lang-bar {
  display: flex;
  gap: 8px;
  margin: var(--space-sm) 0;
}

.landing-lang-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.landing-lang-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}

.btn-open-tg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.35);
}

.banned-icon {
  font-size: 3.5rem;
  margin-bottom: var(--space-sm);
}

/* Diagnostics Screen */
.diagnostics-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 380px;
  overflow-y: auto;
}

.diag-item {
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 12px;
  font-family: monospace;
}

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

.diag-method {
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}
.diag-method-get { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.diag-method-post { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.diag-method-put { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
.diag-method-delete { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.diag-status-ok { color: #10b981; font-weight: bold; }
.diag-status-err { color: #ef4444; font-weight: bold; }
.diag-status-warn { color: #f59e0b; font-weight: bold; }

.diag-endpoint {
  word-break: break-all;
  color: var(--text-primary);
}

.diag-meta {
  color: var(--text-tertiary);
  font-size: 11px;
  margin-top: 4px;
}

.diag-error-box {
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid #ef4444;
  padding: 8px 10px;
  border-radius: 4px;
  margin-top: 6px;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* App Header & Language Switcher */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 4px;
}

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

.app-brand img {
  border-radius: 8px;
}

.app-brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.app-lang-switcher {
  display: flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}

.app-lang-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.app-lang-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.4);
}

/* In-App Topup Drawer / Modal */
.topup-card-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topup-card-number {
  font-family: monospace;
  font-size: 15px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #a78bfa;
}

.topup-instruction-box {
  background: rgba(139, 92, 246, 0.08);
  border-left: 3px solid #8b5cf6;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

/* ====================================================
   HISTORY SCREEN: 3-USTUNLI ZAMONAVIY MAKET VA LINE-CLAMP
   ==================================================== */
.history-order-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.history-order-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-purple);
}

.history-col-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.history-col-info {
  flex: 1;
  min-width: 0; /* Text-overflow flex bolada ishlashi uchun shart */
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-topic-clamped {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.history-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.history-col-right {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.history-card-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-purple-light);
  white-space: nowrap;
}

.history-card-date {
  font-size: 11px;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.history-modal-topic-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--text-primary);
  max-height: 140px;
  overflow-y: auto;
  word-break: break-word;
}

/* ====================================================
   UNIVERSITETLAR VA SHABLONLAR: TANLOV HOLATI (SELECTED)
   ==================================================== */
.uni-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

.uni-card {
  position: relative;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: var(--surface-glass);
  transition: all 0.2s ease;
  font-size: 14px;
  font-weight: 500;
  user-select: none;
  -webkit-user-select: none;
  word-break: break-word;
}

.uni-card:hover {
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-1px);
}

.uni-card.selected {
  border: 2px solid var(--accent-purple) !important;
  background: rgba(139, 92, 246, 0.22) !important;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.45);
  transform: scale(1.015);
  color: #fff;
  font-weight: 600;
  padding-right: 38px;
}

.uni-card.selected::after {
  content: '✓';
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
}

.uni-card.uni-card-custom {
  border-style: dashed;
  color: var(--accent-purple-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ====================================================
   TAQDIMOT SHABLONLARI: GRID VA RASMLAR (PREVIEW)
   ==================================================== */
.template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 350px) {
  .template-grid {
    grid-template-columns: 1fr;
  }
}

.template-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 10px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--surface-glass);
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
}

.template-card:hover {
  border-color: rgba(139, 92, 246, 0.5);
  transform: translateY(-2px);
}

.template-card.selected {
  border: 2px solid var(--accent-purple) !important;
  background: rgba(139, 92, 246, 0.22) !important;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.45);
  transform: scale(1.02);
}

.template-preview-img-container {
  width: 100%;
  height: 105px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.template-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.template-card:hover .template-preview-img {
  transform: scale(1.05);
}

.template-zoom-btn {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: background 0.2s;
  z-index: 2;
}

.template-zoom-btn:hover {
  background: var(--accent-purple);
}

.template-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 2px;
}

.template-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.template-check-badge {
  display: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-purple);
  color: #fff;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.template-card.selected .template-check-badge {
  display: flex;
}

/* ====================================================
   KARTA HISOB-KITOBI (SETTLEMENTS) VA ADMIN VIDJETLARI
   ==================================================== */
.receivable-summary-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(16, 185, 129, 0.09));
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.receivable-total-amount {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.card-receivable-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: var(--radius-md);
  margin: 6px 0;
}

.card-receivable-badge {
  font-size: 15px;
  font-weight: 700;
  color: #10b981;
}

.settlement-history-item {
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ====================================================
   EKRAN VA KONTEYNER KENG KELISHI VA OVERFLOW OLDINI OLISH
   ==================================================== */
.screen {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-item-card, .order-card, .uni-card, .template-card, .referral-link-card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.admin-item-header, .card-header-flex {
  width: 100%;
  min-width: 0;
}

.admin-item-title, .admin-item-subtitle {
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

/* Error Screen Container & Card Layout */
#error-screen.fullscreen-center {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  box-sizing: border-box;
}

.error-screen-card {
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  border-radius: var(--glass-radius);
}


