@import url("https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  --bg: #06070a;
  --bg-2: #0b0d12;
  --surface: rgba(18, 22, 30, 0.72);
  --surface-2: #141924;
  --line: rgba(120, 160, 200, 0.16);
  --line-strong: rgba(120, 220, 255, 0.38);
  --text: #e8f1f7;
  --muted: #7d8b9a;
  --cyan: #5ef2ff;
  --sand: #5ef2ff;           /* združljivost s starimi stili */
  --accent: #ff6a1a;
  --accent-2: #ffb04a;
  --accent-ink: #160700;
  --ok: #3dffa8;
  --err: #ff4d6a;
  --radius: 4px;
  --font: "Chakra Petch", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; color: var(--text); font-family: var(--font); }
html { background: var(--bg); }
body {
  min-height: 100dvh; -webkit-font-smoothing: antialiased; position: relative;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(94, 242, 255, 0.10), transparent 60%),
    radial-gradient(80% 50% at 100% 110%, rgba(255, 106, 26, 0.10), transparent 60%),
    var(--bg);
}
/* tehnična mreža */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(94, 242, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 242, 255, 0.045) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 85%);
}
body > * { position: relative; z-index: 1; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--cyan); }
img { max-width: 100%; display: block; }
code { font-family: var(--mono); color: var(--cyan); font-size: 0.85em; }
.hidden { display: none !important; }

/* ---------- oznake ---------- */
.label, label {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
label { display: block; margin: 16px 0 7px; }
.muted { color: var(--muted); }
.error { color: var(--err); min-height: 1.3em; margin-top: 12px; font-family: var(--mono); font-size: 0.8rem; }

/* ---------- gumbi ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: rgba(94, 242, 255, 0.04); cursor: pointer; text-decoration: none; color: var(--text);
  font-family: var(--mono); font-weight: 500; font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: background .2s, border-color .2s, transform .1s;
}
.btn:hover { background: rgba(94, 242, 255, 0.09); }
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary {
  background: linear-gradient(100deg, var(--accent), var(--accent-2)); color: var(--accent-ink); border-color: transparent;
  font-weight: 600; box-shadow: 0 0 0 1px rgba(255, 106, 26, 0.4), 0 10px 40px -10px rgba(255, 106, 26, 0.65);
}
.btn.primary:hover { filter: brightness(1.07); }
.btn.big { min-height: 64px; font-size: 0.95rem; width: 100%; letter-spacing: 0.18em; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 0.7rem; }
.btn.danger { color: var(--err); border-color: rgba(255, 77, 106, 0.4); background: rgba(255, 77, 106, 0.05); }
.btn.ghost { background: transparent; border-color: var(--line); }

/* ---------- polja ---------- */
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 13px 14px; border-radius: var(--radius); border: 1px solid var(--line);
  background: rgba(6, 8, 12, 0.7); outline: none; transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(94, 242, 255, 0.12); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; font-family: var(--mono); font-size: 0.8rem; }

/* ---------- znamka ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.06em; }
.brand .mark {
  width: 34px; height: 34px; border: 1px solid var(--cyan); color: var(--cyan); display: grid; place-items: center;
  font-family: var(--mono); font-size: 0.78rem; font-weight: 600; position: relative;
  box-shadow: inset 0 0 12px rgba(94, 242, 255, 0.25), 0 0 14px rgba(94, 242, 255, 0.2);
}
.brand .name { font-size: 1rem; text-transform: uppercase; }
.brand .name em { font-style: normal; color: var(--accent); }
.led { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 0.64rem; letter-spacing: 0.16em; color: var(--ok); text-transform: uppercase; }
.led::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- HUD okvir (vogalni oklepaji) ---------- */
.frame { position: relative; }
.frame::before, .frame::after {
  content: ""; position: absolute; width: 18px; height: 18px; pointer-events: none; z-index: 3;
  border-color: var(--cyan); border-style: solid; filter: drop-shadow(0 0 4px rgba(94, 242, 255, 0.7));
}
.frame::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.frame::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}

/* ---------- obvestila ---------- */
.toast {
  position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top)); transform: translateX(-50%);
  background: rgba(11, 14, 20, 0.95); border: 1px solid var(--line-strong); padding: 12px 16px; border-radius: var(--radius);
  z-index: 50; max-width: calc(100% - 32px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 24px rgba(94, 242, 255, 0.12);
  font-family: var(--mono); font-size: 0.8rem; line-height: 1.45; animation: drop .25s ease-out;
}
.toast.err { border-color: var(--err); box-shadow: 0 0 24px rgba(255, 77, 106, 0.2); }
@keyframes drop { from { opacity: 0; transform: translate(-50%, -8px); } }

.spinner {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(94, 242, 255, 0.15); border-top-color: var(--cyan);
  animation: spin 0.9s linear infinite; box-shadow: 0 0 16px rgba(94, 242, 255, 0.25);
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
