:root {
  --ink: #f8fafc;
  --muted: #94a3b8;
  --paper: #111827;
  --line: rgba(148, 163, 184, 0.18);
  --navy: #020617;
  --soft-gray: #0b1220;
  --aqua: #10b981;
  --blue: #dbeafe;
  --violet: #334155;
  --lime: #34d399;
  --rose: #e11d48;
  --amber: #f59e0b;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  --site-bg-image: url("./assets/site-background.jpg");
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
  background: var(--soft-gray);
  letter-spacing: 0;
}

body::before {
  content: "DERIV TOOL";
  position: fixed;
  top: 50%;
  right: clamp(8px, 2.8vw, 34px);
  z-index: 1;
  pointer-events: none;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  color: rgba(52, 211, 153, 0.12);
  font-size: clamp(42px, 8vw, 108px);
  font-weight: 900;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(16, 185, 129, 0.12);
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.screen {
  min-height: 100vh;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
}

.login-screen {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.08) 25%, transparent 25%) 0 0 / 28px 28px,
    linear-gradient(135deg, var(--navy), #172033 55%, #263241);
}

.login-grid {
  width: min(100%, 1080px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  position: relative;
  z-index: 2;
}

.card {
  background: rgba(15, 23, 42, 0.94);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.login-card {
  overflow: hidden;
  animation: rise 0.7s ease both;
}

.login-head {
  padding: 30px 32px;
  color: white;
  background: linear-gradient(135deg, #020617, #0f172a);
  position: relative;
  overflow: hidden;
}

.login-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, rgba(16, 185, 129, 0.24));
}

.login-head h1,
.login-head p {
  margin: 0;
  position: relative;
  z-index: 1;
}

.login-head h1 {
  font-family: Inter, Aptos, "Segoe UI", Arial, sans-serif;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 900;
}

.login-head p {
  margin-top: 4px;
  opacity: 0.88;
}

.form-area {
  padding: 30px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.field input,
.field select,
.admin-create input {
  width: 100%;
  border: 2px solid rgba(15, 23, 42, 0.12);
  border-radius: 14px;
  padding: 15px 16px;
  color: var(--ink);
  background: #0b1220;
  outline: none;
  transition: 0.2s ease;
}

.field input:focus,
.field select:focus,
.admin-create input:focus {
  border-color: var(--aqua);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.16);
}

.mode-row,
.button-row {
  display: grid;
  gap: 12px;
}

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

.button-row {
  grid-template-columns: 1fr 1fr;
}

.mode {
  padding: 12px;
  border-radius: 14px;
  background: #111827;
  color: var(--ink);
  font-weight: 800;
  transition: 0.2s ease;
}

.mode.active {
  color: #04111a;
  background: var(--aqua);
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.16);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 18px;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 24px rgba(15, 23, 42, 0.18);
}

.btn.primary {
  width: 100%;
  margin-top: 18px;
  color: #04111a;
  background: var(--aqua);
}

.btn.whatsapp {
  width: 100%;
  margin-top: 14px;
  background: #047857;
  gap: 12px;
  min-height: 58px;
  text-align: left;
}

.whatsapp-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #25d366;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.whatsapp-icon svg {
  width: 23px;
  height: 23px;
  fill: white;
}

.whatsapp-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.whatsapp-copy strong,
.whatsapp-copy small {
  overflow-wrap: anywhere;
}

.whatsapp-copy small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 800;
}

