﻿:root {
  color-scheme: dark;
  --bg: #0f1014;
  --panel: rgba(21, 23, 30, 0.84);
  --panel-2: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.12);
  --text: #f6f5f2;
  --muted: #aeb6cc;
  --dim: #747987;
  --accent: #ff9900;
  --green: #10c787;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(4, 9, 16, 0.76), rgba(12, 14, 19, 0.96)),
    url("assets/ai-moldova-portal.png") center / cover fixed,
    var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.panel-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.panel-rail {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: rgba(8, 10, 15, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 850;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: url("assets/favicon-ai.svg") center / cover no-repeat;
  box-shadow: 0 0 28px rgba(255, 153, 0, 0.26);
}

.panel-nav {
  display: grid;
  gap: 8px;
}

.panel-nav button,
.ghost-btn,
.primary-btn,
.google-btn {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 16px;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.panel-nav button {
  background: transparent;
  color: var(--muted);
  text-align: left;
}

.panel-nav button.active,
.panel-nav button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 153, 0, 0.34);
}

.rail-card,
.auth-card,
.metric-card,
.plan-card,
.affiliate-card,
.settings-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.rail-card {
  margin-top: auto;
  padding: 16px;
}

.rail-card strong,
.rail-card span {
  display: block;
}

.rail-card span,
p,
.muted {
  color: var(--muted);
  line-height: 1.65;
}

.auth-screen {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 520px);
  gap: 44px;
  align-items: center;
  padding: 64px max(28px, calc((100vw - 1180px) / 2));
}

.auth-screen.hidden,
.dashboard.hidden,
[data-panel-view].hidden {
  display: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  border: 1px solid var(--line);
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #dbe4f7;
}

.eyebrow span {
  width: 9px;
  height: 9px;
  background: var(--accent);
}

h1, h2, p { margin-top: 0; }
h1 {
  margin: 24px 0 18px;
  font-size: clamp(48px, 5.4vw, 78px);
  line-height: 1.04;
  font-weight: 560;
}
h2 {
  margin: 8px 0 12px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.08;
  font-weight: 560;
}

.auth-stats,
.dash-grid,
.plans-grid,
.affiliate-layout {
  display: grid;
  gap: 16px;
}

.auth-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
}

.auth-stats div {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.auth-stats strong,
.auth-stats span {
  display: block;
}

.auth-card {
  padding: 24px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.auth-tabs button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}

.auth-tabs button.active {
  background: rgba(255, 153, 0, 0.12);
  color: var(--text);
  border-color: rgba(255, 153, 0, 0.45);
}

.google-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #f7f5ef;
  color: #07080b;
  font-weight: 850;
}

.google-btn span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #fff;
  color: #4285f4;
}

.divider {
  display: grid;
  place-items: center;
  margin: 20px 0;
  color: var(--dim);
}

.auth-form,
.settings-form {
  display: grid;
  gap: 14px;
}

.settings-form {
  max-width: 620px;
  padding: 24px;
}

label {
  display: grid;
  gap: 8px;
  color: #dce2f4;
  font-size: 14px;
}

input,
select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 10, 15, 0.72);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

input:focus,
select:focus {
  border-color: rgba(255, 153, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 153, 0, 0.08);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff9900;
  color: #08090c;
  border-color: #ff9900;
  font-weight: 850;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.primary-btn:hover,
.ghost-btn:hover,
.google-btn:hover {
  transform: translateY(-2px);
}

.form-note {
  min-height: 22px;
  margin: 0;
  font-size: 13px;
}

.payment-message {
  min-height: 24px;
  margin: 0 0 18px;
  color: var(--muted);
}

.payment-message[data-type="success"] { color: #9ef2ce; }
.payment-message[data-type="error"] { color: #ffb3a7; }
.payment-message[data-type="info"] { color: #dbe4f7; }

.dashboard {
  padding: 38px max(24px, calc((100vw - 1180px) / 2));
}

.dash-topbar,
.section-head,
.dash-actions,
.button-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.dash-topbar {
  margin-bottom: 28px;
}

.dash-topbar h1 {
  margin: 4px 0 0;
  font-size: clamp(36px, 4vw, 58px);
}

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

.metric-card,
.plan-card,
.affiliate-card {
  padding: 22px;
}

.metric-card span,
.affiliate-card span {
  display: block;
  color: var(--dim);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-card strong,
.affiliate-card strong {
  display: block;
  margin: 12px 0 8px;
  font-size: 34px;
}

.metric-card.highlight {
  border-color: rgba(255, 153, 0, 0.42);
  background: rgba(255, 153, 0, 0.1);
}

.panel-section {
  margin-top: 44px;
}

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

.plan-card {
  display: flex;
  min-height: 420px;
  flex-direction: column;
}

.plan-card.active {
  border-color: rgba(255, 153, 0, 0.55);
}

.plan-card h3 {
  margin: 0 0 14px;
  font-size: 22px;
}

.plan-price {
  font-size: 36px;
  font-weight: 760;
}

.plan-card ul,
.clean-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.plan-card li::before,
.clean-list li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border: 1px solid var(--accent);
  border-radius: 999px;
}

.plan-card button {
  margin-top: auto;
}

.affiliate-layout {
  grid-template-columns: 1.15fr 1fr 1fr;
}

.affiliate-card p {
  word-break: break-word;
}

.payment-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.payment-card {
  width: min(720px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(24px, 5vw, 48px);
  background: rgba(11, 13, 19, 0.86);
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
}

.payment-card h1 {
  font-size: clamp(42px, 6vw, 72px);
}

.payment-card.success {
  border-color: rgba(16, 199, 135, 0.32);
}

.payment-card.fail {
  border-color: rgba(255, 153, 0, 0.42);
}

@media (max-width: 1100px) {
  .panel-shell,
  .auth-screen {
    grid-template-columns: 1fr;
  }

  .panel-rail {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .rail-card {
    display: none;
  }

  .dash-grid,
  .plans-grid,
  .affiliate-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .panel-rail,
  .auth-screen,
  .dashboard {
    padding: 18px;
  }

  .panel-nav,
  .auth-stats,
  .dash-grid,
  .plans-grid,
  .affiliate-layout {
    grid-template-columns: 1fr;
  }

  .dash-topbar,
  .section-head,
  .dash-actions,
  .button-row {
    align-items: stretch;
    flex-direction: column;
  }
}
