/* Deep's Guitar Academy — tokens + shared components (public + admin) */
:root, :root[data-theme="dark"] {
  --bg: #0b0b0c; --bg-2: #111113; --card: #151517; --card-2: #1b1b1e; --elev: #202024;
  --text: #f5f1e8; --text-2: #cfc9bf; --muted: #a39d93; --line: rgba(255,255,255,.10); --line-2: rgba(255,255,255,.18);
  --gold: #d6a85b; --gold-2: #f0cf91; --gold-ink: #f0cf91; --on-gold: #0d0d0d; --gold-soft: rgba(214,168,91,.14);
  --ok: #4ade80; --ok-soft: rgba(74,222,128,.14); --err: #f87171; --err-soft: rgba(248,113,113,.14);
  --warn: #fbbf24; --warn-soft: rgba(251,191,36,.14); --info: #60a5fa; --info-soft: rgba(96,165,250,.14);
  --shadow: 0 18px 50px rgba(0,0,0,.45); --shadow-sm: 0 4px 16px rgba(0,0,0,.35);
  --overlay: rgba(0,0,0,.66); --nav-bg: rgba(11,11,12,.78); --input-bg: #0f0f11;
  --radius: 16px; --radius-sm: 10px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #faf8f4; --bg-2: #f3efe7; --card: #ffffff; --card-2: #f8f5ef; --elev: #ffffff;
  --text: #17150f; --text-2: #3a352c; --muted: #6b6457; --line: rgba(23,21,15,.10); --line-2: rgba(23,21,15,.2);
  --gold: #c08f3e; --gold-2: #d6a85b; --gold-ink: #7a5718; --on-gold: #0d0d0d; --gold-soft: rgba(192,143,62,.13);
  --ok: #15803d; --ok-soft: rgba(21,128,61,.10); --err: #b91c1c; --err-soft: rgba(185,28,28,.09);
  --warn: #a16207; --warn-soft: rgba(161,98,7,.11); --info: #1d4ed8; --info-soft: rgba(29,78,216,.09);
  --shadow: 0 18px 50px rgba(60,45,20,.13); --shadow-sm: 0 4px 16px rgba(60,45,20,.09);
  --overlay: rgba(23,21,15,.45); --nav-bg: rgba(250,248,244,.86); --input-bg: #ffffff;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6; transition: background .25s, color .25s; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.gold { color: var(--gold-ink); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 22px; border-radius: 999px;
  border: 1px solid transparent; font-weight: 700; font-size: 15px; cursor: pointer; transition: transform .15s, background .2s, border-color .2s, opacity .2s;
  white-space: nowrap; text-align: center; line-height: 1.2; background: none; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled, .btn.is-busy, .btn[aria-disabled="true"] { opacity: .75; cursor: progress; transform: none; pointer-events: none; }
.btn-primary { background: var(--gold); color: var(--on-gold); }
.btn-primary:hover { background: var(--gold-2); }
.btn-ghost { border-color: var(--line-2); background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--gold-soft); border-color: var(--gold); }
.btn-danger { background: var(--err); color: #fff; }
.btn-ok { background: var(--ok); color: #0d0d0d; }
.btn-sm { min-height: 36px; padding: 7px 14px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn-wa { background: #25d366; color: #0d0d0d; }
.spin { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > label, .lbl { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.field .req { color: var(--err); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--input-bg); color: var(--text); font-size: 16px; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.is-invalid { border-color: var(--err) !important; border-left-width: 4px !important; }
.field-err { color: var(--err); font-size: 13px; font-weight: 600; }
.hint { font-size: 12.5px; color: var(--muted); }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--gold); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* dialogs */
body.dlg-open { overflow: hidden; }
.dlg-overlay { position: fixed; inset: 0; z-index: 1000; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 16px; opacity: 0; transition: opacity .18s; backdrop-filter: blur(4px); }
.dlg-overlay.in { opacity: 1; }
.dlg { width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow: auto; background: var(--elev); color: var(--text); border: 1px solid var(--line-2); border-radius: 20px; padding: 26px 24px 20px;
  box-shadow: var(--shadow); transform: translateY(12px) scale(.97); transition: transform .2s; text-align: center; }
.dlg-overlay.in .dlg { transform: none; }
.dlg-icon { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 24px; font-weight: 800; background: var(--gold-soft); color: var(--gold-ink); }
.dlg-success .dlg-icon { background: var(--ok-soft); color: var(--ok); }
.dlg-error .dlg-icon, .dlg-warn .dlg-icon { background: var(--err-soft); color: var(--err); }
.dlg-title { font-family: var(--serif); font-size: 23px; margin-bottom: 8px; }
.dlg-body { color: var(--text-2); font-size: 15px; margin: 0 0 18px; text-align: center; overflow-wrap: anywhere; }
.dlg-body .kv { text-align: left; }
.dlg-input { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--input-bg); color: var(--text); font-size: 16px; margin-bottom: 16px; resize: vertical; }
.dlg-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dlg-actions .btn { min-width: 120px; flex: 1 1 auto; }

/* toast */
.toast-wrap { position: fixed; z-index: 1100; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--elev); color: var(--text); border: 1px solid var(--line-2); border-left: 4px solid var(--ok); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow-sm); font-weight: 600; font-size: 14px; animation: tin .25s; transition: opacity .3s, transform .3s; }
.toast-err { border-left-color: var(--err); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* chips / badges */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .02em; background: var(--gold-soft); color: var(--gold-ink); white-space: nowrap; }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-err { background: var(--err-soft); color: var(--err); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-info { background: var(--info-soft); color: var(--info); }
.chip-mute { background: var(--line); color: var(--muted); }

/* theme toggle */
.theme-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--text); flex: none; }
.theme-btn:hover { border-color: var(--gold); color: var(--gold-ink); }
.theme-btn .i-sun { display: none; } .theme-btn .i-moon { display: block; }
[data-theme="dark"] .theme-btn .i-sun { display: block; } [data-theme="dark"] .theme-btn .i-moon { display: none; }
.stars { color: #f5b301; letter-spacing: 2px; }
