/* prvi.dodir — porudžbina, prijava, nalog i admin.
   Učitava se posle style.css i koristi iste boje i komponente. */

[hidden] { display: none !important; }

/* ---------- Header unutrašnjih strana ---------- */

.header__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.top-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 15px;
  transition: background-color .2s;
}
.top-link:hover { background: var(--pesak); }
.top-link .icon { width: 17px; height: 17px; }
.header__tag {
  margin-left: 14px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--ugalj);
  color: var(--papir);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
}
@media (max-width: 560px) {
  .top-link__text { display: none; }
  .top-link { width: 44px; justify-content: center; padding: 0; }
  .btn--icon-sm { width: 44px; height: 44px; padding: 0; }
  .header__right .btn--sm { height: 44px; }
}
@media (max-width: 420px) {
  .header__tag { display: none; }
}

/* ---------- Strana ---------- */

.page { padding: clamp(36px, 5vw, 64px) 0 clamp(64px, 8vw, 112px); }

.page-head .title { margin-top: 14px; font-size: clamp(40px, 5.6vw, 76px); }
.page-head__lead {
  margin-top: 18px;
  max-width: 38em;
  font-size: 16px;
  color: var(--grafit-tamni);
}

/* ---------- Polja ---------- */

.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field__label {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ugalj);
}
.field__label i { font-style: normal; color: var(--grafit); }

.input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  background: var(--pesak);
  color: var(--ugalj);
  font: inherit;
  font-size: 16px;   /* 16px sprečava zumiranje na iPhone-u */
  transition: border-color .2s, background-color .2s;
}
.input::placeholder { color: #8F8E88; }
.input:hover { background: #E3E1DA; }
.input:focus { outline: none; border-color: var(--ugalj); background: var(--pesak); }
textarea.input {
  height: auto;
  min-height: 110px;
  padding: 14px 16px;
  line-height: 1.5;
  resize: vertical;
}
.input[readonly] { color: var(--grafit); }
.input:disabled { color: #A9A8A2; cursor: not-allowed; }

.field__error {
  font-size: 13.5px;
  color: #A1281D;
}
.field.has-error .input { border-color: #A1281D; background: #F2E4E0; }
.field__hint { font-size: 13px; color: var(--grafit); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 20px;
}
.grid-2 > .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 18px; }
}

/* Lozinka sa dugmetom „Prikaži“ */
.pw { position: relative; }
.pw .input { padding-right: 96px; }
.pw__toggle {
  position: absolute;
  top: 6px;
  right: 6px;
  bottom: 6px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: var(--papir);
  color: var(--ugalj);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

/* Kvačica */
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  cursor: pointer;
}
.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--ugalj);
  cursor: pointer;
}

/* Prekidač (vidljivo / sakriveno) */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--ugalj);
  cursor: pointer;
  user-select: none;
}
.switch input {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 44px;
  height: 26px;
  margin: 0;
  border-radius: 99px;
  background: #CFCDC5;
  cursor: pointer;
  transition: background-color .25s;
}
.switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(11, 11, 11, .2);
  transition: transform .3s var(--ease-smooth);
}
.switch input:checked { background: var(--ugalj); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 2px solid var(--ugalj); outline-offset: 3px; }
.switch__text { min-width: 4.6em; text-align: right; }
.switch:has(input:not(:checked)) .switch__text { color: var(--grafit); }

