/* ==========================================================================
   MailPulse — Design System
   Single shared stylesheet for all pages. Mobile-first (base = 375px).
   Breakpoints: 640px / 768px / 960px.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-tertiary: #1f2937;
  --card-bg: #111827;
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --accent: #10b981;
  --accent-hover: #059669;
  --accent-blue: #3b82f6;
  --accent-red: #ef4444;
  --accent-amber: #f59e0b;
  --border: #1f2937;
  --border-input: #374151;
  --radius-sm: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.2);
  --shadow-btn: 0 4px 20px rgba(16, 185, 129, 0.3);
  --shadow-btn-hover: 0 8px 28px rgba(16, 185, 129, 0.45);
  --font: 'Inter', sans-serif;
}

/* --------------------------------------------------------------------------
   2. Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  padding: 32px 0 48px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
}

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

.stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.grid-4 {
  grid-template-columns: repeat(2, 1fr);
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

@media (min-width: 640px) {
  .container {
    padding: 0 24px;
  }

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

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

@media (min-width: 960px) {
  main {
    padding: 48px 0 64px;
  }

  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .page-title {
    font-size: 48px;
  }
}

/* --------------------------------------------------------------------------
   4. Header / footer
   -------------------------------------------------------------------------- */
.site-header {
  position: relative;
  background: rgba(10, 14, 26, 0.9);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.logo {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.logo:hover {
  text-decoration: none;
}

.admin-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.12);
  border-radius: 999px;
  vertical-align: middle;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
  text-decoration: none;
}

.nav-link.active {
  color: var(--accent);
  background: rgba(16, 185, 129, 0.1);
}

.logout-form {
  margin: 0;
}

.logout-button {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.nav-link-disabled {
  pointer-events: none;
  position: relative;
  opacity: 0.6;
  animation: pulse 3s ease-in-out infinite;
}

.coming-soon-badge {
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.15);
  border-radius: 999px;
  vertical-align: middle;
}

.support-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.support-unread-badge {
  display: none;
  flex-shrink: 0;
  min-width: 16px;
  height: 16px;
  margin-left: 4px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  color: #fff;
  background: var(--accent-red);
  border-radius: 999px;
}

.support-notification-toast {
  position: fixed;
  z-index: 99999;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 20px;
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-sm);
  background: #1e293b;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  animation: support-notification-in 0.3s ease-out;
  transition: opacity 0.3s;
}

.support-notification-toast.is-leaving { opacity: 0; }

@keyframes support-notification-in {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.lang-switch {
  font-weight: 600;
}

.admin-orders-menu {
  position: relative;
  display: inline-flex;
}

.admin-orders-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 100;
  min-width: 160px;
  padding: 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  list-style: none;
}

.admin-orders-menu:hover .admin-orders-dropdown,
.admin-orders-menu:focus-within .admin-orders-dropdown {
  display: block;
}

.admin-orders-dropdown-link {
  display: block;
  padding: 10px;
  font-size: 14px;
  color: var(--text-primary);
  border-radius: 8px;
}

.admin-orders-dropdown-link:hover,
.admin-orders-dropdown-link:focus-visible {
  color: var(--accent);
  background: rgba(16, 185, 129, 0.1);
  text-decoration: none;
}

.balance-chip {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-input);
  border-radius: 999px;
  white-space: nowrap;
  transition: border-color 0.2s, transform 0.2s;
}

.balance-chip:hover {
  border-color: var(--accent);
  text-decoration: none;
  transform: translateY(-1px);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  font-size: 20px;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle:focus-visible,
.nav-link:focus-visible,
.balance-chip:focus-visible,
.user-chip:focus-visible,
.admin-orders-dropdown-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-header.nav-open .nav-links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  padding: 12px 16px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.site-header.nav-open .balance-chip,
.site-header.nav-open .user-chip {
  text-align: center;
  margin-top: 8px;
}

@media (max-width: 959px) {
  .site-header.nav-open .user-dropdown,
  .site-header.nav-open .user-chip,
  .site-header.nav-open .dropdown-menu {
    width: 100%;
  }

  .site-header.nav-open .user-chip {
    justify-content: center;
  }

  .site-header.nav-open .dropdown-menu {
    position: static;
    min-width: 0;
    margin-top: 8px;
  }
}

@media (max-width: 1099px) {
  .admin-header.nav-open .admin-orders-menu {
    display: flex;
    flex-direction: column;
  }

  .admin-header.nav-open .admin-orders-dropdown {
    display: flex;
    position: static;
    flex-direction: column;
    min-width: 0;
    margin: 0 12px 4px;
    box-shadow: none;
  }
}

.admin-header {
  border-bottom-color: rgba(245, 158, 11, 0.35);
}

@media (min-width: 960px) {
  .site-header:not(.admin-header) .nav-toggle {
    display: none;
  }

  .site-header:not(.admin-header) .nav-links {
    display: flex;
    flex-direction: row;
    position: static;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
}

@media (min-width: 1100px) {
  .admin-header .nav-toggle {
    display: none;
  }

  .admin-header .nav-links,
  .admin-header.nav-open .nav-links {
    display: flex;
    flex-direction: row;
    position: static;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.footer-links {
  display: flex;
  gap: 16px;
}

.footer-link {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}

.btn:hover {
  text-decoration: none;
}

.btn:disabled,
.btn:disabled:hover {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  box-shadow: var(--shadow-btn);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn-hover);
}

.btn-secondary {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-input);
}

.btn-secondary:hover {
  background: var(--border-input);
}

.btn-blue {
  background: linear-gradient(135deg, var(--accent-blue), #2563eb);
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn-blue:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(59, 130, 246, 0.45);
}

.btn-danger {
  background: linear-gradient(135deg, var(--accent-red), #dc2626);
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(239, 68, 68, 0.4);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 18px;
}

.btn-block {
  width: 100%;
}

.btn-pulse {
  animation: pulse 3s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   6. Cards & stats
   -------------------------------------------------------------------------- */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.settings-card {
  width: 100%;
  max-width: 560px;
}

.card-hover {
  transition: transform 0.2s, box-shadow 0.2s;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.stat-card {
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stat-label {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-secondary);
}

.stat-delta {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
}

.stat-delta.up {
  color: var(--accent);
}

.stat-delta.down {
  color: var(--accent-red);
}

@media (min-width: 960px) {
  .stat-value {
    font-size: 32px;
  }
}

.news-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.news-card-title {
  font-size: 18px;
  font-weight: 600;
}

.news-card-date {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.news-card-excerpt {
  font-size: 14px;
  color: var(--text-secondary);
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.news-card-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  display: block;
}

.admin-news-preview {
  display: block;
  width: min(100%, 320px);
  height: auto;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* Auth pages — Modern centered login */
body.auth-wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: #070a0f;
  overflow: hidden;
}

body.auth-wrap::before {
  content: none;
}

@keyframes blob-move {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, -5%) scale(1.08); }
}

body.auth-wrap::after {
  content: none;
}

.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .45;
  animation: float-blob 22s ease-in-out infinite alternate;
}

.blob-1 { width: 420px; height: 420px; top: -8%; left: -8%; background: rgba(16, 185, 129, .5); }
.blob-2 { width: 520px; height: 520px; bottom: -12%; right: -10%; background: rgba(5, 150, 105, .45); animation-delay: -8s; }
.blob-3 { width: 360px; height: 360px; top: 45%; left: 35%; background: rgba(20, 184, 166, .35); animation-delay: -14s; }

@keyframes float-blob {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(35px, -35px) scale(1.1); }
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 416px;
  margin: 0 auto;
  background: rgba(17, 24, 39, 0.78);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 22px;
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
  padding: 26px 24px;
  animation: authIn .5s cubic-bezier(.2,.7,.3,1) both;
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to { opacity: 1; transform: none; }
}

.auth-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.45), transparent);
  border-radius: 1px;
}

