/*
 * QuickGroup Central Branding CSS
 * Relies on Inter, Outfit, and Fira Code fonts.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&family=Fira+Code:wght@400;500&family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20,400,0,0&display=swap');

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* DESIGN TOKENS */
:root, [data-theme="light"] {
  --bg: #f0f2f7;
  --surface: #ffffff;
  --surface2: #f8f9fc;
  --border: #e4e7ef;
  --border2: #d1d5e0;
  --text: #111827;
  --text2: #6b7280;
  --text3: #9ca3af;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #eff6ff;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --success: #10b981;
  --success-light: #ecfdf5;
  --warn: #f59e0b;
  --warn-light: #fffbeb;
  --pin: #8b5cf6;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;
  --mono: 'Fira Code', monospace;
  --topbar: 58px;
}

[data-theme="dark"] {
  --bg: #090d16;
  --surface: #111827;
  --surface2: #1f2937;
  --border: #1f2937;
  --border2: #374151;
  --text: #f9fafb;
  --text2: #9ca3af;
  --text3: #6b7280;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-light: rgba(59, 130, 246, 0.15);
  --danger: #f87171;
  --danger-light: rgba(239, 68, 68, 0.15);
  --success: #34d399;
  --success-light: rgba(16, 185, 129, 0.15);
  --warn: #fbbf24;
  --warn-light: rgba(245, 158, 11, 0.15);
  --pin: #a78bfa;
  --shadow: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.5);
}

[data-theme="sepia"] {
  --bg: #f4ecd8;
  --surface: #fdf6e3;
  --surface2: #eae0c9;
  --border: #dcd1b4;
  --border2: #a88d75;
  --text: #5b4636;
  --text2: #8f6f56;
  --text3: #a88d75;
  --accent: #855d3e;
  --accent-hover: #6b482f;
  --accent-light: #ebdcb9;
  --danger: #b23b3b;
  --danger-light: #fbebeb;
  --success: #60863a;
  --success-light: #e6eedb;
  --warn: #b27f12;
  --warn-light: #fbf6eb;
  --pin: #8b5cf6;
  --shadow: 0 1px 3px rgba(91,70,54,0.06);
  --shadow-md: 0 4px 12px rgba(91,70,54,0.08);
  --shadow-lg: 0 10px 30px rgba(91,70,54,0.12);
}

/* BASE STYLES */
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.25s, color 0.25s;
}

/* TYPOGRAPHY */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; color: var(--text); }
code, pre { font-family: var(--mono); }

/* SCROLLBAR */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; height: 32px;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font-family: var(--font); font-size: 13px; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: all 0.15s; text-decoration: none; outline: none;
}
.btn:hover:not(:disabled) { background: var(--surface2); border-color: var(--border2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover:not(:disabled) { background: #dc2626; border-color: #dc2626; }
.btn.sm { padding: 0 10px; height: 27px; font-size: 12px; }
.btn.lg { padding: 0 20px; height: 38px; font-size: 14px; font-weight: 600; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* CONTAINER */
.container {
  width: 100%; max-width: 900px; margin: 0 auto; padding: 0 20px;
}

/* TOPBAR */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar);
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px; padding: 0 16px;
  z-index: 100; box-shadow: var(--shadow);
  transition: background 0.25s, border-color 0.25s;
}
#topbar .brand { display: flex; flex-direction: column; text-decoration: none; cursor: pointer; }
#topbar .brand .logo { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.3px; display: inline-flex; align-items: center; gap: 5px; }
#topbar .brand .logo .logo-icon { font-size: 18px !important; color: var(--accent); }
#topbar .brand .sub { font-size: 9px; color: var(--text3); font-family: var(--mono); line-height: 1; margin-top: 1px; }
.divider-v { width: 1px; height: 22px; background: var(--border); flex-shrink: 0; }

.nav-links { display: flex; gap: 6px; }
.nav-link {
  color: var(--text2); text-decoration: none; font-weight: 500; font-size: 13px;
  padding: 6px 12px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; gap: 6px;
  transition: all 0.15s;
}
.nav-link:hover, .nav-link.active { color: var(--accent); background: var(--accent-light); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* CARDS */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow); transition: all 0.15s ease-in-out;
}
.card:hover { border-color: var(--border2); }

/* FOOTER */
footer.footer {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 24px 20px; text-align: center; margin-top: auto;
  transition: background 0.25s, border-color 0.25s;
}
.footer-container { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.footer-container p { font-size: 13px; color: var(--text2); }
.footer-container p strong { color: var(--text); }
.footer-container a { color: var(--accent); text-decoration: none; font-weight: 500; }
.footer-container a:hover { text-decoration: underline; }
.footer-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 13px; }
.footer-dot { color: var(--text3); font-size: 10px; }
.footer-sub { font-size: 11px !important; color: var(--text3) !important; margin-top: 4px; }
