/* Loudy - vizuelni sistem. Radius 6px, mekana paleta, bez teških senki. */

:root {
  color-scheme: light dark;

  --bg: #e8eaec;
  --bg-accent: #dcdfe3;
  --surface: #ffffff;
  --surface-soft: #f4f5f7;
  --border: #d5d9de;
  --border-strong: #c2c7ce;

  --text: #14181c;
  --text-muted: #5e6771;

  --accent: #00a651;
  --accent-hover: #008c44;
  --accent-light: #2fd671;
  --accent-soft: #dff5e8;
  --accent-contrast: #ffffff;

  --success: #00a651;
  --success-soft: #dff5e8;
  --warn: #b8730a;
  --warn-soft: #fbeed7;
  --danger: #cc2f38;
  --danger-soft: #fbe6e7;

  --radius: 6px;
  --shadow: 0 1px 2px rgba(20, 24, 28, 0.06), 0 8px 24px rgba(20, 24, 28, 0.06);
  --grain-opacity: 0.16;
  --font: ui-monospace, "JetBrains Mono", "SFMono-Regular", "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;
  --mono: var(--font);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --bg-accent: #1b1f23;
    --surface: #1c2126;
    --surface-soft: #22282e;
    --border: #2c333a;
    --border-strong: #3a424a;

    --text: #eef1f4;
    --text-muted: #96a0aa;

    --accent: #22c55e;
    --accent-hover: #34d76e;
    --accent-light: #5cf0a0;
    --accent-soft: #14301f;
    --accent-contrast: #0b1410;

    --success: #22c55e;
    --success-soft: #14301f;
    --warn: #e5a23c;
    --warn-soft: #2c2214;
    --danger: #ff6b73;
    --danger-soft: #2e1618;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 10px 28px rgba(0, 0, 0, 0.3);
    --grain-opacity: 0.22;
  }
}

* {
  box-sizing: border-box;
}

/* Klase postavljaju display, pa bi bez ovoga hidden atribut bio bez efekta. */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}

h1,
h2 {
  margin: 0;
  letter-spacing: -0.015em;
}

a {
  color: var(--accent);
}

/* ---------- Pozadina: fini animirani grain ---------- */

body::before {
  content: "";
  position: fixed;
  top: -60%;
  left: -60%;
  width: 220%;
  height: 220%;
  pointer-events: none;
  z-index: 0;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='260' height='260' filter='url(%23n)' opacity='0.55'/></svg>");
  background-size: 260px 260px;
  animation: grain-shift 900ms steps(1) infinite;
  will-change: transform;
}

