/* DuoLab — Base Styles
   Shared across all pages. Dark theme.
   ============================================================ */

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

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@400;600;700&display=swap');

/* Variables */
:root {
  /* DuoLab shell (dark) */
  --bg-primary: #1D1A1F;
  --bg-secondary: #262226;
  --bg-elevated: #2E2A30;
  --text-primary: #F8F5F0;
  --text-secondary: #B0AAB0;
  --text-muted: #888888;
  --border: rgba(255, 255, 255, 0.08);

  /* Florias product theme */
  --florias-primary: #3D2137;
  --florias-secondary: #2A1525;
  --florias-accent: #C9A961;
  --florias-accent-hover: #D4B872;
  --florias-border: rgba(201, 169, 97, 0.3);

  /* Fonts */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;

  /* Sizing */
  --max-width: 960px;
  --max-width-narrow: 480px;
  --radius: 8px;
  --radius-lg: 12px;
}

/* Base */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Typography */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }

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

/* Layout */
.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.page-container--narrow {
  max-width: var(--max-width-narrow);
}

/* Navigation */
.duolab-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
}
.nav-logo:hover { color: var(--text-primary); }

.nav-center {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.15s;
}
.nav-link:hover { color: var(--text-primary); }
.nav-link--active { color: var(--florias-accent); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-user {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.nav-logout {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}
.nav-logout:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  transition: border-color 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--florias-accent);
}
.form-input::placeholder {
  color: var(--text-muted);
}

.form-input--error {
  border-color: #E74C3C;
}

.form-error {
  font-size: 0.8125rem;
  color: #E74C3C;
  margin-top: 0.25rem;
  display: none;
}
.form-error--visible {
  display: block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.5rem;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.btn--primary {
  background: var(--florias-accent);
  color: var(--florias-primary);
}
.btn--primary:hover {
  background: var(--florias-accent-hover);
}
.btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn--secondary:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.btn--full {
  width: 100%;
}

/* Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.alert--error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: #E74C3C;
}

.alert--success {
  background: rgba(39, 174, 96, 0.1);
  border: 1px solid rgba(39, 174, 96, 0.3);
  color: #27AE60;
}

/* Loading */
.spinner {
  width: 1.5rem;
  height: 1.5rem;
  border: 2px solid var(--border);
  border-top-color: var(--florias-accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-small { font-size: 0.8125rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none; }

/* Responsive */
@media (max-width: 640px) {
  .page-container { padding: 1.25rem 1rem; }
  .duolab-nav { padding: 0.625rem 1rem; }
  .nav-center { gap: 1rem; }
  h1 { font-size: 1.5rem; }
}
