/* =============================================
   AGRAMSERVIS – Zahtjev za povrat sredstava
   Professional Corporate Design
   ============================================= */

:root {
  --brand-orange: #E8651A;
  --brand-orange-light: #F28040;
  --brand-orange-dark: #C4511A;
  --brand-orange-faint: #FDF2EB;
  --neutral-50: #FAFAFA;
  --neutral-100: #F4F4F5;
  --neutral-200: #E4E4E7;
  --neutral-300: #D1D5DB;
  --neutral-400: #9CA3AF;
  --neutral-500: #6B7280;
  --neutral-600: #4B5563;
  --neutral-700: #374151;
  --neutral-800: #1F2937;
  --neutral-900: #111827;
  --success: #059669;
  --success-light: #ECFDF5;
  --error: #DC2626;
  --error-light: #FEF2F2;
  --warning: #D97706;
  --warning-light: #FFFBEB;
  --info: #2563EB;
  --info-light: #EFF6FF;
  --shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 25px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 50px -10px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-weight: 400;
  color: var(--neutral-700);
  background: var(--neutral-100);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── HEADER ─────────────────────────────────── */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--neutral-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-link { display: flex; align-items: center; flex-shrink: 0; }
.logo { height: 36px; width: auto; display: block; }

.header-title {
  border-left: 2px solid var(--neutral-200);
  padding-left: 20px;
}

.header-subtitle {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--neutral-400);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 3px;
}

.header-main {
  font-family: 'DM Serif Display', serif;
  font-size: 17px;
  font-weight: 400;
  color: var(--neutral-800);
  line-height: 1.2;
}

/* ── PROGRESS BAR ────────────────────────────── */
.progress-bar-wrap {
  height: 3px;
  background: var(--neutral-200);
  position: sticky;
  top: 72px;
  z-index: 99;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-orange-dark), var(--brand-orange));
  width: 0%;
  transition: width 0.3s ease;
}

/* ── LAYOUT ──────────────────────────────────── */
.main-content {
  padding: 40px 0 60px;
  min-height: calc(100vh - 72px);
}

.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── INTRO CARD ───────────────────────────────── */
.intro-card {
  background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
  color: white;
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  box-shadow: 0 8px 32px -8px rgba(232,101,26,0.4);
}

.intro-icon {
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.intro-icon svg { width: 26px; height: 26px; color: white; }

.intro-title {
  font-family: 'DM Serif Display', serif;
  font-size: 20px;
  font-weight: 400;
  color: white;
  margin-bottom: 6px;
}

.intro-text {
  font-size: 14px;
  color: rgba(255,255,255,0.88);
  line-height: 1.6;
}

/* ── FORM SECTION ────────────────────────────── */
.form-section {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--neutral-200);
}

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--neutral-100);
}

.section-number {
  width: 40px;
  height: 40px;
  background: var(--brand-orange-faint);
  color: var(--brand-orange);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'DM Serif Display', serif;
  font-size: 15px;
  font-weight: 400;
  flex-shrink: 0;
  border: 1px solid rgba(232,101,26,0.15);
}

.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 18px;
  font-weight: 400;
  color: var(--neutral-800);
  margin-bottom: 2px;
}

.section-desc {
  font-size: 13px;
  color: var(--neutral-500);
}

/* ── FORM GRID ───────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }
.full-width { grid-column: 1 / -1; }
.half { grid-column: span 1; }

/* ── LABELS ──────────────────────────────────── */
.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-700);
  display: flex;
  align-items: center;
  gap: 6px;
}

.required { color: var(--brand-orange); font-size: 14px; }

/* ── INPUTS ──────────────────────────────────── */
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--neutral-800);
  background: var(--neutral-50);
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.form-input:hover { border-color: var(--neutral-300); }

.form-input:focus {
  border-color: var(--brand-orange);
  box-shadow: 0 0 0 3px rgba(232,101,26,0.12);
  background: #fff;
}

.form-input.is-valid {
  border-color: var(--success);
  background: var(--success-light);
}

.form-input.is-error {
  border-color: var(--error);
  background: var(--error-light);
  box-shadow: 0 0 0 3px rgba(220,38,38,0.08);
}

/* ── TEXTAREA ────────────────────────────────── */
.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.char-counter {
  text-align: right;
  font-size: 12px;
  color: var(--neutral-400);
}

/* ── SELECT ──────────────────────────────────── */
.select-wrap { position: relative; }

.form-select {
  cursor: pointer;
  padding-right: 36px;
  appearance: none;
}

.select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--neutral-400);
  pointer-events: none;
}

/* ── INPUT PREFIX ────────────────────────────── */
.input-prefix-wrap { position: relative; }

.input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-500);
}

.with-prefix { padding-left: 30px; }

/* ── IBAN ────────────────────────────────────── */
.iban-wrap { position: relative; }

.iban-input { 
  font-family: 'DM Mono', 'Courier New', monospace;
  font-size: 15px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding-right: 48px;
}

.iban-status {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iban-hint {
  font-size: 12px;
  color: var(--neutral-400);
  margin-top: 4px;
  display: block;
}

.iban-warning {
  display: none;
  margin-top: 10px;
  padding: 12px 14px;
  background: var(--warning-light);
  border: 1px solid rgba(217,119,6,0.25);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: #92400E;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.5;
}

.iban-warning svg { width: 16px; height: 16px; color: var(--warning); flex-shrink: 0; margin-top: 2px; }
.iban-warning.visible { display: flex; }

/* ── INFO BUTTON ─────────────────────────────── */
.info-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--neutral-400);
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}

.info-btn:hover { color: var(--brand-orange); }
.info-btn svg { width: 18px; height: 18px; }

/* ── TOOLTIP ─────────────────────────────────── */
.tooltip {
  position: fixed;
  z-index: 9999;
  background: var(--neutral-900);
  color: white;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  max-width: 280px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}

.tooltip.visible { opacity: 1; }

/* ── FIELD ERROR ─────────────────────────────── */
.field-error {
  font-size: 12px;
  color: var(--error);
  display: none;
  align-items: center;
  gap: 4px;
}

.field-error.visible { display: flex; }

/* ── UPLOAD ZONE ─────────────────────────────── */
.upload-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--info-light);
  border: 1px solid rgba(37,99,235,0.15);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 13.5px;
  color: #1E3A8A;
  line-height: 1.6;
}

.upload-notice svg { width: 18px; height: 18px; color: var(--info); flex-shrink: 0; margin-top: 2px; }

.upload-zone {
  border: 2px dashed var(--neutral-300);
  border-radius: var(--radius-md);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: border-color var(--transition), background var(--transition);
}

.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--brand-orange);
  background: var(--brand-orange-faint);
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.upload-icon {
  width: 52px;
  height: 52px;
  background: var(--neutral-100);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.upload-icon svg { width: 26px; height: 26px; color: var(--neutral-400); }
.upload-zone:hover .upload-icon, .upload-zone.drag-over .upload-icon {
  background: rgba(232,101,26,0.1);
}
.upload-zone:hover .upload-icon svg, .upload-zone.drag-over .upload-icon svg {
  color: var(--brand-orange);
}

.upload-text { font-size: 14px; color: var(--neutral-600); margin-bottom: 6px; }
.upload-browse { color: var(--brand-orange); font-weight: 500; cursor: pointer; }
.upload-types { font-size: 12px; color: var(--neutral-400); }

/* ── FILE LIST ───────────────────────────────── */
.file-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.file-icon { font-size: 18px; flex-shrink: 0; }
.file-name { flex: 1; color: var(--neutral-700); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--neutral-400); flex-shrink: 0; font-size: 12px; }
.file-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--neutral-400);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.file-remove:hover { background: var(--error-light); color: var(--error); }

/* ── LEGAL NOTICES ───────────────────────────── */
.legal-notices { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }

.legal-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  line-height: 1.6;
}

.notice-warning {
  background: var(--warning-light);
  border: 1px solid rgba(217,119,6,0.2);
  color: #78350F;
}

.notice-info {
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  color: var(--neutral-600);
}

.notice-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notice-warning .notice-icon { background: rgba(217,119,6,0.1); }
.notice-warning .notice-icon svg { width: 18px; height: 18px; color: var(--warning); }
.notice-info .notice-icon { background: var(--neutral-200); }
.notice-info .notice-icon svg { width: 18px; height: 18px; color: var(--neutral-500); }

.legal-link { color: var(--brand-orange); text-decoration: none; }
.legal-link:hover { text-decoration: underline; }

/* ── SUBMIT BUTTON ───────────────────────────── */
.submit-section { text-align: center; }

