@import url('https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800&family=Geist+Mono:wght@500;600&display=swap');
:root {
  --bg: #ffffff; --soft: #f7f7fb; --soft2: #f0f0f6; --line: #e7e7ef; --line2: #d9d9e4;
  --ink: #15151d; --ink2: #3a3a48; --muted: #6c6c7d; --dim: #9a9aab;
  --brand: #6547f0; --brand2: #4f46e5; --brand-soft: #f1edff; --brand-line: #d9d0ff;
  --grad: linear-gradient(135deg, #8b5cf6, #4f46e5);
  --rec: #f43f5e; --ok: #10b981; --warn: #f59e0b;
  --r: 12px; --shadow: 0 1px 2px rgba(20,20,40,.04), 0 4px 16px -6px rgba(20,20,40,.10);
  --shadow-lg: 0 24px 60px -20px rgba(40,30,120,.30), 0 2px 6px rgba(20,20,40,.06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 400 14px/1.5 Geist, -apple-system, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: 'Geist Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s, transform .1s, filter .15s; color: var(--ink); }
.btn:hover { background: var(--soft); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--grad); color: #fff; border-color: transparent; box-shadow: 0 6px 18px -8px rgba(101,71,240,.8), inset 0 1px 0 rgba(255,255,255,.2); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--soft2); }
.btn.danger { color: #e11d48; }
.btn.danger:hover { background: #fff1f3; border-color: #fecdd3; }
.btn.lg { height: 48px; padding: 0 22px; font-size: 15.5px; border-radius: 12px; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* forms */
.field { width: 100%; height: 42px; padding: 0 13px; border-radius: 10px; border: 1px solid var(--line2); background: #fff; outline: 0; transition: border-color .15s, box-shadow .15s; }
.field:disabled { background: var(--soft); color: var(--muted); cursor: not-allowed; }
.field:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(101,71,240,.14); }
textarea.field { height: auto; padding: 11px 13px; resize: none; }
label.lbl { display: block; font-weight: 600; font-size: 13px; margin: 0 0 6px; color: var(--ink2); }
.err { background: #fff1f3; border: 1px solid #fecdd3; color: #be123c; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; }

/* brand */
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 16.5px; letter-spacing: -.02em; color: var(--ink); }
.logo img { width: 28px; height: 28px; border-radius: 8px; box-shadow: 0 4px 12px -4px rgba(101,71,240,.6); }
.logo small { font: 600 10.5px 'Geist Mono', monospace; color: var(--brand); background: var(--brand-soft); border: 1px solid var(--brand-line); padding: 2px 7px; border-radius: 99px; letter-spacing: .04em; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; font-size: 13px; flex: 0 0 auto; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; }
.avatar.lg { width: 44px; height: 44px; font-size: 17px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 24px); opacity: 0; display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 12px; background: #16161f; color: #fff; font-weight: 600; font-size: 13.5px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.45); transition: all .28s cubic-bezier(.2,.9,.3,1.2); pointer-events: none; z-index: 100; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast i { width: 18px; height: 18px; border-radius: 50%; background: var(--ok); display: grid; place-items: center; }

/* menus and modals */
.menu { position: absolute; z-index: 60; min-width: 190px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 5px; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 0; background: none; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--ink); text-align: left; }
.menu button:hover, .menu a:hover { background: var(--soft); }
.menu .sep { height: 1px; background: var(--line); margin: 5px 2px; }
.menu .danger { color: #e11d48; }
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(20,18,40,.38); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fade .18s; }
.modal { width: 100%; max-width: 480px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 22px; animation: pop .25s cubic-bezier(.2,.9,.3,1.2); }
.modal h3 { margin: 0 0 4px; font-size: 18px; letter-spacing: -.02em; }
.modal p { margin: 0 0 16px; color: var(--muted); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
