/* Sales Enablement 2.0 — shared theme tokens.
   Lively green gradient, modern typography, frosted glass on cards.
   Used by both /entry (public) and /admin (gated). */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=DM+Serif+Display&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --brand-1: #0f9d58;
  --brand-2: #34d399;
  --brand-3: #059669;
  --accent:  #f59e0b;
  --danger:  #dc2626;
  --ok:      #16a34a;
  --warn:    #ea580c;

  --bg-0: #0b1626;
  --bg-1: #0f2233;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.10);
  --border: rgba(255, 255, 255, 0.14);
  --text-0: #f8fafc;
  --text-1: #e2e8f0;
  --text-2: #94a3b8;
  --text-3: #64748b;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.20);

  --font-sans: 'DM Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'DM Serif Display', serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--text-0);
  background:
    radial-gradient(ellipse at top left, rgba(15, 157, 88, 0.35) 0%, transparent 45%),
    radial-gradient(ellipse at bottom right, rgba(52, 211, 153, 0.25) 0%, transparent 50%),
    linear-gradient(135deg, var(--bg-0) 0%, var(--bg-1) 100%);
  background-attachment: fixed;
}

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; margin: 0 0 0.5em; }
h1 { font-size: 2.25rem; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p  { line-height: 1.55; color: var(--text-1); }
code, kbd { font-family: var(--font-mono); font-size: 0.9em; }

/* --- Panels & cards --- */
.card {
  background: var(--panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}
.card--tight { padding: 1rem; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  font: 500 0.95rem/1 var(--font-sans);
  border: 1px solid var(--border);
  background: var(--panel-strong);
  color: var(--text-0);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { background: rgba(255,255,255,0.14); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--primary {
  background: linear-gradient(135deg, var(--brand-1), var(--brand-3));
  border-color: transparent;
  color: white;
  font-weight: 600;
}
.btn--primary:hover { background: linear-gradient(135deg, var(--brand-2), var(--brand-1)); }
.btn--ghost { background: transparent; }
.btn--danger { background: var(--danger); border-color: transparent; color: white; }

/* --- Form controls --- */
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field > label {
  font-size: 0.85rem; color: var(--text-2); font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.field > label .req { color: var(--accent); margin-left: 2px; }
.field .hint { font-size: 0.8rem; color: var(--text-3); margin-top: 0.15rem; }

.input, .select, .textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-0);
  font: 400 0.95rem var(--font-sans);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2);
}
.textarea { resize: vertical; min-height: 90px; }
.select option { background: var(--bg-1); color: var(--text-0); }

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font: 500 0.75rem var(--font-sans);
  background: rgba(52, 211, 153, 0.15);
  color: var(--brand-2);
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.badge--ex { background: rgba(245, 158, 11, 0.15); color: var(--accent); border-color: rgba(245, 158, 11, 0.3); }
.badge--lh { background: rgba(52, 211, 153, 0.15); color: var(--brand-2); border-color: rgba(52, 211, 153, 0.3); }
.badge--muted { background: rgba(148, 163, 184, 0.12); color: var(--text-2); border-color: rgba(148, 163, 184, 0.25); }

/* --- Grid helpers --- */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* --- Toasts --- */
#toast-container {
  position: fixed; top: 1rem; right: 1rem; z-index: 1000;
  display: flex; flex-direction: column; gap: 0.5rem;
  max-width: 380px;
}
.toast {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--bg-1);
  border: 1px solid var(--border);
  color: var(--text-0);
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.2s ease-out;
}
.toast--ok    { border-left: 4px solid var(--ok); }
.toast--err   { border-left: 4px solid var(--danger); }
.toast--warn  { border-left: 4px solid var(--warn); }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0 } to { transform: none; opacity: 1 } }

/* --- Skeleton loading --- */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.06) 25%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.06) 75%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton { 0% { background-position: 200% 0 } 100% { background-position: -200% 0 } }
