/**
 * KALKULACIJA.ME — Pantheon Dark NEON Theme
 * Dark sleek design with neon glow accents
 * (c) Telmont Montenegro DOO
 */

:root {
  /* Primary Colors — Deep dark palette */
  --bg-primary: #0a0e14;
  --bg-secondary: #0f141b;
  --bg-tertiary: #151c26;
  --bg-card: #1a2230;
  --bg-elevated: #212a3a;

  /* Neon Accent Colors */
  --neon-cyan: #00f0ff;
  --neon-blue: #00a8ff;
  --neon-purple: #b14aff;
  --neon-pink: #ff2e9a;
  --neon-green: #00ff88;
  --neon-orange: #ff8c00;
  --neon-red: #ff3860;
  --neon-yellow: #ffd60a;

  /* Legacy accent aliases (for compat) */
  --accent-blue: var(--neon-blue);
  --accent-purple: var(--neon-purple);
  --accent-green: var(--neon-green);
  --accent-orange: var(--neon-orange);
  --accent-red: var(--neon-red);

  /* Text Colors */
  --text-primary: #e8f0ff;
  --text-secondary: #8b9bb4;
  --text-muted: #5a6b85;

  /* Border & Dividers */
  --border-color: #2a3548;
  --border-subtle: #1f2937;
  --border-neon: rgba(0, 240, 255, 0.3);

  /* Neon Glow Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
  --shadow-md: 0 4px 12px -2px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 12px 28px -4px rgba(0, 0, 0, 0.7);
  --shadow-glow-cyan: 0 0 20px rgba(0, 240, 255, 0.25), 0 0 40px rgba(0, 168, 255, 0.1);
  --shadow-glow-purple: 0 0 20px rgba(177, 74, 255, 0.25), 0 0 40px rgba(177, 74, 255, 0.1);
  --shadow-glow-green: 0 0 15px rgba(0, 255, 136, 0.3);
  --shadow-glow-red: 0 0 15px rgba(255, 56, 96, 0.3);
  --shadow-glow-orange: 0 0 15px rgba(255, 140, 0, 0.3);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-glow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Font */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
}

/* ===== BASE ===== */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  background-image:
    radial-gradient(circle at 15% 15%, rgba(0, 168, 255, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(177, 74, 255, 0.04) 0%, transparent 40%);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar — neon */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--neon-blue), var(--neon-purple));
  border-radius: 5px;
  border: 2px solid var(--bg-secondary);
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--neon-cyan), var(--neon-pink));
}

/* Selection */
::selection {
  background: rgba(0, 240, 255, 0.25);
  color: var(--neon-cyan);
}

/* ===== LOGIN PAGE ===== */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--bg-primary);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(0, 240, 255, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(177, 74, 255, 0.08) 0%, transparent 50%),
    linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  position: relative;
  overflow: hidden;
}

.login-page::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(circle at 30% 20%, rgba(0, 240, 255, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 70% 80%, rgba(177, 74, 255, 0.06) 0%, transparent 40%);
  animation: neon-pulse 18s ease-in-out infinite;
}

@keyframes neon-pulse {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.6; }
  50% { transform: scale(1.15) rotate(2deg); opacity: 1; }
}

.login-card {
  position: relative;
  z-index: 1;
  background: rgba(26, 34, 48, 0.85);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg), var(--shadow-glow-cyan);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: card-glow 4s ease-in-out infinite;
}

@keyframes card-glow {
  0%, 100% { box-shadow: var(--shadow-lg), 0 0 20px rgba(0, 240, 255, 0.15); }
  50% { box-shadow: var(--shadow-lg), 0 0 30px rgba(177, 74, 255, 0.2); }
}

.login-header { text-align: center; margin-bottom: var(--space-xl); }

.login-logo {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
  border-radius: var(--radius-lg);
  display: grid;
  place-items: center;
  margin: 0 auto var(--space-md);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.4), 0 0 60px rgba(177, 74, 255, 0.2);
  animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
  0%, 100% { box-shadow: 0 0 30px rgba(0, 240, 255, 0.4), 0 0 60px rgba(177, 74, 255, 0.2); }
  50% { box-shadow: 0 0 40px rgba(0, 240, 255, 0.6), 0 0 80px rgba(177, 74, 255, 0.3); }
}

