/* ===== PayoutTrackr — premium dark/gold fintech theme ===== */
:root {
  --bg: #0a0b0e;
  --bg-2: #101218;
  --panel: #14161d;
  --panel-2: #1a1d26;
  --panel-3: #20242f;
  --border: #262a34;
  --border-soft: #1e222b;
  --text: #f3f2ee;
  --muted: #969ba8;
  --muted-2: #6f7482;

  --gold: #d0a860;
  --gold-2: #fbe19f;
  --gold-deep: #9a7330;
  --accent: #d0a860;
  --accent-2: #fbe19f;

  --green: #27c281;
  --red: #f0524a;
  --amber: #f0a53a;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 45px rgba(0,0,0,.45);
  --shadow-sm: 0 6px 18px rgba(0,0,0,.30);
  --gold-glow: 0 0 0 1px rgba(208,168,96,.35), 0 10px 30px rgba(208,168,96,.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: "Segoe UI", "Assistant", system-ui, -apple-system, Arial, sans-serif;
  min-height: 100vh;
  line-height: 1.55;
  background:
    radial-gradient(900px 500px at 100% -8%, rgba(208,168,96,.10), transparent 60%),
    radial-gradient(700px 500px at -5% 0%, rgba(208,168,96,.05), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 22px 70px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,11,14,.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 13px 22px;
  display: flex; align-items: center; gap: 18px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { height: 34px; width: auto; display: block; filter: drop-shadow(0 3px 9px rgba(208,168,96,.28)); }
.brand .brand-text {
  font-weight: 800; font-size: 19px; letter-spacing: .6px;
  background: linear-gradient(92deg, #fff 20%, var(--gold-2) 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nav-links { display: flex; gap: 5px; margin-inline-start: auto; align-items: center; flex-wrap: wrap; }
.nav-links a {
  padding: 8px 15px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 600; font-size: 14px; transition: .16s;
}
.nav-links a:hover { color: var(--text); background: var(--panel); }
.nav-links a.active { color: var(--gold-2); background: rgba(208,168,96,.10); box-shadow: inset 0 0 0 1px rgba(208,168,96,.22); }

.lang-toggle {
  border: 1px solid var(--border); background: var(--panel);
  color: var(--text); padding: 7px 13px; border-radius: var(--radius-sm);
  cursor: pointer; font-weight: 700; font-size: 13px; transition: .16s;
}
.lang-toggle:hover { border-color: var(--gold); color: var(--gold-2); }

/* ---------- Hero ---------- */
.hero { padding: 52px 0 22px; }
.hero-centered { text-align: center; }
.hero-centered p { margin-inline: auto; }
.hero-full-logo {
  width: 340px; max-width: 78%; height: auto; margin: 6px auto 22px; display: block;
  filter: drop-shadow(0 14px 34px rgba(208,168,96,.22));
}
@media (max-width: 560px){ .hero-full-logo { width: 260px; } }
.hero h1 {
  font-size: 40px; line-height: 1.12; margin: 0 0 12px; letter-spacing: -.5px;
  background: linear-gradient(94deg, #ffffff 30%, var(--gold-2) 130%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { color: var(--muted); font-size: 17px; max-width: 660px; margin: 0; }
@media (max-width: 820px){ .hero h1 { font-size: 30px; } .hero { padding: 34px 0 16px; } }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px){ .grid.cols-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 820px){ .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; } }
@media (max-width: 560px){ .grid.cols-4 { grid-template-columns: 1fr; } }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--panel), #111319);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(208,168,96,.35), transparent);
  border-radius: var(--radius) var(--radius) 0 0;
}
.card h2 { margin: 0 0 16px; font-size: 19px; letter-spacing: -.2px; }
.card h3 { margin: 0 0 12px; font-size: 13px; color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }

.card.link-card { transition: transform .2s, border-color .2s, box-shadow .2s; cursor: pointer; }
.card.link-card:hover { transform: translateY(-4px); border-color: rgba(208,168,96,.45); box-shadow: var(--shadow), var(--gold-glow); }
.card.link-card .icon {
  width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, rgba(208,168,96,.16), rgba(208,168,96,.04));
  border: 1px solid rgba(208,168,96,.22); margin-bottom: 14px;
}

/* ---------- Stats ---------- */
.stat {
  background: linear-gradient(180deg, var(--panel), #111319);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px;
}
.stat .label { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .3px; margin-bottom: 8px; }
.stat .value { font-size: 27px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat .value.green { color: var(--green); }
.stat .value.red { color: var(--red); }

/* ---------- Forms ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 7px; letter-spacing: .2px; }
input, select, textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
  padding: 12px 13px; border-radius: var(--radius-sm); font-size: 15px; font-family: inherit;
  transition: border-color .15s, box-shadow .15s; font-variant-numeric: tabular-nums;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(208,168,96,.14);
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
@media (max-width: 560px){ .row { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, var(--gold-deep));
  color: #1c1607; border: none; padding: 12px 20px; border-radius: var(--radius-sm);
  font-weight: 800; font-size: 15px; cursor: pointer; transition: .16s; letter-spacing: .2px;
  box-shadow: 0 6px 16px rgba(208,168,96,.18);
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(208,168,96,.28); }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.btn.secondary:hover { border-color: var(--gold); color: var(--gold-2); filter: none; }
.btn.danger { background: transparent; color: var(--red); border: 1px solid rgba(240,82,74,.5); box-shadow: none; }
.btn.danger:hover { background: rgba(240,82,74,.10); filter: none; }
.btn.small { padding: 7px 13px; font-size: 13px; }

.segmented {
  display: inline-flex; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 4px; gap: 4px;
}
.segmented button {
  border: none; background: transparent; color: var(--muted);
  padding: 8px 17px; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 14px; transition: .14s;
}
.segmented button.active { color: #10120c; }
.segmented button.long.active { background: var(--green); color: #04160d; }
.segmented button.short.active { background: var(--red); color: #fff; }
.segmented button[data-filter].active { background: var(--gold); color: #1c1607; }

/* ---------- Result box ---------- */
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
@media (max-width: 560px){ .result-grid { grid-template-columns: 1fr; } }
.result-item {
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: var(--radius-sm); padding: 14px 15px;
}
.result-item .k { color: var(--muted); font-size: 12px; font-weight: 600; margin-bottom: 5px; letter-spacing: .2px; }
.result-item .v { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.v.green { color: var(--green); }
.v.red { color: var(--red); }
.v.amber { color: var(--amber); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 13px; text-align: start; border-bottom: 1px solid var(--border-soft); white-space: nowrap; }
th { color: var(--muted); font-weight: 700; font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; }
td { font-variant-numeric: tabular-nums; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: var(--panel-2); }
.pill { padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.long { background: rgba(39,194,129,.15); color: var(--green); }
.pill.short { background: rgba(240,82,74,.15); color: var(--red); }
.pnl-pos { color: var(--green); font-weight: 700; }
.pnl-neg { color: var(--red); font-weight: 700; }

.empty { text-align: center; color: var(--muted); padding: 44px 20px; font-size: 15px; }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 34px 0 16px; gap: 12px; flex-wrap: wrap; }
.section-title h2 { margin: 0; font-size: 22px; letter-spacing: -.3px; }

/* ---------- Progress ---------- */
.progress-track {
  position: relative; height: 28px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 999px; overflow: hidden; margin: 6px 0 4px;
}
.progress-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold) 55%, var(--gold-2));
  box-shadow: 0 0 18px rgba(208,168,96,.4); transition: width .55s ease;
}
.progress-label { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--text); text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.progress-done .progress-fill { background: linear-gradient(90deg, var(--green), #4ade9a); box-shadow: 0 0 18px rgba(39,194,129,.4); }

.banner-success {
  background: rgba(39,194,129,.12); border: 1px solid rgba(39,194,129,.5); color: #a9f0cd;
  padding: 11px 13px; border-radius: var(--radius-sm); font-weight: 700; font-size: 14px; margin-top: 10px;
}

.hint { color: var(--muted); font-size: 13px; margin-top: 7px; }
.footer {
  color: var(--muted-2); font-size: 13px; text-align: center; padding: 34px 0 12px;
  border-top: 1px solid var(--border-soft); margin-top: 46px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
}
.footer .logo { height: 22px; width: auto; opacity: .8; }

/* ---------- Auth / billing pages ---------- */
.auth-wrap { max-width: 440px; margin: 46px auto 0; }
.auth-card { padding: 30px 28px; }
.auth-card h1 { font-size: 26px; margin: 0 0 6px; letter-spacing: -.4px; }
.auth-card .sub { color: var(--muted); margin: 0 0 22px; font-size: 14px; }
.auth-error {
  display: none; background: rgba(240,82,74,.12); border: 1px solid rgba(240,82,74,.5);
  color: #ffb4b0; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px;
  font-weight: 600; margin-bottom: 14px;
}
.auth-alt { text-align: center; margin-top: 18px; }
.auth-alt a { color: var(--gold-2); font-weight: 700; font-size: 14px; }
.auth-alt a:hover { text-decoration: underline; }
.auth-logo { display: block; height: 66px; width: auto; margin: 0 auto 20px; filter: drop-shadow(0 8px 20px rgba(208,168,96,.28)); }

/* Pricing / subscribe */
.price-wrap { max-width: 560px; margin: 40px auto 0; }
.price-head { text-align: center; margin-bottom: 26px; }
.price-amount { font-size: 52px; font-weight: 800; letter-spacing: -1.5px; }
.price-amount .per { font-size: 18px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.price-tag { color: var(--muted); font-size: 16px; margin-top: 6px; }
.feature-list { list-style: none; padding: 0; margin: 0 0 24px; }
.feature-list li {
  display: flex; align-items: flex-start; gap: 11px; padding: 11px 0;
  border-bottom: 1px solid var(--border-soft); font-size: 15px;
}
.feature-list li:last-child { border-bottom: none; }
.feature-list .tick {
  flex: none; width: 22px; height: 22px; border-radius: 999px; display: grid; place-items: center;
  background: rgba(208,168,96,.15); color: var(--gold-2); font-weight: 900; font-size: 13px;
  border: 1px solid rgba(208,168,96,.35);
}
.secure-note { text-align: center; color: var(--muted-2); font-size: 13px; margin-top: 14px; }

/* ---------- Journey ---------- */
.acct-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.acct-title { font-size: 20px; font-weight: 800; letter-spacing: -.3px; margin: 0; }
.acct-meta { color: var(--muted); font-size: 13px; margin-top: 4px; display: flex; gap: 14px; flex-wrap: wrap; }
.acct-meta b { color: var(--text); font-weight: 700; }
.firm-badge { display: inline-block; background: rgba(208,168,96,.12); color: var(--gold-2); border: 1px solid rgba(208,168,96,.3); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }

.timeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 6px; }
@media (max-width: 780px){ .timeline { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px){ .timeline { grid-template-columns: 1fr; } }

.stage {
  background: var(--bg-2); border: 1px solid var(--border-soft); border-radius: 12px;
  padding: 14px; position: relative; border-top: 3px solid var(--muted-2);
}
.stage[data-status="active"] { border-top-color: var(--gold); box-shadow: 0 0 0 1px rgba(208,168,96,.25); }
.stage[data-status="passed"] { border-top-color: var(--green); }
.stage[data-status="failed"] { border-top-color: var(--red); }
.stage[data-status="pending"] { border-top-color: var(--border); opacity: .82; }

.stage-top { display: flex; align-items: center; gap: 9px; margin-bottom: 8px; }
.stage-dot {
  width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center;
  font-size: 13px; font-weight: 900; flex: none; background: var(--panel-3); color: var(--muted);
}
.stage[data-status="active"] .stage-dot { background: var(--gold); color: #1c1607; }
.stage[data-status="passed"] .stage-dot { background: var(--green); color: #04160d; }
.stage[data-status="failed"] .stage-dot { background: var(--red); color: #fff; }
.stage-name { font-weight: 700; font-size: 13.5px; line-height: 1.25; }
.stage-badge { margin-inline-start: auto; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.stage-badge.active { background: rgba(208,168,96,.16); color: var(--gold-2); }
.stage-badge.passed { background: rgba(39,194,129,.16); color: var(--green); }
.stage-badge.failed { background: rgba(240,82,74,.16); color: var(--red); }
.stage-badge.pending { background: var(--panel-3); color: var(--muted); }

.stage-metric { font-size: 12px; color: var(--muted); margin: 6px 0 2px; }
.stage-metric b { color: var(--text); font-weight: 700; }
.mini-track { height: 7px; background: var(--panel-3); border-radius: 999px; overflow: hidden; margin: 6px 0; }
.mini-fill { height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold)); border-radius: 999px; }
.stage[data-status="passed"] .mini-fill { background: var(--green); }
.stage-dates { font-size: 11.5px; color: var(--muted-2); margin-top: 6px; }
.stage-edit-btn { margin-top: 9px; font-size: 12px; color: var(--gold-2); background: none; border: none; cursor: pointer; font-weight: 700; padding: 0; }
.stage-edit-btn:hover { text-decoration: underline; }
.stage-form { margin-top: 10px; display: none; }
.stage-form.open { display: block; }
.stage-form .field { margin-bottom: 8px; }
.stage-form label { font-size: 11px; margin-bottom: 3px; }
.stage-form input, .stage-form select, .stage-form textarea { padding: 8px 9px; font-size: 13px; }

.payout-list { margin-top: 8px; }
.payout-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; padding: 7px 0; border-bottom: 1px solid var(--border-soft); }
.payout-item:last-child { border-bottom: none; }
.payout-item .amt { color: var(--green); font-weight: 800; }
.payout-item button { background: none; border: none; color: var(--red); cursor: pointer; font-size: 12px; font-weight: 700; }
.payout-total { font-size: 22px; font-weight: 800; color: var(--green); letter-spacing: -.4px; }

.account-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--border-soft); gap: 12px;
}
.account-row:last-of-type { border-bottom: none; }
.account-row .k { color: var(--muted); font-size: 14px; }
.account-row .val { font-weight: 700; }
.badge-status { padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge-status.active { background: rgba(39,194,129,.15); color: var(--green); }
.badge-status.inactive { background: rgba(240,82,74,.15); color: var(--red); }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 48px; height: 27px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; cursor: pointer; inset: 0; background: var(--panel-3);
  border: 1px solid var(--border); border-radius: 999px; transition: .2s;
}
.switch .slider::before {
  content: ""; position: absolute; height: 19px; width: 19px; inset-inline-start: 3px; top: 3px;
  background: var(--muted); border-radius: 50%; transition: .2s;
}
.switch input:checked + .slider { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); border-color: var(--gold); }
.switch input:checked + .slider::before { transform: translateX(21px); background: #1c1607; }
[dir="rtl"] .switch input:checked + .slider::before { transform: translateX(-21px); }