/* Upload */
.upload {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border: 1.5px dashed #BDBAB2;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.upload:hover, .upload.is-drag { border-color: var(--ugalj); background: rgba(233, 231, 225, .5); }
.upload:focus-within { border-color: var(--ugalj); }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload__thumb {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--pesak);
  overflow: hidden;
}
.upload__thumb img { width: 100%; height: 100%; object-fit: contain; }
.upload__thumb svg { width: 26px; height: 26px; }
.upload__text { flex: 1; min-width: 0; }
.upload__title { display: block; font-size: 15.5px; font-weight: 500; }
.upload__sub { display: block; margin-top: 2px; font-size: 13px; color: var(--grafit); }
.upload__remove {
  flex: none;
  padding: 8px 12px;
  border: 0;
  border-radius: 9px;
  background: var(--pesak);
  color: var(--ugalj);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
}
.upload__remove:hover { background: #DCDAD2; }

/* Boje sajta */
.swatches { display: flex; flex-wrap: wrap; gap: 14px 12px; }
.swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  cursor: pointer;
}
.swatch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatch__dot {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 2px var(--papir), 0 0 0 2px transparent;
  transition: box-shadow .2s, transform .3s var(--ease-smooth);
}
.swatch:hover .swatch__dot { transform: scale(1.06); }
.swatch input:checked + .swatch__dot { box-shadow: 0 0 0 3px var(--papir), 0 0 0 4.5px var(--ugalj); }
.swatch input:focus-visible + .swatch__dot { outline: 2px solid var(--ugalj); outline-offset: 6px; }

/* Količina */
.qty {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 12px;
  background: var(--pesak);
}
.qty button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 9px;
  background: var(--papir);
  color: var(--ugalj);
  font-size: 20px;
  cursor: pointer;
}
.qty button:last-child { background: var(--ugalj); color: var(--papir); }
.qty button:disabled { opacity: .35; cursor: default; }
.qty output {
  min-width: 48px;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* Napomena / info kutija */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--pesak);
  font-size: 14px;
  color: var(--grafit-tamni);
}
.notice .icon { width: 20px; height: 20px; margin-top: 1px; color: var(--ugalj); }
.notice b { color: var(--ugalj); font-weight: 600; }
.notice--dark { background: var(--ugalj); color: #CFCDC5; }
.notice--dark .icon, .notice--dark b { color: var(--papir); }

.secure {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--grafit);
}
.secure .icon { width: 15px; height: 15px; }

.form-error {
  padding: 14px 16px;
  border-radius: 12px;
  background: #F2E4E0;
  color: #7E1F16;
  font-size: 14.5px;
}

/* ---------- Porudžbina ---------- */

.order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
  margin-top: 28px;
}

.stepnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 4px;
  margin-top: 30px;
}
.stepnav a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: 99px;
  font-size: 14.5px;
  font-weight: 500;
  transition: background-color .2s;
}
.stepnav a:hover { background: var(--pesak); }
.stepnav span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ugalj);
  color: var(--papir);
  font-family: var(--mono);
  font-size: 12px;
}

.fsec {
  padding: 36px 0;
  border-top: 1px solid var(--linija);
}
.fsec:first-child { padding-top: 32px; }
.fsec__num { font-family: var(--mono); font-size: 12px; color: var(--grafit); }
.fsec__title {
  margin-top: 6px;
  font-size: clamp(28px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.1;
}
.fsec__lead { margin-top: 6px; font-size: 15px; color: var(--grafit-tamni); }
.fsec__body { display: grid; gap: 24px; margin-top: 26px; }

.card-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px 28px;
}
.card-pick__card { width: 240px; }

.pay {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-radius: 14px;
  background: var(--pesak);
  padding: 4px;
  gap: 4px;
}
.pay label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 11px;
  cursor: pointer;
  transition: background-color .2s, box-shadow .2s;
}
.pay input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--ugalj); }
.pay label:has(input:checked) { background: var(--papir); box-shadow: 0 1px 2px rgba(11, 11, 11, .08); }
.pay .icon { width: 26px; height: 26px; }
.pay b { display: block; font-size: 15.5px; font-weight: 500; }
.pay small { display: block; font-size: 12.5px; color: var(--grafit); line-height: 1.35; }
@media (max-width: 640px) { .pay { grid-template-columns: minmax(0, 1fr); } }

.submit-row { display: grid; gap: 18px; padding-top: 32px; border-top: 1px solid var(--linija); }
.btn--lg { height: 60px; font-size: 17px; border-radius: 14px; }
.btn[aria-busy="true"] { opacity: .6; cursor: progress; }

