/* 5P DTF — skupni CSS */
:root {
  --purple: #6965AA;
  --purple-dark: #524f8a;
  --purple-light: #f0effa;
  --green: #BCFF85;
  --gray: #41515B;
  --gray-light: #f5f5f7;
  --border: #ddd;
  --text: #111;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; color: var(--text); background: #f4f4f8; }

/* NAV */
nav {
  background: var(--purple);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 0;
  box-shadow: 0 2px 8px rgba(105,101,170,.3);
  flex-wrap: wrap;
}
nav .nav-logo {
  padding: 10px 0;
  margin-right: 24px;
}
nav .nav-logo img {
  height: 38px;
  display: block;
  filter: brightness(0) invert(1);
}
nav a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  border-bottom: 3px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
nav a:hover { color: white; border-bottom-color: var(--green); }
nav a.active { color: white; border-bottom-color: var(--green); font-weight: 700; }

/* PAGE WRAPPER */
.page { max-width: 860px; margin: 28px auto; padding: 0 16px 40px; }
.page-wide { max-width: 1100px; margin: 28px auto; padding: 0 16px 40px; }

/* HERO (samo za index) */
.hero {
  background: white;
  border-radius: 10px;
  padding: 48px 40px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  margin-bottom: 32px;
}
.hero h1 { font-size: 28px; font-weight: 800; color: var(--purple); letter-spacing: -0.5px; margin-bottom: 10px; }
.hero p { color: #666; font-size: 15px; line-height: 1.6; max-width: 520px; margin: 0 auto 32px; }
.hero-logo { height: 56px; margin: 0 auto 28px; display: block; }
.hero-accent { display: inline-block; width: 40px; height: 3px; background: var(--green); border-radius: 2px; margin-bottom: 20px; }

/* CARD GRID */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 680px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: white;
  border-radius: 8px;
  padding: 28px 24px;
  text-align: center;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.card:hover { border-color: var(--purple); box-shadow: 0 4px 20px rgba(105,101,170,.2); transform: translateY(-2px); }
.card-icon { font-size: 36px; line-height: 1; }
.card h3 { font-size: 15px; font-weight: 700; color: var(--purple); }
.card p { font-size: 12px; color: #666; line-height: 1.5; }

/* PAPER (obrazci) */
.paper {
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

/* DOC HEADER */
.doc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 3px solid var(--purple);
  padding-bottom: 16px;
  margin-bottom: 24px;
  gap: 16px;
}
.doc-header img { height: 50px; background: var(--purple); padding: 8px 14px; border-radius: 6px; }

/* ZELENA POLJA */
.section-head.green { background: var(--green); color: var(--gray); }
.field-green input, .field-green textarea, .field-green select { border-color: #8ac952; background: #f5fff0; }
.field-green label { color: #4a8020; }
table.tbl-green thead tr { background: var(--green); color: var(--gray); }
.doc-header-right { text-align: right; font-size: 11px; color: #666; line-height: 1.7; }
.doc-title { font-size: 17px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; text-align: center; color: var(--purple); margin-bottom: 8px; }
.doc-subtitle { text-align: center; font-size: 12px; color: #888; margin-bottom: 24px; }

/* DOC NUMBER */
.doc-num-row { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.doc-num-row label { font-size: 11px; color: #888; }
.doc-num-row input { border: none; border-bottom: 2px solid var(--purple); font-size: 16px; font-weight: 800; width: 110px; color: var(--purple); background: transparent; outline: none; font-family: inherit; text-align: right; }

/* SECTIONS */
.section { border: 1.5px solid var(--border); border-radius: 6px; margin-bottom: 16px; overflow: hidden; }
.section-head { background: var(--purple); color: white; font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; padding: 7px 14px; }
.section-body { padding: 14px; }
.section-body.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.section-body.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.section-body.g4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 600px) {
  .section-body.g2, .section-body.g3, .section-body.g4 { grid-template-columns: 1fr; }
}

/* FIELDS */
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: #666; }
.field input, .field select, .field textarea {
  border: none; border-bottom: 1.5px solid #ccc; padding: 6px 2px; font-size: 14px;
  font-family: inherit; background: transparent; width: 100%; outline: none; transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--purple); }
.field textarea { border: 1.5px solid #ccc; border-radius: 4px; padding: 8px; resize: vertical; min-height: 65px; }
.field.full { grid-column: 1 / -1; }
.field.required label::after { content: " *"; color: var(--purple); }

/* EMAIL HIGHLIGHT */
.email-field { background: var(--purple-light); border-radius: 6px; padding: 14px; margin-bottom: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.email-field .field label { color: var(--purple); font-weight: 700; }
.email-hint { font-size: 11px; color: #888; margin-top: 4px; }

/* TABLES */
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { background: #f0effa; padding: 7px 10px; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--purple); border-bottom: 2px solid var(--purple); }
.tbl td { padding: 6px 10px; border-bottom: 1px solid #eee; }
.tbl td input, .tbl td select { border: none; border-bottom: 1px solid #ccc; width: 100%; padding: 3px 0; font-size: 12px; background: transparent; outline: none; font-family: inherit; }
.tbl td input:focus, .tbl td select:focus { border-color: var(--purple); }
.tbl tr.total-row { background: #fafafa; font-weight: 700; }

/* CHECKBOXES */
.check-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 12px 14px; }
@media (max-width: 600px) { .check-grid { grid-template-columns: 1fr 1fr; } }
.check-item { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; cursor: pointer; }
.check-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--purple); cursor: pointer; flex-shrink: 0; }

/* CENA */
.cena-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.cena-item { padding: 12px 14px; border-right: 1px solid #eee; }
.cena-item:last-child { border-right: none; }
.cena-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; color: #666; margin-bottom: 5px; }
.cena-val input { border: none; border-bottom: 2px solid var(--purple); font-size: 17px; font-weight: 800; width: 100%; background: transparent; outline: none; font-family: inherit; color: var(--purple); }
.cena-val.accent input { color: #41515B; border-color: #41515B; }

/* STATUS WORKFLOW */
.status-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 12px 14px; }
.status-dot { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: #888; cursor: pointer; }
.dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #ccc; transition: all 0.2s; }
.dot.novo { border-color: #2196F3; background: #E3F2FD; }
.dot.design { border-color: var(--purple); background: var(--purple-light); }
.dot.odobreno { border-color: #FF9800; background: #FFF3E0; }
.dot.produkcija { border-color: #F44336; background: #FFEBEE; }
.dot.zakljuceno { border-color: #4CAF50; background: #E8F5E9; }
.dot.active { filter: brightness(0.75) saturate(1.5); border-width: 3px; }

/* PROOF AREA */
.proof-area {
  border: 2px dashed #ccc; border-radius: 8px; min-height: 300px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color 0.2s; background: #fafafa; position: relative; overflow: hidden;
}
.proof-area:hover { border-color: var(--purple); }
.proof-area.has-img { border-style: solid; border-color: var(--purple); }
.proof-placeholder { text-align: center; color: #bbb; pointer-events: none; }
.proof-placeholder .icon { font-size: 44px; margin-bottom: 10px; }
.proof-placeholder p { font-size: 13px; font-weight: 500; }
.proof-placeholder small { font-size: 11px; }
.proof-preview { max-width: 100%; max-height: 360px; object-fit: contain; display: none; border-radius: 4px; }
.proof-area.has-img .proof-preview { display: block; }
.proof-area.has-img .proof-placeholder { display: none; }
.proof-remove { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.5); color: white; border: none; border-radius: 50%; width: 26px; height: 26px; cursor: pointer; font-size: 14px; display: none; align-items: center; justify-content: center; }
.proof-area.has-img .proof-remove { display: flex; }

/* SIG ROW */
.sig-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 14px; }
.sig-box { border-bottom: 1.5px solid #555; padding-top: 38px; text-align: center; font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 0.8px; }

/* BUTTONS */
.btn-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.btn { padding: 11px 22px; border: none; border-radius: 5px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: opacity 0.2s; }
.btn-primary { background: var(--purple); color: white; }
.btn-secondary { background: #eee; color: #444; }
.btn-print { background: var(--gray); color: white; }
.btn:hover { opacity: 0.85; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* SUBMIT FEEDBACK */
.submit-msg { padding: 12px 16px; border-radius: 6px; font-size: 13px; font-weight: 500; display: none; margin-top: 12px; }
.submit-msg.ok { background: #E8F5E9; color: #2E7D32; border: 1px solid #4CAF50; }
.submit-msg.err { background: #FFEBEE; color: #C62828; border: 1px solid #F44336; }
.submit-msg.loading { background: #E3F2FD; color: #1565C0; border: 1px solid #2196F3; }

/* ROK OPOMBA */
.rok-opomba { background: #FFF8E1; border-left: 4px solid #FFB300; padding: 10px 14px; font-size: 12px; color: #5D4037; margin: 0 0 14px; border-radius: 0 4px 4px 0; }

/* ODOBRITEV */
.odobr-box { border: 2px solid var(--border); border-radius: 8px; padding: 22px; text-align: center; transition: all 0.2s; }
.odobr-box.ok { border-color: #4CAF50; background: #E8F5E9; }
.odobr-box.ne { border-color: #F44336; background: #FFEBEE; }
.badge { display: inline-block; padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.badge.caka { background: #FFF3E0; color: #E65100; border: 1.5px solid #FFB300; }
.badge.odobren { background: #E8F5E9; color: #2E7D32; border: 1.5px solid #4CAF50; }
.badge.zavrn { background: #FFEBEE; color: #C62828; border: 1.5px solid #F44336; }
.btn-odobri { background: #4CAF50; color: white; border: none; padding: 11px 24px; border-radius: 5px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; margin: 0 6px; }
.btn-zavrni { background: #F44336; color: white; border: none; padding: 11px 24px; border-radius: 5px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; margin: 0 6px; }

/* PRIROCNIK */
.guide-toc { background: white; border-radius: 8px; padding: 24px 28px; margin-bottom: 28px; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.guide-toc h2 { color: var(--purple); font-size: 16px; margin-bottom: 14px; }
.guide-toc ol { padding-left: 20px; line-height: 2; }
.guide-toc a { color: var(--purple); text-decoration: none; font-size: 13px; font-weight: 500; }
.guide-toc a:hover { text-decoration: underline; }

.guide-section { background: white; border-radius: 8px; padding: 28px 32px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.guide-section h2 { font-size: 20px; font-weight: 800; color: var(--purple); margin-bottom: 6px; padding-bottom: 10px; border-bottom: 2px solid var(--green); display: inline-block; }
.guide-section h3 { font-size: 15px; font-weight: 700; color: var(--gray); margin: 18px 0 8px; }
.guide-section p { line-height: 1.7; color: #333; margin-bottom: 10px; font-size: 14px; }
.guide-section ul, .guide-section ol { padding-left: 22px; line-height: 1.9; color: #333; font-size: 14px; margin-bottom: 10px; }
.guide-section li { margin-bottom: 2px; }

.tip-box { background: var(--purple-light); border-left: 4px solid var(--purple); padding: 12px 16px; border-radius: 0 6px 6px 0; margin: 12px 0; font-size: 13px; color: var(--gray); }
.tip-box strong { color: var(--purple); }
.warn-box { background: #FFF8E1; border-left: 4px solid #FFB300; padding: 12px 16px; border-radius: 0 6px 6px 0; margin: 12px 0; font-size: 13px; color: #5D4037; }
.warn-box strong { color: #E65100; }

.mesh-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0; }
.mesh-card { border: 2px solid var(--border); border-radius: 8px; padding: 16px; text-align: center; }
.mesh-card.low { border-color: #FFB300; background: #FFFDE7; }
.mesh-card.med { border-color: var(--purple); background: var(--purple-light); }
.mesh-card.hi { border-color: #F44336; background: #FFEBEE; }
.mesh-range { font-size: 22px; font-weight: 900; margin-bottom: 4px; }
.mesh-card.low .mesh-range { color: #E65100; }
.mesh-card.med .mesh-range { color: var(--purple); }
.mesh-card.hi .mesh-range { color: #C62828; }
.mesh-card p { font-size: 11px; line-height: 1.5; color: #555; }

/* PRINT */
@media print {
  nav, .btn-row, .no-print, .submit-msg { display: none !important; }
  body { background: white; }
  .paper { box-shadow: none; padding: 10px 0; }
  .page { margin: 0; padding: 0; max-width: 100%; }
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .paper { padding: 16px; }
  .doc-header { flex-direction: column; }
  .sig-row { grid-template-columns: 1fr; }
  .cena-grid { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr 1fr; }
  .mesh-grid { grid-template-columns: 1fr; }
}
