/* ============================================================
   Signal App — Design System (Pure CSS3)
   Dark-only premium fintech aesthetic.
   Palette:
     - Deep Navy #081B33 (bg)
     - Navy Card #102848 (surface)
     - Signal Red #D62828 (primary)
     - White text, #D9D9D9 muted
============================================================ */

/* --- Design Tokens --- */
:root {
  --font-sans: "Poppins", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Poppins", "Inter", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-3xl: 32px;
  --radius: 14px;

  --background: #081b33;
  --foreground: #ffffff;
  --surface: #102848;
  --surface-elevated: #143160;
  --card: #102848;
  --card-foreground: #ffffff;
  --popover: #102848;
  --popover-foreground: #ffffff;
  --primary: #d62828;
  --primary-foreground: #ffffff;
  --primary-glow: #ef3b3b;
  --secondary: #143160;
  --secondary-foreground: #ffffff;
  --muted: #143160;
  --muted-foreground: #d9d9d9;
  --accent: #143160;
  --accent-foreground: #ffffff;
  --destructive: #ea4335;
  --destructive-foreground: #ffffff;
  --success: #16c784;
  --warning: #f4b400;
  --error: #ea4335;
  --border: rgba(255, 255, 255, 0.08);
  --input: rgba(255, 255, 255, 0.08);
  --ring: #d62828;

  --chart-1: #d62828;
  --chart-2: #16c784;
  --chart-3: #f4b400;
  --chart-4: #4f8cff;
  --chart-5: #b57bff;

  --sidebar: #0a1f3a;
  --sidebar-foreground: #ffffff;
  --sidebar-primary: #d62828;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #143160;
  --sidebar-accent-foreground: #ffffff;
  --sidebar-border: rgba(255, 255, 255, 0.06);
  --sidebar-ring: #d62828;

  --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 20px 60px -20px rgba(214, 40, 40, 0.45);
  --gradient-primary: linear-gradient(135deg, #ef3b3b 0%, #d62828 60%, #a51e1e 100%);
  --gradient-surface: linear-gradient(180deg, #102848 0%, #0a1f3a 100%);
  --gradient-hero: radial-gradient(1200px 600px at 50% -10%, rgba(214, 40, 40, 0.18), transparent 60%);

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
}

html {
  background-color: var(--background);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: var(--gradient-hero);
  background-attachment: fixed;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

img,
svg {
  display: block;
  max-width: 100%;
}

table {
  border-collapse: collapse;
}

/* --- Core Utilities --- */
.surface-card {
  background: var(--gradient-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.surface-card--flush {
  padding: 0 !important;
  overflow: hidden;
}

.btn-primary-gradient {
  background: var(--gradient-primary);
  color: #ffffff;
  box-shadow: 0 10px 30px -10px rgba(214, 40, 40, 0.55);
  border: none;
}

.text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #d9d9d9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-white { color: #ffffff; }
.text-muted { color: var(--muted-foreground); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.font-mono { font-family: var(--font-mono); }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-7xl { font-size: 4.5rem; line-height: 1; }

.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }
.tracking-tight { letter-spacing: -0.025em; }
.tracking-wider { letter-spacing: 0.05em; }
.tracking-widest { letter-spacing: 0.1em; }
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* --- Layout --- */
.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-xs { max-width: 20rem; }
.max-w-sm { max-width: 24rem; }
.max-w-md { max-width: 28rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.shrink-0 { flex-shrink: 0; }
.min-w-0 { min-width: 0; }
.flex-1 { flex: 1 1 0%; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.block { display: block; }

.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-baseline { align-items: baseline; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.place-items-center {
  display: grid;
  place-items: center;
}

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.inset-0 { inset: 0; }
.inset-x-0 { left: 0; right: 0; }
.top-0 { top: 0; }
.top-2 { top: 0.5rem; }
.right-2 { right: 0.5rem; }
.left-0 { left: 0; }
.left-1\/2 { left: 50%; }
.left-3 { left: 0.75rem; }
.top-1\/2 { top: 50%; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

.-translate-x-1\/2 { transform: translateX(-50%); }
.-translate-y-1\/2 { transform: translateY(-50%); }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pt-6 { padding-top: 1.5rem; }
.pt-8 { padding-top: 2rem; }
.pt-14 { padding-top: 3.5rem; }
.pt-16 { padding-top: 4rem; }
.pb-8 { padding-bottom: 2rem; }
.pb-28 { padding-bottom: 7rem; }
.pl-10 { padding-left: 2.5rem; }
.pr-4 { padding-right: 1rem; }

.m-0 { margin: 0; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-auto { margin-top: auto; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }

.h-2 { height: 0.5rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-9 { height: 2.25rem; }
.h-10 { height: 2.5rem; }
.h-11 { height: 2.75rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-20 { height: 5rem; }
.h-24 { height: 6rem; }
.h-32 { height: 8rem; }
.h-40 { height: 10rem; }
.w-2 { width: 0.5rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-9 { width: 2.25rem; }
.w-10 { width: 2.5rem; }
.w-11 { width: 2.75rem; }
.w-12 { width: 3rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-32 { width: 8rem; }
.w-64 { width: 16rem; }
.w-\[calc\(100\%-2rem\)\] { width: calc(100% - 2rem); }

.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: var(--radius-md); }
.rounded-xl { border-radius: var(--radius-lg); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-3xl { border-radius: var(--radius-3xl); }
.rounded-\[14px\] { border-radius: 14px; }
.rounded-t-lg { border-top-left-radius: var(--radius-md); border-top-right-radius: var(--radius-md); }

.border { border: 1px solid var(--border); }
.border-2 { border-width: 2px; border-style: solid; }
.border-t { border-top: 1px solid var(--border); }
.border-b { border-bottom: 1px solid var(--border); }
.border-r { border-right: 1px solid var(--border); }
.border-dashed { border-style: dashed; }
.border-white\/5 { border-color: rgba(255, 255, 255, 0.05); }
.border-white\/8 { border-color: rgba(255, 255, 255, 0.08); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.border-white\/15 { border-color: rgba(255, 255, 255, 0.15); }
.border-white\/20 { border-color: rgba(255, 255, 255, 0.2); }
.border-primary\/30 { border-color: rgba(214, 40, 40, 0.3); }
.border-primary\/40 { border-color: rgba(214, 40, 40, 0.4); }

.bg-background { background-color: var(--background); }
.bg-surface { background-color: var(--surface); }
.bg-surface-elevated { background-color: var(--surface-elevated); }
.bg-sidebar { background-color: var(--sidebar); }
.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05); }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-primary\/10 { background-color: rgba(214, 40, 40, 0.1); }
.bg-primary\/15 { background-color: rgba(214, 40, 40, 0.15); }
.bg-primary\/20 { background-color: rgba(214, 40, 40, 0.2); }
.bg-primary\/30 { background-color: rgba(214, 40, 40, 0.3); }
.bg-background\/40 { background-color: rgba(8, 27, 51, 0.4); }
.bg-background\/50 { background-color: rgba(8, 27, 51, 0.5); }
.bg-background\/90 { background-color: rgba(8, 27, 51, 0.9); }
.bg-surface-elevated\/60 { background-color: rgba(20, 49, 96, 0.6); }
.bg-surface-elevated\/80 { background-color: rgba(20, 49, 96, 0.8); }

.tone-primary { color: var(--primary); background-color: rgba(214, 40, 40, 0.1); }
.tone-success { color: var(--success); background-color: rgba(22, 199, 132, 0.1); }
.tone-warning { color: var(--warning); background-color: rgba(244, 180, 0, 0.1); }
.tone-error { color: var(--error); background-color: rgba(234, 67, 53, 0.1); }

.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur-xl { backdrop-filter: blur(24px); }

.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

.aspect-square { aspect-ratio: 1 / 1; }

.transition-all { transition: all 0.2s ease; }
.transition-colors { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }

.leading-tight { line-height: 1.25; }

/* --- Mobile Shell --- */
.mobile-shell {
  min-height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
}

.mobile-shell__inner {
  position: relative;
  width: 100%;
  max-width: 28rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.25rem 7rem;
}

.mobile-shell__inner--no-nav {
  padding-bottom: 2rem;
}

.mobile-shell__inner--centered {
  justify-content: center;
}

/* --- Bottom Navigation --- */
.bottom-nav {
  position: fixed;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 24rem;
  z-index: 50;
  padding-bottom: var(--safe-bottom);
}

.bottom-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 0.625rem 0.75rem;
  backdrop-filter: blur(24px);
}

.bottom-nav__link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-lg);
  color: var(--muted-foreground);
  transition: all 0.2s ease;
  text-decoration: none;
}

.bottom-nav__link:hover {
  color: #ffffff;
}

.bottom-nav__link--active {
  color: #ffffff;
  background-color: rgba(214, 40, 40, 0.15);
}

.bottom-nav__label {
  font-size: 10px;
  font-weight: 500;
}

/* --- Page Header --- */
.page-header {
  margin-bottom: 1.5rem;
}

.page-header__back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  transition: color 0.2s ease;
}

.page-header__back:hover {
  color: #ffffff;
}

.page-header__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
  width: 100%;
}

.page-header__subtitle {
  margin-top: 0.375rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  width: 100%;
  max-width: none;
}

/* --- Signal Button --- */
.signal-button {
  width: 100%;
  height: 3.5rem;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.signal-button:active:not(:disabled) {
  transform: scale(0.98);
}

.signal-button:disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.signal-button--primary:hover:not(:disabled) {
  filter: brightness(1.1);
}

.signal-button--secondary {
  background-color: var(--surface-elevated);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.signal-button--secondary:hover:not(:disabled) {
  background-color: rgba(20, 49, 96, 0.8);
}

.signal-button--outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.signal-button--outline:hover:not(:disabled) {
  background-color: rgba(255, 255, 255, 0.05);
}

.signal-button--sm {
  width: auto;
  height: 2.75rem;
  padding: 0 1rem;
  font-size: 0.875rem;
}

.signal-button--max-xs {
  max-width: 20rem;
}

/* --- Signal Input --- */
.signal-input {
  display: block;
}

.signal-input__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.signal-input__field {
  width: 100%;
  height: 3.5rem;
  padding: 0 1rem;
  border-radius: 14px;
  background-color: rgba(20, 49, 96, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  transition: all 0.2s ease;
}

.signal-input__field::placeholder {
  color: rgba(217, 217, 217, 0.6);
}

.signal-input__field:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 2px rgba(214, 40, 40, 0.3);
}

/* --- Phone Input --- */
.phone-input__label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.phone-input__wrapper {
  display: flex;
  align-items: center;
  height: 3.5rem;
  border-radius: 14px;
  background-color: rgba(20, 49, 96, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: all 0.2s ease;
}

.phone-input__wrapper:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(214, 40, 40, 0.3);
}

.phone-input__code,
.phone-input__flag {
  padding: 0 0.9rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-weight: 500;
  background-color: rgba(255, 255, 255, 0.05);
  flex-shrink: 0;
}

.phone-input__flag-svg {
  width: 1.65rem;
  height: 1.1rem;
  display: block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.phone-input__field {
  flex: 1;
  height: 100%;
  padding: 0 1rem;
  background: transparent;
  border: none;
  color: #ffffff;
  outline: none;
}

.phone-input__field::placeholder {
  color: rgba(217, 217, 217, 0.6);
}

/* --- Surface Card --- */
.surface-card--padded {
  padding: 1.25rem;
}

.surface-card--flex {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* --- Illustration --- */
.illustration {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

.illustration__ring {
  width: 8rem;
  height: 8rem;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.illustration__ring--primary {
  background: linear-gradient(to bottom right, rgba(214, 40, 40, 0.25), rgba(214, 40, 40, 0.05));
  color: var(--primary);
}

.illustration__ring--success {
  background: linear-gradient(to bottom right, rgba(22, 199, 132, 0.25), rgba(22, 199, 132, 0.05));
  color: var(--success);
}

.illustration__ring--warning {
  background: linear-gradient(to bottom right, rgba(244, 180, 0, 0.25), rgba(244, 180, 0, 0.05));
  color: var(--warning);
}

.illustration__inner {
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  background-color: rgba(8, 27, 51, 0.4);
  display: grid;
  place-items: center;
  backdrop-filter: blur(4px);
}

/* --- Loading Dots --- */
.loading-dots {
  display: flex;
  gap: 0.375rem;
  justify-content: center;
}

.loading-dots__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background-color: var(--primary);
  animation: dot-pulse 1.4s infinite ease-in-out;
}

.loading-dots__dot:nth-child(2) { animation-delay: 0.16s; }
.loading-dots__dot:nth-child(3) { animation-delay: 0.32s; }

/* --- Progress Bar --- */
.progress-bar {
  position: relative;
  height: 0.5rem;
  width: 100%;
  overflow: hidden;
  border-radius: 9999px;
  background-color: rgba(214, 40, 40, 0.2);
}

.progress-bar--muted {
  background-color: rgba(255, 255, 255, 0.1);
}

.progress-bar__indicator {
  height: 100%;
  background-color: var(--primary);
  border-radius: 9999px;
  transition: width 0.12s ease;
  width: 0%;
}

/* --- Splash Screen --- */
.splash-screen {
  min-height: 100vh;
  width: 100%;
  display: grid;
  place-items: center;
  padding: 0 1.5rem;
}

.splash-screen__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: fade-in 0.6s ease-out;
}

.splash-screen__logo-wrap {
  position: relative;
}

.splash-screen__glow {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-2xl);
  background-color: rgba(214, 40, 40, 0.3);
  filter: blur(2rem);
  animation: pulse 2s ease-in-out infinite;
}

.splash-screen__logo {
  position: relative;
  width: 6rem;
  height: 6rem;
  border-radius: var(--radius-2xl);
  display: grid;
  place-items: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.splash-screen__brand {
  text-align: center;
}

.splash-screen__title {
  font-size: 1.875rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.025em;
}

.splash-screen__tagline {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

.splash-screen__status {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

/* --- Company Grid --- */
.company-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.company-card {
  position: relative;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  background-color: #000000;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.company-card:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.company-card--active {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(214, 40, 40, 0.35);
  transform: scale(0.98);
}

.company-card__check {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background-color: var(--primary);
  display: none;
  place-items: center;
}

.company-card--active .company-card__check {
  display: grid;
}

.company-card__check .icon {
  width: 0.625rem;
  height: 0.625rem;
}

.company-card__input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.company-card__avatar {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-2xl);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.125rem;
}

.company-card__logo-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 2.45 / 1;
  min-height: 4.25rem;
  overflow: hidden;
  border-radius: 10px;
  line-height: 0;
  background-color: #000000;
  padding: 0.12rem 0.22rem;
  box-sizing: border-box;
}

.company-card__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  display: block;
  background: transparent;
  padding: 0;
  box-shadow: none;
  transform: scale(1.38);
  transform-origin: center;
}

.company-selected-display {
  margin-bottom: 1.5rem;
}

.company-selected-display .company-card__logo-wrap {
  width: 100%;
}

/* --- Connect page --- */
.connect-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.connect-page__back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-bottom: 1.25rem;
  transition: color 0.2s ease;
}

.connect-page__back:hover {
  color: #ffffff;
}

.connect-page__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #ffffff;
  margin: 0 0 1rem;
  width: 100%;
}

.company-circle {
  display: flex;
  justify-content: center;
  margin: 0 0 1rem;
}

.company-circle__logo-wrap {
  width: 6.75rem;
  height: 6.75rem;
  border-radius: 50%;
  overflow: hidden;
  background-color: #000000;
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.company-circle__logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.company-circle__avatar {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.5rem;
}

.connect-page__form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
}

.connect-page__hint {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted-foreground);
  text-align: center;
  margin: 0;
  width: 100%;
  align-self: stretch;
}

.connect-page__phone {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.connect-page__company {
  color: #ffffff;
  font-weight: 600;
}

.connect-page__form .phone-input,
.connect-page__form .form-actions {
  width: 100%;
  align-self: stretch;
}

.connect-page__form .form-actions {
  margin-top: 0;
}

.company-selected__brand {
  width: 100%;
  flex-shrink: 0;
}

.company-selected__logo-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 4.5 / 1;
  overflow: hidden;
  border-radius: 8px;
  line-height: 0;
  background-color: #000000;
}

.company-selected__logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  display: block;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.company-card__name {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.company-searching {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(8, 27, 51, 0.88);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.company-searching[hidden] {
  display: flex !important;
}

.company-searching--visible {
  opacity: 1;
  visibility: visible;
}

.company-searching__panel {
  width: 100%;
  padding: 1.75rem 1.25rem;
  border-radius: var(--radius-xl);
  background: var(--gradient-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.company-searching__ring {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background: rgba(214, 40, 40, 0.12);
  display: grid;
  place-items: center;
}

.company-searching__title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
}

.company-searching__subtext {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.company-searching .loading-dots {
  margin-top: 0.25rem;
}

.company-grid-form.is-searching {
  pointer-events: none;
  opacity: 0.45;
}

/* --- VPN Option Card --- */
.option-card {
  width: 100%;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--gradient-surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  color: inherit;
}

.option-card:active {
  transform: scale(0.98);
}

.option-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.option-card--primary {
  border-color: rgba(214, 40, 40, 0.4);
}

.option-card__icon {
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.option-card__icon--muted {
  background-color: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

.option-card__icon--gradient {
  background: var(--gradient-primary);
  color: #ffffff;
}

.option-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 2rem;
}

.option-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.option-card__title {
  display: block;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--foreground);
}

.option-card__desc {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--muted-foreground);
}

/* --- Flow pages --- */
.verifying-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin: 0 auto;
  padding: 0 0.25rem;
}

.verifying-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.75rem 1rem 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(16, 40, 72, 0.96) 0%, rgba(10, 31, 58, 0.98) 100%);
  box-shadow:
    var(--shadow-card),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.verifying-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.verifying-card .illustration {
  margin: 0.25rem 0 1rem;
}

.verifying-card .illustration__ring {
  width: 7rem;
  height: 7rem;
}

.verifying-card .illustration__inner {
  width: 4.25rem;
  height: 4.25rem;
}

.verifying-page__icon {
  width: 100%;
  max-width: 20rem;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.verifying-page__icon > div {
  width: 100%;
  display: flex;
  justify-content: center;
}

.verifying-page__icon [hidden] {
  display: none !important;
}

.verifying-page__text {
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.verifying-page__heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
}

.verifying-page__subtext {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0.5rem auto 0;
  text-align: center;
  width: 100%;
  line-height: 1.55;
}

.verifying-page__progress {
  margin: 1.5rem auto 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.verifying-page__progress .progress-bar {
  width: 100%;
}

.verifying-page__progress [data-progress-label] {
  width: 100%;
  text-align: center;
}

.verifying-page__progress .loading-dots {
  margin: 0 auto;
}

/* --- Game preview (Aviator-style) --- */
body.game-screen {
  background-color: var(--background);
  background-image: var(--gradient-hero);
  background-attachment: fixed;
}

body.game-screen .mobile-shell,
body.game-screen .mobile-shell__inner {
  background: transparent;
}

body.game-screen .game-shell {
  padding-top: 1rem;
  padding-bottom: 2.5rem;
}

.game-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 0 1rem;
  gap: 3rem;
  text-align: center;
}

.game-page__multiplier {
  position: relative;
  width: 14.5rem;
  height: 14.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.game-page__glow {
  position: absolute;
  inset: -14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 40, 40, 0.16) 0%, transparent 72%);
  pointer-events: none;
}

.game-page__rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.game-page__ring-line {
  fill: none;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.game-page__ring-line--outer {
  stroke: rgba(255, 255, 255, 0.22);
  stroke-width: 1.5;
}

.game-page__ring-line--inner {
  stroke: var(--foreground);
  stroke-width: 1.5;
}

.game-page__value {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.25rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--foreground);
  text-shadow:
    0 0 18px rgba(214, 40, 40, 0.22),
    0 0 28px rgba(255, 255, 255, 0.35);
}

.game-page__actions {
  width: 100%;
  max-width: none;
}

.game-page__btn {
  border-radius: 9999px;
  font-size: 0.9375rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  height: auto;
  padding: 1.05rem 1.75rem;
  box-shadow: var(--shadow-glow);
}

.game-page__btn:hover:not(:disabled) {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.game-page__btn:active:not(:disabled) {
  transform: scale(0.98);
}

.game-page__btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Flash messages --- */
.flash-messages {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  width: calc(100% - 2rem);
  max-width: 24rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.flash-message {
  padding: 0.875rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  line-height: 1.45;
  color: #ffffff;
  box-shadow: var(--shadow-card);
}

.flash-message--success {
  background: rgba(22, 199, 132, 0.12);
  border: 1px solid rgba(22, 199, 132, 0.35);
}

.flash-message--error {
  background: rgba(234, 67, 53, 0.12);
  border: 1px solid rgba(234, 67, 53, 0.35);
}

/* --- Payment processing overlay --- */
.payment-processing {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(8, 27, 51, 0.88);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.payment-processing[hidden] {
  display: flex !important;
}

.payment-processing--visible {
  opacity: 1;
  visibility: visible;
}

.payment-processing__panel {
  width: 100%;
  padding: 1.75rem 1.25rem;
  border-radius: var(--radius-xl);
  background: var(--gradient-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-card);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.payment-processing__ring {
  width: 4rem;
  height: 4rem;
  border-radius: 9999px;
  background: rgba(214, 40, 40, 0.12);
  display: grid;
  place-items: center;
}

.payment-processing__ring--success {
  background: rgba(34, 197, 94, 0.14);
}

.payment-processing__ring--failed {
  background: rgba(214, 40, 40, 0.16);
}

.payment-processing__ring[hidden],
.payment-processing [hidden] {
  display: none !important;
}

.payment-processing__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #ffffff;
}

.payment-processing__subtext {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.share-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
}

.share-page .illustration {
  margin: 0 0 1.5rem;
}

.share-page__text {
  text-align: center;
  width: 100%;
  margin: 0 auto;
}

.share-page__heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  width: 100%;
}

.share-page__subtext {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.5rem;
  text-align: center;
  width: 100%;
  line-height: 1.55;
}

.share-page__card {
  margin-top: 2rem;
  width: 100%;
  text-align: center;
}

.share-page__stats {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.share-page__stats-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.share-page__stats-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}

.share-page__stats-target {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.share-page__hint {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.75rem;
  text-align: center;
}

.share-page__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin-top: 1.5rem;
}

.share-page__actions .signal-button,
.share-page__actions form {
  width: 100%;
}

.page-header--back-only {
  margin-bottom: 0.5rem;
}

.page-header--back-only .page-header__back {
  margin-bottom: 0;
}

.vpn-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.vpn-page .illustration {
  margin: 0.5rem auto 1rem;
}

.vpn-page__heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  letter-spacing: -0.025em;
  width: 100%;
}

.vpn-page__intro {
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 400;
  color: rgba(217, 217, 217, 0.78);
  width: 100%;
  margin: 0.65rem auto 0;
  line-height: 1.6;
  max-width: 22rem;
}

.vpn-page .option-list {
  width: 100%;
  margin-top: 1.75rem;
}

.vpn-page__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.35rem 0.25rem;
}

.vpn-page__divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.vpn-page__divider-text {
  flex: 0 1 auto;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--muted-foreground);
  max-width: 11.5rem;
  padding: 0 0.35rem;
}

.status-page,
.vps-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  padding: 0 0.25rem;
}

.status-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.75rem 1rem 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(16, 40, 72, 0.96) 0%, rgba(10, 31, 58, 0.98) 100%);
  box-shadow:
    var(--shadow-card),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.status-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.status-card .illustration {
  margin: 0.25rem 0 1rem;
}

.status-card .illustration__ring {
  width: 7rem;
  height: 7rem;
}

.status-card .illustration__inner {
  width: 4.25rem;
  height: 4.25rem;
}

.vps-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.75rem 1rem 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(16, 40, 72, 0.96) 0%, rgba(10, 31, 58, 0.98) 100%);
  box-shadow:
    var(--shadow-card),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.vps-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
}

.vps-card .illustration {
  margin: 0.25rem 0 1rem;
}

.vps-card .illustration__ring {
  width: 7rem;
  height: 7rem;
}

.vps-card .illustration__inner {
  width: 4.25rem;
  height: 4.25rem;
}

.vps-card .vps-page__actions {
  margin-top: 1.5rem;
}

.vps-card .vps-page__actions .signal-button {
  width: 100%;
}

.status-page__text,
.vps-page__text {
  text-align: center;
  padding: 0;
  max-width: 100%;
  width: 100%;
  margin: 0 auto;
}

.vps-page__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 2rem;
}

.vps-page__actions .signal-button {
  width: 100%;
  text-align: center;
}

.status-page__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin-top: 1.75rem;
  padding: 0;
}

.status-page__heading,
.vps-page__heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  width: 100%;
  letter-spacing: -0.02em;
}

.status-page__subtext,
.vps-page__subtext {
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.6;
  color: rgba(217, 217, 217, 0.78);
  margin-top: 0.65rem;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.status-card .status-page__actions {
  margin-top: 1.5rem;
  gap: 0.65rem;
}

.status-card .status-page__note {
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.status-card .status-page__actions .signal-button {
  width: 100%;
}

.waiting-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.waiting-page__text {
  text-align: center;
  width: 100%;
}

.waiting-page__heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  width: 100%;
}

.waiting-page__subtext {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.75rem;
  width: 100%;
  line-height: 1.55;
}

.waiting-page__card {
  margin-top: 2.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.waiting-page__estimate {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.status-page__note,
.vps-page__skip {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.vps-page__skip {
  display: block;
  font-size: 0.875rem;
  transition: color 0.2s ease;
}

.vps-page__skip:hover {
  color: #ffffff;
}

a.signal-button {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.progress-bar__label {
  margin-top: 0.5rem;
  text-align: right;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.progress-bar__label--center {
  text-align: center;
}

.text-xl { font-size: 1.25rem; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Payment Summary --- */
.payment-summary__heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.payment-summary__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.payment-summary__divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 0.5rem 0;
}

.payment-summary__total-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.payment-summary__total-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

/* --- Link styles --- */
.link-muted {
  display: block;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  transition: color 0.2s ease;
}

.link-muted:hover {
  color: #ffffff;
}

.link-muted--inline {
  display: inline;
}

/* --- Admin login --- */
.admin-login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.admin-login {
  width: 100%;
  max-width: 28rem;
}

.admin-login__brand {
  text-align: center;
  margin-bottom: 2rem;
}

.admin-login__logo {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-2xl);
  display: inline-grid;
  place-items: center;
  margin-bottom: 1rem;
}

.admin-login__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.admin-login__subtitle {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

.admin-login__form {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-login__alert {
  margin-bottom: 1rem;
}

.alert--success {
  color: var(--success);
  background-color: rgba(22, 199, 132, 0.1);
  border: 1px solid rgba(22, 199, 132, 0.3);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
}

/* --- Admin Layout --- */
.admin-layout {
  min-height: 100vh;
  display: flex;
  background-color: var(--background);
}

.admin-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5rem;
  z-index: 40;
  background-color: rgba(8, 27, 51, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  align-items: center;
  padding: 0 1rem;
  justify-content: space-between;
}

.admin-topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-topbar__logo {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
}

.admin-topbar__title {
  font-weight: 700;
  color: #ffffff;
}

.admin-topbar__menu-btn {
  color: #ffffff;
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
}

.admin-sidebar {
  position: fixed;
  inset-block: 0;
  left: 0;
  width: 16rem;
  background-color: var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 30;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  padding-top: 4rem;
}

.admin-sidebar--open {
  transform: translateX(0);
}

.admin-sidebar__brand {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1.5rem 2rem;
}

.admin-sidebar__logo {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
}

.admin-sidebar__name {
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.admin-sidebar__role {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
}

.admin-sidebar__nav {
  padding: 0 0.75rem;
}

.admin-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
}

.admin-sidebar__link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.05);
}

.admin-sidebar__link--active {
  color: #ffffff;
  background-color: rgba(214, 40, 40, 0.15);
  border: 1px solid rgba(214, 40, 40, 0.3);
}

.admin-main {
  flex: 1;
  min-width: 0;
  padding-top: 3.5rem;
}

.admin-main__inner {
  padding: 1rem;
  max-width: 80rem;
  margin: 0 auto;
}

/* --- Admin Dashboard --- */
.admin-header__title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #ffffff;
}

.admin-header__subtitle {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.375rem;
}

.surface-card--flush {
  padding: 0;
  overflow: hidden;
}

.data-table__toolbar--row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.data-table__search-wrap--grow {
  flex: 1;
  min-width: 220px;
}

.admin-header--row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0;
}

.table-scroll {
  overflow-x: auto;
}

.text-muted { color: var(--muted-foreground); }
.text-white { color: #ffffff; }
.text-sm { font-size: 0.875rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-medium { font-weight: 500; }

.admin-page > * + * {
  margin-top: 1.5rem;
}

.admin-header {
  margin-bottom: 0;
}


.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card,
.chart-card,
.activity-card {
  padding: 1.25rem;
}

.stat-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.stat-card__icon--primary { color: var(--primary); background-color: rgba(214, 40, 40, 0.1); }
.stat-card__icon--success { color: var(--success); background-color: rgba(22, 199, 132, 0.1); }
.stat-card__icon--warning { color: var(--warning); background-color: rgba(244, 180, 0, 0.1); }
.stat-card__icon--error { color: var(--error); background-color: rgba(234, 67, 53, 0.1); }

.stat-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.chart-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.chart-card__title {
  font-weight: 600;
  color: #ffffff;
}

.chart-card__unit {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1rem;
}

.activity-item__body {
  flex: 1;
  min-width: 0;
}

.activity-item__name {
  font-weight: 600;
  font-size: 0.8125rem;
  color: #ffffff;
  line-height: 1.3;
}

.activity-item__desc {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.4;
  word-break: break-word;
}

.activity-item__meta {
  flex-shrink: 0;
  text-align: right;
  align-self: center;
}

.stat-card__change {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.stat-card__value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
}

.stat-card__label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

.dashboard-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.chart {
  height: 12rem;
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
}

.chart__bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  height: 100%;
}

.chart__bar {
  width: 100%;
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  min-height: 0;
  transition: height 0.3s ease;
}

.chart__bar--filled {
  min-height: 4px;
}

.chart__bar--empty {
  height: 0 !important;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
}

.chart__label {
  font-size: 10px;
  color: var(--muted-foreground);
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.875rem;
}

.activity-item__avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  background: rgba(214, 40, 40, 0.15);
  border: 1px solid rgba(214, 40, 40, 0.25);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  flex-shrink: 0;
}

.activity-item__amount {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
}

.activity-item__time {
  font-size: 10px;
  color: var(--muted-foreground);
}

/* --- Tables --- */
.data-table {
  width: 100%;
  font-size: 0.875rem;
}

.data-table thead tr {
  text-align: left;
  color: var(--muted-foreground);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1.25rem;
}

.data-table tbody tr {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.025);
}

.data-table__toolbar {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table__search-wrap {
  position: relative;
}

.data-table__search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-foreground);
  pointer-events: none;
}

.data-table__search {
  width: 100%;
  height: 2.75rem;
  padding-left: 2.5rem;
  padding-right: 1rem;
  border-radius: var(--radius-lg);
  background-color: rgba(8, 27, 51, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.875rem;
}

.data-table__search:focus {
  border-color: var(--primary);
  outline: none;
}

.data-table__footer {
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.data-table__pagination {
  display: flex;
  gap: 0.5rem;
}

.data-table__page-btn {
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.data-table__page-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.filter-select {
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: var(--radius-lg);
  background-color: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.875rem;
}

.payments-summary.stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .payments-summary.stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.payments-table-card .data-table__toolbar {
  padding: 1rem 1.25rem;
}

.filter-select--toolbar {
  min-width: 9.5rem;
  flex: 0 1 auto;
}

.payments-table__id {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payments-table__user {
  white-space: nowrap;
}

.period-filter {
  margin-bottom: 1rem;
}

.period-filter__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.period-filter__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 27, 51, 0.55);
  color: var(--muted-foreground);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.period-filter__chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.period-filter__chip--active,
.period-filter__chip:has(input:checked) {
  color: #ffffff;
  border-color: rgba(214, 40, 40, 0.55);
  background: rgba(214, 40, 40, 0.18);
}

.period-filter__custom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.period-filter__custom.is-hidden {
  display: none;
}

.period-filter__hint {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.filter-btn {
  height: 2.75rem;
  padding: 0 1rem;
  border-radius: var(--radius-lg);
  background-color: rgba(8, 27, 51, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.filter-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
}

.badge--completed,
.badge--active {
  color: var(--success);
  background-color: rgba(22, 199, 132, 0.15);
}

.badge--pending,
.badge--processing {
  color: var(--warning);
  background-color: rgba(244, 180, 0, 0.15);
  border: 1px solid rgba(244, 180, 0, 0.3);
}

.badge--failed {
  color: var(--error);
  background-color: rgba(234, 67, 53, 0.15);
}

.badge--default {
  border: 1px solid transparent;
  background-color: var(--primary);
  color: #ffffff;
}

.badge--secondary {
  border: 1px solid transparent;
  background-color: var(--secondary);
  color: #ffffff;
}

.badge--outline {
  border: 1px solid var(--border);
  color: var(--foreground);
  background: transparent;
}

/* --- Upload zone --- */
.upload-zone {
  width: 100%;
  height: 6rem;
  border-radius: 14px;
  border: 2px dashed rgba(255, 255, 255, 0.15);
  display: grid;
  place-items: center;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
}

.upload-zone:hover {
  border-color: var(--primary);
  color: #ffffff;
}

/* --- Switch toggle --- */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.switch-row__label {
  font-weight: 500;
  color: #ffffff;
}

.switch-row__desc {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.125rem;
}

.switch {
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.switch__input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch__track {
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.switch__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.25rem;
  height: 1.25rem;
  background-color: #ffffff;
  border-radius: 9999px;
  transition: transform 0.2s ease;
}

.switch__input:checked + .switch__track {
  background-color: var(--primary);
}

.switch__input:checked + .switch__track .switch__thumb {
  transform: translateX(1.25rem);
}

.admin-page--narrow {
  max-width: 48rem;
}

.admin-page--pricing {
  max-width: 56rem;
}

.provider-grid,
.pricing-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .provider-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .provider-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* --- Provider cards --- */
.provider-live-banner {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem !important;
  border-left: 3px solid var(--success);
}

.provider-live-banner__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.provider-live-banner__value {
  margin-top: 0.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff;
}

.provider-live-banner__hint {
  margin: 0.5rem 0 0;
}

.provider-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-top: 3px solid var(--provider-color, var(--primary));
  padding: 1.25rem !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.provider-card--live {
  box-shadow: 0 0 0 1px rgba(22, 199, 132, 0.35), 0 12px 30px -18px rgba(22, 199, 132, 0.45);
  border-top-color: var(--success);
}

.provider-card__name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.provider-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.provider-badge--live {
  background: rgba(22, 199, 132, 0.18);
  color: var(--success);
  border: 1px solid rgba(22, 199, 132, 0.35);
}

.provider-badge--enabled {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.provider-badge--inactive {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-foreground);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.provider-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.provider-card__warning {
  color: var(--warning);
}

.provider-card form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.provider-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.provider-card__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.provider-card__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}

.provider-card__name {
  font-weight: 600;
  color: #ffffff;
  font-size: 0.9375rem;
}

.provider-card__status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-transform: capitalize;
}

.provider-card__status-icon--operational { color: var(--success); }
.provider-card__status-icon--degraded { color: var(--warning); }
.provider-card__status-icon--offline { color: var(--error); }

.provider-card__edit-btn {
  width: 100%;
  height: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: #ffffff;
  font-size: 0.875rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.provider-card__edit-btn:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.provider-card__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.provider-card__form[hidden] {
  display: none !important;
}

.provider-card__form label.text-white {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.provider-card__save {
  margin-top: 0.25rem;
}

.provider-card__hint {
  margin: 0;
  line-height: 1.4;
}

.provider-card__docs-link {
  color: var(--primary);
  text-decoration: none;
}

.provider-card__docs-link:hover {
  text-decoration: underline;
}

.provider-card__webhook {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.provider-card__webhook-url {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.75rem;
  word-break: break-all;
}

.provider-card__form code {
  font-size: 0.75rem;
  color: #fca5a5;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
}

.pricing-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pricing-card__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
}

.pricing-card__desc {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  line-height: 1.4;
}

.pricing-input-wrap {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

.pricing-input-wrap__field {
  flex: 1;
  min-width: 0;
}

.pricing-input-wrap__field .signal-input {
  width: 100%;
}

.pricing-input-wrap__prefix,
.pricing-input-wrap__suffix {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.5rem;
  padding: 0 0.85rem;
  border-radius: 14px;
  background-color: rgba(20, 49, 96, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pricing-form__actions {
  margin-top: 1.25rem;
  padding-top: 0.25rem;
}

.payment-type-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.payment-type-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.payment-type-card__label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.payment-type-card__value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  text-transform: capitalize;
}

.payment-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.payment-form__fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.company-selected {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin-bottom: 1.5rem;
  padding: 0.25rem 0.3rem;
}

.company-selected__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-lg);
  background: rgba(214, 40, 40, 0.2);
  color: var(--primary);
  font-weight: 700;
  display: grid;
  place-items: center;
}

.company-selected__label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-foreground);
}

.company-selected__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
  text-transform: capitalize;
}

.data-table th a {
  color: inherit;
  text-decoration: none;
}

.data-table th a:hover {
  color: #ffffff;
}

.settings-section {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.settings-hint {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted-foreground);
}

.settings-logo-preview {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.settings-logo-preview__img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.25rem;
}

.site-brand__img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  display: block;
}

.site-brand__img--splash {
  width: 3.25rem;
  height: 3.25rem;
}

.site-brand__img--admin {
  width: 1.25rem;
  height: 1.25rem;
}

.site-brand__img--login {
  width: 2.25rem;
  height: 2.25rem;
}

.settings-hint__code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #ffffff;
  word-break: break-all;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.profile-card__avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

.profile-card__role {
  margin-top: 0.5rem;
}

.form-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.signal-button--narrow {
  max-width: 20rem;
}

.signal-button--inline {
  width: auto !important;
  height: 2.5rem !important;
  padding: 0 1rem !important;
  font-size: 0.875rem !important;
}

.font-mono { font-family: var(--font-mono); }

/* --- Profile avatar --- */
.profile-avatar {
  width: 5rem;
  height: 5rem;
  border-radius: 9999px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
}

/* --- Flash / Alert --- */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.alert--error {
  background-color: rgba(234, 67, 53, 0.15);
  color: var(--error);
  border: 1px solid rgba(234, 67, 53, 0.3);
}

.alert--success {
  background-color: rgba(22, 199, 132, 0.15);
  color: var(--success);
  border: 1px solid rgba(22, 199, 132, 0.3);
}

/* --- Icon sizes --- */
.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon--xs { width: 0.75rem; height: 0.75rem; }
.icon--sm { width: 1rem; height: 1rem; }
.icon--md { width: 1.25rem; height: 1.25rem; }
.icon--lg { width: 1.5rem; height: 1.5rem; }
.icon--xl { width: 2.25rem; height: 2.25rem; }
.icon--2xl { width: 2.5rem; height: 2.5rem; }

.icon--spin {
  animation: spin 1s linear infinite;
}

.icon--pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* --- Animations --- */
@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-fade-in { animation: fade-in 0.6s ease-out; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* --- Responsive --- */
@media (min-width: 640px) {
  .admin-main__inner {
    padding: 1.5rem;
  }
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .admin-topbar {
    display: none !important;
  }

  .admin-sidebar {
    position: static;
    transform: translateX(0);
    padding-top: 1.5rem;
  }

  .admin-sidebar__brand {
    display: flex;
  }

  .admin-main {
    padding-top: 0;
  }

  .admin-main__inner {
    padding: 2.5rem;
  }

  .dashboard-grid {
    grid-template-columns: 2fr 1fr;
  }

  .lg\:hidden { display: none !important; }
  .lg\:static { position: static !important; }
  .lg\:pt-0 { padding-top: 0 !important; }
  .lg\:pt-6 { padding-top: 1.5rem !important; }
  .lg\:col-span-2 { grid-column: span 2 / span 2; }
  .lg\:flex { display: flex !important; }
}

@media (max-width: 1023px) {
  .admin-topbar {
    display: flex;
  }
}

/* --- PWA install banner (bottom) --- */
.pwa-install-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  padding: 0.75rem 0.85rem calc(0.75rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
  background: linear-gradient(180deg, rgba(8, 27, 51, 0.2) 0%, rgba(8, 27, 51, 0.96) 35%, #081B33 100%);
  transform: translateY(110%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s ease;
  pointer-events: none;
}

.pwa-install-banner--visible {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.pwa-install-banner__inner {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(20, 49, 96, 0.95), rgba(12, 34, 68, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.35);
}

.pwa-install-banner__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #000;
}

.pwa-install-banner__icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.pwa-install-banner__copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.pwa-install-banner__title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.pwa-install-banner__text {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  line-height: 1.3;
}

.pwa-install-banner__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.pwa-install-banner__btn {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  line-height: 1;
}

.pwa-install-banner__btn--install {
  background: var(--gradient-primary);
  color: #ffffff;
}

.pwa-install-banner__btn--dismiss {
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted-foreground);
  font-size: 1.1rem;
  font-weight: 500;
}

body.has-pwa-banner .mobile-shell__inner {
  padding-bottom: calc(5.5rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
}

/* --- Utility: screen reader only --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