.btn.danger {
  background: linear-gradient(135deg, #ef4444, #b91c1c);
}

.btn.blue {
  background: #1e293b;
}

.btn.green {
  background: var(--aqua);
}

.btn.small {
  min-height: 34px;
  padding: 7px 12px;
  font-size: 13px;
}

.error {
  margin-bottom: 14px;
  padding: 11px 13px;
  border-radius: 8px;
  color: #fecaca;
  background: rgba(225, 29, 72, 0.14);
  border: 1px solid rgba(225, 29, 72, 0.34);
  font-weight: 700;
}

.success {
  margin-bottom: 14px;
  padding: 11px 13px;
  border-radius: 8px;
  color: #bbf7d0;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.34);
  font-weight: 700;
}

.side-stack {
  display: grid;
  gap: 16px;
  align-content: start;
  animation: rise 0.7s ease 0.12s both;
}

.info-card {
  padding: 24px;
}

.info-card h3 {
  margin: 0 0 14px;
  color: var(--lime);
  font-size: 22px;
}

.info-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.info-card li {
  padding: 8px 0;
  color: #dbeafe;
  font-weight: 700;
}

.info-card li::before {
  content: ">";
  color: var(--aqua);
  font-weight: 900;
  margin-right: 10px;
}

.welcome-screen {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(16, 185, 129, 0.08) 25%, transparent 25%) 0 0 / 30px 30px,
    linear-gradient(135deg, #020617, #0b1220);
}

.welcome-card {
  width: min(100%, 760px);
  overflow: hidden;
}

.welcome-head,
.admin-head,
.dash-head {
  color: white;
  background: linear-gradient(135deg, var(--navy), #1e293b);
}

.welcome-head {
  padding: 34px;
}

.welcome-head h1,
.welcome-head p {
  margin: 0;
}

.welcome-body {
  padding: 30px;
}

.welcome-body h2 {
  margin: 0 0 18px;
}

.copy p {
  margin: 14px 0;
  color: #cbd5e1;
  line-height: 1.6;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 26px 0;
}

.feature-box {
  padding: 18px;
  border-radius: 16px;
  background: #0b1220;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.feature-box h3 {
  margin: 0 0 6px;
}

.feature-box p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.dash-screen {
  position: relative;
  background:
    linear-gradient(rgba(2, 6, 23, 0.94), rgba(2, 6, 23, 0.94)),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.06) 0 1px, transparent 1px 96px),
    repeating-linear-gradient(0deg, rgba(16, 185, 129, 0.08) 0 1px, transparent 1px 96px);
  padding: 0;
}

.dash-head,
.admin-head {
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.bar {
  width: min(100%, 1240px);
  margin: auto;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

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

.logo {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #04111a;
  font-size: 28px;
  font-weight: 900;
  background: var(--aqua);
}

.brand h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 38px);
}

.brand p {
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.main {
  width: min(100%, 1240px);
  margin: auto;
  padding: 24px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat {
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  background: #1e293b;
}

.stat small {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
}

.stat strong {
  display: block;
}

.control-card {
  padding: 26px;
  margin-bottom: 20px;
}

.control-grid {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: 28px;
}

.scanner-intro {
  text-align: center;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
}

.big-logo {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: #04111a;
  font-size: 42px;
  font-weight: 900;
  background: var(--aqua);
  box-shadow: 0 18px 34px rgba(16, 185, 129, 0.22);
}

.scanner-intro h2 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
}

.scanner-intro p {
  margin: 0;
  color: var(--muted);
  max-width: 360px;
}

.pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.22);
  font-weight: 900;
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--amber);
}

.dot.live {
  background: #22c55e;
}

.controls h3 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 22px;
}