/* Bočni pregled */
.aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 14px;
  padding-top: 24px;
  border-top: 1px solid var(--linija);
}
.aside__head {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--grafit);
}
.aside .back-card { box-shadow: 0 16px 40px -22px rgba(11, 11, 11, .28), 0 0 0 1px rgba(11, 11, 11, .03); }
.aside__phone {
  container-type: inline-size;
  display: flex;
  justify-content: center;
  padding: 6px 0 4px;
}
.aside__phone .phone { font-size: calc(100cqw * .8 / 16.8); }

.summary { border-top: 1px solid var(--linija); }
.summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--linija);
  font-size: 15px;
}
.summary dt { color: var(--grafit); }
.summary dd { text-align: right; }
.summary__old { margin-right: 6px; color: var(--grafit); }
.summary .summary__total { border-top: 1.5px solid var(--ugalj); border-bottom: 0; padding-top: 16px; align-items: baseline; }
.summary__total dt { color: var(--ugalj); font-weight: 500; }
.summary__total dd { font-size: 28px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }

/* Na užem ekranu: koraci, pa pregled i cena, pa potvrda i dugme (kao u dizajnu). */
@media (max-width: 1000px) {
  .order { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  #order-form { display: contents; }
  .fsec { order: 1; }
  .aside { order: 2; position: static; padding-bottom: 32px; }
  .submit-row { order: 3; }
  .aside__submit { display: none; }
  .aside__phone .phone { font-size: calc(min(100cqw, 360px) * .86 / 16.8); }
}

/* Uspeh */
.done {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  padding: clamp(24px, 4vw, 48px) 0;
}
.done__check {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ugalj);
  color: var(--papir);
}
.done__check svg { width: 26px; height: 26px; }
.done .title { margin-top: 24px; font-size: clamp(40px, 5.4vw, 72px); }
.done__lead { margin-top: 20px; max-width: 34em; font-size: 17px; color: var(--grafit-tamni); }
.done-code {
  margin-top: 28px;
  padding: 20px 22px;
  border-radius: 18px;
  background: var(--ugalj);
  color: var(--papir);
}
.done-code__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.done-code .label { color: var(--grafit-svetli); font-size: 11px; }
.done-code__copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #2A2A28;
  color: var(--papir);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.done-code__copy:hover { background: #3A3A38; }
.done-code__copy .icon { width: 16px; height: 16px; }
.done-code__value {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: .14em;
  line-height: 1.1;
  user-select: all;
}
.done-code__note { margin-top: 12px; font-size: 14px; color: #CFCDC5; }
.done-code__note.is-warn { color: #F2C77E; }
.done__list { margin-top: 28px; border-top: 1px solid var(--linija); }
.done__list li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  padding: 14px 0;
  border-bottom: 1px solid var(--linija);
  font-size: 15.5px;
}
.done__list span { font-family: var(--mono); font-size: 12px; color: var(--grafit); padding-top: 3px; }
.done__link { font-weight: 500; word-break: break-all; }
.done__ctas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
@media (max-width: 860px) { .done { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Prijava ---------- */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
  /* Samo gore i dole: bočni razmak daje .wrap (inače na telefonu sadržaj ide do ivice). */
  padding-top: clamp(24px, 4vw, 56px);
  padding-bottom: clamp(48px, 6vw, 80px);
}
.auth__panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 600px;
  padding: clamp(32px, 4vw, 52px);
  border-radius: 28px;
  background: var(--ugalj);
  color: var(--papir);
  overflow: hidden;
}
.auth__panel .label { color: var(--grafit-svetli); }
.auth__panel .title { margin-top: 18px; font-size: clamp(40px, 4.6vw, 64px); }
.auth__panel .muted { color: var(--grafit-svetli); }
.auth__panel p.auth__lead { margin-top: 22px; max-width: 26em; font-size: 16px; color: #CFCDC5; }
.auth__art { width: min(100%, 420px); align-self: center; }

.auth__form { width: 100%; max-width: 520px; display: grid; gap: 22px; }
.auth__title { font-size: clamp(32px, 3vw, 40px); font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.auth__sub { margin-top: 10px; font-size: 15.5px; color: var(--grafit-tamni); }
.auth__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.auth__forgot { font-size: 14px; }
.auth__alt { padding-top: 22px; border-top: 1px solid var(--linija); font-size: 15.5px; }

@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth__panel { min-height: 0; }
  .auth__art { display: none; }
  .auth__form { max-width: none; }
}

/* ---------- Moj nalog i uređivač ---------- */

.account {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) minmax(300px, 340px);
  gap: clamp(24px, 3vw, 44px);
  align-items: start;
  margin-top: 40px;
}

.tabs { display: grid; gap: 4px; position: sticky; top: calc(var(--header-h) + 24px); }
.tab {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ugalj);
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.tab .icon { width: 18px; height: 18px; }
.tab:hover { background: var(--pesak); }
.tab[aria-selected="true"] { background: var(--ugalj); color: var(--papir); }

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--linija);
}
.panel-head__title { font-size: clamp(28px, 2.6vw, 34px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; }
.panel-head__sub { margin-top: 6px; font-size: 14.5px; color: var(--grafit-tamni); }
.panel-head .label { font-size: 11px; white-space: nowrap; }

.frow {
  display: grid;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--linija);
}
.frow__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 26px;
}
.frow__top .label { font-size: 11px; }
.frow.is-hidden .field__label { color: var(--grafit); }
.frow.is-hidden .input { color: #9A9993; }
.frow.has-error .input { border-color: #A1281D; background: #F2E4E0; }

.subsec { padding: 26px 0 6px; }
.subsec__title { font-size: 18px; font-weight: 600; letter-spacing: -0.03em; }
.subsec__sub { margin-top: 4px; font-size: 14px; color: var(--grafit-tamni); }

.savebar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 16px 0;
  border-top: 1.5px solid var(--ugalj);
  background: var(--papir);
}
.savebar__state {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  color: var(--grafit-tamni);
}
.savebar__state::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #A9A8A2;
  transition: background-color .3s;
}
.savebar.is-dirty .savebar__state { color: var(--ugalj); }
.savebar.is-dirty .savebar__state::before { background: #C47A1E; }
.savebar.is-error .savebar__state::before { background: #A1281D; }

.live {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: grid;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--linija);
}
.live .aside__phone .phone { font-size: calc(100cqw * .92 / 16.8); }

@media (max-width: 1100px) {
  .account { grid-template-columns: minmax(0, 1fr) minmax(280px, 320px); }
  .tabs {
    grid-column: 1 / -1;
    position: static;
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
  }
  .tabs::-webkit-scrollbar { display: none; }
}
@media (max-width: 800px) {
  .account { grid-template-columns: minmax(0, 1fr); margin-top: 28px; }
  .live { position: static; }
  .live .aside__phone .phone { font-size: calc(min(100cqw, 380px) * .86 / 16.8); }
}

/* Pregled ličnog sajta u telefonu: boja i dodatni delovi */
.phone__screen {
  --cs-bg: #0B0B0B;
  --cs-blob: #2A2A28;
  overflow-y: auto;
  scrollbar-width: none;
}
.phone__screen::-webkit-scrollbar { display: none; }
.phone__screen .site-hero { background: var(--cs-bg); }
.phone__screen .site-hero__blob { background: var(--cs-blob); }
.phone__screen .site-save { background: var(--cs-bg); }
.site-hero__logo {
  position: absolute;
  left: 5em;
  right: .7em;
  top: 2.9em;
  height: 8.5em;
  display: grid;
  place-items: center;
  padding: .6em;
  border-radius: .9em;
  background: var(--papir);
}
.site-hero__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.site-hero__photo i {
  font-style: normal;
  font-family: var(--mono);
  font-size: .5em;
  letter-spacing: .12em;
  color: #6E6D68;
}
.site-about { padding: .9em .2em .2em; }
.site-about h4 { margin: 0; font-size: .78em; font-weight: 600; letter-spacing: -0.02em; }
.site-about p { margin-top: .35em; font-size: .56em; line-height: 1.45; color: var(--grafit-tamni); }
.site-about h4 + p + h4, .site-about ul + h4 { margin-top: .8em; }
.site-chips { display: flex; flex-wrap: wrap; gap: .3em; margin-top: .45em; }
.site-chips li {
  padding: .35em .7em;
  border-radius: 99px;
  background: var(--pesak);
  font-size: .5em;
}
.site-made {
  padding: 1.1em 0 .4em;
  text-align: center;
  font-size: .5em;
  color: var(--grafit);
}
.site-made b { color: var(--ugalj); }

/* Poleđina kartice: logo i QR u pregledu */
.back-card__logo.has-img { width: auto; height: auto; padding: 0; border: 0; border-radius: 0; }
.back-card__logo img { display: block; max-width: 19cqw; max-height: 12cqw; object-fit: contain; }
.back-card__qr svg rect[fill="white"], .back-card__qr svg rect[fill="#ffffff"] { fill: transparent; }

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

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 32px;
}
.stat {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--pesak);
  text-align: left;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: background-color .2s;
}
.stat:hover { background: #E1DFD8; }
.stat .label { font-size: 11px; }
.stat b {
  display: block;
  margin-top: 10px;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}
.stat--dark { background: var(--ugalj); color: var(--papir); }
.stat--dark:hover { background: #222220; }
.stat--dark .label { color: var(--grafit-svetli); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 32px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 99px;
  background: var(--pesak);
  color: var(--ugalj);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background-color .2s, color .2s;
}
.chip:hover { background: #DCDAD2; }
.chip[aria-pressed="true"] { background: var(--ugalj); color: var(--papir); }
.chip small { margin-left: 4px; font-family: var(--mono); font-size: 11px; opacity: .6; }
.search { position: relative; width: min(100%, 320px); }
.search .input { height: 44px; padding-left: 42px; }
.search .icon { position: absolute; left: 14px; top: 13px; color: var(--grafit); }

.olist { margin-top: 18px; border-top: 1px solid var(--linija); }
.orow {
  display: grid;
  grid-template-columns: 90px minmax(0, 1.4fr) minmax(0, 1.2fr) 70px 110px 120px 24px;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 16px 8px;
  border: 0;
  border-bottom: 1px solid var(--linija);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s;
}
.orow:hover { background: rgba(233, 231, 225, .7); }
.orow__num { font-family: var(--mono); font-size: 12px; color: var(--grafit); }
.orow__num small { display: block; margin-top: 3px; font-size: 11px; }
.orow__name { font-weight: 600; letter-spacing: -0.02em; }
.orow__sub { margin-top: 2px; font-size: 13px; color: var(--grafit); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orow__contact { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orow__qty, .orow__total { font-size: 14px; font-variant-numeric: tabular-nums; }
.orow .icon { color: var(--grafit); }
.olist__empty { padding: 48px 8px; color: var(--grafit); }
.olist__head {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--grafit);
  cursor: default;
}
.olist__head:hover { background: transparent; }

@media (max-width: 900px) {
  .olist__head { display: none; }
  .orow {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name status" "contact contact" "num total";
    gap: 6px 12px;
    padding: 16px 4px;
  }
  .orow > :nth-child(1) { grid-area: num; }
  .orow > :nth-child(2) { grid-area: name; }
  .orow > :nth-child(3) { grid-area: contact; }
  .orow > :nth-child(4) { display: none; }
  .orow > :nth-child(5) { grid-area: total; text-align: right; }
  .orow > :nth-child(6) { grid-area: status; justify-self: end; }
  .orow > :nth-child(7) { display: none; }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 99px;
  background: var(--pesak);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; }
.pill--nova { background: var(--ugalj); color: var(--papir); }
.pill--nova::before { background: #E9A23B; opacity: 1; }
.pill--u_izradi { background: #E8E1D2; color: #6B4A12; }
.pill--poslata { background: #DFE4EA; color: #1E3550; }
.pill--zavrsena { background: #DDE6DA; color: #24442A; }
.pill--otkazana { background: #EFE1DE; color: #7E1F16; }

/* Detalj klijenta */
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: var(--grafit-tamni);
}
.back:hover { color: var(--ugalj); }
.back .icon { rotate: 180deg; width: 16px; height: 16px; }

.dhead {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-top: 24px;
}
.dhead .title { margin-top: 12px; font-size: clamp(36px, 4.4vw, 60px); }
.dhead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.dhead__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.select {
  height: 44px;
  padding: 0 38px 0 14px;
  border: 0;
  border-radius: 11px;
  background: var(--pesak) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B0B0B' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") right 12px center / 16px no-repeat;
  color: var(--ugalj);
  font: inherit;
  font-size: 15px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  margin-top: 36px;
}
.detail__side { display: grid; gap: 14px; }
@media (max-width: 1000px) { .detail { grid-template-columns: minmax(0, 1fr); } }

.box {
  padding: 22px;
  border-radius: 18px;
  background: var(--pesak);
}
.box--light { background: var(--papir-svetli); box-shadow: 0 0 0 1px var(--linija); }
.box--dark { background: var(--ugalj); color: var(--papir); }
.box--dark .label { color: var(--grafit-svetli); }
.box__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.box__head .label { font-size: 11px; }
.box__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: #1C1C1B;
  font-family: var(--mono);
  font-size: clamp(20px, 2vw, 26px);
  letter-spacing: .12em;
}
.code--muted { font-family: var(--font); font-size: 14px; letter-spacing: 0; color: var(--grafit-svetli); }

.btn--soft { background: var(--pesak); color: var(--ugalj); }
.btn--soft:hover { background: #DCDAD2; }
.box .btn--soft { background: var(--papir); }
.box .btn--soft:hover { background: #fff; }
.box--dark .btn--soft { background: #2A2A28; color: var(--papir); }
.box--dark .btn--soft:hover { background: #3A3A38; }
.btn--danger { background: transparent; color: #A1281D; box-shadow: inset 0 0 0 1.5px #E2C3BD; }
.btn--danger:hover { background: #F2E4E0; }

.kv div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #D9D7CF;
  font-size: 14.5px;
}
.kv div:last-child { border-bottom: 0; }
.kv dt { color: var(--grafit); flex: none; }
.kv dd { text-align: right; overflow-wrap: anywhere; }
.box--dark .kv div { border-color: #2A2A28; }

.linkline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--papir);
  font-size: 14px;
  word-break: break-all;
}
.linkline a { flex: 1; }
.icon-btn {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: var(--pesak);
  color: var(--ugalj);
  cursor: pointer;
}
.icon-btn:hover { background: #DCDAD2; }
.icon-btn .icon { width: 16px; height: 16px; }

/* Modal */
.modal {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--papir);
  color: var(--ugalj);
  box-shadow: 0 40px 80px -30px rgba(11, 11, 11, .5);
}
.modal::backdrop { background: rgba(11, 11, 11, .45); backdrop-filter: blur(3px); }
.modal__box { display: grid; gap: 20px; padding: clamp(24px, 3vw, 32px); }
.modal__title { font-size: 28px; font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; }
.modal__sub { margin-top: 6px; font-size: 14.5px; color: var(--grafit-tamni); }
.modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

/* Obaveštenje u dnu ekrana */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ugalj);
  color: var(--papir);
  font-size: 14.5px;
  box-shadow: 0 16px 40px -16px rgba(11, 11, 11, .5);
  opacity: 0;
  transform: translate(-50%, 12px);
  transition: opacity .3s var(--ease-soft), transform .4s var(--ease-smooth);
  pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

.loading { padding: 80px 0; color: var(--grafit); }

/* Kartončić sa podacima za prijavu (štampa) */
.slip { display: none; }
@media print {
  body.printing > *:not(.slip) { display: none !important; }
  body.printing .slip { display: block !important; }
  body.printing { background: #fff; }
  .slip__card {
    width: 90mm;
    padding: 8mm;
    border: .3mm solid #999;
    border-radius: 3mm;
    font-family: var(--font);
    color: #000;
  }
  .slip__brand { font-size: 14pt; font-weight: 600; letter-spacing: -0.04em; }
  .slip__brand span { color: #6E6D68; }
  .slip__lead { margin-top: 3mm; font-size: 9pt; color: #333; }
  .slip__rows { margin-top: 5mm; }
  .slip__rows div { display: flex; justify-content: space-between; gap: 4mm; padding: 2mm 0; border-top: .2mm solid #ccc; font-size: 9.5pt; }
  .slip__rows dt { color: #555; font-family: var(--mono); font-size: 7.5pt; letter-spacing: .1em; padding-top: .6mm; }
  .slip__rows dd { font-weight: 500; word-break: break-all; text-align: right; }
  .slip__code { font-family: var(--mono) !important; font-size: 13pt; letter-spacing: .12em; }
}

/* Polja unutar sivih kutija dobijaju svetlu pozadinu, da se vide. */
.box .input { background: var(--papir); }
.box .input:hover { background: #fff; }
.box .input:focus { background: var(--papir); }

/* ---------- Logo: obrada i prekidač pozadine ---------- */

.upload.is-busy { cursor: progress; }
.upload__thumb.has-img { background: var(--papir); box-shadow: inset 0 0 0 1px var(--linija); }
.upload__thumb.has-img img { padding: 6px; }
.upload__spin {
  width: 22px;
  height: 22px;
  border: 2px solid #CFCDC5;
  border-top-color: var(--ugalj);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.upload__bg { margin-top: 12px; }
.upload__bg span { min-width: 0; text-align: left; color: var(--ugalj); }
.swatch[hidden] { display: none; }

/* ---------- Pregled sajta u telefonu: logo bez pozadine i staklena ploča ---------- */

.site-lang {
  position: absolute;
  top: .9em;
  left: .9em;
  z-index: 3;
  display: flex;
  padding: .2em;
  border-radius: 99px;
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  font-size: .5em;
  font-weight: 600;
  letter-spacing: .06em;
}
.site-lang b, .site-lang i {
  padding: .45em .9em;
  border-radius: 99px;
  font-style: normal;
  font-weight: 600;
}
.site-lang b { color: var(--ugalj); }
.site-lang i { color: rgba(243, 242, 237, .65); }

.site-hero__img {
  position: absolute;
  top: 1.4em;
  right: .9em;
  width: 9.4em;
  height: 8.6em;
  object-fit: contain;
  object-position: right top;
}
.site-hero__tile {
  position: absolute;
  top: 1.4em;
  right: .9em;
  width: 8.4em;
  height: 8.4em;
  border-radius: .9em;
  overflow: hidden;
}
.site-hero__tile img { width: 100%; height: 100%; object-fit: cover; }
.site-hero__tile.is-light { padding: 1em; background: var(--papir); }
.site-hero__tile.is-light img { object-fit: contain; }

.site-glass {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: fit-content;   /* velika koliko i tekst, kao .cs-glass */
  max-width: 86%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.4em max(1.8em, 13cqw) 1.1em 1.1em;
  border-top: 1px solid rgba(255, 255, 255, .22);
  border-right: 1px solid rgba(255, 255, 255, .16);
  border-top-right-radius: 50% 34%;
  overflow: hidden;
  clip-path: inset(0 round 0 50% 0 0 / 0 34% 0 0);   /* isto kao .cs-glass (Safari) */
}
.phone__screen .site-hero { container-type: size; padding: 0; }
.site-glass__under {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 0;
  width: 100cqw;
  height: 100cqh;
  background: var(--cs-bg);
}
.site-glass__under img { filter: blur(.9em) saturate(1.1); }
.site-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .02) 18%, rgba(255, 255, 255, .13) 30%, rgba(255, 255, 255, .02) 40%),
    rgba(255, 255, 255, .08);
}
.site-glass .site-hero__name,
.site-glass .site-hero__role { position: relative; z-index: 2; }
