:root {
  --bg-primary: #070a12;
  --bg-secondary: #0f1523;
  --bg-card: rgba(17, 24, 39, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.09);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --radius-xl: 18px;
  --radius-lg: 12px;
  --radius-md: 10px;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 15% 5%, rgba(99, 102, 241, 0.14), transparent 35%),
    radial-gradient(circle at 85% 12%, rgba(16, 185, 129, 0.10), transparent 35%);
  min-height: 100vh;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  background: rgba(7, 10, 18, 0.88);
  border-bottom: 1px solid var(--border-subtle);
}

.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  transition: all 0.22s ease;
}

/* Tool Card in Catalog */
.tool-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent, #6366f1);
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 38px -12px rgba(0, 0, 0, 0.6);
}

.tool-card.selected-tool {
  border-color: var(--card-accent, #6366f1);
  box-shadow: 0 0 0 2px var(--card-accent, #6366f1), 0 18px 40px -10px rgba(0, 0, 0, 0.7);
  background: rgba(30, 41, 68, 0.92);
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 0.7rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 20px -6px rgba(99, 102, 241, 0.5);
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-emerald {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 0.7rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 20px -6px rgba(16, 185, 129, 0.45);
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-emerald:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-amber {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: #fff;
  font-weight: 700;
  border-radius: var(--radius-md);
  padding: 0.7rem 1.3rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 20px -6px rgba(245, 158, 11, 0.45);
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-secondary {
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 0.65rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: all 0.2s ease;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-secondary:hover {
  background: rgba(51, 65, 85, 0.95);
  color: #fff;
}

/* KPI Cards */
.kpi-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(22, 31, 50, 0.92) 0%, rgba(13, 18, 30, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 1.25rem;
}

/* Decision Cards */
.decision-card {
  border-left: 4px solid var(--decision-color, #6366f1);
  background: rgba(19, 27, 46, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 14px 14px 0;
  padding: 1.15rem 1.35rem;
}

/* PRO Lock Blur Overlay */
.pro-locked-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.pro-blurred-content {
  filter: blur(7px);
  pointer-events: none;
  user-select: none;
  opacity: 0.45;
}

.pro-lock-banner {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.85) 0%, rgba(7, 10, 18, 0.92) 100%);
}

/* Serbian NBS Uplatnica (Nalog za uplatu) */
.nbs-uplatnica {
  background: #fffdf9;
  color: #1e293b;
  border: 2px solid #b91c1c;
  border-radius: 10px;
  padding: 18px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
}

.nbs-uplatnica .nbs-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #991b1b;
  font-weight: 700;
  margin-bottom: 2px;
}

.nbs-uplatnica .nbs-box {
  border: 1.5px solid #dc2626;
  background: #ffffff;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  border-radius: 4px;
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table th {
  background: rgba(15, 23, 42, 0.96);
  color: #94a3b8;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.data-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: #e2e8f0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-success { background: rgba(16, 185, 129, 0.16); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.32); }
.badge-warning { background: rgba(245, 158, 11, 0.16); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.32); }
.badge-danger  { background: rgba(244, 63, 94, 0.16); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.32); }
.badge-info    { background: rgba(99, 102, 241, 0.16); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.32); }

/* ============================================================================
   CLEAN CORPORATE A4 PDF PRINT EXPORT LAYOUT
   ============================================================================ */
#pdfPrintView {
  display: none;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 10pt;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .screen-only,
  .no-print {
    display: none !important;
  }

  #pdfPrintView {
    display: block !important;
    background: #ffffff !important;
    color: #0f172a !important;
    width: 100%;
  }

  .pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 3px solid #4f46e5;
    padding-bottom: 10px;
    margin-bottom: 16px;
  }

  .pdf-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
  }

  .pdf-kpi-box {
    border: 1px solid #cbd5e1;
    border-top: 3px solid #4f46e5;
    border-radius: 6px;
    padding: 10px;
    background: #f8fafc !important;
    break-inside: avoid;
  }

  .pdf-section-title {
    font-size: 12pt;
    font-weight: 800;
    color: #1e293b;
    border-left: 4px solid #4f46e5;
    padding-left: 8px;
    margin: 14px 0 8px 0;
  }

  .pdf-decision-item {
    border: 1px solid #e2e8f0;
    border-left: 4px solid #10b981;
    background: #f8fafc !important;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 8px;
    break-inside: avoid;
  }

  .pdf-charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
    break-inside: avoid;
  }

  .pdf-chart-box {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px;
    text-align: center;
    background: #ffffff !important;
    break-inside: avoid;
  }

  .pdf-chart-box img {
    max-width: 100%;
    height: 175px;
    object-fit: contain;
  }

  .pdf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 8.5pt;
    margin-top: 8px;
  }

  .pdf-table th {
    background: #1e293b !important;
    color: #ffffff !important;
    padding: 6px 8px;
    text-align: left;
    border: 1px solid #334155;
  }

  .pdf-table td {
    padding: 5px 8px;
    border: 1px solid #cbd5e1;
    color: #0f172a;
  }

  .pdf-table tr:nth-child(even) td {
    background: #f8fafc !important;
  }
}
