/* ── RESET & ROOT ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ph-blue:          #0E2E7D;
  --ph-blue-mid:      #1A4DB3;
  --ph-blue-light:    #D6E4FF;
  --ph-blue-pale:     #EEF4FF;
  --ph-red:           #CE1126;
  --ph-red-soft:      #FDE8EB;
  --ph-gold:          #F5B800;
  --ph-gold-light:    #FEF3C7;
  --surface:          #F1F5FB;
  --card:             #FFFFFF;
  --border:           #D8E3F5;
  --border-mid:       #BAD0F0;
  --text-primary:     #0A1D45;
  --text-secondary:   #3A517A;
  --text-muted:       #7A90B8;

  /* Status */
  --pill-green:       #D1FAE5;
  --pill-green-text:  #065F46;
  --pill-orange:      #FEF3C7;
  --pill-orange-text: #92400E;
  --pill-red:         #FEE2E2;
  --pill-red-text:    #991B1B;
  --pill-blue:        #DBEAFE;
  --pill-blue-text:   #1E40AF;

  /* Geometry */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;
  --radius-xl:  22px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(14,46,125,0.06), 0 1px 2px rgba(14,46,125,0.04);
  --shadow-md:  0 4px 16px rgba(14,46,125,0.10), 0 2px 6px rgba(14,46,125,0.06);
  --shadow-lg:  0 8px 32px rgba(14,46,125,0.16);

  /* Typography */
  --font-heading: 'Sora', sans-serif;
  --font-body:    'Plus Jakarta Sans', sans-serif;
}

/* ── BASE ─────────────────────────────────────────── */
body {
  font-family:      var(--font-body);
  background:       var(--surface);
  color:            var(--text-primary);
  min-height:       100vh;
  font-size:        14px;
  line-height:      1.6;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ── HEADER ─────────────────────────────────────────── */
.header {
  background: var(--ph-blue);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 3px solid var(--ph-gold);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 36px; height: 36px;
  background: var(--ph-gold);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800; font-size: 16px;
  color: var(--ph-blue);
  letter-spacing: -1px;
}
.logo-text {
  font-family: var(--font-heading);
  font-weight: 700; font-size: 20px;
  color: #fff;
  letter-spacing: -0.5px;
}
.logo-text span { color: var(--ph-gold); }
.logo-sub {
  font-family: var(--font-body);
  font-size: 10px; font-weight: 300;
  color: rgba(255,255,255,0.5);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: block;
  margin-top: -3px;
}

/* Nav */
nav { display: flex; gap: 4px; flex: 1; }

.nav-btn {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.7);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.nav-btn:hover, .nav-btn.active { background: rgba(255,255,255,0.12); color: #fff; }
.nav-btn.active { color: var(--ph-gold); }

/* Server status indicator */
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.server-status {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,0.6);
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.3s;
}
.status-dot.ok    { background: #34D399; }
.status-dot.error { background: #F87171; }
.status-dot.checking { background: var(--ph-gold); animation: pulse 1.2s infinite; }

/* ── HERO ─────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, #0A1D45 0%, #0E2E7D 50%, #1A4DB3 100%);
  padding: 48px 24px 56px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 360px; height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,184,0,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -40px; left: 20%;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(206,17,38,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: 1400px; margin: 0 auto; position: relative; }

.ph-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(245,184,0,0.12);
  border: 1px solid rgba(245,184,0,0.25);
  border-radius: 100px;
  padding: 5px 14px;
  margin-bottom: 20px;
}
.ph-badge-flag { font-size: 16px; }
.ph-badge-text {
  font-size: 11px; font-weight: 600;
  color: var(--ph-gold);
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800; color: #fff;
  line-height: 1.15;
  max-width: 640px;
  letter-spacing: -1px;
  margin-bottom: 14px;
}
.hero h1 em { color: var(--ph-gold); font-style: normal; }

.hero > .hero-inner > p {
  color: rgba(255,255,255,0.65);
  font-size: 15px; max-width: 500px;
  margin-bottom: 28px; line-height: 1.7;
}

/* Hero search */
.hero-search {
  display: flex; gap: 10px;
  max-width: 560px;
  margin-bottom: 36px;
}
.hero-search input {
  flex: 1;
  padding: 12px 18px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-body); font-size: 14px;
  outline: none; transition: all 0.2s;
}
.hero-search input::placeholder { color: rgba(255,255,255,0.4); }
.hero-search input:focus {
  background: rgba(255,255,255,0.15);
  border-color: var(--ph-gold);
}

/* Hero stats */
.hero-stats {
  display: flex; gap: 32px; flex-wrap: wrap;
}
.hero-stat-value {
  font-family: var(--font-heading);
  font-size: 28px; font-weight: 800;
  color: #fff; letter-spacing: -1px;
}
.hero-stat-value span { color: var(--ph-gold); }
.hero-stat-label {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase; letter-spacing: 1px;
  margin-top: 2px;
}
.hero-stat-sep {
  width: 1px;
  background: rgba(255,255,255,0.1);
  align-self: stretch; margin: 4px 0;
}

/* ── CATEGORY PILLS ──────────────────────────────── */
.categories-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
}
.categories-bar::-webkit-scrollbar { display: none; }

.categories-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex; gap: 6px;
  padding: 10px 0;
  align-items: center;
}

