/* ── Reset & tokens ────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --cream:    #fdf8f2;
  --cream2:   #f5ebe0;
  --cream3:   #ede0ce;
  --espresso: #1c0f06;
  --coffee:   #3b1f0c;
  --caramel:  #b5622a;
  --caramel-l:#e8a96a;
  --text:     #2d1a0a;
  --text2:    #7a5c44;
  --text3:    #b09070;
  --border:   #e4d0b8;
  --white:    #fff;
  --shadow:   0 2px 16px rgba(44,14,0,.09);
  --shadow-lg:0 8px 40px rgba(44,14,0,.14);
  --radius:   10px;
  --radius-lg:18px;
}
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--cream); color: var(--text); font-size: 15px; line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; outline: none; font-family: inherit; }
input, select, textarea { font-family: inherit; outline: none; }
img { display: block; max-width: 100%; }

/* ── Typography ─────────────────────────────────────────────────────────────── */
h1,h2,h3,h4 { font-family: 'Playfair Display', Georgia, serif; line-height: 1.15; color: var(--espresso); }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.header { background: var(--espresso); position: sticky; top: 0; z-index: 400; }
.header-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 36px; height: 36px; background: var(--caramel); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.logo-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.logo-name { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--white); letter-spacing: -.5px; }
.logo-name span { color: var(--caramel-l); }
.header-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link { color: rgba(255,255,255,.65); font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 6px; transition: all .15s; white-space: nowrap; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-link.active { color: var(--caramel-l); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.btn-login { background: var(--caramel); color: #fff; padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 700; transition: background .15s; }
.btn-login:hover { background: #9e5423; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--caramel); cursor: pointer; }
.user-menu-wrap { position: relative; }
.user-dropdown { display: none; position: absolute; top: calc(100% + 8px); right: 0; background: var(--espresso); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); min-width: 180px; overflow: hidden; box-shadow: var(--shadow-lg); z-index: 500; }
.user-menu-wrap:hover .user-dropdown,
.user-menu-wrap.open .user-dropdown { display: block; }
.user-dropdown a, .user-dropdown button { display: block; width: 100%; padding: 12px 18px; color: rgba(255,255,255,.75); font-size: 13px; font-weight: 600; text-align: left; background: none; transition: background .15s; }
.user-dropdown a:hover, .user-dropdown button:hover { background: rgba(255,255,255,.08); color: #fff; }
.user-dropdown hr { border: none; border-top: 1px solid rgba(255,255,255,.1); margin: 4px 0; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 28px; border-radius: var(--radius); font-size: 14px; font-weight: 700; transition: all .2s; cursor: pointer; border: none; }
.btn-primary { background: var(--caramel); color: #fff; }
.btn-primary:hover { background: #9e5423; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(181,98,42,.4); }
.btn-outline { background: transparent; color: var(--caramel); border: 2px solid var(--caramel); }
.btn-outline:hover { background: var(--caramel); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; border: 1.5px solid rgba(255,255,255,.3); }
.btn-ghost:hover { background: rgba(255,255,255,.2); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }

/* ── Cards ───────────────────────────────────────────────────────────────────── */
.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }

/* ── Badge ───────────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.badge-green  { background: #d1fae5; color: #065f46; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-gray   { background: #f3f4f6; color: #374151; }

/* ── Form elements ───────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 13px; font-weight: 700; color: var(--text); }
.form-input, .form-select, .form-textarea {
  width: 100%; background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px; font-size: 14px; color: var(--text);
  transition: border .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--caramel); box-shadow: 0 0 0 3px rgba(181,98,42,.1); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 12px; color: var(--text3); }

/* ── Modal ───────────────────────────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.show { display: flex; }
.modal { background: var(--white); border-radius: var(--radius-lg); padding: 32px; width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); position: relative; max-height: 90vh; overflow-y: auto; }
.modal-title { font-size: 20px; font-weight: 800; color: var(--espresso); margin-bottom: 20px; }
.modal-close { position: absolute; top: 16px; right: 16px; background: var(--cream); border: none; border-radius: 50%; width: 32px; height: 32px; font-size: 18px; cursor: pointer; color: var(--text2); display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--cream3); }

/* ── Toast ───────────────────────────────────────────────────────────────────── */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--espresso); color: #fff; padding: 12px 24px; border-radius: 24px; font-size: 14px; font-weight: 600; z-index: 9999; pointer-events: none; opacity: 0; transition: opacity .3s; box-shadow: var(--shadow-lg); white-space: nowrap; }
#toast.show { opacity: 1; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.footer { background: var(--espresso); color: rgba(255,255,255,.55); padding: 48px 24px 32px; }
.footer-inner { max-width: 1280px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand { }
.footer-brand .logo-name { font-size: 26px; margin-bottom: 12px; display: block; }
.footer-brand p { font-size: 13px; line-height: 1.7; max-width: 260px; }
.footer-col h4 { color: #fff; font-size: 13px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13px; margin-bottom: 8px; transition: color .15s; }
.footer-col a:hover { color: var(--caramel-l); }
.footer-bottom { max-width: 1280px; margin: 32px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; align-items: center; font-size: 12px; }

/* ── Loading spinner ──────────────────────────────────────────────────────────── */
.spinner { width: 36px; height: 36px; border: 3px solid var(--cream3); border-top-color: var(--caramel); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-wrap { display: flex; justify-content: center; align-items: center; padding: 60px; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .header-nav { display: none; }
}
@media (max-width: 600px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}