.auth-brand {
  display: block;
  width: fit-content;
  margin: 0 auto 16px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-decoration: none;
  background: linear-gradient(90deg, #ffffff, #34d399, #ffffff, #34d399, #ffffff);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: brand-shimmer 5s linear infinite;
  filter: drop-shadow(0 0 18px rgba(16, 185, 129, .25));
}

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

.auth-brand:hover {
  filter: drop-shadow(0 0 28px rgba(16, 185, 129, .45));
  text-decoration: none;
}

.auth-card .card-title {
  text-align: center;
  font-size: 22px;
  margin-bottom: 6px;
}

.auth-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.auth-card .admin-form {
  gap: 12px;
}
.auth-card .input { transition: border-color .15s, box-shadow .15s; }
.auth-card .input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(16, 185, 129, .16); outline: none; }

.auth-card .btn-block {
  width: 100%;
  justify-content: center;
}

.terms-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
}

.terms-checkbox {
  width: auto;
  flex-shrink: 0;
  margin-top: 3px;
}

.terms-consent-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.terms-consent-copy label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.terms-link {
  color: var(--accent);
}

.terms-message {
  margin-top: 6px;
  color: var(--accent-red);
  font-size: 12px;
}

.auth-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-footer a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.form-error {
  font-size: 12px;
  color: var(--accent-red);
}

@media (min-width: 640px) {
  body.auth-wrap {
    padding: 32px 24px;
  }
  .auth-card {
    padding: 30px 28px;
  }
}

/* --------------------------------------------------------------------------
   7. Forms
   -------------------------------------------------------------------------- */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-secondary);
}

.textarea {
  resize: vertical;
  min-height: 120px;
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca3af' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-hint {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.input-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.input-row .input {
  flex: 1;
  min-width: 200px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  cursor: pointer;
}

.checkbox-row input[type='checkbox'] {
  appearance: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-input);
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.checkbox-row input[type='checkbox']:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-row input[type='checkbox']:checked::after {
  content: '✓';
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.search-input {
  max-width: 420px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l4 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-left: 42px;
}

/* --------------------------------------------------------------------------
   8. Tables
   -------------------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

.table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
  color: var(--text-secondary);
  white-space: nowrap;
}

.table td {
  padding: 14px 16px;
  white-space: nowrap;
}

.table tbody tr {
  border-top: 1px solid var(--border);
  transition: background 0.15s;
}

.table tbody tr:hover {
  background: var(--bg-tertiary);
}

.table th[data-sort] {
  cursor: pointer;
  user-select: none;
}

.table th[data-sort]::after {
  content: ' ↕';
  opacity: 0.4;
}

.table th[data-sort].sort-asc::after {
  content: ' ↑';
  opacity: 1;
  color: var(--accent);
}

.table th[data-sort].sort-desc::after {
  content: ' ↓';
  opacity: 1;
  color: var(--accent);
}

/* --------------------------------------------------------------------------
   9. Badges / status pills
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
}

.badge-success {
  color: var(--accent);
  background: rgba(16, 185, 129, 0.12);
}

.badge-info {
  color: var(--accent-blue);
  background: rgba(59, 130, 246, 0.12);
}

.badge-warn {
  color: var(--accent-amber);
  background: rgba(245, 158, 11, 0.12);
}

.badge-danger {
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.12);
}

.badge-neutral {
  color: var(--text-secondary);
  background: var(--bg-tertiary);
}

/* --------------------------------------------------------------------------
   10. Pagination
   -------------------------------------------------------------------------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.page-btn:hover {
  background: var(--border-input);
  text-decoration: none;
}

.page-btn.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.page-ellipsis {
  color: var(--text-secondary);
  padding: 0 4px;
}

.page-info {
  width: 100%;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

@media (min-width: 640px) {
  .page-info {
    width: auto;
    margin-bottom: 0;
    margin-right: 8px;
  }
}

/* --------------------------------------------------------------------------
   13. Hero (homepage)
   -------------------------------------------------------------------------- */
.hero {
  text-align: center;
  padding: 48px 0 32px;
}

.hero-eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  animation: glow 4s ease-in-out infinite alternate;
}

.hero-subtitle {
  margin-top: 16px;
  font-size: 18px;
  color: var(--text-secondary);
}

.hero-ctas {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

@media (min-width: 640px) {
  .hero-ctas {
    flex-direction: row;
    justify-content: center;
  }
}

@media (min-width: 960px) {
  .hero {
    padding: 64px 0 48px;
  }

  .hero-title {
    font-size: 64px;
  }

  .hero-subtitle {
    font-size: 20px;
  }
}

/* --------------------------------------------------------------------------
   11. Modal
   -------------------------------------------------------------------------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  overflow-y: auto;
  padding: 20px;
}

.modal.show {
  display: flex;
}

.modal-dialog {
  width: 100%;
  max-width: 520px;
  margin: auto;
}

.modal-dialog.modal-lg {
  max-width: 760px;
}

.modal-dialog .card {
  animation: fadeUp 0.25s ease-out;
}

/* --------------------------------------------------------------------------
   12. Chat (support tickets)
   -------------------------------------------------------------------------- */
.chat {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  max-width: 85%;
}

.chat-row.operator {
  align-self: flex-start;
}

.chat-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-avatar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 16px;
  border-radius: 50%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-input);
}

.chat-row.user .chat-avatar {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
}

.chat-msg {
  padding: 14px 18px;
  font-size: 15px;
  line-height: 1.55;
  border-radius: var(--radius-md);
}

