/* Forma za prijavu (zamena za Tally) */
.sf-overlay {
  --sf-bg: #0b111d;
  --sf-panel: #0f1624;
  --sf-field: #0a0f1a;
  --sf-line: rgba(148, 163, 184, .14);
  --sf-line-strong: rgba(148, 163, 184, .28);
  --sf-text: #f3f5f8;
  --sf-muted: #8f98a6;
  --sf-accent: #3191ff;
  --sf-accent-2: #6a7dff;
  --sf-glow: rgba(49, 145, 255, .35);
  --sf-error: #ff6b7a;
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(3, 6, 12, .72);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
  font-family: var(--font-sans, "Inter", system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
}
.sf-overlay.sf-open { opacity: 1; pointer-events: auto; }

.sf-dialog {
  position: relative;
  width: 100%; max-width: 540px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px);
  overflow-y: auto; overscroll-behavior: contain;
  color: var(--sf-text);
  border-radius: 28px;
  padding: 30px 30px 26px;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(49, 145, 255, .16), transparent 60%) padding-box,
    linear-gradient(var(--sf-panel), var(--sf-bg)) padding-box,
    linear-gradient(160deg, rgba(102, 179, 255, .55), rgba(148, 163, 184, .10) 35%, rgba(148, 163, 184, .06) 70%, rgba(106, 125, 255, .35)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 40px 120px -30px var(--sf-glow), 0 0 0 1px rgba(0, 0, 0, .3);
  transform: translateY(16px) scale(.98);
  transition: transform .35s cubic-bezier(.2, .9, .3, 1);
  scrollbar-width: none;
}
.sf-dialog::-webkit-scrollbar { display: none; }
.sf-open .sf-dialog { transform: none; }

