/* MONLY v1.94 — panel firme. Nastavlja isti sistem kao panel agenta:
   bijele kartice, navy naslovi i mesingani akcenti iz novogradnje. */

/* ——— tabovi: prozirna traka u jednom redu, bez pilula i bez plave ———
   Aktivan tab nosi tanku mesinganu liniju, ostalo je miran natpis. */
/* Dio panela staje ispod lijepljenog zaglavlja i tabova, ne pod njih. */
#companyPanel, #projectPanel, #unitsPanel, #billingPanel { scroll-margin-top: 118px; }

body.panel-ui .tabs.ip-tabs {
  display: flex;
  gap: 4px;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--pp-line);
  border-radius: 0;
  box-shadow: none;
  overflow-x: auto;
  scrollbar-width: none;
}
body.panel-ui .tabs.ip-tabs::-webkit-scrollbar { display: none; }
body.panel-ui .tabs.ip-tabs button {
  position: relative;
  flex: 0 0 auto;
  padding: 13px 16px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #7b8798;
  font: 600 10.5px/1 var(--domis-ui);
  letter-spacing: .12em;
  text-transform: uppercase;
  /* stari panel je stavljao sjenku na aktivan tab; ovdje je nema */
  box-shadow: none;
}
body.panel-ui .tabs.ip-tabs button:hover { background: transparent; color: var(--pp-navy); box-shadow: none; }
body.panel-ui .tabs.ip-tabs button.active { background: transparent; color: var(--pp-navy); font-weight: 700; box-shadow: none; }
body.panel-ui .tabs.ip-tabs button.active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 2px;
  background: var(--pp-gold);
}