.progress-card {
  margin-bottom: 20px;
  padding: 32px;
  text-align: center;
  color: white;
  background: #020617;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.rings {
  width: 230px;
  height: 230px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(var(--aqua) calc(var(--progress) * 1%), rgba(255, 255, 255, 0.08) 0),
    radial-gradient(circle, #020617 54%, transparent 55%);
  box-shadow: 0 0 35px rgba(16, 185, 129, 0.2);
}

.rings-inner {
  width: 165px;
  height: 165px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    conic-gradient(var(--lime) calc(var(--progress) * 1%), rgba(255, 255, 255, 0.09) 0),
    #020617;
}

.rings strong {
  font-size: 48px;
  color: var(--lime);
}

.analysis-card,
.empty-card,
.strategy-card,
.rating-card {
  padding: 26px;
  margin-bottom: 20px;
}

.bars {
  height: 220px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  margin: 18px 0;
  background: linear-gradient(180deg, #020617, #0b1220);
  border-radius: 18px;
  border: 1px solid var(--line);
  overflow-x: auto;
}

.bar-col {
  width: 34px;
  min-width: 28px;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.bar-fill {
  width: 100%;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(0deg, #334155, var(--aqua));
}

.digits {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  max-width: 430px;
  margin: auto;
}

.digit {
  aspect-ratio: 1;
  border-radius: 16px;
  color: var(--ink);
  background: #0b1220;
  border: 1px solid var(--line);
  font-size: 28px;
  font-weight: 900;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.strategy {
  padding: 18px;
  border-radius: 18px;
  color: white;
  background: linear-gradient(135deg, #0b1220, #1e293b);
}

.strategy h4 {
  margin: 0 0 8px;
}

.strategy p {
  margin: 8px 0;
  line-height: 1.45;
}

.risk {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12px;
  font-weight: 900;
}

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

.stars {
  display: flex;
  justify-content: center;
  gap: 7px;
}

.star {
  font-size: 38px;
  color: #475569;
  background: transparent;
}

.star.on {
  color: var(--amber);
}

.signal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 6, 23, 0.82);
  backdrop-filter: blur(7px);
}

.signal-box {
  width: min(100%, 390px);
  min-height: 390px;
  padding: 24px;
  text-align: center;
  border-radius: 24px;
  border: 3px solid transparent;
  background:
    linear-gradient(135deg, #0b1220, #111827) padding-box,
    linear-gradient(135deg, var(--aqua), var(--navy)) border-box;
  box-shadow: var(--shadow);
  animation: zoom 0.25s ease both;
}

.signal-badge {
  display: inline-flex;
  padding: 7px 14px;
  border-radius: 999px;
  color: #04111a;
  background: var(--aqua);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}

.signal-digit {
  width: 130px;
  height: 130px;
  margin: 28px auto 10px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  color: white;
  font-size: 72px;
  font-weight: 900;
  background: #020617;
}

.signal-label {
  display: inline-flex;
  padding: 8px 20px;
  border-radius: 999px;
  color: white;
  background: var(--aqua);
  font-size: 20px;
  font-weight: 900;
}

.confidence {
  color: var(--lime);
  font-size: 42px;
  font-weight: 900;
}

.countdown {
  display: inline-flex;
  justify-content: center;
  min-width: 112px;
  margin-top: 8px;
  padding: 8px 24px;
  border-radius: 14px;
  color: white;
  background: #020617;
  font-size: 30px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.admin-screen {
  position: relative;
  padding: 0;
  background: linear-gradient(135deg, var(--navy), #1e293b);
}

.admin-main {
  width: min(100%, 1180px);
  margin: auto;
  padding: 24px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.admin-stat {
  padding: 22px;
  color: white;
  background: linear-gradient(135deg, #0b1220, #1e293b);
}

.admin-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 38px;
}

.admin-create {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

td code {
  display: inline-flex;
  max-width: 150px;
  padding: 4px 8px;
  border-radius: 8px;
  overflow-wrap: anywhere;
  color: #0f172a;
  background: #f1f5f9;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
  font-weight: 800;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 12px;
}

.status {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.status.active {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
}

.status.inactive {
  color: #fecaca;
  background: rgba(225, 29, 72, 0.14);
}

.status.pending {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sync-chip {
  display: inline-flex;
  min-height: 38px;
  padding: 8px 12px;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.24);
  font-size: 13px;
  font-weight: 900;
}

.pending-card {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 18px;
  align-items: start;
  padding: 24px;
  margin-bottom: 20px;
  border-color: rgba(245, 158, 11, 0.28);
}

.pending-card h2 {
  margin: 0 0 6px;
}

.pending-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.pending-list {
  display: grid;
  gap: 10px;
}

.pending-user {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.24);
}

.pending-user strong,
.pending-user span {
  display: block;
}

.pending-user span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.hidden {
  display: none !important;
}

/* Light production theme */
body {
  color: #0f172a;
  background: #f5f7fb;
}

body::before {
  color: rgba(13, 148, 136, 0.1);
  text-shadow: none;
}

.login-screen,
.welcome-screen,
.dash-screen,
.admin-screen {
  background:
    linear-gradient(rgba(2, 6, 23, 0.62), rgba(2, 6, 23, 0.66)),
    var(--site-bg-image) center / cover no-repeat fixed,
    radial-gradient(circle at 12% 10%, rgba(20, 184, 166, 0.16), transparent 32%),
    radial-gradient(circle at 88% 0%, rgba(14, 165, 233, 0.14), transparent 30%),
    linear-gradient(135deg, #f8fafc 0%, #eef7f4 48%, #f1f5f9 100%);
}

.login-grid,
.main,
.admin-main {
  position: relative;
  z-index: 2;
}

.card,
.login-card,
.welcome-card,
.control-card,
.analysis-card,
.empty-card,
.strategy-card,
.rating-card,
.stat,
.admin-stat,
.info-card {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(10px);
}

.login-head,
.welcome-head,
.dash-head,
.admin-head {
  color: #0f172a;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(234, 250, 244, 0.9));
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(10px);
}

.login-head::after {
  background: linear-gradient(135deg, transparent 55%, rgba(16, 185, 129, 0.16));
}

.login-head p,
.welcome-head p,
.brand p,
.admin-head p,
.copy p,
.scanner-intro p,
.feature-box p,
.strategy p {
  color: #475569 !important;
}

.field label,
.stat small,
th {
  color: #64748b;
}

.field input,
.field select,
.admin-create input {
  color: #0f172a;
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.14);
}

.field input:focus,
.field select:focus,
.admin-create input:focus {
  background: #ffffff;
  border-color: #0d9488;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.14);
}

.mode {
  color: #334155;
  background: #eef2f7;
}

.mode.active,
.btn.primary,
.btn.green,
.signal-badge,
.signal-label {
  color: #ffffff;
  background: #0d9488;
}

.btn.blue {
  color: #0f172a;
  background: #e2e8f0;
}

.btn.whatsapp {
  background: #128c7e;
}

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

.error {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fca5a5;
}

.info-card h3,
.confidence,
.rings strong {
  color: #0d9488;
}

.info-card li {
  color: #334155;
}

.feature-box,
.digit {
  color: #0f172a;
  background: #f8fafc;
  border-color: rgba(13, 148, 136, 0.18);
}

.logo,
.big-logo {
  color: #ffffff;
  background: #0d9488;
  box-shadow: 0 18px 34px rgba(13, 148, 136, 0.2);
}

.stat-icon {
  color: #0f172a;
  background: #ccfbf1;
}

.pill {
  color: #0f766e;
  background: #ccfbf1;
  border-color: #99f6e4;
}

.progress-card {
  color: #0f172a;
  background: #ffffff;
  border-color: rgba(13, 148, 136, 0.2);
}

.rings {
  background:
    conic-gradient(#0d9488 calc(var(--progress) * 1%), #e2e8f0 0),
    radial-gradient(circle, #ffffff 54%, transparent 55%);
  box-shadow: 0 16px 40px rgba(13, 148, 136, 0.14);
}

.rings-inner {
  background:
    conic-gradient(#14b8a6 calc(var(--progress) * 1%), #e2e8f0 0),
    #ffffff;
}

.bars {
  background: linear-gradient(180deg, #f8fafc, #ecfeff);
  border-color: rgba(15, 23, 42, 0.08);
}

.bar-fill {
  background: linear-gradient(0deg, #94a3b8, #0d9488);
}

.strategy {
  color: #0f172a;
  background: linear-gradient(135deg, #ffffff, #ecfeff);
  border: 1px solid rgba(13, 148, 136, 0.14);
}

.risk {
  color: #0f766e;
  background: #ccfbf1;
}

.star {
  color: #cbd5e1;
}

.signal {
  background: rgba(248, 250, 252, 0.82);
}

.signal-box {
  background:
    linear-gradient(135deg, #ffffff, #f8fafc) padding-box,
    linear-gradient(135deg, #0d9488, #99f6e4) border-box;
}

.signal-digit,
.countdown {
  color: #0f172a;
  background: #f1f5f9;
}

.admin-stat {
  color: #0f172a;
  background: linear-gradient(135deg, #ffffff, #ecfeff);
}

.status.active {
  color: #166534;
  background: #dcfce7;
}

.status.inactive {
  color: #991b1b;
  background: #fee2e2;
}

.status.pending {
  color: #92400e;
  background: #fef3c7;
}

.sync-chip {
  color: #0f766e;
  background: #ccfbf1;
  border-color: #99f6e4;
}

.pending-card {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(245, 158, 11, 0.3);
}

.pending-user {
  background: #fffbeb;
  border-color: #fde68a;
}

/* Photo-first theme: remove bright panels while keeping text readable. */
.card,
.login-card,
.welcome-card,
.control-card,
.analysis-card,
.empty-card,
.strategy-card,
.rating-card,
.stat,
.admin-stat,
.info-card,
.pending-card,
.pending-user,
.progress-card,
.feature-box,
.strategy,
.signal {
  color: #ffffff;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.72);
}

.login-head,
.welcome-head,
.dash-head,
.admin-head {
  color: #ffffff;
  background: transparent;
  border-bottom-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: none;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.72);
}

.login-head::after {
  background: transparent;
}

.login-head p,
.welcome-head p,
.brand p,
.admin-head p,
.copy p,
.scanner-intro p,
.feature-box p,
.strategy p,
.info-card li,
.field label,
.stat small,
th,
.pending-card p,
.pending-user span {
  color: rgba(255, 255, 255, 0.86) !important;
  text-shadow: 0 2px 9px rgba(0, 0, 0, 0.74);
}

.field input,
.field select,
.admin-create input,
td code {
  color: #ffffff;
  background: rgba(2, 6, 23, 0.62);
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.field input::placeholder,
.admin-create input::placeholder {
  color: rgba(255, 255, 255, 0.66);
}

.field input:focus,
.field select:focus,
.admin-create input:focus {
  color: #ffffff;
  background: rgba(2, 6, 23, 0.74);
  border-color: #34d399;
}

.mode,
.btn.blue,
.signal-digit,
.countdown,
.digit {
  color: #ffffff;
  background: rgba(2, 6, 23, 0.58);
  border-color: rgba(255, 255, 255, 0.18);
}

.mode.active,
.btn.primary,
.btn.green,
.signal-badge,
.signal-label,
.logo,
.big-logo,
.stat-icon {
  text-shadow: none;
}

.info-card h3,
.confidence,
.rings strong,
.stat strong,
.pending-user strong {
  color: #ffffff;
}

.bars,
.signal-box {
  background: rgba(2, 6, 23, 0.36);
  border-color: rgba(255, 255, 255, 0.2);
}

th,
td {
  color: #ffffff;
  border-bottom-color: rgba(255, 255, 255, 0.18);
}

.sync-chip,
.pill,
.risk,
.status.active,
.status.inactive,
.status.pending {
  text-shadow: none;
}

.controls {
  padding: 24px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  text-shadow: none;
}

.controls h3 {
  color: #0f172a;
  text-shadow: none;
}

.controls .field label {
  color: #475569 !important;
  text-shadow: none;
}

.controls .field input,
.controls .field select {
  color: #0f172a;
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  text-shadow: none;
}

.mini-market {
  margin-top: 18px;
  padding: 16px;
  border-radius: 16px;
  color: #0f172a;
  background:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px) 0 0 / 12.5% 100%,
    #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.66);
  text-shadow: none;
}

.mini-market-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mini-candles {
  height: 124px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 8px;
  align-items: end;
  overflow: hidden;
}

.mini-candle {
  --color: #16a34a;
  position: relative;
  height: var(--wick);
  display: grid;
  place-items: end center;
  animation: candleMove 1.6s ease-in-out infinite alternate;
  animation-delay: calc(var(--delay) * -0.13s);
  transform: translateY(var(--offset));
}

.mini-candle::before {
  content: "";
  width: 2px;
  height: 100%;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color) 62%, #ffffff);
}

.mini-candle::after {
  content: "";
  position: absolute;
  bottom: 18px;
  width: min(100%, 18px);
  height: var(--body);
  border-radius: 5px;
  background: var(--color);
  box-shadow: 0 0 14px color-mix(in srgb, var(--color) 42%, transparent);
}

.mini-candle.down {
  --color: #dc2626;
}

.mini-candle.up {
  --color: #16a34a;
}

.signal {
  background:
    radial-gradient(circle at 50% 40%, rgba(56, 189, 248, 0.2), transparent 34%),
    rgba(2, 6, 23, 0.78);
}

.signal-box {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(2, 6, 23, 0.96), rgba(15, 23, 42, 0.92)) padding-box,
    conic-gradient(from 120deg, #38bdf8, #34d399, #f59e0b, #38bdf8) border-box;
  border: 3px solid transparent;
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.38),
    0 0 42px rgba(56, 189, 248, 0.24);
  text-shadow: none;
}

.signal-box::before {
  content: "";
  position: absolute;
  inset: -35%;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.16) 48%, transparent 58%);
  animation: scannerSweep 2.2s linear infinite;
}

.signal-box > * {
  position: relative;
  z-index: 1;
}

.signal-box p,
.signal-box strong {
  color: #ffffff;
  text-shadow: none;
}

.signal-digit {
  color: #ffffff;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 255, 255, 0.18), transparent 38%),
    linear-gradient(135deg, #0f172a, #052e2b 55%, #111827);
  border: 1px solid rgba(125, 211, 252, 0.46);
  box-shadow:
    inset 0 0 24px rgba(56, 189, 248, 0.18),
    0 18px 46px rgba(56, 189, 248, 0.22);
  text-shadow: 0 4px 18px rgba(52, 211, 153, 0.44);
  animation: none;
}

.signal-label,
.countdown {
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.24);
}

.network-scanner-card {
  padding: clamp(22px, 4vw, 36px);
  background:
    radial-gradient(circle at 50% 42%, rgba(59, 130, 246, 0.24), transparent 34%),
    radial-gradient(circle at 50% 54%, rgba(245, 158, 11, 0.18), transparent 46%),
    rgba(2, 6, 23, 0.48);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.scanner-panel {
  display: grid;
  grid-template-columns: minmax(250px, 430px) 1fr;
  gap: clamp(22px, 4vw, 46px);
  align-items: center;
}

.network-scanner {
  position: relative;
  width: min(100%, 360px);
  aspect-ratio: 1;
  margin: auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(2, 6, 23, 0.86) 52%, rgba(14, 165, 233, 0.14) 56%, transparent 68%);
  box-shadow:
    0 0 34px rgba(56, 189, 248, 0.32),
    inset 0 0 45px rgba(245, 158, 11, 0.12);
  overflow: hidden;
}

.network-scanner::before {
  content: "";
  position: absolute;
  inset: 11%;
  border-radius: 50%;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 100% 24%,
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px) 0 0 / 24% 100%;
  mask-image: radial-gradient(circle, #000 58%, transparent 69%);
  animation: scannerGrid 3.4s linear infinite;
}

.network-scanner::after {
  content: "";
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: conic-gradient(from -90deg, #38bdf8 calc(var(--progress) * 1%), rgba(255, 255, 255, 0.12) 0);
  mask: radial-gradient(circle, transparent 66%, #000 67%, #000 71%, transparent 72%);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.22);
}

.scanner-core {
  position: relative;
  z-index: 3;
  width: 62%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    0 0 34px rgba(245, 158, 11, 0.32),
    0 0 50px rgba(56, 189, 248, 0.24);
}

.scanner-core img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.24) contrast(1.08) brightness(0.82);
  transform: scale(1.22);
}

.scanner-core strong {
  position: relative;
  z-index: 2;
  padding: 12px 18px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(2, 6, 23, 0.66);
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 900;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.76);
}

.scanner-sweep {
  position: absolute;
  inset: -18%;
  z-index: 1;
  background: linear-gradient(95deg, transparent 38%, rgba(56, 189, 248, 0.5) 49%, transparent 60%);
  animation: scannerSweep 1.45s linear infinite;
}

.scanner-orbit {
  position: absolute;
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.22);
}

.orbit-one {
  width: 78%;
  height: 28%;
  transform: rotate(18deg);
  animation: orbitGlow 1.8s ease-in-out infinite alternate;
}

.orbit-two {
  width: 82%;
  height: 31%;
  transform: rotate(-32deg);
  border-color: rgba(245, 158, 11, 0.52);
  animation: orbitGlow 2.1s ease-in-out infinite alternate-reverse;
}

.orbit-three {
  width: 35%;
  height: 86%;
  transform: rotate(8deg);
  border-color: rgba(125, 211, 252, 0.46);
  animation: orbitGlow 2.4s ease-in-out infinite alternate;
}

.network-node {
  position: absolute;
  z-index: 4;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.86);
  animation: nodePulse 0.8s ease-in-out infinite alternate;
}

.node-one {
  top: 20%;
  left: 24%;
}

.node-two {
  right: 18%;
  top: 45%;
  background: #38bdf8;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.86);
  animation-delay: 0.2s;
}

.node-three {
  left: 50%;
  bottom: 15%;
  background: #fb7185;
  box-shadow: 0 0 22px rgba(251, 113, 133, 0.8);
  animation-delay: 0.4s;
}

.scanner-status {
  display: grid;
  gap: 10px;
  color: #ffffff;
  text-align: left;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.76);
}

.scanner-status span {
  color: #7dd3fc;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.scanner-status strong {
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.05;
}

.scanner-status p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 800;
}

.scanner-progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.scanner-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #f59e0b, #34d399);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.46);
  transition: width 0.22s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scannerSweep {
  from {
    transform: translateX(-55%) rotate(12deg);
  }
  to {
    transform: translateX(55%) rotate(12deg);
  }
}

@keyframes scannerGrid {
  from {
    transform: rotate(0deg) scale(1);
  }
  to {
    transform: rotate(360deg) scale(1.04);
  }
}

@keyframes orbitGlow {
  from {
    opacity: 0.62;
  }
  to {
    opacity: 1;
  }
}

@keyframes nodePulse {
  from {
    transform: scale(0.82);
  }
  to {
    transform: scale(1.22);
  }
}

@keyframes candleMove {
  from {
    transform: translateY(var(--offset)) scaleY(0.86);
  }
  to {
    transform: translateY(calc(var(--offset) - 18px)) scaleY(1.08);
  }
}

@keyframes zoom {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 860px) {
  .login-screen,
  .welcome-screen,
  .dash-screen,
  .admin-screen {
    background-attachment: scroll, scroll, scroll, scroll, scroll;
  }

  .login-grid,
  .control-grid,
  .scanner-panel,
  .strategy-grid {
    grid-template-columns: 1fr;
  }

  .scanner-status {
    text-align: center;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .feature-grid,
  .admin-create,
  .pending-card {
    grid-template-columns: 1fr;
  }

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

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

  .actions,
  .button-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 520px) {
  body::before {
    right: 4px;
    color: rgba(52, 211, 153, 0.08);
    font-size: 40px;
  }

  .screen,
  .main,
  .admin-main {
    padding: 16px;
  }

  .stats,
  .button-row,
  .mode-row {
    grid-template-columns: 1fr;
  }

  .brand {
    align-items: flex-start;
  }

  .brand h1 {
    font-size: 24px;
  }

  .network-scanner {
    width: min(100%, 300px);
  }

  .scanner-core strong {
    font-size: 34px;
  }

  .scanner-status strong {
    font-size: 25px;
  }

  .signal-box {
    min-height: auto;
    padding: 20px;
    border-radius: 20px;
  }

  .mini-candles {
    gap: 5px;
    height: 108px;
  }

  .mini-candle::after {
    width: min(100%, 14px);
  }

  .signal-digit {
    width: 112px;
    height: 112px;
    font-size: 62px;
  }

  .btn {
    min-height: 48px;
  }

  .table-wrap {
    margin: 0 -16px;
    padding: 0 16px;
  }

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

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

  .form-area,
  .welcome-body,
  .control-card,
  .analysis-card,
  .empty-card,
  .strategy-card,
  .rating-card {
    padding: 20px;
  }
}
