/* ============================================================
   POPUSTIĆ – Design System
   Segoe UI · Dark/Light theme · Mobile-first
============================================================ */

:root {
  --bg: #0d0d10;
  --surface: #16161c;
  --surface2: #1e1e27;
  --border: rgba(255,255,255,0.07);
  --accent: #ff3c5f;
  --accent2: #ff8c42;
  --accent3: #7c3aed;
  --text: #f0f0f4;
  --text2: #8888a0;
  --text3: #555568;
  --green: #22c55e;
  --cta: #16a34a;
  --cta-hover: #15803d;
  --cta-glow: 0 0 20px rgba(22,163,74,0.3);
  --yellow: #eab308;
  --radius: 16px;
  --radius-sm: 10px;
  --font: 'Segoe UI', system-ui, sans-serif;
  --shadow: 0 8px 32px rgba(0,0,0,0.4);
  --glow-accent: 0 0 24px rgba(255,60,95,0.3);
  --topbar-bg: rgba(13,13,16,0.88);
  --bottomnav-bg: rgba(22,22,28,0.95);
}

html.light {
  --cta: #16a34a;
  --cta-hover: #166534;
}

html.light {
  --bg: #f4f4f8;
  --surface: #ffffff;
  --surface2: #ebebf2;
  --border: rgba(0,0,0,0.08);
  --text: #0d0d14;
  --text2: #5a5a72;
  --text3: #9999b0;
  --shadow: 0 8px 32px rgba(0,0,0,0.10);
  --glow-accent: 0 0 24px rgba(255,60,95,0.18);
  --topbar-bg: rgba(244,244,248,0.90);
  --bottomnav-bg: rgba(255,255,255,0.96);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.25s, color 0.2s;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.35;
}

/* ============================================================
   TOPBAR
============================================================ */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: var(--topbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.25s;
}

.logo {
  font-family: var(--font);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
}

.logo-icon {
  width: 30px; height: 30px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: var(--glow-accent);
}

.logo > .logo-c { color: var(--accent); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  line-height: 1;
}

.btn-ghost {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface2); color: var(--text); }

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: var(--glow-accent);
}
.btn-primary:hover { background: #ff1a42; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover { background: rgba(255,60,95,0.1); }

.btn-success {
  background: var(--green);
  color: #0a1f0a;
  font-weight: 600;
}
.btn-success:hover { background: #16a34a; transform: translateY(-1px); }

.btn-cta {
  background: var(--cta);
  color: white;
  box-shadow: var(--cta-glow);
}
.btn-cta:hover { background: var(--cta-hover); transform: translateY(-1px); }

/* ============================================================
   LAYOUT
============================================================ */
.page-wrap {
  padding-top: 60px;
  padding-bottom: 32px;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============================================================
   ALERTS
============================================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 16px;
}
.alert-error   { background: rgba(255,60,95,0.12);  color: #ff6b88;  border: 1px solid rgba(255,60,95,0.3); }
.alert-success { background: rgba(34,197,94,0.12);  color: #4ade80;  border: 1px solid rgba(34,197,94,0.3); }
html.light .alert-error   { color: #cc0022; }
html.light .alert-success { color: #166534; }

/* ============================================================
   HERO
============================================================ */
.hero {
  padding: 52px 20px 36px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 600px; height: 400px;
  background: radial-gradient(ellipse, rgba(255,60,95,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,60,95,0.12);
  border: 1px solid rgba(255,60,95,0.3);
  color: var(--accent);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.live-dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
  font-size: clamp(28px, 5.5vw, 52px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 14px;
}

.hero h1 em { font-style: normal; color: var(--accent); }

.hero p {
  color: var(--text2);
  font-size: 16px;
  max-width: 460px;
  margin: 0 auto 28px;
}

/* ============================================================
   FILTER BAR
============================================================ */
.filters-bar {
  padding: 0 16px 16px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters-bar::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.filter-chip:hover { border-color: var(--accent); color: var(--text); }
.filter-chip.active { background: var(--surface2); border-color: var(--text2); color: var(--text); box-shadow: none; font-weight: 700; }

/* ============================================================
   SORT TABS
============================================================ */
.sort-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
  padding: 0 16px;
}

.sort-tab {
  flex: 1;
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text3);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}
.sort-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.sort-tab:hover  { color: var(--text2); }

.count-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--text2);
  margin: 0 16px 16px;
}
.count-pill strong { color: var(--text); }

/* ============================================================
   DEALS GRID
============================================================ */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  padding: 0 0 24px;
  width: 100%;
  align-items: start;
}

.deals-grid.list-view {
  grid-template-columns: 1fr;
  gap: 8px;
}




/* list-view handled in deals-grid block above */



/* ── View Toggle dugme ──────────────────────────── */
.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 4px;
}
.view-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 16px;
  color: var(--text3);
  transition: all .15s;
  line-height: 1;
}
.view-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

/* ============================================================
   DEAL CARD
============================================================ */
.deal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  cursor: pointer;
  position: relative;
  animation: cardIn 0.4s ease both;
}

/* ── LIST VIEW card stilovi ─────────────────────── */
.list-view .deal-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: 1fr;
  align-items: center;
  border-radius: var(--radius-sm);
  animation: none;
  min-height: 64px;
}
.list-view .deal-card:hover { background: var(--surface2); transform: none; }

