/* RealUsers.tech — global styles
   Mobile-first. Type-as-brand. Dark + light themes. */

:root, [data-theme="dark"] {
  --bg: #0a0a0f;
  --bg-elev: #14141c;
  --bg-elev-2: #1c1c26;
  --line: #2a2a38;
  --line-strong: #3a3a4a;
  --ink: #f4f4f8;
  --ink-mute: #9a9aae;
  --ink-quiet: #6a6a7e;

  --accent: #d4ff4f;
  --accent-ink: #0a0a0f;
  --accent-soft: rgba(212,255,79,0.08);
  --warn: #ff7a4a;
  --bad:  #ff4a6a;
  --good: #4affb0;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow:    0 4px 12px rgba(0,0,0,0.35);

  --radius: 4px;
  --radius-lg: 8px;

  --f-sans: 'Space Grotesk', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --f-serif: 'Instrument Serif', Georgia, serif;
}

/* Light theme — bright, clean, forward.
   Anchored on a near-white bg with cool-gray ink and the same lime accent. */
[data-theme="light"] {
  --bg: #fafbfc;
  --bg-elev: #ffffff;
  --bg-elev-2: #f4f6f8;
  --line: #e5e7ec;
  --line-strong: #d0d4dc;
  --ink: #0f1419;
  --ink-mute: #5b6472;
  --ink-quiet: #8b94a3;

  --accent: #5cc800;        /* lime works in light too, but darker for contrast */
  --accent-ink: #ffffff;
  --accent-soft: rgba(92,200,0,0.10);
  --warn: #d97706;
  --bad:  #dc2626;
  --good: #059669;

  --shadow-sm: 0 1px 2px rgba(15,20,25,0.06);
  --shadow:    0 4px 16px rgba(15,20,25,0.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

/* ---- header ---- */
.ru-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.ru-brand {
  font-family: var(--f-sans);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
}
.ru-brand-mark { color: var(--ink); }
.ru-brand-accent { color: var(--accent); }
.ru-brand-dot {
  color: var(--ink-quiet);
  font-family: var(--f-mono);
  font-size: 13px;
  font-weight: 400;
  margin-left: 2px;
}
.ru-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}
.ru-nav a {
  color: var(--ink-mute);
}
.ru-nav a i { margin-right: 4px; }
.ru-cta-sm {
  background: var(--accent);
  color: var(--accent-ink) !important;
  padding: 6px 12px;
  border-radius: var(--radius);
  font-weight: 600;
}
.ru-cta-sm:hover { color: var(--accent-ink) !important; opacity: 0.9; }
.ru-nav-quiet { opacity: 0.6; }

/* Hide nav text on tiny screens, keep icons */
@media (max-width: 480px) {
  .ru-nav a span,
  .ru-nav a:not(.ru-cta-sm) { font-size: 0; }
  .ru-nav a:not(.ru-cta-sm) i { font-size: 16px; margin: 0; }
}

/* ---- layout ---- */
main, .ru-main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 18px 80px;
}

/* ---- typography ---- */
h1, h2, h3, h4 {
  font-family: var(--f-sans);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 16px;
}
h1 { font-size: clamp(28px, 7vw, 48px); font-weight: 700; }
h2 { font-size: clamp(22px, 5vw, 32px); }
h3 { font-size: 18px; }
.serif { font-family: var(--f-serif); font-style: italic; }
.mono  { font-family: var(--f-mono); }
.mute  { color: var(--ink-mute); }
.quiet { color: var(--ink-quiet); }

/* ---- cards ---- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.card + .card { margin-top: 14px; }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--bg-elev-2);
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  font-size: 15px;
  min-height: 44px; /* mobile touch target */
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover { color: var(--accent-ink); opacity: 0.9; background: var(--accent); }
.btn-danger {
  border-color: var(--bad);
  color: var(--bad);
}
.btn-danger:hover { background: var(--bad); color: var(--bg); }
.btn-block { width: 100%; }

/* ---- forms ---- */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mute);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 12px 14px;
  border-radius: var(--radius);
  font-family: var(--f-sans);
  font-size: 16px; /* prevents iOS zoom */
  transition: border-color 0.15s;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
}
.field textarea { min-height: 100px; resize: vertical; }
.field-help { font-size: 12px; color: var(--ink-quiet); margin-top: 4px; }
.field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 600px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

/* ---- badges / chips ---- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  font-size: 11px;
  font-family: var(--f-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-mute);
}
.chip-accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip-warn   { color: var(--warn); border-color: var(--warn); }
.chip-good   { color: var(--good); border-color: var(--good); }
.chip-bad    { color: var(--bad); border-color: var(--bad); }

/* ---- footer ---- */
.ru-footer {
  border-top: 1px solid var(--line);
  padding: 20px 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--ink-quiet);
  font-family: var(--f-mono);
}
.ru-footer a { color: var(--ink-mute); }