@keyframes grain-shift {
  0%   { transform: translate3d(0, 0, 0); }
  12%  { transform: translate3d(-3%, 2%, 0); }
  25%  { transform: translate3d(2%, -4%, 0); }
  37%  { transform: translate3d(-5%, -2%, 0); }
  50%  { transform: translate3d(4%, 3%, 0); }
  62%  { transform: translate3d(-2%, 5%, 0); }
  75%  { transform: translate3d(3%, -3%, 0); }
  87%  { transform: translate3d(-4%, 1%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* Sloj 3: blago zeleno svetlo iza sadržaja. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 45% at 12% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(50% 40% at 100% 12%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 72%);
  animation: glow-drift 16s ease-in-out infinite alternate;
}

@keyframes glow-drift {
  0% { opacity: 0.6; transform: translate3d(0, 0, 0); }
  100% { opacity: 1; transform: translate3d(0, 1.5%, 0); }
}

@media (prefers-reduced-motion: reduce) {
  body::before,
  body::after {
    animation: none;
  }
}

.shell,
.auth,
.marketing {
  position: relative;
  z-index: 1;
}

/* ---------- Brend ---------- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.brand--center {
  justify-content: center;
  width: 100%;
  margin-bottom: 22px;
}

.brand__mark {
  width: 22px;
  height: 22px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), #7ce8a4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.brand__name {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}

/* ---------- Layout ---------- */

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__user {
  font-size: 13px;
  color: var(--text-muted);
}

.app {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  display: inline-block;
  vertical-align: middle;
}

/* ---------- Kartice ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card__head h2 {
  font-size: 14px;
  font-weight: 600;
}

/* ---------- Potrošnja (traka u meniju) ---------- */

.usage {
  padding: 2px 2px 4px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.usage__text {
  margin: 0;
  font-size: 9.5px;
  line-height: 1.3;
  color: var(--text-muted);
  opacity: 0.7;
  text-align: center;
  letter-spacing: 0.01em;
}

.usage__bar {
  /* box-sizing: border-box je globalan, pa 7px ukljucuje i ivicu -> 5px popune */
  height: 7px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-accent);
  overflow: hidden;
}

.usage__fill {
  height: 100%;
  border-radius: var(--radius);
  background: var(--accent);
  transition: width 0.3s ease;
}

.usage[data-level="warn"] .usage__fill {
  background: var(--warn);
}

.usage[data-level="full"] .usage__fill {
  background: var(--danger);
}

/* ---------- Forma ---------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field--inline {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.field--inline select {
  flex: 1;
  min-width: 0;
  max-width: 300px;
  text-overflow: ellipsis;
}

.field__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

label {
  font-size: 13px;
  font-weight: 500;
}

.field__link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: none;
}

.field__link:hover {
  color: var(--accent);
}

.hint,
.counter {
  font-size: 12px;
  color: var(--text-muted);
}

.hint {
  margin: 0;
}

.counter {
  font-variant-numeric: tabular-nums;
}

textarea,
select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"] {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea {
  resize: vertical;
  min-height: 130px;
  line-height: 1.6;
}

textarea:focus,
select:focus,
input:focus,
button:focus-visible,
a:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

select:disabled,
textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.composer {
  padding: 0;
  gap: 0;
  box-shadow: none;
}

.composer__editor {
  gap: 0;
}

.composer__editor .field__head {
  padding: 15px 17px 9px;
}

.composer__editor .field__head label {
  font-size: 12px;
}

.composer__editor .counter {
  font-size: 10.5px;
}

.composer__editor textarea {
  min-height: 152px;
  padding: 4px 17px 17px;
  border: 0;
  border-radius: 0;
  background: transparent;
  line-height: 1.65;
}

.composer__editor textarea:focus {
  border-color: transparent;
  background: color-mix(in srgb, var(--surface-soft) 45%, transparent);
  box-shadow: none;
}

.composer__editor > .hint {
  margin: 0;
  padding: 0 17px 12px;
}

.composer__bottom {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-soft) 55%, var(--surface));
}

.composer__options {
  display: grid;
  grid-template-columns: 190px 140px minmax(210px, 1fr);
  align-items: end;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.composer__options .field--inline {
  align-items: stretch;
  flex: none;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.composer__options label {
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.composer__options select {
  width: 100%;
  max-width: none;
  min-height: 34px;
  padding: 6px 32px 6px 10px;
  font-size: 13px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b98a5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
}

.composer__language {
  min-width: 0;
}

.composer__model {
  min-width: 0;
}

.composer__model--locked {
  position: relative;
  cursor: help;
}

.composer__model--locked::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  z-index: 20;
  width: max-content;
  max-width: 250px;
  padding: 7px 9px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 3px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.composer__model--locked:hover::after,
.composer__model--locked:focus-within::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.composer__model--locked select:disabled {
  border-color: var(--accent);
  background-color: var(--accent-soft);
  color: var(--text);
  cursor: help;
  opacity: 1;
}

.composer__voice {
  min-width: 0;
}

.composer__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.composer__actions .button {
  min-height: 34px;
  white-space: nowrap;
}

.composer > .status {
  min-height: 0;
  padding: 8px 16px;
  border-top: 1px solid var(--border);
}

.composer > .status:empty {
  display: none;
}

/* ---------- Dugmad ---------- */

.button {
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--bg-accent);
}

.button--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}

.button--primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.button--soft {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

.button--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  padding: 6px 10px;
}

.button--ghost:hover {
  color: var(--text);
  background: var(--bg-accent);
}

.button--block {
  width: 100%;
  text-align: center;
  padding: 11px 16px;
}

.button:disabled {
  opacity: 0.55;
  cursor: progress;
}

.icon-button {
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.icon-button:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.icon-button--danger:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-soft);
}

/* ---------- Status i baneri ---------- */