/* Sakrij header (emoji ikona) u list view */
.list-view .deal-card-header { display: none; }

/* Body - glavni sadrzaj */
.list-view .deal-card-body {
  grid-column: 2;
  grid-row: 1;
  padding: 14px 12px 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.list-view .deal-badge-wrap {
  flex-shrink: 0;
}
.list-view .deal-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 0;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
}
.list-view .deal-desc   { display: none; }
.list-view .deal-contact { display: none; }
.list-view .deal-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* Footer - firma desno */
.list-view .deal-card-footer {
  grid-column: 3;
  grid-row: 1;
  border-top: none;
  border-left: 1px solid var(--border);
  padding: 10px 16px;
  min-width: 160px;
  max-width: 200px;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  justify-content: center;
}

/* Sakrij deal-cta u list view - cela kartica je klikabilna */
.list-view .deal-cta { display: none; }

/* ── Fav dugme ──────────────────────────────────────────── */
.fav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px;
  border-radius: 8px;
  transition: transform 0.2s, opacity 0.2s, filter 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
  filter: grayscale(1);
  position: relative;
  z-index: 10;
}
.fav-btn:hover { transform: scale(1.15); opacity: 0.75; filter: grayscale(0.4); }
.fav-btn.fav-active { opacity: 1; filter: none; }
.list-view .fav-btn { display: none; }


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

.deal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(255,60,95,0.2);
}

.deal-card-header {
  padding: 16px 16px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.deal-badge {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: white;
  font-weight: 800;
  font-size: 26px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  line-height: 1;
  box-shadow: var(--glow-accent);
  flex-shrink: 0;
}
.deal-badge.orange { background: var(--accent2); box-shadow: 0 0 20px rgba(255,140,66,0.4); }
.deal-badge.purple { background: var(--accent3); box-shadow: 0 0 20px rgba(124,58,237,0.4); }
.deal-badge.green  { background: var(--green);   box-shadow: 0 0 20px rgba(34,197,94,0.4); color: #0a1f0a; }

.deal-category-icon { font-size: 30px; line-height: 1; flex-shrink: 0; }

.deal-card-body { padding: 0 16px 14px; }

.deal-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}

.deal-desc {
  color: var(--text2);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 0;
}

.deal-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  color: var(--text3);
  background: var(--surface2);
  padding: 3px 9px;
  border-radius: 100px;
}

.deal-expiry.urgent   { color: var(--yellow); }
.deal-expiry.critical { color: var(--accent); font-weight: 600; }

/* Contact block on card */
.deal-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.deal-contact-item {
  font-size: 12.5px;
  color: #c8c8dc;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.light .deal-contact-item { color: #3a3a55; }

.deal-contact-link { color: #a0a0cc; }
html.light .deal-contact-link { color: #5050aa; }

.deal-card-footer {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.deal-biz { display: flex; align-items: center; gap: 8px; min-width: 0; }

.deal-biz-avatar {
  width: 26px; height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.deal-biz-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deal-cta {
  display: none;
}

.trending-ribbon {
  position: absolute;
  top: 12px; right: -28px;
  background: var(--yellow);
  color: #1a1000;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 36px;
  transform: rotate(45deg);
  width: 120px;
  text-align: center;
}

/* ============================================================
   PAGINATION
============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px 16px 32px;
  flex-wrap: wrap;
}

/* ============================================================
   EMPTY STATE
============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text3);
  grid-column: 1 / -1;
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; }
.empty-state p { font-size: 16px; }

/* ============================================================
   BOTTOM NAV
============================================================ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--bottomnav-bg);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
  transition: background 0.25s;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  color: var(--text3);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-item:hover { color: var(--text2); }
.nav-item.active { color: var(--accent); }
.nav-icon { font-size: 22px; line-height: 1; }

/* ============================================================
   AUTH PAGES
============================================================ */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 24px 16px 90px;
}

.auth-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  width: 100%;
  max-width: 420px;
}

.auth-box h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}

.auth-box > p {
  color: var(--text2);
  font-size: 14px;
  margin-bottom: 24px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--text3);
  font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.auth-toggle {
  text-align: center;
  font-size: 13px;
  color: var(--text2);
  margin-top: 16px;
}
.auth-toggle a { color: var(--accent); cursor: pointer; text-decoration: none; }

/* ============================================================
   FORM ELEMENTS
============================================================ */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 13px;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent); }
.form-textarea { resize: vertical; min-height: 88px; }
.form-hint { font-size: 12px; color: var(--text3); margin-top: 4px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* ============================================================
   DASHBOARD
============================================================ */
.dashboard {
  max-width: 960px;
  margin: 0 auto;
  padding: 28px 16px 90px;
}

.dashboard-header { margin-bottom: 24px; }
.dashboard-header h2 { font-size: 26px; font-weight: 800; margin-bottom: 4px; }

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.stat-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 12px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-deal-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: border-color 0.2s;
}
.dash-deal-row:hover { border-color: var(--text3); }

.dash-deal-info { flex: 1; min-width: 0; }

.dash-deal-title {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-deal-sub { font-size: 12px; color: var(--text3); margin-top: 2px; }

.status-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 100px;
  flex-shrink: 0;
  white-space: nowrap;
}
.status-active   { background: rgba(34,197,94,0.15);   color: var(--green); }
.status-expired  { background: rgba(255,60,95,0.12);   color: var(--accent); }
.status-draft    { background: rgba(136,136,160,0.12); color: var(--text3); }
.status-pending  { background: rgba(234,179,8,0.15);   color: var(--yellow); }
.status-approved { background: rgba(34,197,94,0.15);   color: var(--green); }
.status-rejected { background: rgba(255,60,95,0.12);   color: var(--accent); }

/* ============================================================
   MODAL
============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: flex-end;
  justify-content: center;
}
@media (min-width: 600px) {
  .modal-overlay { align-items: center; padding: 20px; }
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px 20px 36px;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@media (min-width: 600px) { .modal { border-radius: var(--radius); } }

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title { font-size: 19px; font-weight: 700; }

.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  border: none;
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.modal-close:hover { background: var(--border); }

.modal-contact-row {
  font-size: 14px;
  color: #c8c8dc;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.5;
}
html.light .modal-contact-row { color: #3a3a55; }

/* ============================================================
   ADMIN DEAL ROW TABS (reuse sort-tabs)
============================================================ */
.sort-tabs a { text-decoration: none; }

/* ============================================================
   AI SECTION
============================================================ */
.ai-section {
  background: linear-gradient(135deg, rgba(124,58,237,0.12) 0%, rgba(255,60,95,0.08) 100%);
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}

.ai-section-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* ============================================================
   TOAST
