/* ============================================================
   HOOTIFY SHARED STYLES
   Used by all standalone pages
   ============================================================ */

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

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

:root {
  --bg: #f7f3e9;
  --surface: #efe8dd;
  --fg: #5b2c3e;
  --muted: #a88792;
  --border: #d4c4bc;
  --accent: #0f3b3a;
  --accent2: #3f6f6a;
  --accent3: #6fa7a3;
  --danger: #8b3a3a;
  --success: #5a7a4f;
  --warning: #c4925a;
  --font: 'Inter', -apple-system, sans-serif;
  --font-h: 'Playfair Display', Georgia, serif;
  --nav-w: 220px;
  --top-h: 52px;
  --r: 8px;
  --shadow: 0 2px 8px rgba(15,59,58,0.08);
}

html, body { height: 100%; font-family: var(--font); background: var(--bg); color: var(--fg); font-size: 15px; line-height: 1.6; }

/* ── Layout ── */
.app { display: flex; height: 100vh; overflow: hidden; }
.nav { width: var(--nav-w); min-width: var(--nav-w); background: var(--surface); border-right: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; }
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.topbar { height: var(--top-h); min-height: var(--top-h); background: var(--surface); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; padding: 0 20px; flex-shrink: 0; }
.content { flex: 1; overflow-y: auto; }

/* ── Nav ── */
.nav-logo { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--border); text-decoration: none; }
.nav-owl { width: 28px; height: 28px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.nav-brand { font-family: var(--font-h); font-size: 1rem; font-weight: 700; color: var(--accent); }
.nav-section { padding: 8px 8px 0; }
.nav-label { font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); padding: 8px 8px 4px; display: block; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 7px; text-decoration: none; font-size: 0.8125rem; font-weight: 500; color: var(--muted); transition: all 0.15s; margin-bottom: 1px; }
.nav-item:hover { background: rgba(15,59,58,0.06); color: var(--fg); }
.nav-item.active { background: rgba(15,59,58,0.1); color: var(--accent); }
.nav-item svg, .nav-item .icon { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }
.nav-item.active .icon { opacity: 1; }
.nav-footer { margin-top: auto; padding: 10px 8px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.nav-status { display: flex; align-items: center; gap: 6px; flex: 1; }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.nav-status-text { font-size: 0.72rem; color: var(--muted); }

/* ── Topbar ── */
.tb-breadcrumb { font-size: 0.8125rem; color: var(--muted); flex: 1; }
.tb-breadcrumb .active { color: var(--fg); font-weight: 600; }
.tb-actions { display: flex; align-items: center; gap: 8px; }
.tb-pill { display: flex; align-items: center; gap: 6px; padding: 3px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 20px; font-size: 0.75rem; text-decoration: none; color: var(--fg); transition: all 0.15s; }
.tb-pill:hover { background: var(--surface); }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 7px; font-family: var(--font); font-size: 0.875rem; font-weight: 500; cursor: pointer; border: 1px solid transparent; transition: all 0.15s; text-decoration: none; line-height: 1.4; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #f7f3e9; border-color: var(--accent); }
.btn-primary:hover:not(:disabled) { background: #1a5550; }
.btn-secondary { background: var(--surface); color: var(--fg); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--border); }
.btn-ghost { background: transparent; color: var(--fg); }
.btn-ghost:hover:not(:disabled) { background: var(--surface); }
.btn-sm { padding: 4px 10px; font-size: 0.8rem; }
.btn-icon { padding: 6px; aspect-ratio: 1; justify-content: center; }

/* ── Forms ── */
.input, .textarea, .select { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 0.9rem; outline: none; transition: border-color 0.15s, box-shadow 0.15s; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent2); box-shadow: 0 0 0 3px rgba(63,111,106,0.12); }
.textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.label { display: block; font-size: 0.8125rem; font-weight: 500; margin-bottom: 4px; }
.form-group { margin-bottom: 16px; }

/* ── Cards ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; }
.badge-accent { background: rgba(15,59,58,0.1); color: var(--accent); }
.badge-success { background: rgba(90,122,79,0.12); color: var(--success); }
.badge-warning { background: rgba(196,146,90,0.15); color: var(--warning); }
.badge-danger { background: rgba(139,58,58,0.12); color: var(--danger); }
.badge-muted { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }

/* ── Toast ── */
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 999; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); font-size: 0.875rem; pointer-events: all; animation: slideUp 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(--accent2); }
@keyframes slideUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

/* ── Responsive ── */
@media(max-width:768px) {
  .nav { display: none; }
  .nav.open { display: flex; position: fixed; inset: 0 auto 0 0; z-index: 100; }
}

/* ── Utilities ── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--muted); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.mb-4 { margin-bottom: 16px; }
.mt-4 { margin-top: 16px; }
.ml-auto { margin-left: auto; }
.border-b { border-bottom: 1px solid var(--border); }
.bg-surface { background: var(--surface); }
.rounded { border-radius: var(--r); }
.shadow { box-shadow: var(--shadow); }
.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }