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

:root {
  --red: #e4002b;
  --red-dark: #b8001f;
  --navy: #1a2c5b;
  --navy-dark: #111e3d;
  --bg: #f0f2f5;
  --surface: #ffffff;
  --border: #dde1e9;
  --gray-500: #8892a4;
  --gray-400: #a0a8b8;
  --gray-200: #e8ebf0;
  --text-primary: #1a1a2e;
  --text-secondary: #5a6478;
  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --transition: 0.15s ease;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */
.nav {
  background: var(--navy);
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.nav-logo {
  height: 28px;
  width: auto;
  /* Logo je bijel, radi na teget pozadini */
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.nav-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
}

/* ── Crvena traka ispod nava ──────────────────────────────────────────────── */
.nav-stripe {
  height: 4px;
  background: var(--red);
  flex-shrink: 0;
}

/* ── Breadcrumb ───────────────────────────────────────────────────────────── */
.breadcrumb {
  background: var(--surface);
  padding: 10px 40px;
  border-bottom: 1px solid var(--border);
}

.breadcrumb span {
  font-size: 12px;
  color: var(--gray-500);
}

.breadcrumb span + span::before {
  content: ' › ';
}

.breadcrumb span:last-child {
  color: var(--text-primary);
  font-weight: 500;
}

/* ── Page ─────────────────────────────────────────────────────────────────── */
.page {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px 80px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--red);
  border-radius: 4%;
  width: 100%;
  max-width: 520px;
  padding: 36px 40px 40px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

/* ── Card header ──────────────────────────────────────────────────────────── */
.card-header {
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.card-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 3px 10px;
  margin-bottom: 14px;
}

.card-title {
  font-size: 22px;
  font-weight: 300;
  color: var(--navy);
  margin-bottom: 6px;
  line-height: 1.3;
}

.card-title strong {
  font-weight: 700;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Upload redovi ────────────────────────────────────────────────────────── */
#uploadForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.upload-row {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
  overflow: hidden;
}

.upload-row:hover,
.upload-row.drag-over {
  border-color: var(--navy);
  background: #eaecf5;
}

.upload-row.has-file {
  border-color: var(--red);
  background: #fff5f7;
}

.upload-row.has-file::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--red);
}

.upload-num {
  width: 52px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-500);
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}

.upload-row.has-file .upload-num {
  background: var(--red);
  color: #fff;
}

.upload-icon {
  width: 52px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gray-500);
  transition: color var(--transition);
}

.upload-row.has-file .upload-icon { color: var(--red); }

.upload-info {
  flex: 1;
  padding: 0 20px;
  overflow: hidden;
}

.upload-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

.upload-hint {
  font-size: 12px;
  color: var(--text-secondary);
}

.upload-hint .link-label {
  color: var(--navy);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.upload-filename {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-style: italic;
}

.upload-row.has-file .upload-filename {
  color: var(--red);
  font-style: normal;
  font-weight: 600;
}

.upload-status {
  width: 48px;
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  transition: color var(--transition);
}

.upload-row.has-file .upload-status { color: var(--red); }

/* ── Error ────────────────────────────────────────────────────────────────── */
.error-msg {
  background: #fff0f2;
  border-left: 3px solid var(--red);
  color: #b0001f;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.5;
}

/* ── Submit ───────────────────────────────────────────────────────────────── */
.submit-wrap {
  margin-top: 24px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

button[type="submit"] {
  width: 100%;
  background: var(--red);
  color: #fff;
  border: none;
  padding: 15px 24px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background var(--transition);
}

button[type="submit"]:disabled {
  background: var(--gray-400);
  cursor: not-allowed;
}

button[type="submit"]:not(:disabled):hover { background: var(--red-dark); }

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Success ──────────────────────────────────────────────────────────────── */
.success-msg {
  display: none;
  align-items: flex-start;
  gap: 14px;
  background: #f0faf4;
  border-left: 3px solid #00a651;
  padding: 18px 20px;
  margin-top: 16px;
  animation: fadeIn 0.3s ease;
}

.success-msg svg { flex-shrink: 0; color: #00a651; margin-top: 1px; }
.success-msg p   { font-size: 14px; font-weight: 600; color: #007a3a; margin-bottom: 2px; }
.success-msg span { font-size: 12px; color: var(--text-secondary); }

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

/* ── Footer ───────────────────────────────────────────────────────────────── */
.footer {
  background: var(--navy-dark);
  padding: 16px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.footer span {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
}

@media (max-width: 600px) {
  .nav, .breadcrumb, .footer { padding-left: 20px; padding-right: 20px; }
  .card { padding: 24px 20px 28px; }
  .footer { flex-direction: column; gap: 4px; }
}