.login-logo i { font-size: 2.25rem; color: white; }

.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 0 var(--space-xs);
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.login-subtitle { color: var(--text-secondary); font-size: 0.875rem; margin: 0; }

/* Tenant Badge */
.tenant-badge {
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  margin-bottom: var(--space-lg);
}

.tenant-badge i { font-size: 1.25rem; color: var(--neon-cyan); margin-bottom: var(--space-xs); display: block; }
.tenant-badge strong { color: var(--text-primary); font-size: 1rem; }
.tenant-badge .tenant-meta { color: var(--text-muted); font-size: 0.75rem; margin-top: var(--space-xs); }

/* ===== FORMS ===== */
.form-group { margin-bottom: var(--space-lg); }

.form-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.form-control, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: var(--font-sans);
  transition: all var(--transition-glow);
}

.form-control:focus, .form-select:focus {
  outline: none;
  border-color: var(--neon-cyan);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.12), 0 0 20px rgba(0, 240, 255, 0.15);
  background: var(--bg-tertiary);
}

.form-control::placeholder { color: var(--text-muted); }

.input-group { display: flex; align-items: stretch; }
.input-group .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }

.input-group-text {
  display: flex;
  align-items: center;
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-left: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--neon-cyan);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-glow);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-purple) 100%);
  color: white;
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 0 20px rgba(0, 168, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.5), 0 0 50px rgba(177, 74, 255, 0.3);
}

.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.2);
}

.btn-success {
  background: linear-gradient(135deg, var(--neon-green) 0%, #00cc6a 100%);
  color: #001a0d;
  font-weight: 700;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}
.btn-success:hover { box-shadow: 0 0 25px rgba(0, 255, 136, 0.5); transform: translateY(-1px); }

.btn-danger {
  background: linear-gradient(135deg, var(--neon-red) 0%, #cc1f3d 100%);
  color: white;
  box-shadow: 0 0 15px rgba(255, 56, 96, 0.3);
}
.btn-danger:hover { box-shadow: 0 0 25px rgba(255, 56, 96, 0.5); transform: translateY(-1px); }

.btn-warning {
  background: linear-gradient(135deg, var(--neon-orange) 0%, #cc6f00 100%);
  color: white;
  box-shadow: 0 0 15px rgba(255, 140, 0, 0.3);
}

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }

/* ===== LAYOUT ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: var(--bg-secondary);
  background-image: linear-gradient(180deg, rgba(0, 240, 255, 0.02) 0%, transparent 100%);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  width: 260px;
  flex-shrink: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-decoration: none;
}

.sidebar-brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--neon-cyan) 0%, var(--neon-purple) 100%);
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.3);
}

.sidebar-brand-icon i { color: white; font-size: 1.25rem; }

.sidebar-brand-text {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.sidebar-nav { flex: 1; padding: var(--space-md); overflow-y: auto; }

.nav-section { margin-bottom: var(--space-lg); }

.nav-section-title {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: var(--space-md) var(--space-md) var(--space-sm);
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: 0.625rem var(--space-md);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  transition: all var(--transition-glow);
  margin-bottom: var(--space-xs);
  border-left: 3px solid transparent;
  margin-left: -3px;
}

.nav-link i { font-size: 1.125rem; width: 24px; text-align: center; }

.nav-link:hover {
  background: var(--bg-tertiary);
  color: var(--neon-cyan);
  border-left-color: rgba(0, 240, 255, 0.5);
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.12) 0%, rgba(177, 74, 255, 0.08) 100%);
  color: var(--neon-cyan);
  border-left-color: var(--neon-cyan);
  box-shadow: inset 0 0 20px rgba(0, 240, 255, 0.05);
}

.nav-link.active i { color: var(--neon-cyan); text-shadow: 0 0 10px rgba(0, 240, 255, 0.6); }

.sidebar-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--border-color);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-menu:hover { background: var(--bg-tertiary); box-shadow: 0 0 15px rgba(0, 240, 255, 0.1); }

.user-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--neon-purple) 0%, var(--neon-cyan) 100%);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: white;
  box-shadow: 0 0 15px rgba(177, 74, 255, 0.3);
}

.user-info { flex: 1; }
.user-name { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); margin: 0; }
.user-role { font-size: 0.75rem; color: var(--text-muted); margin: 0; }

/* Main Content */
.main-content {
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.top-bar {
  background: rgba(15, 20, 27, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: var(--space-md) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-title { font-size: 1.5rem; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.page-actions { display: flex; gap: var(--space-sm); }

.content-area { flex: 1; padding: var(--space-xl); }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition-glow);
}

.card:hover { border-color: rgba(0, 240, 255, 0.2); }

.card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.card-title i { color: var(--neon-cyan); }
.card-body { padding: var(--space-lg); }

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-glow);
}

.stat-card:hover { transform: translateY(-2px); }

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}

.stat-card.blue::before { background: var(--neon-blue); box-shadow: 0 0 10px rgba(0, 168, 255, 0.5); }
.stat-card.green::before { background: var(--neon-green); box-shadow: 0 0 10px rgba(0, 255, 136, 0.5); }
.stat-card.orange::before { background: var(--neon-orange); box-shadow: 0 0 10px rgba(255, 140, 0, 0.5); }
.stat-card.purple::before { background: var(--neon-purple); box-shadow: 0 0 10px rgba(177, 74, 255, 0.5); }

.stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
}