.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 16px 40px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  box-shadow: 0 4px 20px -4px rgba(232,101,26,0.5);
  letter-spacing: 0.01em;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px -4px rgba(232,101,26,0.55);
}

.submit-btn:active { transform: translateY(0); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.btn-icon { display: flex; align-items: center; }
.btn-icon svg { width: 18px; height: 18px; }

/* ── MODAL ───────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  backdrop-filter: blur(4px);
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal {
  background: white;
  border-radius: var(--radius-xl);
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.25s;
}

.modal-overlay.active .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: 32px 32px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.modal-icon {
  width: 60px;
  height: 60px;
  background: var(--brand-orange-faint);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon svg { width: 32px; height: 32px; color: var(--brand-orange); }

.modal-title {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--neutral-800);
}

.modal-body {
  padding: 20px 32px;
}

.modal-question {
  font-size: 15px;
  color: var(--neutral-600);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.6;
}

.modal-notice {
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 13px;
  color: var(--neutral-600);
  line-height: 1.7;
}

.modal-footer {
  padding: 0 32px 32px;
  display: flex;
  gap: 12px;
}

.btn-cancel {
  flex: 1;
  padding: 13px;
  border: 1.5px solid var(--neutral-200);
  border-radius: 50px;
  background: white;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--neutral-600);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.btn-cancel:hover { background: var(--neutral-50); border-color: var(--neutral-300); }

.btn-confirm {
  flex: 2;
  padding: 13px;
  background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-dark) 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-confirm:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-confirm:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ── SUCCESS ─────────────────────────────────── */
.success-overlay {
  position: fixed;
  inset: 0;
  background: var(--neutral-100);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.success-card {
  background: white;
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  text-align: center;
  max-width: 500px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: successPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPop {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--success-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.success-icon svg { width: 44px; height: 44px; color: var(--success); }

.success-title {
  font-family: 'DM Serif Display', serif;
  font-size: 24px;
  color: var(--neutral-800);
  margin-bottom: 14px;
}

.success-text {
  font-size: 14.5px;
  color: var(--neutral-500);
  line-height: 1.7;
  margin-bottom: 16px;
}

.success-ref {
  font-size: 13px;
  color: var(--neutral-400);
  margin-bottom: 28px;
  font-family: monospace;
}

/* ── TOAST ───────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  background: var(--neutral-900);
  color: white;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease;
  max-width: 380px;
}

.toast svg { width: 18px; height: 18px; color: #F87171; flex-shrink: 0; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── FOOTER ──────────────────────────────────── */
.site-footer {
  background: var(--neutral-800);
  color: var(--neutral-300);
  padding: 48px 0 0;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-logo { height: 28px; width: auto; filter: brightness(0) invert(1); margin-bottom: 10px; }

.footer-tagline {
  font-size: 13px;
  color: var(--neutral-500);
  margin-top: 6px;
}

.footer-heading {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--neutral-400);
  margin-bottom: 14px;
}

.footer-address {
  font-style: normal;
  font-size: 13.5px;
  line-height: 2;
  color: var(--neutral-400);
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--neutral-400);
  text-decoration: none;
  padding: 5px 0;
  transition: color var(--transition);
}

.footer-link:hover { color: var(--brand-orange-light); }
.footer-link svg { width: 16px; height: 16px; flex-shrink: 0; }

.footer-bottom {
  border-top: 1px solid var(--neutral-700);
  padding: 20px 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--neutral-600);
}

/* ── FADE IN ─────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.5s ease forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.15s; }
.fade-in:nth-child(4) { animation-delay: 0.2s; }
.fade-in:nth-child(5) { animation-delay: 0.25s; }
.fade-in:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 680px) {
  .header-inner { height: 60px; gap: 14px; }
  .header-title { padding-left: 14px; }
  .header-main { font-size: 14px; }
  .header-subtitle { display: none; }
  .logo { height: 28px; }
  .progress-bar-wrap { top: 60px; }
  .main-content { padding: 24px 0 40px; }
  .container { padding: 0 16px; }
  .intro-card { padding: 20px; flex-direction: column; gap: 14px; }
  .form-section { padding: 20px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .half { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .modal-header { padding: 24px 24px 0; }
  .modal-body { padding: 16px 24px; }
  .modal-footer { padding: 0 24px 24px; flex-direction: column; }
  .btn-cancel, .btn-confirm { flex: auto; }
  .submit-btn { width: 100%; justify-content: center; padding: 16px 24px; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
}
