/* Noetic Soul Coffee — Brand Tokens + Shared Styles */

:root {
  --bg:            #0b1221;
  --surface:       #111a2c;
  --surface-alt:   #16223a;
  --border:        #1e3050;
  --deep-navy:     #172945;
  --amber-gold:    #FDB142;
  --burnt-orange:  #BC581B;
  --coffee-brown:  #443730;
  --accent:        #FC8742;
  --cream:         #F8F4ED;
  --cream-dim:     #C8C0B4;

  /* Status colors */
  --success:       #3ecf8e;
  --warning:       #f5a623;
  --danger:        #e74c3c;
  --info:          #3498db;

  /* Typography */
  --font-head:     'Comfortaa', sans-serif;
  --font-body:     'Manrope', sans-serif;

  /* Spacing */
  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     20px;
  --radius-xl:     28px;

  /* Transitions */
  --transition:    0.18s ease;
}

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

html {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─────────────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--cream);
}

a {
  color: var(--amber-gold);
  text-decoration: none;
  transition: opacity var(--transition);
}
a:hover { opacity: 0.8; }

/* ─── Layout utilities ───────────────────────────────────────────────────── */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { align-items: center; justify-content: space-between; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }

/* ─── Cards / Surfaces ───────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.card-alt {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--amber-gold);
  color: #000;
}
.btn-primary:hover:not(:disabled) { background: #FFB94F; }

.btn-secondary {
  background: var(--surface-alt);
  color: var(--cream);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--deep-navy); border-color: var(--amber-gold); }

.btn-danger {
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover:not(:disabled) { background: #c0392b; }

.btn-ghost {
  background: transparent;
  color: var(--cream-dim);
  border: 1px solid var(--border);
}
.btn-ghost:hover:not(:disabled) { color: var(--cream); border-color: var(--cream-dim); }

.btn-lg {
  padding: 16px 32px;
  font-size: 17px;
  border-radius: var(--radius-lg);
}

.btn-xl {
  padding: 20px 40px;
  font-size: 19px;
  border-radius: var(--radius-xl);
  width: 100%;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

/* ─── Form controls ──────────────────────────────────────────────────────── */

.input, .select {
  width: 100%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--transition);
}
.input:focus, .select:focus { border-color: var(--amber-gold); }
.input::placeholder { color: var(--cream-dim); }
.select option { background: var(--surface-alt); }

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--cream-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.form-error { font-size: 12px; color: var(--danger); }

/* ─── Badges / Chips ─────────────────────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.badge-gold { background: rgba(253, 177, 66, 0.15); color: var(--amber-gold); }
.badge-success { background: rgba(62, 207, 142, 0.15); color: var(--success); }
.badge-warning { background: rgba(245, 166, 35, 0.15); color: var(--warning); }
.badge-danger { background: rgba(231, 76, 60, 0.15); color: var(--danger); }
.badge-info { background: rgba(52, 152, 219, 0.15); color: var(--info); }
.badge-muted { background: rgba(200, 192, 180, 0.1); color: var(--cream-dim); }

/* ─── Toast notifications ────────────────────────────────────────────────── */

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--cream);
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  pointer-events: auto;
  animation: toast-in 0.2s ease;
  max-width: 340px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--info); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Loading / Spinner ──────────────────────────────────────────────────── */

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(253, 177, 66, 0.2);
  border-top-color: var(--amber-gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Tables ─────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--cream-dim);
  border-bottom: 1px solid var(--border);
}

td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(30, 48, 80, 0.5);
  color: var(--cream);
}

tr:hover td { background: rgba(253, 177, 66, 0.03); }

/* ─── Divider ────────────────────────────────────────────────────────────── */

.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ─── Utility ────────────────────────────────────────────────────────────── */

.text-gold { color: var(--amber-gold); }
.text-dim { color: var(--cream-dim); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }
.text-sm { font-size: 13px; }
.text-lg { font-size: 18px; }
.font-head { font-family: var(--font-head); }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* ─── Scrollbar ──────────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--amber-gold); }

/* ─── Mobile ─────────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
  .btn-xl { padding: 16px 24px; font-size: 16px; }
  .card, .card-alt { padding: 16px; }
}