============================================================ */
.toast {
  position: fixed;
  bottom: 76px; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9000;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
  pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ============================================================
   DEAL DETAIL PAGE
============================================================ */
.deal-detail {
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 16px 90px;
}

/* ============================================================
   RESPONSIVE TWEAKS
============================================================ */
@media (max-width: 600px) {
  .topbar-right .btn-ghost:not(#themeToggle) { display: none; }
  .auth-box { padding: 24px 18px; }
}


/* ============================================================
   FLATPICKR – srpski kalendar override
============================================================ */
.flatpickr-calendar {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  font-family: var(--font) !important;
}
.flatpickr-month {
  background: var(--surface) !important;
  color: var(--text) !important;
}
.flatpickr-weekday {
  background: var(--surface) !important;
  color: var(--text3) !important;
  font-size: 11px !important;
}
.flatpickr-day {
  color: var(--text) !important;
  border-radius: 8px !important;
}
.flatpickr-day:hover {
  background: var(--surface2) !important;
  border-color: var(--border) !important;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: white !important;
}
.flatpickr-day.today {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}
.flatpickr-day.today.selected { color: white !important; }
.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
  color: var(--text3) !important;
  opacity: .4 !important;
}
.flatpickr-prev-month svg,
.flatpickr-next-month svg { fill: var(--text2) !important; }
.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg { fill: var(--accent) !important; }
.numInput, .numInputWrapper {
  color: var(--text) !important;
  background: var(--surface2) !important;
}
.flatpickr-time {
  background: var(--surface) !important;
  border-top: 1px solid var(--border) !important;
}
.flatpickr-time input {
  color: var(--text) !important;
  background: var(--surface) !important;
}
.flatpickr-time .flatpickr-time-separator { color: var(--text2) !important; }
.flatpickr-current-month { color: var(--text) !important; }
.flatpickr-current-month select {
  color: var(--text) !important;
  background: var(--surface) !important;
}
html.light .flatpickr-calendar { background: #fff !important; }
html.light .flatpickr-month,
html.light .flatpickr-weekday { background: #fff !important; }
html.light .flatpickr-day:hover { background: #f0f0f8 !important; }

/* Input sa ikonom kalendara */
.date-input-wrap {
  position: relative;
}
.date-input-wrap .form-input {
  padding-right: 36px;
  cursor: pointer;
}
.date-input-wrap::after {
  content: '📅';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}

/* ── Feed main ──────────────────────────────────────────── */
.feed-main {
  flex: 1;
  min-width: 0;
  padding: 16px 24px 0 0;
  overflow: hidden;
}

.feed-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 0;
}


/* Mobile filteri - skriveni na desktopu */
.mobile-filters { display: none; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
  .feed-layout  { padding: 0; }
  .feed-main    { padding: 0; }
  .mobile-filters { display: block; padding: 0 12px; }
  .feed-topbar  { padding: 0 12px; }
  .feed-main /* deals-grid layout defined above - no override needed */
}

/* ============================================================
   RESPONSIVE FEED GRID
============================================================ */
.feed-layout { display: block; }
.feed-main { display: block; padding: 0; }
.feed-topbar { display: none; }
.mobile-filters { display: none; }

/* deals-grid layout defined above - no override needed */

/* 900px+: 3 kolone */


/* 1300px+: 4 kolone */


/* Mobilni: 1 kolona */


/* Filters bar fix - ne seci kategorije */
.filters-bar {
  padding: 0 20px 0 !important;
  max-width: 1600px !important;
  margin: 0 auto !important;
}

/* Sort tabs fix u novom layoutu */
.sort-tabs {
  border-bottom: none !important;
  padding: 0 !important;
}


/* ============================================================
   MAIN LAYOUT – feed + sidebar
============================================================ */
.main-layout-wrap {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  width: 100%;
  margin: 20px 0 0;
  padding: 0;
}

.main-feed-col {
  flex: 1;
  min-width: 0;
}


/* ── Social icons in topbar ─────────────────────────────── */
.td-social {
  color: var(--text3) !important;
  transition: color .2s, background .15s !important;
}
.td-social:hover {
  color: var(--text) !important;
  background: var(--surface2) !important;
}

/* ── Badge prikaz po view modu ──────────────────── */
/* Grid: sakrij badge-wrap (badge je u meta) */
.deals-grid:not(.list-view) .deal-badge-wrap { display: none; }
@media (max-width: 600px) {
  .deals-grid:not(.list-view) .deal-badge-wrap { display: block !important; }
}

/* List: sakrij badge u meta (badge je u badge-wrap) */
.list-view .deal-meta .deal-badge { display: none; }

/* List: body layout - badge + title u redu */
.list-view .deal-card-body {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}
.list-view .deal-title {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Truncate dugih naziva firme u list view ─────── */
.list-view .deal-biz-name {
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-view .deal-card-footer {
  max-width: 180px;
}

/* ── Filter chip active – manje kontrastan ── */
.filter-chip.active { background: var(--surface2); border-color: var(--text2); color: var(--text); box-shadow: none; font-weight: 700; }

/* ── MOBILE GRID CARD ── */
@media (max-width: 600px) {
  .deals-grid:not(.list-view) .deal-meta { display: none; }
  .deals-grid:not(.list-view) .deal-contact { display: none; }
  .deals-grid:not(.list-view) .deal-desc { display: none; }
  .deals-grid:not(.list-view) .deal-title { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
  .deals-grid:not(.list-view) .deal-badge-wrap { display: block !important; order: 2; margin-top: 4px; }
  .deals-grid:not(.list-view) .deal-badge-wrap .deal-badge { font-size: 12px; padding: 3px 9px; box-shadow: none; }
  .deals-grid:not(.list-view) .deal-card-body { display: flex; flex-direction: column; padding: 0 12px 10px; }
  .deals-grid:not(.list-view) .deal-title { order: 1; }
  .deals-grid:not(.list-view) .deal-badge-wrap { order: 2; }
}

.deals-grid:not(.list-view) .deal-card { position: relative; }
.deals-grid:not(.list-view) .fav-btn { position: absolute; bottom: 12px; right: 12px; opacity: 0.5; filter: grayscale(1); font-size: 18px; background: none; border: none; cursor: pointer; padding: 4px; border-radius: 8px; z-index: 5; }
.deals-grid:not(.list-view) .fav-btn.fav-active { opacity: 1; filter: none; }