.stat-value { font-size: 2rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.stat-change { font-size: 0.875rem; color: var(--text-muted); margin-top: var(--space-xs); }
.stat-change.positive { color: var(--neon-green); }
.stat-change.negative { color: var(--neon-red); }

/* ===== TABLES ===== */
.table-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table { width: 100%; border-collapse: collapse; }

.table thead th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table tbody td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.table tbody tr { transition: background var(--transition-fast); }
.table tbody tr:hover td { background: var(--bg-tertiary); }
.table tbody tr:last-child td { border-bottom: none; }

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-draft { background: rgba(90, 107, 133, 0.2); color: var(--text-secondary); }
.badge-active { background: rgba(0, 255, 136, 0.12); color: var(--neon-green); box-shadow: 0 0 10px rgba(0, 255, 136, 0.15); }
.badge-archived { background: rgba(90, 107, 133, 0.15); color: var(--text-muted); }
.badge-warning { background: rgba(255, 140, 0, 0.12); color: var(--neon-orange); }

/* Bootstrap compat badge colors */
.badge.bg-success { background: rgba(0, 255, 136, 0.15); color: var(--neon-green); }
.badge.bg-danger { background: rgba(255, 56, 96, 0.15); color: var(--neon-red); }
.badge.bg-warning { background: rgba(255, 140, 0, 0.15); color: var(--neon-orange); }
.badge.bg-primary { background: rgba(0, 168, 255, 0.15); color: var(--neon-blue); }
.badge.bg-info { background: rgba(0, 240, 255, 0.15); color: var(--neon-cyan); }
.badge.bg-secondary { background: rgba(90, 107, 133, 0.2); color: var(--text-secondary); }

/* ===== ALERTS ===== */
.alert {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  border: 1px solid transparent;
  font-size: 0.9375rem;
}

.alert-success {
  background: rgba(0, 255, 136, 0.08);
  border-color: rgba(0, 255, 136, 0.25);
  color: var(--neon-green);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.1);
}

.alert-error {
  background: rgba(255, 56, 96, 0.08);
  border-color: rgba(255, 56, 96, 0.25);
  color: var(--neon-red);
  box-shadow: 0 0 15px rgba(255, 56, 96, 0.1);
}

.alert-warning {
  background: rgba(255, 140, 0, 0.08);
  border-color: rgba(255, 140, 0, 0.25);
  color: var(--neon-orange);
  box-shadow: 0 0 15px rgba(255, 140, 0, 0.1);
}

.alert-info {
  background: rgba(0, 240, 255, 0.08);
  border-color: rgba(0, 240, 255, 0.25);
  color: var(--neon-cyan);
  box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.alert-danger { background: rgba(255, 56, 96, 0.08); border-color: rgba(255, 56, 96, 0.25); color: var(--neon-red); }

/* ===== UTILITIES ===== */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-primary { color: var(--text-primary); }
.text-success { color: var(--neon-green); }
.text-danger { color: var(--neon-red); }
.text-warning { color: var(--neon-orange); }
.text-info { color: var(--neon-cyan); }
.text-center { text-align: center; }
.text-end { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-sm); }
.mb-2 { margin-bottom: var(--space-md); }
.mb-3 { margin-bottom: var(--space-lg); }
.mb-4 { margin-bottom: var(--space-xl); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-sm); }
.mt-2 { margin-top: var(--space-md); }
.mt-3 { margin-top: var(--space-lg); }
.mt-4 { margin-top: var(--space-xl); }
.my-4 { margin-top: var(--space-xl); margin-bottom: var(--space-xl); }

