/* ================================
   Techno Assistant — global reset
   ================================ */
#techno-wizard-root, #techno-wizard-root * {
  box-sizing: border-box;
}

/* Wrap (sekcija shortcoda) */
.techno-wrap {
  --tp: #0b3c6f;  /* primary (tamno plava) */
  --ta: #d91e18;  /* accent (crvena) */
  --paper:#ffffff;
  --ink: #0b2540; /* tamno siva/plava za tekst na beloj */
  --ink-inv:#ffffff;
  --muted:#6f8096;
  --chip:#e9eef6;
  --chip-ink:#123;
  --chip-active-bg:#0b3c6f;
  --chip-active-ink:#fff;
  --ring: rgba(11,60,111,0.25);
  --ok:#16a34a;
  --warn:#eab308;
  --err:#dc2626;

  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--ink);
}

/* ================================
   Hero (zaglavlje)
   ================================ */
.techno-hero {
  background: linear-gradient(135deg, var(--tp) 0%, #0e4a8a 60%, #0b3c6f 100%);
  color: var(--ink-inv);
  padding: clamp(18px, 3vw, 28px) clamp(18px, 4vw, 32px);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
}

.techno-hero h2 {
  margin: 0 0 6px 0;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.2;
  font-size: clamp(20px, 2.6vw, 28px);
  color: #fff; /* eksplicitno da ne “iscuri” tema */
}

.techno-hero p {
  margin: 0;
  opacity: 0.95;
  font-size: clamp(14px, 1.3vw, 16px);
}

/* logo traka (opciono u template-u) */
.techno-logos {
  margin-top: 12px;
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.techno-logos img {
  height: 28px;
  width: auto;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,.1));
}

/* ================================
   Card / layout blokovi
   ================================ */
.techno-card {
  background: var(--paper);
  border: 1px solid #e9eef6;
  border-radius: 14px;
  padding: clamp(16px, 2.5vw, 22px);
  margin-top: 16px;
  box-shadow:
    0 1px 1px rgba(16, 24, 40, 0.04),
    0 10px 30px rgba(11, 60, 111, 0.07);
}

/* Naslovi u kartama */
.techno-card h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
  line-height: 1.3;
  color: var(--tp);
}

/* ================================
   Steps (indikator)
   ================================ */
.techno-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.techno-step {
  background: #f6f8fc;
  border: 1px solid #ecf1f9;
  color: #3c4b68;
  border-radius: 10px;
  padding: 8px 10px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
}
.techno-step.active {
  background: var(--tp);
  border-color: var(--tp);
  color: #fff;
}

/* ================================
   Preset traka
   ================================ */
.presetbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.preset {
  appearance: none;
  border: 1px solid #e4eaf5;
  background: #f8fafd;
  color: #1f304d;
  font-weight: 600;
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .05s ease, border-color .2s ease, background .2s ease;
}
.preset:hover { border-color: var(--tp); }
.preset:active { transform: scale(0.98); }

/* ================================
   Grid polja
   ================================ */
.techno-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
}

.techno-field {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.techno-field.wide { grid-column: span 12; }
.techno-field.full { grid-column: 1 / -1; }

.label {
  font-size: 12px;
  letter-spacing: .3px;
  text-transform: uppercase;
  font-weight: 800;
  color: #2f3e5c;
}

/* ================================
   Inputi, selecti
   ================================ */
.input, .select, .textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #dfe6f3;
  background: #ffffff;
  color: #10223f;
  font-size: 14px;
  outline: none;
  transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #667 50%),
    linear-gradient(135deg, #667 50%, transparent 50%),
    linear-gradient(to right, #ccc, #ccc);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 13px) calc(50% - 3px),
    calc(100% - 28px) 50%;
  background-size:
    5px 5px,
    5px 5px,
    1px 18px;
  background-repeat: no-repeat;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--tp);
  box-shadow: 0 0 0 4px var(--ring);
}

/* ================================
   Chips (višestruki izbor)
   ================================ */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  appearance: none;
  border: 1px solid #dfe6f3;
  background: var(--chip);
  color: var(--chip-ink);
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  padding: 9px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .05s ease;
}
.chip:hover { border-color: var(--tp); }
.chip:active { transform: scale(0.98); }
.chip.active {
  background: var(--chip-active-bg);
  border-color: var(--chip-active-bg);
  color: var(--chip-active-ink);
  box-shadow: 0 6px 18px rgba(11,60,111,0.18);
}

/* ================================
   Actions (dugmad)
   ================================ */