.sf-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.sf-brand { font-family: var(--font-display, system-ui, sans-serif); font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.sf-brand b { color: var(--sf-accent); }
.sf-close {
  width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center;
  border: 1px solid var(--sf-line); background: rgba(255, 255, 255, .02); color: var(--sf-muted);
  cursor: pointer; transition: all .2s;
}
.sf-close svg { width: 14px; height: 14px; }
.sf-close:hover { color: var(--sf-text); border-color: var(--sf-line-strong); background: rgba(255, 255, 255, .06); }

.sf-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 26px; }
.sf-steps div { font-size: 12px; font-weight: 500; color: var(--sf-muted); transition: color .3s; }
.sf-steps div::before {
  content: ""; display: block; height: 3px; border-radius: 999px; margin-bottom: 8px;
  background: var(--sf-line);
  transition: background .4s;
}
.sf-steps div.sf-done { color: var(--sf-text); }
.sf-steps div.sf-done::before { background: linear-gradient(90deg, var(--sf-accent), #66b3ff); box-shadow: 0 0 12px rgba(49, 145, 255, .5); }

.sf-title {
  font-family: var(--font-display, system-ui, sans-serif);
  font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.025em;
  margin: 0 0 10px;
}
.sf-title span { background: linear-gradient(90deg, #66b3ff, var(--sf-accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sf-sub { color: var(--sf-muted); font-size: 15px; line-height: 1.55; margin: 0 0 24px; }

.sf-proof {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin: -6px 0 24px; padding: 12px 14px;
  border: 1px solid var(--sf-line); border-radius: 14px;
  background: rgba(255, 255, 255, .02);
  font-size: 13px; color: var(--sf-muted);
}
.sf-proof strong { color: var(--sf-text); font-weight: 600; }
.sf-proof i { width: 3px; height: 3px; border-radius: 9px; background: var(--sf-line-strong); }

.sf-step { display: none; }
.sf-step.sf-active { display: block; animation: sf-in .4s cubic-bezier(.2, .9, .3, 1); }
.sf-step.sf-back-anim { animation-name: sf-in-back; }
@keyframes sf-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes sf-in-back { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }

.sf-field { margin-bottom: 16px; }
.sf-label { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.sf-label em { font-style: normal; font-weight: 400; font-size: 12px; color: var(--sf-muted); }
.sf-control { position: relative; }
.sf-control > svg {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: #5d6676; pointer-events: none; transition: color .2s;
}
.sf-control:focus-within > svg { color: var(--sf-accent); }
.sf-input {
  width: 100%; box-sizing: border-box;
  background: var(--sf-field);
  border: 1px solid var(--sf-line);
  border-radius: 14px;
  color: var(--sf-text);
  font: inherit; font-size: 16px;
  padding: 15px 16px 15px 44px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea.sf-input { padding-left: 16px; min-height: 130px; resize: vertical; line-height: 1.5; }
.sf-input::placeholder { color: #545d6c; }
.sf-input:hover { border-color: var(--sf-line-strong); }
.sf-input:focus { border-color: var(--sf-accent); background: #0b1220; box-shadow: 0 0 0 4px rgba(49, 145, 255, .15); }
.sf-count { position: absolute; right: 12px; bottom: 10px; font-size: 11px; color: #545d6c; pointer-events: none; }

.sf-invalid .sf-input, .sf-invalid .sf-option { border-color: rgba(255, 107, 122, .7); }
.sf-error { display: none; align-items: center; gap: 6px; color: var(--sf-error); font-size: 13px; margin-top: 8px; }
.sf-invalid .sf-error { display: flex; animation: sf-shake .35s; }
@keyframes sf-shake { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }

.sf-options { display: grid; gap: 10px; }
.sf-option {
  display: flex; align-items: center; gap: 14px;
  width: 100%; box-sizing: border-box; text-align: left;
  background: var(--sf-field);
  border: 1px solid var(--sf-line);
  border-radius: 16px;
  color: var(--sf-text);
  font: inherit; font-size: 15px; font-weight: 600;
  padding: 14px 16px; cursor: pointer;
  transition: border-color .2s, background .2s, transform .15s;
}
.sf-option:hover { border-color: var(--sf-line-strong); }
.sf-option:active { transform: scale(.99); }
.sf-option small { display: block; font-weight: 400; font-size: 13px; color: var(--sf-muted); margin-top: 2px; }
.sf-ico {
  flex: none; width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--sf-line); color: #aeb6c2;
  transition: all .2s;
}
.sf-ico svg { width: 20px; height: 20px; }
.sf-mark {
  flex: none; margin-left: auto; width: 22px; height: 22px; border-radius: 7px;
  border: 1.5px solid #3c4453; display: grid; place-items: center; transition: all .2s;
}
.sf-option[data-single] .sf-mark { border-radius: 999px; }
.sf-mark svg { width: 12px; height: 12px; opacity: 0; transform: scale(.5); transition: all .2s; }
.sf-option[aria-pressed="true"] {
  border-color: rgba(49, 145, 255, .8);
  background: linear-gradient(180deg, rgba(49, 145, 255, .14), rgba(49, 145, 255, .06));
}
.sf-option[aria-pressed="true"] .sf-ico { background: var(--sf-accent); border-color: var(--sf-accent); color: #fff; box-shadow: 0 8px 20px -8px var(--sf-accent); }
.sf-option[aria-pressed="true"] .sf-mark { background: var(--sf-accent); border-color: var(--sf-accent); }
.sf-option[aria-pressed="true"] .sf-mark svg { opacity: 1; transform: none; }

.sf-row { grid-template-columns: repeat(3, 1fr); }
.sf-row .sf-option { flex-direction: column; justify-content: center; text-align: center; gap: 10px; padding: 16px 8px; font-size: 14px; }
.sf-row .sf-mark { display: none; }

.sf-actions { display: flex; gap: 10px; margin-top: 26px; }
.sf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 15px;
  padding: 16px 24px;
  transition: transform .2s, box-shadow .25s, opacity .2s, background .2s;
}
.sf-btn svg { width: 16px; height: 16px; transition: transform .2s; }
.sf-btn-primary {
  flex: 1; color: #fff;
  background: linear-gradient(180deg, #4ea2ff, var(--sf-accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 12px 30px -12px var(--sf-accent);
}
.sf-btn-primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 18px 40px -12px var(--sf-accent); }
.sf-btn-primary:hover svg { transform: translateX(3px); }
.sf-btn-primary[disabled] { opacity: .7; cursor: wait; transform: none; }
.sf-btn-ghost { background: rgba(255, 255, 255, .05); border: 1px solid var(--sf-line); color: var(--sf-text); }
.sf-btn-ghost:hover { background: rgba(255, 255, 255, .09); }
.sf-spin { width: 16px; height: 16px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; animation: sf-rot .7s linear infinite; }
@keyframes sf-rot { to { transform: rotate(360deg); } }

.sf-note { display: flex; align-items: center; justify-content: center; gap: 6px; color: #6b7482; font-size: 12px; margin: 16px 0 0; }
.sf-note svg { width: 13px; height: 13px; }
.sf-fail { display: none; color: var(--sf-error); font-size: 14px; text-align: center; margin: 14px 0 0; line-height: 1.5; }
.sf-fail.sf-show { display: block; }

.sf-success { text-align: center; padding: 10px 0 6px; }
.sf-success-icon { position: relative; width: 84px; height: 84px; margin: 6px auto 22px; }
.sf-success-icon::before {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  background: radial-gradient(circle, rgba(49, 145, 255, .35), transparent 70%);
  animation: sf-pulse 2s ease-out infinite;
}
.sf-success-icon svg { position: relative; width: 84px; height: 84px; }
.sf-success-icon circle { stroke-dasharray: 230; stroke-dashoffset: 230; animation: sf-draw .6s ease-out forwards; }
.sf-success-icon path { stroke-dasharray: 50; stroke-dashoffset: 50; animation: sf-draw .4s .45s ease-out forwards; }
@keyframes sf-draw { to { stroke-dashoffset: 0; } }
@keyframes sf-pulse { 0% { transform: scale(.8); opacity: 1; } 100% { transform: scale(1.5); opacity: 0; } }
.sf-success .sf-sub { max-width: 360px; margin-left: auto; margin-right: auto; }
.sf-success .sf-sub-ig { margin-top: -12px; color: var(--sf-text); font-size: 14px; }
.sf-success-actions { display: grid; gap: 10px; margin-top: 8px; }
.sf-success-actions a { text-decoration: none; }

.sf-overlay button:focus { outline: none; }
.sf-overlay button:focus-visible, .sf-overlay a:focus-visible { outline: 2px solid var(--sf-accent); outline-offset: 2px; }

.sf-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
html.sf-lock, html.sf-lock body { overflow: hidden; }

/* Telefon: forma izlazi odozdo, preko celog ekrana po širini */
@media (max-width: 560px) {
  .sf-overlay { align-items: flex-end; padding: 0; }
  .sf-dialog {
    max-width: none; border-radius: 26px 26px 0 0;
    max-height: 94vh; max-height: 94dvh;
    padding: 12px 18px calc(20px + env(safe-area-inset-bottom));
    transform: translateY(100%);
  }
  .sf-dialog::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 9px; background: var(--sf-line-strong); margin: 0 auto 14px; }
  .sf-title { font-size: 24px; }
  .sf-row { grid-template-columns: 1fr; }
  .sf-row .sf-option { flex-direction: row; justify-content: flex-start; text-align: left; padding: 12px 14px; }
  .sf-row .sf-ico { width: 34px; height: 34px; }
  .sf-proof { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .sf-overlay *, .sf-overlay { animation: none !important; transition: none !important; }
  .sf-success-icon circle, .sf-success-icon path { stroke-dashoffset: 0; }
}
