/* v1.0.0 — Λάμψη web */
:root {
  --bg: #0b0d14; --bg2: #121624; --card: #171c2c; --card2: #1e2438; --line: #2a3150;
  --text: #eef1fb; --muted: #97a0bf; --accent: #ffb547; --accent2: #ff6b9a; --ok: #3ddc97; --warn: #ffcf5a; --err: #ff6b6b; --info: #6aa8ff;
  --r: 14px; --nav: 64px; --top: 56px;
  --grad: linear-gradient(135deg, #ffb547 0%, #ff6b9a 55%, #9b7bff 100%);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
body { padding-top: var(--top); padding-bottom: calc(var(--nav) + 12px); min-height: 100vh; }
a { color: var(--info); }
h1, h2, h3 { margin: 0 0 10px; line-height: 1.2; }
h2 { font-size: 19px; } h3 { font-size: 16px; color: var(--muted); font-weight: 600; margin-top: 18px; }
small, .muted { color: var(--muted); }
.hidden { display: none !important; }

/* Top bar */
.top { position: fixed; inset: 0 0 auto 0; height: var(--top); display: flex; align-items: center; gap: 10px; padding: 0 12px; background: rgba(11,13,20,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); z-index: 20; }
.logo { font-weight: 800; font-size: 20px; letter-spacing: .3px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; white-space: nowrap; }
.top select { flex: 1; min-width: 0; max-width: 260px; margin-left: auto; }
.icon-btn { background: var(--card); border: 1px solid var(--line); color: var(--text); border-radius: 10px; height: 38px; min-width: 38px; padding: 0 10px; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.busy { font-size: 12px; color: var(--accent); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.spin { width: 14px; height: 14px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: sp .8s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }

/* Bottom nav */
.nav { position: fixed; inset: auto 0 0 0; height: var(--nav); display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(14,17,28,.97); border-top: 1px solid var(--line); z-index: 20; }
.nav button { background: none; border: 0; color: var(--muted); font-size: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.nav button b { font-size: 21px; font-weight: 400; line-height: 1; }
.nav button.on { color: var(--accent); }

main { max-width: 980px; margin: 0 auto; padding: 14px 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.card.hero { background: radial-gradient(120% 140% at 0% 0%, rgba(255,181,71,.16), transparent 50%), radial-gradient(120% 140% at 100% 0%, rgba(155,123,255,.18), transparent 55%), var(--card); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > * { min-width: 0; }
.grow { flex: 1; }
.col { display: flex; flex-direction: column; gap: 8px; }
.between { justify-content: space-between; }
.mt { margin-top: 10px; } .mb { margin-bottom: 10px; }

label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea { width: 100%; background: var(--bg2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; font: inherit; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { min-height: 84px; resize: vertical; }
input[type=checkbox] { width: auto; accent-color: var(--accent); transform: scale(1.2); margin-right: 6px; }
input[type=color] { padding: 2px; height: 40px; width: 52px; }
.check { display: flex; align-items: center; font-size: 14px; color: var(--text); margin: 8px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--card2); color: var(--text); padding: 10px 14px; border-radius: 11px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--grad); color: #1a1205; border: 0; }
.btn.ok { background: var(--ok); color: #062014; border: 0; }
.btn.danger { color: var(--err); }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--bg2); color: var(--muted); border-radius: 999px; padding: 6px 11px; font-size: 13px; cursor: pointer; user-select: none; }
.chip.on { background: rgba(255,181,71,.14); color: var(--accent); border-color: rgba(255,181,71,.6); }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: var(--card2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: rgba(61,220,151,.4); } .badge.err { color: var(--err); border-color: rgba(255,107,107,.4); }
.badge.warn { color: var(--warn); border-color: rgba(255,207,90,.4); } .badge.info { color: var(--info); border-color: rgba(106,168,255,.4); }
.badge.eco { color: #8fe3b0; } .badge.balanced { color: #9fc4ff; } .badge.premium { color: #ffb547; }

.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.item.click { cursor: pointer; }
.thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--bg2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; overflow: hidden; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.title { font-weight: 650; }
.sub { font-size: 13px; color: var(--muted); }
.clip { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--bg2); border: 2px solid transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .tag { position: absolute; left: 6px; bottom: 6px; font-size: 11px; background: rgba(0,0,0,.65); color: #fff; padding: 1px 6px; border-radius: 6px; }
.tile .fav { position: absolute; right: 6px; top: 4px; font-size: 14px; }
.tile.sel { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,181,71,.25); }
.tile .rej { position: absolute; inset: 0; background: rgba(0,0,0,.55); font-size: 12px; color: var(--warn); display: flex; align-items: center; justify-content: center; text-align: center; padding: 6px; }

.progress { height: 6px; background: var(--bg2); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--grad); }

.media { width: 100%; max-height: 62vh; object-fit: contain; border-radius: 12px; background: #000; display: block; }
.swatches { display: flex; gap: 4px; }
.sw { width: 18px; height: 18px; border-radius: 6px; border: 1px solid rgba(255,255,255,.2); }
.kv { font-size: 13px; color: var(--muted); word-break: break-word; }
.kv b { color: var(--text); font-weight: 600; }
pre.prompt { white-space: pre-wrap; background: var(--bg2); border-radius: 10px; padding: 10px; font-size: 12.5px; color: var(--muted); margin: 6px 0; max-height: 160px; overflow: auto; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.sep { height: 1px; background: var(--line); margin: 12px 0; }
.note { font-size: 13px; background: rgba(106,168,255,.08); border: 1px solid rgba(106,168,255,.25); border-radius: 10px; padding: 10px; color: #c7d8ff; }
.note.warn { background: rgba(255,207,90,.08); border-color: rgba(255,207,90,.3); color: #ffe7a6; }
.note.err { background: rgba(255,107,107,.08); border-color: rgba(255,107,107,.3); color: #ffc2c2; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(4,6,12,.72); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg2); border: 1px solid var(--line); border-radius: 18px 18px 0 0; width: 100%; max-width: 720px; max-height: 92vh; overflow: auto; padding: 16px 14px 22px; animation: up .18s ease-out; }
@keyframes up { from { transform: translateY(30px); opacity: .5; } }
@media (min-width: 760px) { .modal { align-items: center; } .sheet { border-radius: 18px; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.sheet-head h2 { margin: 0; }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav) + 14px); transform: translateX(-50%); background: #23293f; color: var(--text); border: 1px solid var(--line); padding: 10px 14px; border-radius: 12px; z-index: 80; max-width: 92vw; font-size: 14px; box-shadow: 0 6px 30px rgba(0,0,0,.4); }
.toast.err { border-color: rgba(255,107,107,.6); } .toast.ok { border-color: rgba(61,220,151,.6); }

.auth { max-width: 420px; margin: 8vh auto 0; padding: 0 14px; }
.auth .logo { font-size: 38px; display: block; text-align: center; margin-bottom: 4px; }
.seg { display: flex; flex-direction: column; gap: 6px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; }
.seg-row { display: flex; gap: 8px; align-items: center; }