.status {
  margin: 0;
  font-size: 12px;
  min-height: 18px;
  color: var(--text-muted);
}

.status[data-tone="error"] {
  color: var(--danger);
}

.status[data-tone="done"] {
  color: var(--success);
}

.status[data-tone="busy"]::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 1; }
}

.banner {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
}

.banner--error {
  border-left-color: var(--danger);
  background: var(--danger-soft);
  border-color: transparent;
}

.banner--error strong {
  color: var(--danger);
}

.banner--warn {
  border-left-color: var(--warn);
  background: var(--warn-soft);
  border-color: transparent;
}

.banner--warn strong {
  color: var(--warn);
}

.banner--info {
  border-left-color: var(--success);
  background: var(--success-soft);
  border-color: transparent;
}

/* ---------- Plejer i lista snimaka ---------- */

.player audio {
  display: none;
}

.player__ui {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.player__play {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-contrast);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.player__play:hover {
  background: var(--accent-hover);
}

.player__play:active {
  transform: scale(0.95);
}

.player__track {
  position: relative;
  flex: 1;
  height: 6px;
  border-radius: var(--radius);
  background: var(--bg-accent);
  cursor: pointer;
  touch-action: none;
}

.player__track:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.player__progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: var(--radius);
  background: var(--accent);
}

.player__thumb {
  display: none;
}

.player__time {
  flex: none;
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.clips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.clip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.clip:first-child {
  border-top: none;
  padding-top: 0;
}

.clip__main {
  min-width: 0;
}

.clip__text {
  margin: 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clip__meta {
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-muted);
}

.clip__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.clip__expired {
  font-size: 12px;
  color: var(--text-muted);
  padding: 5px 8px;
}

.empty {
  margin: 0;
  padding: 18px 0 4px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ---------- Prijava ---------- */

.body--auth {
  background: linear-gradient(180deg, var(--bg-accent), var(--bg) 55%);
}

.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.auth__card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 26px;
}

.auth__title {
  font-size: 19px;
  font-weight: 600;
  text-align: center;
}

.auth__subtitle {
  margin: 6px 0 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.auth__switch {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth .banner {
  margin-bottom: 4px;
}

.error-view {
  max-width: 450px;
  padding: 30px;
  text-align: center;
}

.error-view__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 34px;
  margin-bottom: 14px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border));
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
}

