/* AtlasOS Prototype - shared design tokens and base components */

:root {
  /* Brand */
  --brand: #2563eb;
  --brand-hover: #1d4ed8;
  --brand-soft: rgba(37, 99, 235, 0.12);

  /* Accents */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #dc2626;

  /* Light mode (default) */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.12);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.dark {
  --bg: #080c14;
  --surface: #0f172a;
  --surface-alt: #1e293b;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --border: #1e293b;
  --border-strong: #334155;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--brand);
  color: #ffffff;
}
.btn-primary:hover { background: var(--brand-hover); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-alt); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }

.btn-danger {
  background: var(--danger);
  color: #ffffff;
}
.login-error {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.2);
  border-radius: 8px;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.4;
  display: none;
}
.login-error.show { display: block; }

/* Inputs */
.input, .select {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--s-2);
}

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--s-5);
  box-shadow: var(--shadow-sm);
}

.card-hoverable { cursor: pointer; transition: all 0.15s ease; }
.card-hoverable:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.row   { display: flex; align-items: center; gap: var(--s-3); }

/* Typography helpers */
.h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
.h3 { font-size: 18px; font-weight: 600; line-height: 1.35; }
.muted { color: var(--text-muted); }
.mono  { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }

/* Pills / Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-alt);
  color: var(--text-muted);
}
.badge-brand   { background: var(--brand-soft); color: var(--brand); }
.badge-success { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.badge-danger  { background: rgba(220, 38, 38, 0.12); color: var(--danger); }
