/* ============================================================
   GLOBAL — variables, reset, layout, shared buttons
   ============================================================ */

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

/* ── Design Tokens ──────────────────────────────────────────── */
:root {
  --teal:        #0d9488;
  --teal-dark:   #0f766e;
  --teal-light:  #5eead4;
  --teal-bg:     #f0fdfa;
  --ink:         #0f172a;
  --ink-mid:     #334155;
  --ink-soft:    #64748b;
  --surface:     #ffffff;
  --surface-2:   #f8fafc;
  --border:      #e2e8f0;
  --red:         #ef4444;
  --red-soft:    #fef2f2;
  --red-border:  #fca5a5;
  --green:       #22c55e;
  --r:           12px;
  --r-sm:        8px;
  --r-xs:        6px;
  --shadow:      0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:   0 4px 6px -1px rgba(0,0,0,.10), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-lg:   0 10px 28px rgba(0,0,0,.13);
  --ease:        all 0.2s ease;
}

/* ── Base ───────────────────────────────────────────────────── */
html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;
  background: var(--surface-2);
  color: var(--ink);
  height: 100vh;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── App Shell (sidebar + main) ─────────────────────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
}

/* ── Shared Button System ───────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--teal);
  color: white;
}
.btn-primary:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(13,148,136,.30);
}

.btn-outline {
  background: transparent;
  color: var(--teal);
  border: 1.5px solid var(--teal);
}
.btn-outline:hover { background: var(--teal-bg); }

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--ink-soft); color: var(--ink); }

.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1.5px solid var(--red-border);
}
.btn-danger:hover { background: var(--red-soft); }

.btn-sm   { padding: 7px 14px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }

/* ── Form Controls (shared across pages) ───────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 16px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .2px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: var(--ease);
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}

textarea.form-control {
  resize: vertical;
  min-height: 90px;
}

/* ── Utilities ──────────────────────────────────────────────── */
.text-muted { color: var(--ink-soft); }
.text-teal  { color: var(--teal); }
.mt-4 { margin-top: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

/* ── Section Card ───────────────────────────────────────────── */
.section-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 24px;
  margin-bottom: 20px;
}

.section-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.section-card-desc {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 20px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .page-content { padding: 20px 16px; }
}
