/* Profectify OS — dashboard styles. Dark + glassy. */

@import url("https://rsms.me/inter/inter.css");

:root {
  --edu: #2563eb;
  --kids: #f59e0b;
  --ai: #8b5cf6;
  --saas: #10b981;
  --accent: var(--ai);
  --accent-2: #6366f1;

  --bg: #07090f;
  --bg-2: #0b0f1a;
  --surface: rgba(20, 26, 38, 0.7);
  --surface-solid: #11161f;
  --surface-2: #1a212e;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f1f3f8;
  --muted: #9aa3b3;
  --muted-2: #6c7282;
  --danger: #f87171;
  --ok: #34d399;
  --warn: #fbbf24;

  --radius: 14px;
  --radius-lg: 22px;
  --pad: 22px;

  --shadow-sm: 0 1px 0 rgba(255,255,255,0.05) inset;
  --shadow-card: 0 1px 0 rgba(255,255,255,0.04) inset, 0 24px 60px -28px rgba(0,0,0,0.6);
  --grad-accent: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #2563eb 100%);
  --grad-bg: radial-gradient(1200px 600px at 0% -10%, rgba(139,92,246,0.18), transparent 60%),
             radial-gradient(900px 500px at 100% 110%, rgba(37,99,235,0.14), transparent 60%);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  background-image: var(--grad-bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-feature-settings: "cv11", "ss01", "ss03";
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: #b9a8ff; text-decoration: none; transition: color .15s ease; }
a:hover { color: white; }

::selection { background: rgba(139,92,246,0.45); color: white; }

/* ---------------- Header ---------------- */

header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 36px;
  background: rgba(7, 9, 15, 0.65);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
header.nav .brand {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.01em;
  background: var(--grad-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
header.nav .brand a { color: inherit; background: inherit; -webkit-background-clip: text; background-clip: text; }
header.nav nav { display: flex; gap: 6px; }
header.nav nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: all .15s ease;
}
header.nav nav a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
header.nav nav a.active {
  color: var(--text);
  background: rgba(139,92,246,0.12);
  border-color: rgba(139,92,246,0.35);
}

/* ---------------- Layout ---------------- */

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 28px 80px;
}

h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  line-height: 1.05;
}
h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 28px 0 14px;
  color: var(--text);
}
h3 { font-size: 15px; font-weight: 600; color: var(--muted); margin: 0 0 8px; }

p.lead, .lead {
  color: var(--muted);
  font-size: 16px;
  max-width: 720px;
  margin: 0 0 22px;
}

/* ---------------- Hero ---------------- */

.hero {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 36px 36px 32px;
  margin-bottom: 28px;
  background:
    radial-gradient(800px 300px at 0% 0%, rgba(139,92,246,0.20), transparent 60%),
    radial-gradient(600px 280px at 100% 100%, rgba(37,99,235,0.14), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(1px 1px at 30px 40px, rgba(255,255,255,0.4) 99%, transparent 100%) repeat;
  background-size: 80px 80px;
  opacity: 0.04;
  pointer-events: none;
}
.hero h1 { margin-bottom: 8px; }
.hero .lead { margin-bottom: 0; }
.hero .actions { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- Cards ---------------- */

.card {
  background: var(--surface);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--pad);
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  transition: border-color .15s ease, transform .15s ease;
}
.card.hover:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.card.compact { padding: 16px 18px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---------------- Stat tiles (dashboard) ---------------- */

.stat {
  position: relative;
  border-radius: var(--radius);
  padding: 20px 22px 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border: 1px solid var(--border);
  overflow: hidden;
}
.stat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139,92,246,0.06), transparent 60%);
  pointer-events: none;
}
.stat .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted-2); }
.stat .value { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; margin-top: 6px; }
.stat .value .sep { color: var(--muted-2); font-weight: 400; margin: 0 8px; }

/* ---------------- Tags / chips ---------------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  border: 1px solid var(--border);
}
.tag.brand   { color: #c4b5fd; background: rgba(139,92,246,0.10); border-color: rgba(139,92,246,0.35); }
.tag.wife    { color: #6ee7b7; background: rgba(16,185,129,0.10); border-color: rgba(16,185,129,0.35); }
.tag.general { color: #cbd5e1; background: rgba(255,255,255,0.04); }
.tag.pm      { color: #fcd34d; background: rgba(245,158,11,0.10); border-color: rgba(245,158,11,0.35); }

/* ---------------- Status indicators ---------------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
}
.status::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}
.status.done    { color: var(--ok); }
.status.failed  { color: var(--danger); }
.status.running { color: var(--warn); }
.status.queued  { color: var(--muted); }

@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.status.running::before, .status.queued::before { animation: pulse-dot 1.4s ease-in-out infinite; }

/* ---------------- Forms ---------------- */