.actions {
  margin-top: 4px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  appearance: none;
  border: 1px solid var(--tp);
  background: var(--tp);
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: .2px;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform .05s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { box-shadow: 0 8px 22px rgba(11,60,111,0.25); }
.btn:active { transform: translateY(1px); }

.btn.alt {
  background: #f7f9fc;
  color: #18304f;
  border-color: #dbe4f2;
}
.btn.alt:hover { border-color: var(--tp); }

.btn.accent {
  background: var(--ta);
  border-color: var(--ta);
}
.btn.accent:hover { box-shadow: 0 8px 22px rgba(217,30,24,0.25); }

.btn.small { padding: 8px 10px; font-size: 12px; border-radius: 10px; }
.btn[disabled] {
  opacity: .65; cursor: not-allowed;
  box-shadow: none !important;
}

/* ================================
   Rezultati (tekstualni režim)
   ================================ */
.results {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.result-item {
  border: 1px dashed #d9e3f2;
  background: #fbfdff;
  border-radius: 12px;
  padding: 12px;
}

.result-title {
  font-weight: 800;
  color: #0c2c56;
  margin: 0 0 6px 0;
  font-size: 14px;
  line-height: 1.35;
}

.result-sub {
  color: #47618a;
  font-size: 12px;
  margin-bottom: 8px;
}

.result-attrs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.badge {
  background: #eef3fb;
  color: #2a4266;
  border: 1px solid #dce6f5;
  border-radius: 999px;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 700;
}
.badge.stock { background: #e9fbef; color: #0d5c2f; border-color: #c9f4d7; }
.badge.buy   { background: #fff4e5; color: #8a4b08; border-color: #ffe3bd; }

.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ================================
   Notes (objašnjenja razlika)
   ================================ */
.note {
  border-left: 4px solid var(--tp);
  background: #f3f7fe;
  color: #10325e;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
}

/* ================================
   Empty state
   ================================ */
.empty {
  border: 2px dashed #dfe6f3;
  background: #fbfdff;
  color: #3d5174;
  padding: 18px;
  border-radius: 14px;
  text-align: center;
  font-weight: 600;
}

/* ================================
   Debug echo
   ================================ */
.debug-echo {
  margin-top: 10px;
  border: 1px solid #e8eef8;
  background: #fcfdff;
  border-radius: 12px;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: #213a60;
  overflow: auto;
}
.debug-echo pre {
  margin: 0; white-space: pre-wrap; word-break: break-word;
}

/* ================================
   Utility
   ================================ */
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px !important; }
.mt-12 { margin-top: 12px !important; }
.mt-16 { margin-top: 16px !important; }
.hide { display: none !important; }

/* ================================
   Responsive
   ================================ */
@media (max-width: 1024px) {
  .techno-grid .techno-field { grid-column: span 12; }
  .techno-steps { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .presetbar { gap: 6px; }
  .chip { padding: 8px 10px; font-size: 11px; }
  .btn { padding: 9px 12px; font-size: 12px; border-radius: 10px; }
  .result-item { padding: 10px; }
}

/* ================================
   Fokus & pristupačnost
   ================================ */
.chip:focus-visible,
.preset:focus-visible,
.btn:focus-visible,
.input:focus-visible,
.select:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--ring);
}

/* ================================
   Linkovi (ako se koriste)
   ================================ */
a.link {
  color: var(--tp);
  text-decoration: none;
  border-bottom: 1px dashed rgba(11,60,111,0.35);
  transition: color .2s ease, border-color .2s ease;
}
a.link:hover {
  color: #0e4a8a;
  border-color: rgba(11,60,111,0.6);
}
/* ================================
   Pitanja — Goal kartice (Q1)
   ================================ */
.qset { margin-top: 6px; }
.qset h3 { margin: 0 0 10px 0; color: var(--tp); }

.goals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 10px;
}

.goal-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  gap: 8px;
  background: #f6f9fe;
  border: 1px solid #e6eef9;
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: box-shadow .2s ease, border-color .2s ease, transform .05s ease;
  position: relative;
}
.goal-card:hover { border-color: var(--tp); }
.goal-card:active { transform: translateY(1px); }
.goal-card input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0; 
  pointer-events: none;
}
.goal-ico {
  height: 44px; width: 44px;
  display: grid; place-items: center;
  font-size: 20px;
  background: #fff;
  border: 1px solid #e6eef9;
  border-radius: 12px;
}
.goal-title {
  font-weight: 800;
  color: #0c2c56;
  font-size: 14px;
  line-height: 1.2;
}
.goal-desc {
  color: #4b6186;
  font-size: 12px;
}

/* Responsive za goals */
@media (max-width: 1024px) {
  .goals { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .goals { grid-template-columns: 1fr; }
}

/* Sitna dorada badge-a u rezultatima */
.result-attrs .badge { font-weight: 700; }