/* ---- gig listing ---- */
.gig-list { display: flex; flex-direction: column; gap: 12px; }
.gig-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: block;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.gig-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  color: inherit;
}
.gig-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}
.gig-card-title { font-size: 17px; font-weight: 600; margin: 0; }
.gig-card-pay {
  font-family: var(--f-mono);
  font-size: 18px;
  color: var(--accent);
  white-space: nowrap;
  font-weight: 600;
}
.gig-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* ---- hero (landing) ---- */
.hero {
  padding: 60px 0 40px;
  text-align: left;
  position: relative;
}
.hero h1 {
  font-size: clamp(36px, 9vw, 72px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  margin-bottom: 20px;
}
.hero h1 .accent { color: var(--accent); }
.hero h1 .serif { font-weight: 400; font-size: 0.85em; }
.hero p.lede {
  font-size: 18px;
  color: var(--ink-mute);
  max-width: 560px;
  margin-bottom: 30px;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---- alerts ---- */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  border: 1px solid var(--line);
}
.alert-success { border-color: var(--good); color: var(--good); background: color-mix(in srgb, var(--good) 8%, transparent); }
.alert-error   { border-color: var(--bad);  color: var(--bad);  background: color-mix(in srgb, var(--bad)  8%, transparent); }
.alert-info    { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* ---- empty states ---- */
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--ink-quiet);
}
.empty i { font-size: 36px; margin-bottom: 12px; opacity: 0.5; }

/* ---- tables (dashboard) ---- */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tbl th, .tbl td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
.tbl th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-quiet);
  font-weight: 500;
}
@media (max-width: 600px) {
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 10px;
    padding: 12px;
  }
  .tbl td {
    border: none;
    padding: 4px 0;
  }
  .tbl td::before {
    content: attr(data-label);
    display: inline-block;
    width: 110px;
    color: var(--ink-quiet);
    font-size: 11px;
    text-transform: uppercase;
  }
}

/* ---- steps list (gig detail / tester view) ---- */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  padding: 14px 14px 14px 50px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 8px;
  position: relative;
  background: var(--bg-elev);
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 14px;
  top: 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--accent);
}
.steps li.done {
  border-color: var(--good);
  opacity: 0.7;
}
.steps li.done::before { color: var(--good); }

/* ============================================
   Light theme refinements — tech-forward polish
   ============================================ */
[data-theme="light"] body {
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(92,200,0,0.05), transparent 60%),
    radial-gradient(800px 400px at -10% 30%, rgba(15,20,25,0.03), transparent 60%),
    var(--bg);
}
[data-theme="light"] .card {
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
[data-theme="light"] .card:hover {
  box-shadow: var(--shadow);
}
[data-theme="light"] .gig-card {
  box-shadow: var(--shadow-sm);
}
[data-theme="light"] .gig-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
[data-theme="light"] .btn {
  box-shadow: var(--shadow-sm);
}
[data-theme="light"] .btn-primary {
  box-shadow: 0 2px 8px rgba(92,200,0,0.25);
}
[data-theme="light"] .ru-brand-mark {
  color: var(--ink);
}
[data-theme="light"] .ru-brand-accent {
  /* Lime on white needs a subtle backdrop or darker shade to read.
     Already darkened the --accent variable, but add a gradient for extra punch. */
  background: linear-gradient(135deg, #5cc800 0%, #3aa800 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="light"] .chip {
  box-shadow: var(--shadow-sm);
}

/* ============================================
   Theme toggle button
   ============================================ */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-mute);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.theme-toggle i { font-size: 14px; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: inline-block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun  { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: inline-block; }

/* utilities */
.hidden { display: none !important; }
code {
  background: var(--bg-elev-2);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.85em;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 70%, rgba(0,0,0,0.6));
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  animation: modalIn 0.18s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.modal-head h3 { margin: 0; }
.modal-close {
  background: none;
  border: none;
  color: var(--ink-quiet);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}
.modal-close:hover { color: var(--bad); }

/* Locked app URL placeholder */
.locked-url {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-quiet);
  font-size: 14px;
}
.locked-url i { color: var(--warn); }

/* ============================================
   Autocomplete
   ============================================ */
.autocomplete { position: relative; }
.ac-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 60;
  max-height: 260px;
  overflow-y: auto;
  display: none;
}
.ac-list.open { display: block; }
.ac-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}