form .field { margin-bottom: 18px; }
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
label .hint { font-weight: 400; color: var(--muted-2); margin-left: 6px; }

input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="search"], textarea, select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(7,9,15,0.55);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14.5px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(139,92,246,0.65);
  box-shadow: 0 0 0 4px rgba(139,92,246,0.15);
  background: rgba(7,9,15,0.7);
}
textarea { min-height: 130px; resize: vertical; line-height: 1.55; }

/* Multi-select chips */
.chip-group { display: flex; flex-wrap: wrap; gap: 10px; }
.chip-group label.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: all .15s ease;
}
.chip-group label.chip:hover { border-color: var(--border-strong); }
.chip-group label.chip input { display: none; }
.chip-group label.chip.checked,
.chip-group label.chip:has(input:checked) {
  background: rgba(139,92,246,0.14);
  border-color: rgba(139,92,246,0.55);
  color: white;
  box-shadow: 0 0 0 1px rgba(139,92,246,0.25) inset;
}

/* ---------------- Buttons ---------------- */

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  background: var(--grad-accent);
  color: white;
  border: 0;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.005em;
  cursor: pointer;
  box-shadow: 0 6px 20px -8px rgba(99,102,241,0.6), 0 1px 0 rgba(255,255,255,0.18) inset;
  transition: transform .12s ease, box-shadow .15s ease, opacity .15s ease;
  font-family: inherit;
}
button:hover, .btn:hover { transform: translateY(-1px); box-shadow: 0 10px 28px -8px rgba(99,102,241,0.7), 0 1px 0 rgba(255,255,255,0.25) inset; }
button:active, .btn:active { transform: translateY(0); }
button:disabled, .btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn.ghost, button.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
.btn.ghost:hover, button.ghost:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.25); }

.btn.subtle {
  background: rgba(139,92,246,0.10);
  color: #d4c8ff;
  border: 1px solid rgba(139,92,246,0.30);
  box-shadow: none;
}

/* ---------------- Tables ---------------- */

table { width: 100%; border-collapse: collapse; }
table th, table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
table th {
  color: var(--muted-2);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 11.5px;
}
table tbody tr { transition: background .15s ease; }
table tbody tr:hover { background: rgba(255,255,255,0.02); }
table tbody tr:last-child td { border-bottom: 0; }

/* ---------------- Code / pre ---------------- */

pre, code {
  font-family: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
}
pre {
  background: rgba(7,9,15,0.55);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 13px;
  color: var(--text);
  line-height: 1.65;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ---------------- Utility ---------------- */

.muted { color: var(--muted); }
.subtle { color: var(--muted-2); }
.hr { border: 0; border-top: 1px solid var(--border); margin: 22px 0; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* ---------------- Flash ---------------- */

.flash {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.03);
}
.flash.error { background: rgba(248,113,113,0.07); color: #fda4af; border-color: rgba(248,113,113,0.35); }
.flash.ok    { background: rgba(52,211,153,0.07); color: #6ee7b7; border-color: rgba(52,211,153,0.35); }

/* ---------------- Stepper (wizard) ---------------- */

.stepper {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.stepper .step {
  flex: 1;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: var(--muted);
}
.stepper .step .num {
  width: 28px; height: 28px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); color: var(--muted);
  font-weight: 700; font-size: 13px;
}
.stepper .step.active {
  background: rgba(139,92,246,0.10);
  border-color: rgba(139,92,246,0.50);
  color: white;
}
.stepper .step.active .num { background: var(--grad-accent); color: white; }
.stepper .step.done .num { background: rgba(52,211,153,0.18); color: #6ee7b7; }
.stepper .step.done { color: var(--text); }

.wizard-step { display: none; }
.wizard-step.active { display: block; animation: fade-in .25s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------- Login ---------------- */

.auth-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 32px 32px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  box-shadow: var(--shadow-card);
}
.auth-card h1 { font-size: 24px; }
.auth-card .lead { font-size: 14px; }
.auth-card .divider {
  display: flex; align-items: center; gap: 14px;
  color: var(--muted-2); font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em;
  margin: 22px 0;
}
.auth-card .divider::before,
.auth-card .divider::after {
  content: ""; flex: 1; border-top: 1px solid var(--border);
}

/* ---------------- Misc ---------------- */

.kbd {
  display: inline-block;
  padding: 1px 7px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 14px;
}
.empty .icon {
  font-size: 32px;
  display: block;
  margin-bottom: 10px;
  opacity: 0.5;
}