.cat-pill {
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.15s;
  white-space: nowrap;
  font-family: var(--font-body);
}
.cat-pill:hover   { border-color: var(--ph-blue-mid); color: var(--ph-blue); }
.cat-pill.active  { background: var(--ph-blue); border-color: var(--ph-blue); color: #fff; }

/* ── MAIN LAYOUT ─────────────────────────────────── */
.main-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 340px 1fr 360px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 1100px) {
  .main-layout { grid-template-columns: 1fr 1fr; }
  .panel-news  { grid-column: span 2; }
}
@media (max-width: 768px) {
  .main-layout { grid-template-columns: 1fr; }
  .panel-news  { grid-column: 1; }
  .panel-chat  { position: static; }
}

/* ── PANEL BASE ──────────────────────────────────── */
.panel {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}
.panel-title-group { display: flex; align-items: center; gap: 10px; }

.panel-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.panel-icon.blue { background: var(--ph-blue-light); color: var(--ph-blue); }
.panel-icon.gold { background: var(--ph-gold-light); color: #92400E; }
.panel-icon.red  { background: var(--ph-red-soft);   color: var(--ph-red); }

.panel-title {
  font-family: var(--font-heading);
  font-size: 14px; font-weight: 700;
  color: var(--text-primary); letter-spacing: -0.2px;
}
.panel-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.panel-badge {
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px; font-weight: 600;
}
.panel-badge.live     { background: #FEE2E2; color: #991B1B; }
.panel-badge.grounded { background: var(--ph-blue-light); color: var(--ph-blue); }

/* ── SUBSIDY DIRECTORY ───────────────────────────── */
.subsidy-search {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.subsidy-search input {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: 13px;
  color: var(--text-primary);
  outline: none; transition: border 0.15s;
}
.subsidy-search input:focus { border-color: var(--ph-blue-mid); background: #fff; }

.subsidy-list {
  max-height: 680px;
  overflow-y: auto;
  padding: 8px 0;
}
.subsidy-list::-webkit-scrollbar { width: 4px; }
.subsidy-list::-webkit-scrollbar-track { background: transparent; }
.subsidy-list::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 4px; }

.subsidy-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.12s;
  border-bottom: 1px solid var(--surface);
}
.subsidy-item:hover { background: var(--surface); }
.subsidy-item:last-child { border-bottom: none; }

.subsidy-item-header {
  display: flex; align-items: flex-start;
  justify-content: space-between; gap: 8px;
  margin-bottom: 5px;
}
.subsidy-name {
  font-weight: 600; font-size: 13px;
  color: var(--text-primary); line-height: 1.3;
}
.subsidy-agency {
  font-size: 10px; font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  white-space: nowrap; flex-shrink: 0;
}

/* Agency colors */
.agency-dswd      { background: #DBEAFE; color: #1E40AF; }
.agency-dole      { background: #D1FAE5; color: #065F46; }
.agency-doh       { background: #FCE7F3; color: #831843; }
.agency-da        { background: #FEF3C7; color: #78350F; }
.agency-dost      { background: #EDE9FE; color: #5B21B6; }
.agency-ched      { background: #FEE2E2; color: #991B1B; }
.agency-pag-ibig  { background: #ECFDF5; color: #064E3B; }
.agency-dti       { background: #F0F9FF; color: #0C4A6E; }
.agency-sss       { background: #FFF7ED; color: #7C2D12; }
.agency-philhealth{ background: #F0FDFA; color: #0F766E; }
.agency-gsis      { background: #FFF1F2; color: #9F1239; }

.subsidy-desc {
  font-size: 12px; color: var(--text-secondary);
  line-height: 1.5; margin-bottom: 6px;
}
.subsidy-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.subsidy-amount {
  font-size: 11px; font-weight: 700;
  color: var(--ph-blue);
  background: var(--ph-blue-light);
  padding: 2px 8px; border-radius: 100px;
}
.subsidy-status {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 100px;
}
.status-active   { background: var(--pill-green);  color: var(--pill-green-text); }
.status-ongoing  { background: var(--pill-blue);   color: var(--pill-blue-text); }
.status-ended    { background: #F3F4F6;             color: #6B7280; }
.status-upcoming { background: var(--pill-orange); color: var(--pill-orange-text); }

/* ── SUBSIDY DETAIL MODAL ────────────────────────── */
.detail-overlay {
  position: fixed; inset: 0;
  background: rgba(10,29,69,0.5);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.15s;
}
.detail-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  max-width: 560px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s;
}
.detail-header-bg {
  background: linear-gradient(135deg, var(--ph-blue), var(--ph-blue-mid));
  padding: 28px 28px 24px;
  position: relative;
}
.detail-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.15);
  border: none; border-radius: 50%;
  color: #fff; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s;
}
.detail-close:hover { background: rgba(255,255,255,0.25); }

.detail-agency-badge {
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--ph-gold); margin-bottom: 8px;
}
.detail-title {
  font-family: var(--font-heading);
  font-size: 20px; font-weight: 800;
  color: #fff; margin-bottom: 6px;
  letter-spacing: -0.5px; line-height: 1.25;
}
.detail-status-row { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-body { padding: 24px 28px; }
.detail-section { margin-bottom: 20px; }
.detail-section-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); margin-bottom: 8px;
}
.detail-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-info-box {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.detail-info-label {
  font-size: 10px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 4px;
}
.detail-info-value { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.detail-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px;
  background: var(--ph-blue); color: #fff;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-size: 13px; font-weight: 600;
  margin-top: 8px;
  transition: background 0.15s;
}
.detail-link:hover { background: var(--ph-blue-mid); }

/* ── NEWS PANEL ──────────────────────────────────── */
.news-fetch-area {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.news-query-row { display: flex; gap: 8px; margin-bottom: 10px; }
.news-query-row input {
  flex: 1;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: 13px;
  color: var(--text-primary);
  outline: none; transition: border 0.15s;
}
.news-query-row input:focus { border-color: var(--ph-blue-mid); background: #fff; }

.news-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.preset-chip {
  padding: 4px 12px;
  background: var(--ph-blue-pale);
  border: 1px solid var(--ph-blue-light);
  border-radius: 100px;
  font-size: 11px; font-weight: 600;
  color: var(--ph-blue-mid);
  cursor: pointer; transition: all 0.12s;
  font-family: var(--font-body);
}
.preset-chip:hover { background: var(--ph-blue-light); }

.news-feed { padding: 12px 16px; display: flex; flex-direction: column; }
.news-item { padding: 14px 0; border-bottom: 1px solid var(--surface); }
.news-item:last-child { border-bottom: none; }

.news-source-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.news-source-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ph-red); flex-shrink: 0; }
.news-source {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  color: var(--text-muted);
}
.news-date { font-size: 10px; color: var(--text-muted); margin-left: auto; }
.news-headline { font-size: 14px; font-weight: 600; color: var(--text-primary); line-height: 1.4; margin-bottom: 5px; }
.news-headline a { color: inherit; text-decoration: none; }
.news-headline a:hover { color: var(--ph-blue-mid); }
.news-snippet { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

.news-loading { padding: 48px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }
.news-empty { padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }
.news-empty-icon { font-size: 32px; margin-bottom: 10px; opacity: 0.5; }
.news-empty-title { font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.news-empty-sub { line-height: 1.6; }

.news-groundings {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.groundings-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-muted); margin-bottom: 8px;
}
.grounding-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.grounding-chip {
  padding: 4px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 11px; color: var(--ph-blue-mid);
  text-decoration: none; transition: all 0.12s;
}
.grounding-chip:hover { background: var(--ph-blue-light); border-color: var(--ph-blue-mid); }

/* ── AI CHAT PANEL ───────────────────────────────── */
.panel-chat { position: sticky; top: 80px; }

.chat-messages {
  height: 460px; overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 4px; }

.msg { display: flex; gap: 8px; align-items: flex-start; }
.msg.user { flex-direction: row-reverse; }

.msg-avatar {
  width: 28px; height: 28px;
  border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.msg-avatar.ai   { background: var(--ph-blue); color: #fff; }
.msg-avatar.user { background: var(--ph-gold-light); color: #92400E; }

.msg-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 13px; line-height: 1.6;
  color: var(--text-primary);
}
.msg.ai   .msg-bubble { background: var(--surface); border: 1px solid var(--border); border-top-left-radius: var(--radius-sm); }
.msg.user .msg-bubble { background: var(--ph-blue); color: #fff; border-top-right-radius: var(--radius-sm); }

.msg-bubble strong { font-weight: 600; }
.msg-bubble ul { padding-left: 16px; margin-top: 4px; }
.msg-bubble li { margin-bottom: 3px; }

.chat-grounding-sources { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.chat-source-chip {
  font-size: 10px; padding: 2px 8px;
  background: var(--ph-blue-light); color: var(--ph-blue);
  border-radius: 100px; text-decoration: none; font-weight: 600;
}

/* Typing indicator */
.chat-typing { display: flex; gap: 4px; align-items: center; padding: 10px 14px; }
.typing-dot {
  width: 6px; height: 6px;
  border-radius: 50%; background: var(--text-muted);
  animation: bounce 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

.chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--card);
}
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row textarea {
  flex: 1;
  padding: 9px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: 13px;
  color: var(--text-primary);
  resize: none; outline: none;
  min-height: 38px; max-height: 100px;
  overflow-y: auto;
  transition: border 0.15s; line-height: 1.5;
}
.chat-input-row textarea:focus { border-color: var(--ph-blue-mid); background: #fff; }

.chat-send-btn {
  width: 38px; height: 38px;
  background: var(--ph-blue);
  border: none; border-radius: var(--radius-md);
  color: #fff; font-size: 16px;
  cursor: pointer; transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-send-btn:hover    { background: var(--ph-blue-mid); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.chat-quick-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.quick-btn {
  padding: 5px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 11px; font-family: var(--font-body);
  color: var(--text-secondary);
  cursor: pointer; transition: all 0.12s;
}
.quick-btn:hover { background: var(--ph-blue-light); border-color: var(--ph-blue-mid); color: var(--ph-blue); }

/* ── BUTTONS ─────────────────────────────────────── */
.btn-gold {
  padding: 12px 22px;
  background: var(--ph-gold);
  border: none; border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 13px; font-weight: 700;
  color: var(--ph-blue);
  cursor: pointer; transition: all 0.15s;
  white-space: nowrap;
}
.btn-gold:hover { background: #FFD100; transform: translateY(-1px); }

.btn-primary {
  padding: 9px 18px;
  background: var(--ph-blue); color: #fff;
  border: none; border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
  white-space: nowrap;
}
.btn-primary:hover    { background: var(--ph-blue-mid); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── FOOTER ──────────────────────────────────────── */
footer {
  background: var(--ph-blue);
  border-top: 3px solid var(--ph-gold);
  padding: 28px 24px;
  margin-top: 20px;
  color: rgba(255,255,255,0.5);
  font-size: 12px; text-align: center;
}
footer strong { color: var(--ph-gold); font-family: var(--font-heading); }
.footer-inner { max-width: 1400px; margin: 0 auto; }

.footer-agencies {
  display: flex; gap: 16px;
  flex-wrap: wrap; justify-content: center;
  margin-bottom: 12px;
}
.footer-agency-chip {
  padding: 4px 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 100px;
  font-size: 11px; color: rgba(255,255,255,0.5);
}
footer p { margin-bottom: 6px; }

/* ── SPINNER ─────────────────────────────────────── */
.spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--ph-blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 12px;
}

/* ── UTILITIES ───────────────────────────────────── */
.hidden { display: none !important; }

.text-error {
  color: #DC2626; font-size: 12px;
  padding: 8px 12px;
  background: #FEF2F2;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

/* ── ANIMATIONS ──────────────────────────────────── */
@keyframes fadeIn  { from { opacity: 0; }           to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes bounce  { 0%,80%,100% { transform: translateY(0); } 40% { transform: translateY(-6px); } }
@keyframes pulse   { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

.pulse { animation: pulse 2s infinite; }