.form-status.is-ok { color: #0a7c46; }
.form-status.is-error { color: #b42318; }

/* --------------------------------------------------------- fotografije */
.ip-media-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 6px;
}

.ip-media-row .agent-photo-field {
  margin-bottom: 8px;
}

.agent-photo-preview.is-cover {
  width: 178px;
  height: 100px;
  border-radius: 12px;
  background: #f4f7fc;
  color: #8a93a6;
  font: 650 11px var(--domis-ui);
  letter-spacing: .14em;
}

.agent-photo-preview.is-cover img {
  object-fit: cover;
  object-position: center;
  padding: 0;
}

/* ------------------------------------------------------------- sekcije */
.ip-block {
  margin: 20px 0 4px;
  padding: 16px;
  border: 1px solid #edf0f5;
  border-radius: 12px;
  background: #fcfdff;
}

.ip-block h3 {
  margin: 0 0 4px;
  font-family: var(--domis-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -.02em;
  color: var(--nv-navy);
}

.ip-block .hint { margin: 0 0 10px; }

.ip-triple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ip-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 96px 34px;
  gap: 8px;
  margin-bottom: 8px;
}

.ip-row input { min-width: 0; }

.ip-remove {
  width: 34px;
  height: 34px;
  border: 1px solid #e7ebf2;
  border-radius: 9px;
  background: #fff;
  color: #8a93a6;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.ip-remove:hover { border-color: #f0c2bd; color: #b42318; }

.ip-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid #edf0f5;
  border-radius: 12px;
  background: #fcfdff;
  cursor: pointer;
}

.ip-toggle input { margin: 2px 0 0; }
.ip-toggle b { display: block; font-size: 11px; font-weight: 650; color: #111; }
.ip-toggle small { display: block; margin-top: 2px; font-size: 10px; line-height: 1.6; color: #64748b; }

/* --------------------------------------------------------- projekti */
.ip-project-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 14px 0 6px;
  padding: 12px 14px;
  border: 1px solid #edf0f5;
  border-radius: 12px;
  background: #fcfdff;
}

.ip-project-bar select {
  flex: 1 1 240px;
  min-width: 0;
}

.ip-inline-label {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 650;
}

/* Kartice projekata — isti ritam i isti red kao kartice u „Moj profilu“:
   naslov, činjenice, cijena, pa objavljivač sa logom firme. */
.ip-project-cards {
  display: grid;
  gap: 9px;
  margin: 12px 0 4px;
}

.ip-project-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 10px;
  border: 1px solid #edf1f8;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s, background .18s, box-shadow .18s;
}

.ip-project-card:hover { border-color: #cdd9ec; background: #fbfcfe; }
.ip-project-card:focus-visible { outline: 2px solid #9dbcf0; outline-offset: 2px; }
.ip-project-card.is-active { border-color: #c9d8ef; background: #f7fafd; box-shadow: 0 6px 18px rgba(15, 23, 42, .05); }

.ip-project-photo {
  width: 82px;
  height: 68px;
  border-radius: 10px;
  object-fit: cover;
  background: #eef2f9;
  display: block;
}

.ip-project-photo.empty {
  display: grid;
  place-items: center;
  color: #9fb0c6;
  font: 700 18px/1 var(--domis-display);
}

.ip-project-body { min-width: 0; }

.ip-project-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #111;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ip-project-facts {
  margin: 4px 0 0;
  font-size: 10.5px;
  color: #6c7a90;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ip-project-price {
  margin: 4px 0 0;
  font-size: 13.5px;
  font-weight: 700;
  color: #001f44;
  font-variant-numeric: tabular-nums;
}

.ip-project-author { display: flex; align-items: center; gap: 6px; margin-top: 6px; min-width: 0; }

.ip-project-logo {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  overflow: hidden;
  border: 1px solid #dfe7f5;
  border-radius: 50%;
  background: #eef3fb;
  color: #0b3f8f;
  font-size: 8px;
  font-weight: 700;
}

.ip-project-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ip-project-author-text { display: flex; align-items: baseline; gap: 6px; min-width: 0; font-size: 10.5px; color: #6c7a90; }
.ip-project-author-text b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #1d2a3f; font-size: 10.5px; font-weight: 600; }
.ip-project-author-text small { white-space: nowrap; }

.ip-project-status {
  align-self: start;
  padding: 5px 11px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #0058ff;
  font: 700 9.5px/1 var(--domis-ui);
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ip-project-empty {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px dashed #e5e7eb;
  border-radius: 10px;
  background: #fbfcfe;
  color: #64748b;
  font-size: 11.5px;
}

.ip-links { display: grid; gap: 7px; margin-top: 10px; }

/* -------------------------------------------------------- cjenovnik */
.ip-units-wrap {
  margin: 12px 0;
  overflow-x: auto;
  border: 1px solid #edf0f5;
  border-radius: 12px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

table.ip-units {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.ip-units th {
  padding: 9px 8px;
  border-bottom: 1px solid #edf0f5;
  background: #fcfdff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #64748b;
  text-align: left;
  white-space: nowrap;
}

.ip-units td {
  padding: 6px 6px;
  border-bottom: 1px solid #f3f5f9;
  vertical-align: middle;
}

.ip-units input,
.ip-units select {
  width: 100%;
  min-width: 62px;
  padding: 6px 7px;
  border: 1px solid #e7ebf2;
  border-radius: 8px;
  font-size: 11px;
}

.ip-units td.ip-price {
  font-family: var(--domis-ui);
  font-size: 11px;
  font-weight: 650;
  color: var(--nv-navy);
  white-space: nowrap;
}

.ip-units td.ip-empty,
.ip-empty {
  padding: 16px;
  font-size: 11px;
  color: #64748b;
  text-align: center;
}

.ip-units-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ip-unit-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ip-unit-summary span {
  padding: 7px 11px;
  border: 1px solid var(--nv-gold-line, rgba(200, 167, 92, .42));
  border-radius: 999px;
  background: #fffdf7;
  font-size: 10px;
  letter-spacing: .02em;
  color: #64748b;
}

.ip-unit-summary b {
  font-family: var(--domis-ui);
  font-size: 11px;
  font-weight: 700;
  color: var(--nv-navy);
}

/* --------------------------------------------------------- telefon */
@media (max-width: 979px) {
  .ip-media-row,
  .ip-triple {
    grid-template-columns: minmax(0, 1fr);
  }

  .ip-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 78px 34px;
  }

  .ip-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .ip-tabs button {
    flex: 0 0 auto;
  }
}

/* ——— v1.95: kompaktan panel firme u istom ritmu kao „Moj profil“ ———
   Kratak uvod, račun i brojevi iznad forme, četiri taba u jednom redu,
   manji razmaci u formi. Telefon je osnovni slučaj, jer se panel najviše
   koristi s telefona. */
@media (max-width: 760px) {
  .hero { padding: 10px 0 4px; }
  .hero .eyebrow { font-size: 8px; letter-spacing: .2em; }
  .hero h1 { font-size: 21px; line-height: 1.15; }
  .hero > p { display: none; }

  .panel-layout { grid-template-columns: 1fr; gap: 10px; padding: 12px 0 32px; }
  .panel-layout aside { order: 0; }
  .panel-stack { gap: 10px; }

  .panel { padding: 14px; border-radius: 14px; }
  .panel h2 { font-size: 17px; margin-bottom: 6px; }
  .panel .muted { font-size: 11px; line-height: 1.55; }
  .panel .hint { font-size: 10px; line-height: 1.5; }
  .ip-value-card { display: none; }

  /* naslov sekcije je već u tabu iznad — bez dupliranja na telefonu */
  #companyPanel > h2,
  #projectPanel > h2,
  #unitsPanel > h2,
  #billingPanel > h2,
  #companyPanel > .muted,
  #projectPanel > .muted,
  #unitsPanel > .muted { display: none; }

  /* račun: kratak red pa tri radnje, bez ponavljanja teksta */
  #accountPanel h2 { display: none; }
  #accountPanel #accountInfo { margin: 0 0 8px; font-size: 11px; }
  #accountPanel .hint { display: none; }
  #accountPanel { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  #accountPanel #accountInfo { grid-column: 1 / -1; }
  #accountPanel .ip-links { grid-column: 1 / -1; margin: 0; }
  #accountPanel .ip-links .btn,
  #accountPanel > .btn { width: 100%; min-height: 34px; margin: 0 !important; padding: 8px 10px; font-size: 10.5px; line-height: 1.25; }
  #accountPanel .ip-links .btn { margin: 0 !important; }

  /* tabovi: četiri jednaka dijela u jednom redu, na podlozi stranice */
  body.panel-ui .tabs.ip-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    width: 100%;
    overflow: visible;
    margin: 0;
    padding: 0;
    position: sticky;
    top: 64px;
    z-index: 30;
    background: #f6f8fc;
    border-radius: 0;
    box-shadow: none;
  }
  body.panel-ui .tabs.ip-tabs {
    margin-top: 4px;
  }
  body.panel-ui .tabs.ip-tabs button {
    padding: 13px 1px 12px;
    font-size: 9.5px;
    line-height: 1.2;
    letter-spacing: .03em;
    white-space: normal;
    border-radius: 0;
  }
  body.panel-ui .tabs.ip-tabs button.active::after { left: 10px; right: 10px; }

  /* forma: gusta, bez praznih pojaseva */
  .field-grid { gap: 8px; }
  .field-grid label, .field-grid > div > label { font-size: 10px; }
  .field-grid input, .field-grid select, .field-grid textarea { padding: 8px 10px; font-size: 12px; }
  .ip-media-row { gap: 8px; margin-bottom: 2px; }
  .ip-media-row .agent-photo-field { margin-bottom: 4px; }
  .agent-photo-preview.is-cover { width: 138px; height: 78px; }
  .agent-photo-preview.is-logo { width: 96px; height: 96px; }

  /* logo i naslovna: pregled lijevo, tekst desno — bez praznog pojasa */
  .ip-media-row .agent-photo-field {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 12px;
    padding: 10px;
    margin-bottom: 6px;
  }
  .ip-media-row .agent-photo-actions { justify-content: flex-start; margin-top: 7px; }
  .ip-media-row .agent-photo-copy > label { margin-bottom: 2px; font-size: 11px; }
  .ip-media-row .agent-photo-copy .hint {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .ip-media-row .agent-photo-preview.is-cover { width: 96px; height: 56px; }
  .ip-media-row .agent-photo-preview.is-logo { width: 72px; height: 72px; }
  .ip-block { margin: 12px 0 2px; padding: 11px; border-radius: 10px; }
  .ip-block h3 { font-size: 13.5px; }
  .ip-toggle { margin-top: 12px; padding: 10px 11px; border-radius: 10px; }
  .ip-project-cards { gap: 7px; margin: 10px 0 4px; }
  .ip-project-card { grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 8px; border-radius: 12px; }
  .ip-project-photo { width: 56px; height: 48px; border-radius: 8px; }
  .ip-project-title { font-size: 12.5px; }
  .ip-project-facts { font-size: 10px; }
  .ip-project-price { font-size: 12.5px; }
  .ip-project-author { margin-top: 4px; }
  .ip-project-status { grid-column: 2; justify-self: start; margin-top: 2px; padding: 4px 9px; font-size: 8.5px; }
  .ip-project-bar { margin: 10px 0 4px; padding: 9px 10px; border-radius: 10px; gap: 6px; }
  .ip-project-bar select { flex-basis: 100%; }
  .ip-units-wrap { margin: 8px 0; }
  .ip-unit-summary { margin-top: 10px; gap: 6px; }
  .agency-gallery-head { margin: 12px 0 6px; }
  .agency-gallery-head h3 { font-size: 14px; }
  .agency-gallery { gap: 6px; }
  .billing-notice, .billing-summary { font-size: 11px; }

  /* pretplata i fakture: zbir u dva kratka polja, fakture kao redovi liste */
  .billing-panel .billing-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-radius: 10px;
    margin: 10px 0;
  }
  .billing-summary-row { padding: 8px 10px; }
  /* neparan broj polja: zadnje zauzima cijeli red, bez prazne sive kućice */
  .billing-panel .billing-summary-row:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .billing-summary-row span { font-size: 8px; letter-spacing: .1em; }
  .billing-summary-row b { margin-top: 2px; font-size: 11.5px; }
  .billing-subtitle { margin: 14px 0 6px; }

  .billing-invoices {
    gap: 0;
    border: 1px solid #edf0f5;
    border-radius: 10px;
    overflow: hidden;
  }
  .billing-invoice {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 3px 10px;
    align-items: center;
    padding: 9px 11px;
    border: 0;
    border-bottom: 1px solid #f1f4f9;
    border-radius: 0;
  }
  .billing-invoice:last-child { border-bottom: 0; }
  .billing-invoice b { font-size: 11.5px; line-height: 1.35; }
  .billing-invoice small { margin-top: 2px; font-size: 9.5px; }
  .billing-invoice-amount { text-align: right; }
  .billing-invoice-amount b { font-size: 12px; }
  .billing-invoice-doc { margin-top: 3px; padding: 3px 8px; font-size: 9px; }
  .billing-profile-grid { gap: 8px; }
}