.chat-row.operator .chat-msg {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-input);
  border-bottom-left-radius: 4px;
}

.chat-row.user .chat-msg {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-bottom-right-radius: 4px;
}

.chat-msg-meta {
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.input:disabled,
.textarea:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* --------------------------------------------------------------------------
   13. Misc — alerts, states, utilities
   -------------------------------------------------------------------------- */
.alert {
  padding: 12px 16px;
  font-size: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
}

.alert-error {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.alert-success {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.alert-info {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.alert-warning {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

.flash-alerts {
  max-width: 600px;
  margin: 0 auto 16px;
  padding: 0 16px;
}
.flash-alerts .alert {
  margin-bottom: 8px;
}
.flash-alerts .alert:last-child {
  margin-bottom: 0;
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.skeleton {
  display: block;
  height: 16px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 25%,
    var(--border-input) 50%,
    var(--bg-tertiary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.divider-text {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.divider-text::before,
.divider-text::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-input);
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--accent);
  background: rgba(16, 185, 129, 0.1);
  border-radius: 6px;
}

.text-secondary {
  color: var(--text-secondary);
}
.text-sm {
  font-size: 14px;
  line-height: 1.45;
}

.text-green {
  color: var(--accent);
}

.text-blue {
  color: var(--accent-blue);
}

.text-red {
  color: var(--accent-red);
}

.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.is-hidden { display: none; }
.inline-form { display: inline; }
.select-inline { width: auto; display: inline-block; }
.split-actions { justify-content: space-between; }
.pre-wrap {
  white-space: pre-wrap;
  font-family: inherit;
  line-height: 1.6;
  font-size: 14px;
  color: var(--text-secondary);
}
.price-line { font-size: 18px; }
.subtle-line { font-size: 14px; color: var(--text-secondary); }
.chat-message-enter { animation: fadeIn 0.3s ease-in; }
.chat-msg-new {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

/* --------------------------------------------------------------------------
   14. Animations
   -------------------------------------------------------------------------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: var(--shadow-btn);
  }
  50% {
    transform: scale(1.03);
    box-shadow: var(--shadow-btn-hover);
  }
}

@keyframes glow {
  from {
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.35);
  }
  to {
    text-shadow: 0 0 40px rgba(16, 185, 129, 0.55);
  }
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

/* Scroll reveal: elements start hidden only when JS is available */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Pure-CSS load stagger for above-the-fold sections */
.stagger > * {
  animation: fadeUp 0.3s ease-out both;
}

.stagger > *:nth-child(1) { animation-delay: 0s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.2s; }
.stagger > *:nth-child(4) { animation-delay: 0.3s; }
.stagger > *:nth-child(5) { animation-delay: 0.4s; }
.stagger > *:nth-child(6) { animation-delay: 0.5s; }
.stagger > *:nth-child(7) { animation-delay: 0.6s; }
.stagger > *:nth-child(8) { animation-delay: 0.7s; }

/* --------------------------------------------------------------------------
   15. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   16. User dropdown
   -------------------------------------------------------------------------- */
.user-dropdown {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(16,185,129,0.1);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
  appearance: none;
  cursor: pointer;
}

.user-chip:hover {
  background: rgba(16,185,129,0.18);
  border-color: rgba(16,185,129,0.35);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 6px;
  z-index: 1000;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: rgba(16,185,129,0.1);
  color: var(--accent);
}

.dropdown-item.text-danger {
  color: #ef4444;
}

.dropdown-item.text-danger:hover {
  background: rgba(239,68,68,0.1);
}

/* --------------------------------------------------------------------------
   Component library (extracted from inline styles; reused across pages)
   -------------------------------------------------------------------------- */

/* Bootstrap-convention alias so both .badge-warn and .badge-warning work */
.badge-warning { color: #fde68a; background: rgba(245, 158, 11, 0.12); }

/* Narrow page wrappers (replace magic-number inline max-width) */
.page-narrow { max-width: 480px; margin: 24px auto; }
.page-narrow-md { max-width: 640px; margin: 24px auto; }
.page-narrow-sm { max-width: 360px; margin: 24px auto; }
.page-padded { padding: 24px 0; }
.narrow { max-width: 760px; margin: 0 auto; }
.card-compact { padding: 8px 0; }
.modal-card-sm { max-width: 400px; margin: 60px auto; }
.modal-card { max-width: 480px; margin: 60px auto; }
.modal-card-md { max-width: 560px; margin: 60px auto; }
.modal-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.table-id { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.empty-state { text-align: center; padding: 32px; color: var(--text-secondary); }

/* Form footer / actions row */
.form-actions { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.form-actions .btn-block { flex: 1; }

/* Inline metrics row (e.g. summary numbers) */
.metric-row { display: flex; gap: 12px; flex-wrap: wrap; }
.metric-row > .metric { flex: 1; min-width: 120px; }

/* Balance page */
.balance-page { width: 100%; }

.balance-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-bottom: 24px;
  padding: 22px 20px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 24px;
  background: linear-gradient(112deg, rgba(16, 185, 129, 0.11), rgba(8, 24, 20, 0.78) 38%, rgba(10, 18, 24, 0.9));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.balance-hero::before {
  content: '';
  position: absolute;
  top: -170px;
  left: -110px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.2), transparent 66%);
  pointer-events: none;
}

.balance-hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-areas: 'summary' 'bonuses';
  gap: 20px;
  align-items: center;
}

.balance-summary { grid-area: summary; min-width: 0; }
.balance-label {
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.balance-amount {
  color: var(--text-primary);
  font-size: clamp(48px, 8vw, 64px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  line-height: 0.96;
}

.balance-bonuses {
  grid-area: bonuses;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-lg);
  background: rgba(3, 10, 12, 0.3);
}
.balance-bonuses-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 5px;
}
.balance-bonuses-heading h2 {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.balance-bonuses-heading > span {
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.3;
  text-align: right;
  opacity: 0.72;
}
.balance-bonus-tier {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 50px;
  padding: 7px 2px;
}
.balance-bonus-tier + .balance-bonus-tier { border-top: 1px solid var(--border); }
.balance-bonus-threshold {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
}
.balance-bonus-threshold strong { color: var(--text-primary); font-size: 15px; }
.balance-bonus-value {
  color: var(--accent);
  font-size: 24px;
  letter-spacing: -0.025em;
  line-height: 1;
}
.balance-bonus-badge {
  padding: 2px 7px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.balance-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.balance-topup-card,
.balance-transactions-card { min-width: 0; }
.balance-topup-card .card-title,
.balance-transactions-card .card-title { margin-bottom: 18px; }

.amount-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.amount-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.22);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.amount-chip:hover { background: rgba(255, 255, 255, 0.05); }
.amount-chip.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.amount-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.balance-custom-amount { position: relative; }
.balance-custom-amount > span {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 14px;
  color: var(--text-secondary);
  font-weight: 700;
  transform: translateY(-50%);
  pointer-events: none;
}
.balance-custom-amount .input { padding-left: 32px; }
.balance-custom-amount input::-webkit-inner-spin-button,
.balance-custom-amount input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
.balance-custom-amount input[type='number'] { -moz-appearance: textfield; }
.balance-policy-note {
  margin: 2px 0 18px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

@media (min-width: 360px) {
  .amount-chips { display: flex; flex-wrap: wrap; }
  .amount-chip { flex: 1 1 64px; }
}

@media (min-width: 721px) {
  .balance-hero { padding: 28px 30px; }
  .balance-hero-layout {
    grid-template-columns: minmax(220px, 1fr) minmax(340px, 1.35fr);
    grid-template-areas: 'summary bonuses';
    gap: 24px;
  }
  .balance-bonuses { padding: 15px 18px; }
  .balance-bonus-tier { min-height: 54px; padding: 9px 2px; }
}

@media (min-width: 960px) {
  .balance-hero { padding: 32px 36px; }
  .balance-hero-layout {
    grid-template-columns: minmax(260px, 1fr) minmax(400px, 500px);
    gap: clamp(32px, 4vw, 52px);
    min-height: 160px;
  }
  .balance-dashboard-grid {
    grid-template-columns: minmax(320px, 400px) minmax(0, 1fr);
  }
}

/* QR + deposit address (plisio checkout) */
.qr-box {
  margin: 0 auto 16px;
  max-width: 220px;
  background: #fff;
  padding: 12px;
  border-radius: var(--radius-md);
}
.qr-box img { width: 100%; height: auto; display: block; }

.copy-field { position: relative; margin: 0 auto 16px; max-width: 420px; }
.copy-field code {
  display: block;
  word-break: break-all;
  padding: 12px 56px 12px 12px;
  background: rgba(0,0,0,0.25);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.copy-field .copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: transparent;
  border: 0;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
}
.copy-field .copy-btn:hover { color: var(--accent); }
.copy-field .copy-btn.copied { color: var(--accent); }

/* Countdown / live status text */
.muted-small { font-size: 13px; color: var(--text-secondary); }
.tiny-hint { font-size: 12px; color: var(--text-secondary); }

/* Button loading state (used by App.btnLoading) */
.btn[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; }
.btn[aria-busy="true"]::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 16px; height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.7s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

/* Skeleton shimmer already exists (.skeleton); ensure table skeleton cell */

/* ==========================================================================
   Checkout page (Plisio)
   ========================================================================== */
body.checkout-page {
  padding: 0;
}
body.checkout-page main {
  padding: 0;
}
body.checkout-page .container.stack {
  width: 100%;
  max-width: none;
  padding: 0;
}

.checkout-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 16px 24px;
  background: var(--bg-primary);
  position: relative;
}

.checkout-top-logo {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  text-decoration: none;
}
.checkout-top-logo:hover { text-decoration: none; color: var(--accent); }

.checkout-card {
  width: 100%;
  max-width: 460px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 32px 28px;
  text-align: center;
}

.checkout-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.3;
}

.checkout-amount {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  padding: 12px 20px;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-md);
}

.amount-usd {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
}

.amount-crypto {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  background: transparent;
  border: 0;
  font-family: inherit;
}
.amount-crypto:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
  outline: 1px dashed var(--border-input);
}
.amount-crypto .copy-icon { opacity: 0.6; }
.amount-crypto:hover .copy-icon { opacity: 1; }
.amount-crypto.copied { color: var(--accent); outline-color: var(--accent); }

.checkout-page .qr-box {
  margin: 0 auto 20px;
  max-width: 200px;
  background: #fff;
  padding: 12px;
  border-radius: var(--radius-md);
}
.checkout-page .qr-box img {
  width: 100%;
  height: auto;
  display: block;
}

.checkout-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.checkout-page .copy-field {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: none;
  margin: 0 0 20px;
  padding: 12px 14px;
  background: rgba(0,0,0,0.25);
  border: 1px dashed var(--border-input);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.checkout-page .copy-field:hover {
  border-color: var(--accent);
  background: rgba(16,185,129,0.05);
}
.checkout-page .copy-field code {
  flex: 1;
  display: block;
  word-break: break-all;
  padding: 0;
  background: transparent;
  border-radius: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
}
.checkout-page .copy-field .copy-btn {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}
.checkout-page .copy-field:hover .copy-btn { color: var(--accent); }
.checkout-page .copy-field.copied { border-color: var(--accent); }
.checkout-page .copy-field.copied .copy-btn { color: var(--accent); }

.checkout-countdown {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.checkout-hint {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.qr-fallback {
  padding: 14px 4px 4px;
  color: var(--bg-primary);
}
.qr-fallback .muted-small { margin-bottom: 8px; }

.copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 99999;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transform: translateX(-50%);
  animation: checkout-toast-in 0.2s ease-out;
  transition: opacity 0.3s;
}
.copy-toast.is-leaving { opacity: 0; }
.clipboard-fallback {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
@keyframes checkout-toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 480px) {
  .checkout-card { padding: 24px 18px; }
  .checkout-title { font-size: 20px; }
  .amount-usd { font-size: 22px; }
}

/* Status icon (success / fail / pending) */
.checkout-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin-bottom: 20px;
}
.checkout-status-icon.success {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent);
}
.checkout-status-icon.error {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-red);
}
.checkout-status-icon.pending {
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
}

/* Result lines on success page */
.checkout-result-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 14px;
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 8px;
}
.checkout-result-line span { color: var(--text-secondary); }
.checkout-result-line strong { color: var(--text-primary); }
.checkout-result-line.bonus { background: rgba(16,185,129,0.1); }
.checkout-result-line.bonus strong { color: var(--accent); }

/* Action buttons column */
.checkout-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.checkout-amount-compact { margin-bottom: 16px; }
.checkout-primary-action { margin-top: 24px; }
.checkout-status-note { margin-top: 16px; }
.checkout-fail-message { margin-bottom: 24px; }
.btn-leading-icon { flex: 0 0 auto; margin-right: 6px; }

/* Standalone HTTP error pages: keep these independent from the app layout. */
.system-error-page {
  display: grid;
  min-height: 100vh;
  padding: 24px 16px;
  place-items: center;
}
.system-error-card {
  width: min(100%, 440px);
  text-align: center;
}
.system-error-code {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: clamp(56px, 18vw, 96px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
}
.system-error-card .text-secondary { margin-bottom: 24px; }
.system-error-reference {
  margin: -12px 0 24px;
  color: var(--text-secondary);
  font-size: 12px;
}
.system-error-reference code {
  color: var(--text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ==========================================================================
   Admin support (tickets)
   ========================================================================== */
.admin-support-page {
  padding: 32px 0;
}
.admin-support-header {
  margin-bottom: 24px;
}
.admin-support-header .page-title {
  margin-bottom: 4px;
}
.admin-support-header .text-secondary {
  color: var(--text-secondary);
  font-size: 14px;
}

.admin-tickets-table-wrap {
  overflow-x: auto;
}
.admin-tickets-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-tickets-table th,
.admin-tickets-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-tickets-table th {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: rgba(0,0,0,0.2);
}
.admin-tickets-table td {
  color: var(--text-primary);
  vertical-align: middle;
}
.admin-tickets-table tr:hover td {
  background: rgba(255,255,255,0.03);
}
.ticket-client {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ticket-client .client-name {
  font-weight: 600;
}
.ticket-client .client-id {
  font-size: 12px;
  color: var(--text-secondary);
}
.ticket-subject {
  max-width: 300px;
  word-break: break-word;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.status_0 { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.status_1 { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.status_2 { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.status_3 { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }

/* Ticket detail */
.ticket-page .user-dashboard-header {
  max-width: 600px;
  margin: 0 auto 16px;
}
.status-display {
  display: flex;
  align-items: center;
  gap: 8px;
}
.status-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   DataTables dark theme override
   ========================================================================== */
.dataTables_wrapper {
  color: var(--text-secondary);
}
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate,
.dataTables_wrapper .dataTables_processing {
  color: var(--text-secondary) !important;
  margin-bottom: 12px;
}
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 14px;
}
.dataTables_wrapper .dataTables_filter input {
  margin-left: 8px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
  color: var(--text-secondary) !important;
  border: 1px solid var(--border) !important;
  background: var(--bg-tertiary) !important;
  border-radius: var(--radius-sm);
  padding: 4px 10px !important;
  margin: 0 2px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  color: #fff !important;
  background: var(--accent) !important;
  border-color: var(--accent) !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  color: var(--text-secondary) !important;
  background: var(--bg-tertiary) !important;
  border-color: var(--border) !important;
  opacity: 0.5;
}
table.dataTable {
  width: 100% !important;
  border-collapse: collapse;
}
table.dataTable thead th,
table.dataTable thead td {
  color: var(--text-secondary) !important;
  border-bottom: 1px solid var(--border) !important;
  background: transparent !important;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
}
table.dataTable tbody tr {
  background-color: transparent !important;
}
table.dataTable tbody tr:hover {
  background-color: var(--bg-tertiary) !important;
}
table.dataTable tbody td {
  color: var(--text-primary) !important;
  border-top: 1px solid var(--border) !important;
}
table.dataTable.no-footer {
  border-bottom: 1px solid var(--border) !important;
}
table.dataTable tfoot th,
table.dataTable tfoot td {
  color: var(--text-secondary) !important;
  border-top: 1px solid var(--border) !important;
}

/* ==========================================================================
   Admin dashboard
   ========================================================================== */
.admin-dashboard-page {
  padding: 24px 0 48px;
}
.admin-dashboard-header {
  margin-bottom: 24px;
}
.admin-dashboard-header .page-title {
  margin-bottom: 2px;
  font-size: 28px;
}
.admin-dashboard-header .text-secondary {
  color: var(--text-secondary);
  font-size: 14px;
}

.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}
@media (max-width: 1200px) {
  .dashboard-stats-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .dashboard-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .dashboard-stats-grid { grid-template-columns: 1fr; }
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.15s;
  height: 100%;
}
.stat-card:hover {
  border-color: var(--border-input);
}
.stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.stat-icon.users { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-icon.orders { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-icon.topups { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.stat-icon.balance { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.stat-icon.tickets { background: rgba(236, 72, 153, 0.1); color: #ec4899; }
.stat-icon.provider { background: rgba(148, 163, 184, 0.1); color: #94a3b8; }
.stat-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.stat-value.text-muted {
  color: var(--text-secondary);
  font-size: 18px;
}
.stat-sub-inline {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}
.stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 3px;
}

.orders-diff { font-size: 12px; font-weight: 600; }
.orders-diff.positive { color: var(--accent); }
.orders-diff.negative { color: var(--accent-red); }
.orders-diff.neutral { color: var(--text-secondary); font-weight: 500; }

.shittex-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-section {
  margin-top: 8px;
}
.dashboard-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.dashboard-section .section-header .section-title {
  margin: 0;
  font-size: 18px;
}

.user-link {
  color: var(--accent-blue);
  font-weight: 600;
  text-decoration: none;
}
.user-link:hover { color: var(--accent); text-decoration: underline; }

.btn-xs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 0;
  cursor: pointer;
  transition: all 0.15s;
}

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

/* Admin header */
.admin-header .logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.admin-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--accent-red);
  padding: 2px 6px;
  border-radius: 4px;
}
.admin-header .nav-links {
  gap: 8px;
}

/* Admin page shared styles */
.admin-page .container.stack {
  padding-top: 24px;
  padding-bottom: 40px;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.admin-form .form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 768px) {
  .admin-form .form-row {
    grid-template-columns: 1fr;
  }
}
.admin-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.admin-form .form-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.admin-form .checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 14px;
}
.admin-form .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}
.admin-page-editor {
  min-height: 200px;
  resize: vertical;
}
.admin-form.readonly .input {
  background: rgba(255,255,255,0.03);
}

.admin-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
}
.table-compact {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table-compact th {
  text-align: left;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.table-compact td {
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table-compact tr:last-child td {
  border-bottom: 0;
}
.table-compact .table-id {
  font-family: monospace;
  color: var(--text-secondary);
  font-size: 12px;
}
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Table bulk actions */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.table-toolbar .select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}
.table-toolbar .toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.table-compact .checkbox-cell {
  width: 40px;
  text-align: center;
}
.table-compact .checkbox-cell input[type="checkbox"] {
  cursor: pointer;
}

.emailflood-record.row-removing,
.callflood-record.row-removing {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#addmany .email-bulk-input {
  min-height: 180px;
  resize: vertical;
}

/* Call order form */
.call-capacity {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.call-capacity__dot {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.call-capacity--available .call-capacity__dot {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.call-capacity--busy .call-capacity__dot {
  background: var(--accent-red);
  box-shadow: 0 0 8px var(--accent-red);
}

.call-capacity--available .call-capacity__state { color: var(--accent); }
.call-capacity--busy .call-capacity__state { color: var(--accent-red); }

.call-capacity__state {
  font-weight: 600;
}

.call-capacity__queue {
  color: var(--text-secondary);
  font-size: 13px;
}

.call-order-modal .modal-dialog,
.call-delete-modal .modal-dialog {
  display: flex;
  align-items: center;
  min-height: calc(100vh - 40px);
}

.call-order-modal .modal-content,
.call-delete-modal .modal-content {
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.call-delete-modal .modal-dialog {
  max-width: 420px;
}

.call-order-modal .btn-close,
.call-delete-modal .btn-close {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.call-order-modal [hidden] {
  display: none !important;
}

.call-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
}

.call-mode-switch .btn {
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  font-size: 14px;
  white-space: normal;
}

.call-mode-switch .btn:hover {
  transform: none;
}

.call-order-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: start;
  gap: 14px;
}

.call-phone-group {
  min-width: 0;
  margin-bottom: 0;
}

.call-phone-field {
  display: flex;
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.call-phone-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.call-phone-field.is-valid {
  border-color: var(--accent);
}

.call-phone-prefix {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 10px;
  border-right: 1px solid var(--border);
  color: var(--text-secondary);
  background: var(--bg-secondary);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.call-phone-field input {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  outline: none;
  border: 0;
  color: var(--text-primary);
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
}

.call-phone-field input::placeholder {
  color: var(--text-secondary);
}

.call-hours-fieldset {
  min-width: 0;
  border: 0;
}

.call-hours-fieldset .form-label {
  width: 100%;
}

.call-hours-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.call-h-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  background: var(--card-bg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.call-h-btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.call-h-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.call-h-btn span {
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.call-h-btn.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  box-shadow: var(--shadow-btn);
}

.call-hours-info {
  margin: 2px 0 14px;
  color: var(--text-secondary);
  font-size: 13px;
  text-align: center;
}

.call-hours-info strong {
  color: var(--accent);
  font-weight: 600;
}

.call-multi-list {
  min-height: 132px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

.call-order-footer {
  flex-direction: column;
  align-items: stretch;
}

.call-order-footer #submit-btn {
  width: 100%;
  min-height: 46px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  white-space: normal;
}

.call-topup-link {
  color: var(--accent);
  font-size: 13px;
  text-align: center;
}

.call-order-result {
  width: 100%;
}

.call-order-result .admin-alert {
  margin-bottom: 0;
}

@media (max-width: 480px) {
  .call-order-modal,
  .call-delete-modal {
    padding: 12px;
  }

  .call-order-modal .modal-dialog,
  .call-delete-modal .modal-dialog {
    min-height: calc(100vh - 24px);
  }

  .call-order-modal .modal-content,
  .call-delete-modal .modal-content {
    max-height: calc(100vh - 24px);
  }

  .call-order-modal .modal-header,
  .call-order-modal .modal-body,
  .call-order-modal .modal-footer,
  .call-delete-modal .modal-header,
  .call-delete-modal .modal-body,
  .call-delete-modal .modal-footer {
    padding: 14px;
  }

  .call-order-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .call-phone-group {
    margin-bottom: 0;
  }
}

/* Call history cards */
.call-flood-component {
  display: block;
  min-width: 0;
}

.call-flood-component .ajax-target {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.order-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.order-card:hover {
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(4px);
}

.order-card__checkbox {
  display: flex;
  align-items: center;
  min-width: 18px;
  min-height: 18px;
  padding-top: 2px;
}

.order-card__checkbox input,
.call-flood-component .select-all {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.order-card__body,
.order-card__top > :first-child {
  min-width: 0;
}

.order-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.order-card__email {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 12px;
}

.order-card__meta .dot {
  opacity: 0.55;
}

.order-card__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.order-progress {
  width: 100%;
  min-width: 0;
  margin-top: 10px;
}

.order-progress__track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.order-progress__fill {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 1s linear, background 0.4s ease;
}

.order-progress__fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: translateX(-100%);
  animation: order-progress-shimmer 1.8s infinite;
}

.order-progress__fill--done {
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}

.order-progress__fill--done::after,
.order-progress__fill--failed::after {
  animation: none;
  opacity: 0;
}

.order-progress__fill--failed {
  background: linear-gradient(90deg, var(--accent-red), #b91c1c);
}

.order-progress__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.order-progress__left {
  color: var(--text-primary);
  font-weight: 600;
}

@keyframes order-progress-shimmer {
  to { transform: translateX(100%); }
}

@media (max-width: 480px) {
  .table-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .table-toolbar .toolbar-actions,
  .table-toolbar .bulk-delete-selected {
    width: 100%;
  }

  .call-flood-component .ajax-target {
    padding: 8px;
  }

  .order-card {
    gap: 10px;
    padding: 12px;
  }

  .order-card:hover {
    transform: none;
  }

  .order-card__top {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .order-card__actions {
    width: 100%;
  }

  .order-progress__meta {
    font-size: 10px;
  }
}

/* Status badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.status-badge.status_admin { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.status-badge.status_support { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.status-badge.status_blocked { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.status-badge.status_working,
.status-badge.status_work { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.status-badge.status_paused,
.status-badge.status_pause { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.status-badge.status_stopped,
.status-badge.status_stopped { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.status-badge.status_new { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.status-badge.status_open,
.status-badge.status_opened { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.status-badge.status_closed { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.status-badge.status_new_answer { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

/* Admin ticket chat */
.ticket-page main {
  display: flex;
  flex-direction: column;
}
.ticket-page .container.stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 0;
}
.ticket-page .user-dashboard-header {
  display: none;
}
.admin-ticket-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}
.ticket-card-header {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.ticket-card-head-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ticket-card-title {
  font-size: 18px;
  font-weight: 700;
}
.ticket-card-subtitle {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
}
.ticket-card-subtitle .status-badge {
  font-size: 10px;
  padding: 2px 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ticket-card-user {
  font-size: 12px;
  color: var(--text-secondary);
}
.ticket-card-user a {
  color: var(--text-primary);
  font-weight: 500;
}
.ticket-card-user a:hover {
  color: var(--accent);
}
.admin-ticket-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.admin-ticket-messages component.message-component {
  display: contents;
}
.ticket-message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 60%;
}
.ticket-message.admin {
  margin-left: auto;
  align-items: flex-end;
}
.ticket-message.client {
  margin-right: auto;
  align-items: flex-start;
}
.ticket-message .message-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
  order: 2;
}
.ticket-message .message-author {
  font-weight: 500;
  color: var(--text-secondary);
}
.ticket-message .message-bubble {
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  word-break: break-word;
  order: 1;
}
.ticket-message.admin .message-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 3px;
}
.ticket-message.client .message-bubble {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--text-primary);
  border-bottom-left-radius: 3px;
}
.message-form input {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  padding: 5px 10px;
  color: inherit;
  font: inherit;
}
.ticket-message.admin .message-form input {
  border-color: rgba(255, 255, 255, 0.45);
}
.admin-ticket-footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--border);
  padding: 12px 18px;
  background: rgba(255,255,255,0.02);
}
.admin-message-form {
  display: flex;
  gap: 10px;
}
.admin-message-form .input {
  flex: 1;
}
.ticket-reply {
  min-height: 42px;
  resize: vertical;
  font-family: inherit;
}
.admin-ticket-status-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ticket-closed-notice {
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
}

.message-actions {
  margin-top: 6px;
}

.message-actions .buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.message-actions .btn {
  font-size: 12px;
  padding: 4px 10px;
}

.message-actions .delete.agree {
  font-size: 12px;
}

.stage-edit {
  display: none;
}

/* Pagination */
.pagination-wrap {
  margin-top: 16px;
  display: flex;
  justify-content: center;
}
.pagination-wrap nav {
  display: flex;
}
.pagination-wrap .pagination {
  display: inline-flex;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.pagination-wrap .page-item .page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}
.pagination-wrap .page-item.active .page-link,
.pagination-wrap .page-item .page-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Modals */
.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.modal-header .modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.modal-header .btn-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
}
.modal-body {
  padding: 16px;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

/* Custom table-component pagination (dark theme) */
.table-component + .pagination,
.table-component .pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
}
.table-component + .pagination .dataTables_info,
.table-component .pagination .dataTables_info {
  white-space: nowrap;
}
.table-component + .pagination .dataTables_paginate,
.table-component .pagination .dataTables_paginate {
  display: flex;
  align-items: center;
  gap: 8px;
}
.table-component + .pagination .paginate_button,
.table-component .pagination .paginate_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}
.table-component + .pagination .paginate_button:hover,
.table-component .pagination .paginate_button:hover,
.table-component + .pagination .paginate_button.current,
.table-component .pagination .paginate_button.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.table-component + .pagination .paginate_button.previous,
.table-component + .pagination .paginate_button.next,
.table-component .pagination .paginate_button.previous,
.table-component .pagination .paginate_button.next {
  padding: 0 10px;
}
.table-component + .pagination .paginate-select,
.table-component .pagination .paginate-select {
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 13px;
}

/* Admin alerts */
.admin-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 14px;
}
.admin-alert.alert-success {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.admin-alert.alert-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

/* Admin action groups */
.admin-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.admin-inline-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.admin-inline-form .input-xs {
  width: 70px;
  padding: 3px 8px;
  font-size: 12px;
}

/* Narayana top-up */
.narayana-topup-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.narayana-balance-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background:
    radial-gradient(circle at 12% 10%, rgba(16, 185, 129, 0.12), transparent 38%),
    var(--bg-secondary);
}

.narayana-eyebrow {
  margin-bottom: 4px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.narayana-balance-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.narayana-balance-value {
  font-size: clamp(30px, 5vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.narayana-balance-value.is-ok { color: var(--accent); }
.narayana-balance-value.is-low { color: var(--accent-red); }

.narayana-balance-updated {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}

.narayana-topup-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.narayana-topup-panel {
  min-width: 0;
}

.narayana-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.narayana-panel-heading h2 {
  font-size: 19px;
  line-height: 1.3;
}

.narayana-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  color: var(--accent);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.narayana-panel-description {
  margin: 10px 0 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

.narayana-payment-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.narayana-method-fieldset {
  min-width: 0;
  border: 0;
}

.narayana-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  min-height: 62px;
}

.narayana-method-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 12px;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.narayana-method-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--text-secondary);
}

.narayana-method-card:focus-within {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.narayana-method-card:has(input:checked) {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--accent);
}

.narayana-method-card input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
}

.narayana-method-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.narayana-method-copy strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.narayana-method-copy small {
  color: var(--text-secondary);
  font-size: 11px;
}

.narayana-method-message {
  align-self: center;
  color: var(--text-secondary);
  font-size: 13px;
}

.narayana-method-message.is-error { color: #f87171; }

.narayana-payment-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.narayana-amount-field {
  flex: 1 1 170px;
  margin-bottom: 0;
}

.narayana-payment-controls .btn {
  min-height: 50px;
}

.narayana-payment-result {
  display: grid;
  gap: 6px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.narayana-payment-result.is-success {
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}

.narayana-payment-result.is-error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.3);
}

.narayana-payment-link {
  width: fit-content;
  max-width: 100%;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
}

.narayana-bookkeeping-form {
  gap: 2px;
}

.narayana-bookkeeping-form .btn {
  align-self: flex-start;
}

.narayana-topup-hint {
  padding: 0 4px;
  color: var(--text-secondary);
  font-size: 12px;
}

@media (min-width: 900px) {
  .narayana-topup-grid {
    grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr);
  }
}

@media (max-width: 560px) {
  .narayana-balance-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .narayana-balance-summary .btn,
  .narayana-payment-controls .btn,
  .narayana-bookkeeping-form .btn {
    width: 100%;
  }

  .narayana-payment-controls {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Form section titles */
.form-section-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin: 24px 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Extra small input */
.input-xs {
  padding: 4px 8px;
  font-size: 12px;
}

/* Service switcher */
.service-switcher-form {
  gap: 20px;
}
.service-switcher-form .setting {
  padding: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.service-switcher-form .setting .description {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}
.service-switcher-form .setting textarea {
  min-height: 80px;
}

/* Utility */
.hidden,
.self-destruct {
  display: none !important;
}

/* Report tabs in user edit */
.tabs-reports {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.tabs-reports label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.tabs-reports label:hover {
  border-color: var(--border-input);
  color: var(--text-primary);
}
.tabs-reports input[type="radio"] {
  display: none;
}
.tabs-reports input[type="radio"]:checked + * {
  color: var(--accent);
}
.tabs-reports label:has(input[type="radio"]:checked) {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}
.tab-content-body {
  display: none;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
}
/* Pure CSS tab switching based on radio checked state */
.tab-payments:checked ~ .tab-content-body.tab-payments,
.tab-balance-audit:checked ~ .tab-content-body.tab-balance-audit,
.tab-emails:checked ~ .tab-content-body.tab-emails,
.tab-active-sessions:checked ~ .tab-content-body.tab-active-sessions,
.tab-phones:checked ~ .tab-content-body.tab-phones {
  display: block;
}

/* Generic report table component */
.table-component.report {
  width: 100%;
}
.table-component.report h2 {
  font-size: 18px;
  margin-bottom: 16px;
}
.table-component.report .auto-refresher {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.table-component.report .auto-refresher .progress {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}
.table-component.report .table-wrapper {
  overflow-x: auto;
  margin-bottom: 12px;
}
.table-component.report table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.table-component.report table thead th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
.table-component.report table tbody td {
  padding: 10px 12px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}
.table-component.report .no-data {
  text-align: center;
  padding: 32px;
  color: var(--text-secondary);
}

/* User pages shared */
.user-page .container.stack {
  padding-top: 24px;
  padding-bottom: 40px;
}
.user-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.user-dashboard-header .page-title {
  margin-bottom: 2px;
  font-size: 26px !important;
  line-height: 1.2;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
@media (min-width: 960px) {
  .user-dashboard-header .page-title {
    font-size: 28px !important;
  }
}

/* Admin operations: orders, call monitor and disclaimer */
.admin-operations-page .dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 0;
  min-width: 0;
}

.admin-ops-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-ops-stat-card,
.admin-orders-stats .stat-card {
  min-width: 0;
  text-align: left;
}

.admin-ops-status-value {
  margin-top: 6px;
}

.admin-capacity {
  display: block;
  width: 100%;
  height: 7px;
  margin-top: 10px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--bg-tertiary);
}

.admin-capacity::-webkit-progress-bar {
  background: var(--bg-tertiary);
  border-radius: 999px;
}

.admin-capacity::-webkit-progress-value {
  border-radius: 999px;
  background: var(--accent);
}

.admin-capacity::-moz-progress-bar {
  border-radius: 999px;
  background: var(--accent);
}

.admin-capacity--warn::-webkit-progress-value { background: var(--accent-amber); }
.admin-capacity--warn::-moz-progress-bar { background: var(--accent-amber); }
.admin-capacity--danger::-webkit-progress-value { background: var(--accent-red); }
.admin-capacity--danger::-moz-progress-bar { background: var(--accent-red); }

.admin-ops-panel {
  padding: 0;
  overflow: hidden;
}

.admin-ops-panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
}

.admin-ops-panel-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.admin-ops-panel-header .text-secondary {
  font-size: 12px;
}

.admin-ops-panel-body {
  padding: 20px;
}

.admin-ops-table-wrap {
  overscroll-behavior-inline: contain;
}

.admin-ops-table-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.admin-ops-table {
  min-width: 720px;
}

.admin-ops-table th,
.admin-ops-table td {
  padding: 11px 16px;
}

.admin-ops-mono {
  max-width: 260px;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  text-overflow: ellipsis;
}

.admin-orders-stats {
  margin-bottom: 0;
}

.admin-stat-warn { color: var(--accent-amber); }
.admin-stat-success { color: var(--accent); }

.admin-test-send-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 140px auto;
  align-items: end;
  gap: 12px;
}

.admin-test-send-form .form-group {
  margin-bottom: 0;
}

.admin-test-send-form .btn {
  min-height: 45px;
}

.admin-panel-note {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 12px;
}

.admin-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-order-actions form {
  display: inline-flex;
}

.admin-operations-page .btn-success {
  color: #fff;
  background: var(--accent-hover);
}

.admin-operations-page .btn-success:hover {
  background: var(--accent);
}

.admin-ops-pagination {
  margin-top: 0;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.admin-ops-pagination:empty {
  display: none;
}

.admin-disclaimer-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

.admin-disclaimer-grid .form-group {
  min-width: 0;
  margin-bottom: 0;
}

.admin-language-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-language-label span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  color: var(--text-primary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-input);
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}

.admin-code-editor {
  min-height: 420px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.admin-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.admin-form-footer .text-secondary {
  max-width: 620px;
  font-size: 13px;
}

@media (max-width: 768px) {
  .admin-ops-stats,
  .admin-disclaimer-grid {
    grid-template-columns: 1fr;
  }

  .admin-test-send-form {
    grid-template-columns: minmax(0, 1fr) 120px;
  }

  .admin-test-send-form .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .admin-code-editor {
    min-height: 280px;
  }
}

@media (max-width: 480px) {
  .admin-operations-page .dashboard-section {
    gap: 16px;
  }

  .admin-ops-panel-header,
  .admin-ops-panel-body,
  .admin-ops-pagination {
    padding-left: 14px;
    padding-right: 14px;
  }

  .admin-ops-table th,
  .admin-ops-table td {
    padding-left: 12px;
    padding-right: 12px;
  }

  .admin-test-send-form {
    grid-template-columns: 1fr;
  }

  .admin-test-send-form .btn {
    grid-column: auto;
  }

  .admin-disclaimer-form {
    padding: 16px;
  }

  .admin-form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-form-footer .btn {
    width: 100%;
  }
}

/* Admin dashboard overview */
.admin-dashboard-page {
  padding: 0;
}

.admin-dashboard-page .admin-dashboard-header,
.admin-dashboard-page .dashboard-stats-grid,
.admin-dashboard-page .dashboard-section {
  margin: 0;
}

.admin-dashboard-page .admin-ops-panel {
  min-width: 0;
}

.admin-dashboard-page .status-badge {
  white-space: nowrap;
}

.admin-dashboard-email-table {
  min-width: 720px;
}

.admin-dashboard-narayana-header {
  align-items: center;
  flex-wrap: wrap;
}

.admin-dashboard-narayana-header > div {
  min-width: 0;
}

.admin-dashboard-narayana-header .text-secondary {
  display: block;
  margin-top: 2px;
}

.admin-dashboard-provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.admin-dashboard-provider-card {
  min-width: 0;
  padding: 15px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-md);
}

.admin-dashboard-provider-card--summary {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.28);
}

.admin-dashboard-provider-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.admin-dashboard-provider-name {
  overflow: hidden;
  color: var(--text-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-dashboard-provider-value {
  margin-top: 7px;
  color: var(--text-primary);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
}

.admin-dashboard-provider-value span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.admin-dashboard-provider-alert {
  margin-top: 10px;
}

.admin-dashboard-call-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.admin-dashboard-call-heading h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.admin-dashboard-call-heading .text-secondary {
  font-size: 12px;
}

.admin-dashboard-call-table {
  min-width: 560px;
}

@media (max-width: 768px) {
  .admin-dashboard-provider-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .admin-dashboard-page .dashboard-stats-grid {
    gap: 10px;
  }

  .admin-dashboard-provider-grid {
    grid-template-columns: 1fr;
  }

  .admin-dashboard-narayana-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-dashboard-narayana-header .btn {
    width: 100%;
  }

  .admin-dashboard-call-heading {
    padding-right: 14px;
    padding-left: 14px;
  }
}