.flex { display: flex; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: var(--space-md); }
.gap-3 { gap: var(--space-lg); }

.row { display: flex; flex-wrap: wrap; margin: 0 -0.5rem; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; padding: 0 0.5rem; }
.col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; padding: 0 0.5rem; }
.col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; padding: 0 0.5rem; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; padding: 0 0.5rem; }

.form-check { display: flex; align-items: center; gap: 0.5rem; }
.form-check-input { width: 18px; height: 18px; accent-color: var(--neon-cyan); cursor: pointer; }
.form-check-label { cursor: pointer; color: var(--text-secondary); }
.form-text { font-size: 0.8125rem; color: var(--text-muted); margin-top: 0.25rem; }
.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.small { font-size: 0.8125rem; }
code {
  background: var(--bg-tertiary);
  color: var(--neon-cyan);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85em;
}
hr { border: none; border-top: 1px solid var(--border-color); margin: 1.5rem 0; }
a { color: var(--neon-cyan); text-decoration: none; }
a:hover { color: var(--neon-blue); text-decoration: underline; }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .app-layout { flex-direction: column; }
  .sidebar { position: fixed; top: 0; left: 0; height: 100vh; transform: translateX(-100%); transition: transform var(--transition-base); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr; }
  .row { flex-direction: column; }
  .col-md-6, .col-md-4, .col-md-8, .col-md-12 { flex: 0 0 100%; max-width: 100%; }
  .content-area { padding: var(--space-md); }
}

/* ============================================================
   BOOTSTRAP-KOMPATIBILNI DODACI
   Šabloni koriste Bootstrap klase (modal, dropdown, grid, outline
   dugmad...), a učitava se samo Bootstrap JS. Ovdje su te klase
   definisane u bojama teme.
   ============================================================ */

/* --- Grid --- */
.row > * { box-sizing: border-box; }
.col-12 { flex: 0 0 100%; max-width: 100%; padding: 0 0.5rem; }
.col-6  { flex: 0 0 50%; max-width: 50%; padding: 0 0.5rem; }
.col-4  { flex: 0 0 33.333%; max-width: 33.333%; padding: 0 0.5rem; }
.col-md-2 { flex: 0 0 16.666%; max-width: 16.666%; padding: 0 0.5rem; }
.col-md-3 { flex: 0 0 25%; max-width: 25%; padding: 0 0.5rem; }
.col-lg-5 { flex: 0 0 41.666%; max-width: 41.666%; padding: 0 0.5rem; }
.col-lg-7 { flex: 0 0 58.333%; max-width: 58.333%; padding: 0 0.5rem; }
.g-2 { row-gap: 0.5rem; }
.g-4 { row-gap: 1.5rem; }
@media (max-width: 768px) {
  .col-md-2, .col-md-3, .col-md-4, .col-md-6, .col-md-8, .col-lg-5, .col-lg-7 { flex: 0 0 100%; max-width: 100%; }
}