.error-view__eyebrow {
  margin: 0 0 3px;
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.error-view__title {
  font-size: 20px;
}

.error-view__message {
  margin: 8px 0 18px;
  color: var(--text-muted);
  font-size: 13px;
}

.error-view__reference {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 10.5px;
  text-align: left;
}

.error-view__reference code {
  overflow: hidden;
  color: var(--text);
  font: 10.5px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .topbar {
    padding: 12px 16px;
  }

  .app {
    padding: 20px 14px 48px;
  }

  .clip {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

/* ---------- Cene ---------- */

.body--marketing {
  background: linear-gradient(180deg, var(--bg-accent), var(--bg) 45%);
}

.marketing {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.marketing__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.marketing__nav .brand {
  text-decoration: none;
  color: inherit;
}

.marketing__links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.marketing__main {
  flex: 1;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 44px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.marketing__hero {
  text-align: center;
}

.marketing__hero h1 {
  font-size: 30px;
  font-weight: 650;
}

.marketing__hero p {
  margin: 10px auto 0;
  max-width: 520px;
  color: var(--text-muted);
  font-size: 15px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  align-items: start;
}

.plan {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.plan--highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}

.plan[data-current="true"] {
  border-color: var(--accent);
}

.plan__badge {
  position: absolute;
  top: -10px;
  right: 18px;
  padding: 3px 9px;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.plan__name {
  font-size: 17px;
  font-weight: 650;
}

.plan__tagline {
  margin: -8px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.plan__pricing {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.plan__price {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.plan__period {
  font-size: 13px;
  color: var(--text-muted);
}

.plan__features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
  font-size: 13.5px;
}

.plan__features li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  line-height: 1.45;
}

.plan__features li .icon {
  margin-top: 2px;
  color: var(--accent);
}

.faq {
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

.faq h2 {
  font-size: 17px;
  font-weight: 650;
  margin-bottom: 14px;
}

.faq dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

.faq dt {
  font-size: 14px;
  font-weight: 600;
}

.faq dd {
  margin: 3px 0 0;
  font-size: 13.5px;
  color: var(--text-muted);
}

/* ---------- Meni naloga ---------- */

.topbar .brand,
.marketing__nav .brand {
  text-decoration: none;
  color: inherit;
}

.menu {
  position: relative;
}

.menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 10px 5px 5px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.menu__trigger::-webkit-details-marker {
  display: none;
}

.menu__trigger:hover,
.menu[open] .menu__trigger {
  background: var(--bg-accent);
  border-color: var(--border);
}

.menu__name {
  font-size: 13px;
  font-weight: 500;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

svg.menu__caret {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform 0.18s ease, color 0.15s ease;
}

.menu__trigger:hover .menu__caret,
.menu[open] .menu__caret {
  color: var(--accent-light);
}

.menu[open] .menu__caret {
  transform: rotate(180deg);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.avatar--lg {
  width: 36px;
  height: 36px;
  font-size: 13px;
}

.avatar--xl {
  width: 52px;
  height: 52px;
  font-size: 18px;
}

.menu__panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  width: 258px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.menu__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 2px 2px 8px;
  border-bottom: 1px solid var(--border);
}

.menu__identity-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.menu__identity-text strong {
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu__identity-text span:not(.badge) {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu__identity-plan {
  font-size: 11.5px;
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius);
  background: var(--bg-accent);
  border: 1px solid var(--border);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.badge--pro {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.menu__links {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.menu__item {
  display: block;
  width: 100%;
  padding: 6px 9px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.menu__item:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.menu__item--active {
  color: var(--accent);
  font-weight: 500;
}

.menu__logout {
  border-top: 1px solid var(--border);
  padding-top: 6px;
}

.menu__item--danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ---------- Profil ---------- */

.profile__head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.profile__name {
  font-size: 20px;
  font-weight: 650;
}

.profile__email {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.profile__head .badge {
  margin-left: auto;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat__label {
  font-size: 12px;
  color: var(--text-muted);
  gap: 6px;
}

.stat__label .icon {
  width: 13px;
  height: 13px;
  opacity: 0.75;
}

.stat__value {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.stat__hint {
  font-size: 11.5px;
  color: var(--text-muted);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth__legal {
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.auth__legal a {
  color: var(--text-muted);
  text-decoration: none;
}

.auth__legal a:hover {
  color: var(--accent);
}

/* ---------- Pravni tekstovi ---------- */

.legal {
  max-width: 820px;
}

.legal__head h1 {
  font-size: 26px;
  font-weight: 650;
}

.legal__head p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.legal__lead {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
}

.legal__section h2 {
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 8px;
}

.legal__section p,
.legal__section li {
  font-size: 14px;
  line-height: 1.65;
}

.legal__section ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.legal__section code {
  font-family: var(--mono);
  font-size: 12.5px;
  padding: 1px 5px;
  border-radius: var(--radius);
  background: var(--bg-accent);
}

@media (max-width: 560px) {
  .menu__name {
    display: none;
  }

  .menu__panel {
    width: 240px;
  }
}

/* ---------- Ikone ---------- */

.icon {
  width: 15px;
  height: 15px;
  flex: none;
  display: block;
}

.button,
.icon-button,
.menu__item,
.badge,
.card__head h2,
.footer a,
.field__head label,
.usage__label,
.stat__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.menu__item {
  display: flex;
}

.button--block {
  justify-content: center;
}

.card__head h2 .icon,
.footer a .icon {
  opacity: 0.7;
}

.plan__features li .icon {
  color: var(--accent);
  margin-top: 2px;
}

/* ---------- Select sa sopstvenom strelicom ---------- */

select {
  -webkit-appearance: none;
  appearance: none;
  padding: 8px 30px 8px 10px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23808894' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><path d='M4 6.5 8 10.5l4-4'/></svg>");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 14px 14px;
  text-overflow: ellipsis;
}

textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"] {
  padding: 8px 10px;
}

input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ---------- Opasne akcije ---------- */

.card--danger {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
}

.button--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.button--danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger) 85%, #000);
  border-color: color-mix(in srgb, var(--danger) 85%, #000);
}

/* ---------- Kompozer na telefonu ---------- */

@media (max-width: 640px) {
  /* Glas i dugmad idu u zasebne redove umesto da se otimaju o širinu. */
  .composer__bottom {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .composer__options {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.75fr);
    align-items: stretch;
    width: 100%;
    min-width: 0;
    gap: 10px;
  }

  .composer__model,
  .composer__language,
  .composer__voice {
    flex-basis: auto;
  }

  .composer__voice {
    grid-column: 1 / -1;
  }

  .composer__model--locked::after {
    left: 0;
    transform: translateY(3px);
  }

  .composer__model--locked:hover::after,
  .composer__model--locked:focus-within::after {
    transform: translateY(0);
  }

  /* Labela iznad selecta -> ime glasa dobija punu širinu ekrana. */
  .field--inline {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    width: 100%;
  }

  .field--inline select {
    max-width: none;
    width: 100%;
  }

  .composer__actions {
    width: 100%;
  }

  /* Generate zauzima punu širinu na telefonu. */
  .composer__actions .button {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 420px) {
  .composer__options {
    grid-template-columns: 1fr;
  }

  .composer__voice {
    grid-column: auto;
  }
}

/* ---------- Admin ---------- */

.app.admin {
  max-width: 1180px;
}

.admin-mode {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--danger) 72%, #000);
  background: color-mix(in srgb, var(--danger) 88%, #250407);
  color: #fff;
  font-size: 10.5px;
  letter-spacing: 0.01em;
  text-align: center;
}

.admin-mode__label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.admin-mode__label .icon {
  width: 13px;
  height: 13px;
}

.admin-mode__message {
  opacity: 0.88;
}

.admin__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.admin__head h1 {
  font-size: 24px;
}

.admin__eyebrow {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin__nav,
.admin__actions {
  display: flex;
  gap: 8px;
}

.admin__stats {
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.admin__filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px auto;
  align-items: end;
  gap: 12px;
}

.admin__table-card {
  padding-left: 0;
  padding-right: 0;
}

.admin__table-card > .card__head,
.admin__table-card > .pagination,
.admin__table-card > .empty {
  margin-left: 16px;
  margin-right: 16px;
}

.admin__table-wrap {
  width: 100%;
  overflow-x: auto;
}

.admin__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.admin__table th,
.admin__table td {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.admin__table th {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

.admin__table td:first-child a {
  display: flex;
  min-width: 190px;
  flex-direction: column;
  color: var(--text);
  text-decoration: none;
}

.admin__table td:first-child a:hover strong {
  color: var(--accent);
}

.admin__table td:first-child span {
  color: var(--text-muted);
}

.badge--danger {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-soft);
}

.badge--success {
  color: var(--success);
  border-color: var(--success);
  background: var(--success-soft);
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.pagination > :last-child {
  justify-self: end;
}

.admin__back {
  width: fit-content;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
}

.admin__back:hover {
  color: var(--accent);
}

.admin-user-hero {
  gap: 18px;
  padding: 20px;
  overflow: hidden;
}

.admin-user-hero__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-user-hero__identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.admin-user-hero__identity > div {
  min-width: 0;
}

.admin-user-hero__identity h1 {
  font-size: 21px;
  line-height: 1.25;
}

.admin-user-hero__identity a {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 12.5px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-hero__identity a:hover {
  color: var(--accent);
}

.admin-user-hero__label {
  margin: 0 0 2px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-user-hero__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--success) 42%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--success-soft) 70%, var(--surface));
  color: var(--success);
  font-size: 11px;
  font-weight: 650;
}

.admin-user-hero__status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
}

.admin-user-hero__status--suspended {
  border-color: color-mix(in srgb, var(--danger) 42%, var(--border));
  background: color-mix(in srgb, var(--danger-soft) 70%, var(--surface));
  color: var(--danger);
}

.admin-user-hero__meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.admin-user-hero__meta > div {
  min-width: 0;
  padding: 11px 13px;
  border-left: 1px solid var(--border);
}

.admin-user-hero__meta > div:first-child {
  border-left: 0;
}

.admin-user-hero__meta dt {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-user-hero__meta dd {
  margin: 2px 0 0;
  overflow: hidden;
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-hero__id {
  color: var(--text-muted);
  font-size: 11px !important;
  font-weight: 400 !important;
}

.admin__actions {
  flex-direction: column;
}

.admin__action {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.admin__action:first-child {
  padding-top: 0;
  border-top: 0;
}

.admin__action .field {
  flex: 1;
}

.admin__action p {
  display: flex;
  flex-direction: column;
  margin: 0;
}

.admin__action p span {
  color: var(--text-muted);
  font-size: 12px;
}

.admin__action-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin__filters--logs {
  grid-template-columns: minmax(240px, 1fr) 150px 180px auto;
}

.admin-session-list {
  display: flex;
  flex-direction: column;
}

.admin-session {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 13px;
  padding: 15px 0;
  border-top: 1px solid var(--border);
}

.admin-session:first-child {
  padding-top: 2px;
  border-top: 0;
}

.admin-session__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text-muted);
}

.admin-session__main {
  min-width: 0;
}

.admin-session__title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-session__state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--success);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-session__state::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.admin-session__state--expired {
  color: var(--text-muted);
}

.admin-session__meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 18px;
  margin: 9px 0 0;
}

.admin-session__meta div {
  min-width: 0;
}

.admin-session__meta dt {
  color: var(--text-muted);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-session__meta dd {
  margin: 1px 0 0;
  overflow: hidden;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-session__agent {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 10.5px;
}

.admin-session__agent summary {
  width: fit-content;
  cursor: pointer;
}

.admin-session__agent code {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1.4;
}

.admin-log-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.admin-log {
  position: relative;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 11px;
  padding: 13px 15px 13px 10px;
}

.admin-log__rail {
  display: flex;
  justify-content: center;
  padding-top: 5px;
}

.admin-log__rail span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.admin-log--warn .admin-log__rail span {
  background: var(--warn);
  box-shadow: 0 0 0 3px var(--warn-soft);
}

.admin-log--error .admin-log__rail span {
  background: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}

.admin-log__content {
  min-width: 0;
}

.admin-log__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-log__head > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-log__head time,
.admin-log__event {
  color: var(--text-muted);
  font-size: 10.5px;
}

.admin-log__level {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-log__message {
  margin: 4px 0 6px;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 550;
}

.admin-log__facts {
  display: flex;
  align-items: center;
  gap: 6px 12px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 10.5px;
}

.admin-log__facts a {
  color: var(--text-muted);
}

.admin-log__status {
  font-weight: 700;
}

.admin-log__status--ok { color: var(--success); }
.admin-log__status--warn { color: var(--warn); }
.admin-log__status--error { color: var(--danger); }

.admin-log__detail {
  margin-top: 8px;
  font-size: 10.5px;
}

.admin-log__detail summary {
  width: fit-content;
  color: var(--text-muted);
  cursor: pointer;
}

.admin-log__detail pre {
  margin: 7px 0 0;
  padding: 9px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text-muted);
  font: 10.5px/1.5 var(--mono);
}

@media (max-width: 700px) {
  .admin__filters {
    grid-template-columns: 1fr;
  }

  .admin__filters--logs {
    grid-template-columns: 1fr 1fr;
  }

  .admin__action {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-user-hero__top {
    align-items: flex-start;
  }

  .admin-user-hero__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-hero__meta > div:nth-child(3) {
    border-left: 0;
  }

  .admin-user-hero__meta > div:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }

  .admin-session__meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .admin-mode {
    align-items: flex-start;
    flex-direction: column;
    gap: 1px;
    padding: 7px 14px;
    text-align: left;
  }

  .admin-user-hero__top {
    flex-direction: column;
  }

  .admin-user-hero__meta {
    grid-template-columns: 1fr;
  }

  .admin-user-hero__meta > div,
  .admin-user-hero__meta > div:nth-child(3) {
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .admin-user-hero__meta > div:first-child {
    border-top: 0;
  }


  .admin__filters--logs {
    grid-template-columns: 1fr;
  }

  .admin-session {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .admin-session > form {
    grid-column: 2;
  }

  .admin-session__meta {
    grid-template-columns: 1fr;
  }

  .admin-log__head {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}
