/* LAMJA Studio — private dashboard (2101 design) */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/assets/fonts/Inter-Regular.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("/assets/fonts/Inter-Medium.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/assets/fonts/Inter-SemiBold.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("/assets/fonts/Inter-Bold.woff") format("woff"); }
@font-face { font-family: "Inter"; font-weight: 800; font-display: swap; src: url("/assets/fonts/Inter-ExtraBold.woff") format("woff"); }

:root {
  --ink: #030203; --text: #f2efe8; --dim: #b8b0a0; --faint: #7d7566;
  --gold1: #fff6dc; --gold2: #f2d27e; --gold3: #c9952e; --gold4: #7a520e;
  --rose2: #ff6b9a; --rose3: #e0336e; --green: #46e18c;
  --gold-metal: linear-gradient(180deg, #fffaf0 0%, #f2d27e 22%, #c9952e 44%, #7a520e 54%, #ecc76c 68%, #fff1c4 84%, #b5852a 100%);
  --gold-btn: linear-gradient(180deg, rgba(255,255,255,.6), rgba(255,255,255,0) 50%), linear-gradient(160deg, #fff1c2, #f2d27e 35%, #c9952e 65%, #f3d68a);
  --glass: linear-gradient(145deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.03) 50%, rgba(255,255,255,.05) 100%);
  --edge: rgba(255,236,190,.14);
  --shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 24px 50px -18px rgba(0,0,0,.9);
  --blur: blur(22px) saturate(160%);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--ink); color: var(--text); font-size: 14.5px; line-height: 1.55; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: var(--gold2); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
::selection { background: rgba(242,210,126,.35); }
:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

.bg { position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(800px 600px at 85% 0%, rgba(176,18,74,.16), transparent 60%),
              radial-gradient(900px 600px at 0% 100%, rgba(201,149,46,.13), transparent 60%),
              radial-gradient(500px 400px at 50% 50%, rgba(70,225,140,.035), transparent 70%), var(--ink); }
#motes { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

.glass { background: var(--glass); border: 1px solid var(--edge); border-radius: 22px; box-shadow: var(--shadow);
  backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); position: relative; }

/* ---------- logo ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.logo-badge { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; position: relative; flex: none;
  background: radial-gradient(circle at 30% 20%, rgba(255,246,220,.18), rgba(255,255,255,.02) 60%); border: 1px solid rgba(255,236,190,.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 8px 24px -8px rgba(201,149,46,.5); overflow: hidden; }
.logo-badge svg { width: 30px; height: auto; }
.logo-badge .spark { display: none; }
.brand b { font-weight: 800; letter-spacing: .18em; font-size: 13px; background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { display: block; font-family: var(--mono); font-size: 10px; letter-spacing: .2em; color: var(--faint); text-transform: uppercase; }

/* ---------- auth screens ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(440px, 100%); padding: 34px 30px; }
.auth-card .brand { margin-bottom: 26px; }
.auth-card h1 { font-size: 26px; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-card p.sub { color: var(--dim); margin-bottom: 22px; }
.step { display: flex; gap: 10px; align-items: flex-start; color: var(--dim); font-size: 13.5px; margin: 14px 0 10px; }
.step i { font-style: normal; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #1a1205; background: var(--gold-btn); }
.qr { width: 196px; height: 196px; margin: 8px auto 10px; padding: 12px; background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px rgba(242,210,126,.5), 0 20px 50px -20px rgba(242,210,126,.6); }
.qr svg { width: 100%; height: 100%; }
.key { font-family: var(--mono); font-size: 12px; text-align: center; letter-spacing: .08em; color: var(--gold2); word-break: break-all; margin-bottom: 6px; user-select: all; }

/* ---------- form fields ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--dim); letter-spacing: .02em; }
.input, .field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 13px; border: 1px solid rgba(255,236,190,.14);
  background: rgba(0,0,0,.35); color: var(--text); outline: none; transition: border-color .2s, box-shadow .2s; }
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: rgba(242,210,126,.55); box-shadow: 0 0 0 4px rgba(242,210,126,.08); }
.code-input { font-family: var(--mono); font-size: 26px !important; letter-spacing: .5em; text-align: center; padding: 14px !important; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; color: var(--dim); font-size: 13px; }
.toggle input { appearance: none; width: 40px; height: 22px; border-radius: 99px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); position: relative; transition: background .2s; cursor: pointer; flex: none; }
.toggle input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #ddd; transition: transform .25s cubic-bezier(.3,1.4,.5,1), background .2s; }
.toggle input:checked { background: rgba(242,210,126,.35); border-color: rgba(242,210,126,.6); }
.toggle input:checked::after { transform: translateX(18px); background: var(--gold2); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 99px; font-weight: 600; font-size: 13.5px;
  transition: transform .2s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn svg { width: 16px; height: 16px; }
.btn-gold { background: var(--gold-btn); color: #1a1205; box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 10px 26px -10px rgba(242,210,126,.7); }
.btn-gold:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 14px 32px -10px rgba(242,210,126,.9); }
.btn-ghost { border: 1px solid rgba(255,236,190,.2); background: rgba(255,255,255,.04); }
.btn-ghost:hover { background: rgba(255,255,255,.08); border-color: rgba(255,236,190,.35); }
.btn-danger { border: 1px solid rgba(255,107,154,.3); color: #ffb3c9; background: rgba(224,51,110,.08); }
.btn-danger:hover { background: rgba(224,51,110,.18); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }
.btn-block { width: 100%; padding: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: var(--dim); border: 1px solid transparent; transition: .2s; }
.icon-btn:hover { color: var(--gold2); background: rgba(255,255,255,.05); border-color: rgba(255,236,190,.15); }
.icon-btn svg { width: 17px; height: 17px; }
.msg { min-height: 20px; font-size: 13px; margin-top: 10px; text-align: center; }
.msg.err { color: #ff9fbd; } .msg.ok { color: var(--green); }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 18px 14px; display: flex; flex-direction: column; gap: 22px;
  border-right: 1px solid rgba(255,236,190,.08); background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); backdrop-filter: var(--blur); }
.side .brand { padding: 6px 8px; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav button { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 13px; color: var(--dim); font-weight: 500; text-align: left; position: relative; transition: .2s; }
.nav button svg { width: 18px; height: 18px; flex: none; }
.nav button:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav button.on { color: var(--gold1); background: linear-gradient(90deg, rgba(242,210,126,.16), rgba(242,210,126,.03)); box-shadow: inset 0 0 0 1px rgba(242,210,126,.2); }
.nav button.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 3px; background: var(--gold-btn); box-shadow: 0 0 12px var(--gold2); }
.nav .pill { margin-left: auto; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; background: var(--rose3); color: #fff; box-shadow: 0 0 12px rgba(224,51,110,.6); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--faint); padding: 0 8px; }
.side-foot a { color: var(--dim); }

.main { padding: 28px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.top h1 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.03em; }
.top h1 span { background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top p { color: var(--dim); font-size: 13.5px; }
.top-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.view { animation: viewIn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- overview ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { padding: 18px 18px 16px; overflow: hidden; }
.stat::after { content: ""; position: absolute; inset: auto -40% -60% auto; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, var(--c, rgba(242,210,126,.22)), transparent 70%); pointer-events: none; }
.stat .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 14px; color: var(--cc, var(--gold2)); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.stat .ic svg { width: 17px; height: 17px; }
.stat b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; background: var(--gold-metal); -webkit-background-clip: text; background-clip: text; color: transparent; font-variant-numeric: tabular-nums; }
.stat small { color: var(--dim); font-size: 12.5px; }
.stat.rose { --c: rgba(224,51,110,.3); --cc: var(--rose2); }
.stat.green { --c: rgba(70,225,140,.22); --cc: var(--green); }
.grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; }
.panel { padding: 20px; }
.panel h3 { font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.panel h3 small { color: var(--faint); font-weight: 500; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; }
.chart { width: 100%; height: 150px; }
.empty { color: var(--faint); text-align: center; padding: 26px 10px; font-size: 13px; }
.empty svg { width: 28px; height: 28px; margin: 0 auto 8px; opacity: .5; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13px; }
.bar-row .track { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: rgba(255,255,255,.06); overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--rose3), var(--gold2)); width: 0; transition: width 1s cubic-bezier(.2,.8,.2,1); }

/* ---------- lists ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 7px 13px; border-radius: 99px; font-size: 12.5px; color: var(--dim); border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.03); transition: .2s; }
.chip:hover { color: var(--text); }
.chip.on { color: #1a1205; background: var(--gold-btn); border-color: transparent; font-weight: 600; }
.list { display: flex; flex-direction: column; gap: 10px; }
.item { padding: 15px 16px; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; transition: border-color .2s; }
.item:hover { border-color: rgba(255,236,190,.26); }
.item.unread { border-color: rgba(242,210,126,.35); }
.item .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; background: transparent; border: 1px solid rgba(255,255,255,.25); }
.item.unread .dot { background: var(--gold2); border-color: var(--gold2); box-shadow: 0 0 10px var(--gold2); }
.item h4 { font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.item .meta { color: var(--faint); font-size: 12px; font-family: var(--mono); }
.item .text { color: var(--dim); font-size: 13.5px; margin-top: 6px; white-space: pre-wrap; word-break: break-word; }
.item .acts { display: flex; gap: 4px; }
.tag { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: rgba(255,255,255,.07); color: var(--dim); }
.tag.bug { background: rgba(224,51,110,.18); color: #ffb3c9; }
.tag.feedback { background: rgba(70,225,140,.14); color: #a8f5cb; }
.tag.contact, .tag.support { background: rgba(242,210,126,.15); color: var(--gold2); }
.tag.done, .tag.live { background: rgba(70,225,140,.14); color: #a8f5cb; }
.tag.progress, .tag.beta { background: rgba(242,210,126,.15); color: var(--gold2); }
.tag.planned, .tag.soon { background: rgba(255,255,255,.07); color: var(--dim); }
.tag.hidden { background: rgba(224,51,110,.12); color: #ffb3c9; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 500; color: var(--faint); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.tbl td { padding: 11px 12px; border-bottom: 1px solid rgba(255,255,255,.05); }
.tbl tr:hover td { background: rgba(255,255,255,.02); }
.tbl-wrap { overflow-x: auto; }

/* ---------- editor modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: rgba(3,2,3,.65); backdrop-filter: blur(6px); animation: fade .25s; }
.modal .glass { width: min(640px, 100%); max-height: calc(100vh - 36px); overflow: auto; padding: 24px; animation: pop .35s cubic-bezier(.2,.9,.3,1.2); }
.modal h2 { font-size: 20px; margin-bottom: 16px; }
.modal-acts { display: flex; gap: 8px; justify-content: space-between; margin-top: 8px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(10px); } }
.hint { font-size: 12px; color: var(--faint); margin-top: -6px; margin-bottom: 12px; }
.hint code, code.c { font-family: var(--mono); color: var(--gold2); background: rgba(242,210,126,.08); padding: 2px 6px; border-radius: 6px; font-size: 11.5px; word-break: break-all; }

.app-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.app-card .head { display: flex; align-items: center; gap: 12px; }
.app-card .head .ai { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff;
  background: radial-gradient(circle at 30% 20%, #ff9cbc, #e0336e 55%, #6b0f32); box-shadow: 0 10px 24px -10px rgba(224,51,110,.8); }
.app-card .head .ai svg { width: 22px; height: 22px; }
.app-card h4 { font-size: 17px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12.5px; }
.kv span { color: var(--faint); } .kv b { font-weight: 500; color: var(--dim); word-break: break-all; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 80; padding: 12px 20px; border-radius: 99px;
  background: rgba(20,14,10,.9); border: 1px solid rgba(242,210,126,.35); color: var(--gold1); font-size: 13.5px; transition: .35s cubic-bezier(.2,.9,.3,1.2); pointer-events: none; backdrop-filter: blur(10px); }
.toast.show { opacity: 1; transform: translateX(-50%); }

.skeleton { height: 70px; border-radius: 18px; background: linear-gradient(90deg, rgba(255,255,255,.03), rgba(255,255,255,.07), rgba(255,255,255,.03)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; gap: 10px; border-right: 0; border-bottom: 1px solid rgba(255,236,190,.08); background: rgba(8,5,6,.82); }
  .side .brand > div { display: none; }
  .nav { flex-direction: row; overflow-x: auto; scrollbar-width: none; flex: 1; }
  .nav::-webkit-scrollbar { display: none; }
  .nav button { padding: 9px 11px; white-space: nowrap; font-size: 13px; }
  .nav button span.lbl { display: none; }
  .nav button.on span.lbl { display: inline; }
  .nav button.on::before { display: none; }
  .side-foot { display: none; }
  .grid2, .row2, .row3 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat b { font-size: 28px; }
  .item { grid-template-columns: auto 1fr; }
  .item .acts { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* polish */
.empty svg { display: block; }
@media (min-width: 1100px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.modal .glass { background: linear-gradient(145deg, rgba(30,22,18,.96), rgba(12,8,9,.97)); }