/* --- Pomoćne klase --- */
.d-inline { display: inline; }
.w-100 { width: 100%; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.align-items-end { align-items: flex-end; }
.justify-content-between { justify-content: space-between; }
.align-middle td, .align-middle th { vertical-align: middle; }
.text-decoration-none { text-decoration: none; }
.text-white { color: #fff; }
.text-dark { color: #0a0e14; }
.rounded { border-radius: var(--radius-sm); }
.border-0 { border: 0; }
.shadow-sm { box-shadow: var(--shadow-sm); }
.fs-4 { font-size: 1.5rem; }
.display-1 { font-size: 5rem; font-weight: 300; line-height: 1.1; }
.min-vh-100 { min-height: 100vh; }
.p-0 { padding: 0 !important; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.ps-3 { padding-left: 1rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.py-0 { padding-top: 0; padding-bottom: 0; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.bg-light { background: var(--bg-tertiary); }
.card-header.bg-primary, .card-header.bg-success, .card-header.bg-secondary { background: var(--bg-elevated); color: var(--text-primary); }
.main-content a:not(.btn):not(.nav-link):not(.dropdown-item) { color: var(--neon-blue); }

/* --- Forme --- */
.form-control-sm, .form-select-sm { padding: 0.375rem 0.625rem; font-size: 0.8125rem; }
.form-control-lg { padding: 0.75rem 1rem; font-size: 1rem; }
.form-control:disabled, .form-select:disabled, .form-control[readonly] { opacity: 0.65; cursor: not-allowed; }
.input-group > .btn { border-radius: 0 var(--radius-md) var(--radius-md) 0; }

/* --- Outline dugmad --- */
.btn-outline-primary, .btn-outline-secondary, .btn-outline-success,
.btn-outline-danger, .btn-outline-warning, .btn-outline-info {
  background: transparent; border: 1px solid currentColor;
}
.btn-outline-primary   { color: var(--neon-blue); }
.btn-outline-secondary { color: var(--text-secondary); }
.btn-outline-success   { color: var(--neon-green); }
.btn-outline-danger    { color: var(--neon-red); }
.btn-outline-warning   { color: var(--neon-orange); }
.btn-outline-info      { color: var(--neon-cyan); }
.btn-outline-primary:hover, .btn-outline-secondary:hover, .btn-outline-success:hover,
.btn-outline-danger:hover, .btn-outline-warning:hover, .btn-outline-info:hover {
  background: var(--bg-elevated);
}
.btn-group { position: relative; display: inline-flex; vertical-align: middle; gap: 0.25rem; }
.btn-group form { display: inline-flex; }
.btn-group-sm > .btn, .btn-group-sm form > .btn { padding: 0.3rem 0.55rem; font-size: 0.8125rem; }
.btn-close {
  background: none; border: 0; color: var(--text-secondary); cursor: pointer;
  font-size: 1.5rem; line-height: 1; padding: 0 0.25rem;
}
.btn-close::before { content: "\00d7"; }
.btn-close:hover { color: var(--text-primary); }

/* --- Tabele --- */
.table-responsive { overflow-x: auto; }
.table-sm thead th, .table-sm tbody td { padding: 0.5rem 0.625rem; font-size: 0.8125rem; }
.table-light th { background: var(--bg-tertiary); }

/* --- Padajući meni (Bootstrap JS dropdown) --- */
.dropdown-toggle::after {
  content: ""; display: inline-block; border-top: 0.35em solid; border-right: 0.3em solid transparent;
  border-left: 0.3em solid transparent; vertical-align: middle;
}
.dropdown-menu {
  display: none; position: absolute; z-index: 1000; min-width: 11rem; margin: 0; padding: 0.375rem 0;
  list-style: none; text-align: left; background: var(--bg-elevated);
  border: 1px solid var(--border-color); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
}
.dropdown-menu.show { display: block; }
.dropdown-item {
  display: block; padding: 0.45rem 0.9rem; color: var(--text-primary);
  text-decoration: none; font-size: 0.875rem; white-space: nowrap;
}
.dropdown-item:hover { background: var(--bg-tertiary); }

/* --- Modal (Bootstrap JS modal) --- */
.fade { transition: opacity 0.15s linear; }
.fade:not(.show) { opacity: 0; }
.modal {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 1055; display: none; overflow-x: hidden; overflow-y: auto; outline: 0;
}
.modal-dialog { position: relative; width: auto; max-width: 500px; margin: 1.75rem auto; padding: 0 0.75rem; pointer-events: none; }
.modal-lg { max-width: 820px; }
.modal-content {
  position: relative; display: flex; flex-direction: column; pointer-events: auto;
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); color: var(--text-primary);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-color);
}
.modal-title { margin: 0; font-size: 1.05rem; font-weight: 600; }
.modal-body { padding: 1.25rem; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 0.5rem;
  padding: 0.9rem 1.25rem; border-top: 1px solid var(--border-color);
}
.modal-backdrop { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1050; background: #000; }
.modal-backdrop.fade { opacity: 0; }
.modal-backdrop.show { opacity: 0.65; }
body.modal-open { overflow: hidden; }

/* Poruke: dugme "Zatvori" desno */
.alert.flash-msg { display: flex; align-items: flex-start; gap: 0.6rem; }
