/* CâmaraFácil — Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #1a3a5c;
  --primary-dark: #0f2440;
  --primary-light: #2e5f94;
  --secondary: #c8a951;
  --secondary-dark: #a8872e;
  --accent: #2e6da4;
  --danger: #e53e3e;
  --success: #38a169;
  --warning: #d69e2e;
  --info: #3182ce;
  --bg: #f0f4f8;
  --bg2: #e8edf2;
  --card: #ffffff;
  --text: #1a202c;
  --text-light: #718096;
  --text-muted: #a0aec0;
  --border: #e2e8f0;
  --border-dark: #cbd5e0;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 2px 8px rgba(0,0,0,0.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; }
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  background: var(--primary);
  padding: 0 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  position: sticky; top: 0; z-index: 100;
}
.navbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; height: 64px; gap: 32px;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.navbar-brand img { height: 36px; }
.navbar-brand-text { color: #fff; }
.navbar-brand-text strong { display: block; font-size: 1.1rem; font-weight: 700; line-height: 1.1; }
.navbar-brand-text small { font-size: .72rem; opacity: .7; font-weight: 400; }
.navbar-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.navbar-nav a {
  color: rgba(255,255,255,.8); padding: 8px 14px; border-radius: 6px;
  font-size: .88rem; font-weight: 500; transition: all .15s; text-decoration: none;
}
.navbar-nav a:hover { background: rgba(255,255,255,.12); color: #fff; }
.navbar-nav .btn-nav {
  background: var(--secondary); color: var(--primary) !important;
  font-weight: 700; padding: 8px 18px;
}
.navbar-nav .btn-nav:hover { background: var(--secondary-dark); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: #fff;
  padding: 72px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; }
.hero h1 { font-size: 3rem; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.hero h1 span { color: var(--secondary); }
.hero p { font-size: 1.15rem; opacity: .85; max-width: 560px; margin-bottom: 36px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-hero-primary {
  background: var(--secondary); color: var(--primary);
  padding: 16px 32px; border-radius: var(--radius); font-size: 1rem; font-weight: 700;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 16px rgba(200,169,81,0.4); transition: all .2s;
}
.btn-hero-primary:hover { background: var(--secondary-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(200,169,81,0.5); text-decoration: none; color: var(--primary); }
.btn-hero-secondary {
  background: rgba(255,255,255,.12); color: #fff; border: 1.5px solid rgba(255,255,255,.3);
  padding: 16px 32px; border-radius: var(--radius); font-size: 1rem; font-weight: 600;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: all .2s;
}
.btn-hero-secondary:hover { background: rgba(255,255,255,.2); color: #fff; text-decoration: none; }

.hero-stats {
  display: flex; gap: 40px; margin-top: 48px; padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,.15);
}
.hero-stat-value { font-size: 2rem; font-weight: 800; color: var(--secondary); }
.hero-stat-label { font-size: .82rem; opacity: .7; margin-top: 2px; }

/* ============================================================
   CONTAINER / SECTION
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-alt { background: #fff; }
.section-dark { background: var(--primary); color: #fff; }
.section-header { margin-bottom: 40px; }
.section-header h2 { font-size: 1.9rem; font-weight: 700; color: var(--primary); margin-bottom: 8px; }
.section-header p { color: var(--text-light); font-size: 1rem; }
.section-header.center { text-align: center; }

/* ============================================================
   NEWS / INFORMATIVOS TOPO
   ============================================================ */
.news-bar {
  background: var(--secondary);
  padding: 12px 0;
}
.news-bar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 16px;
}
.news-bar-label {
  background: var(--primary); color: #fff; padding: 3px 10px;
  border-radius: 4px; font-size: .75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; white-space: nowrap;
}
.news-bar-ticker {
  flex: 1; overflow: hidden; position: relative; height: 22px;
}
.news-bar-ticker-inner {
  display: flex; gap: 64px; animation: ticker 30s linear infinite;
  white-space: nowrap; font-size: .88rem; font-weight: 600; color: var(--primary);
}
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Notícias em cards */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.news-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; transition: box-shadow .2s, transform .2s; border: 1px solid var(--border);
}
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.news-card-type {
  padding: 4px 12px; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em;
}
.news-card-type.informativo { background: #ebf8ff; color: #2b6cb0; }
.news-card-type.projeto     { background: #f0fff4; color: #276749; }
.news-card-type.processo    { background: #fffbeb; color: #92400e; }
.news-card-type.urgente     { background: #fff5f5; color: #c53030; }
.news-card-body { padding: 16px 20px 20px; }
.news-card-title { font-size: .95rem; font-weight: 700; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
.news-card-meta { font-size: .78rem; color: var(--text-light); display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   CÂMARAS GRID
   ============================================================ */
.camaras-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.camara-card {
  background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow);
  border: 1.5px solid var(--border); overflow: hidden; transition: all .2s; text-decoration: none;
}
.camara-card:hover { box-shadow: var(--shadow-lg); border-color: var(--accent); transform: translateY(-3px); text-decoration: none; }
.camara-card-top { background: var(--primary); padding: 24px; display: flex; align-items: center; gap: 14px; }
.camara-card-top img { width: 52px; height: 52px; border-radius: 8px; object-fit: contain; background: rgba(255,255,255,.15); padding: 4px; }
.camara-card-top-placeholder { width: 52px; height: 52px; border-radius: 8px; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.camara-card-nome { color: #fff; font-weight: 700; font-size: .95rem; line-height: 1.3; }
.camara-card-cidade { color: rgba(255,255,255,.7); font-size: .8rem; margin-top: 2px; }
.camara-card-body { padding: 16px 20px; }
.camara-card-info { display: flex; justify-content: space-between; font-size: .82rem; color: var(--text-light); }
.camara-card-cta { display: flex; gap: 8px; margin-top: 14px; }
.camara-card-cta a {
  flex: 1; padding: 9px 0; text-align: center; border-radius: 6px; font-size: .82rem;
  font-weight: 600; transition: all .15s; text-decoration: none;
}
.camara-card-cta .cta-ver { background: var(--primary); color: #fff; }
.camara-card-cta .cta-ver:hover { background: var(--primary-dark); }
.camara-card-cta .cta-sol { background: var(--secondary); color: var(--primary); }
.camara-card-cta .cta-sol:hover { background: var(--secondary-dark); }

/* ============================================================
   FEATURE CARDS (how it works)
   ============================================================ */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }
.feature-card { background: var(--card); border-radius: var(--radius-lg); padding: 28px 24px; box-shadow: var(--shadow); border: 1px solid var(--border); text-align: center; }
.feature-icon { font-size: 2.4rem; margin-bottom: 14px; }
.feature-title { font-weight: 700; font-size: 1rem; color: var(--primary); margin-bottom: 8px; }
.feature-desc { font-size: .88rem; color: var(--text-light); line-height: 1.6; }

/* ============================================================
   VEREADORES GRID (landing pública)
   ============================================================ */
.vereadores-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; }
.vereador-card {
  background: var(--card); border-radius: var(--radius); padding: 20px 14px; text-align: center;
  box-shadow: var(--shadow); border: 1px solid var(--border); transition: box-shadow .2s;
}
.vereador-card:hover { box-shadow: var(--shadow-md); }
.vereador-card img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 3px solid var(--border); margin-bottom: 10px; }
.vereador-nome { font-weight: 700; font-size: .88rem; color: var(--primary); line-height: 1.3; }
.vereador-partido { font-size: .76rem; color: var(--text-light); margin-top: 3px; }
.vereador-cargo { display: inline-block; margin-top: 8px; padding: 3px 10px; background: var(--secondary); color: var(--primary); border-radius: 20px; font-size: .72rem; font-weight: 700; }

/* Números úteis */
.numeros-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.numero-card { background: var(--card); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; border: 1px solid var(--border); }
.numero-card .icon { font-size: 1.8rem; flex-shrink: 0; }
.numero-card .servico { font-weight: 600; font-size: .88rem; color: var(--text); }
.numero-card .numero { color: var(--accent); font-size: .95rem; font-weight: 700; }
.numero-card .descricao { font-size: .76rem; color: var(--text-light); margin-top: 2px; }

/* ============================================================
   FORMS / LOGIN
   ============================================================ */
.bg-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 100%); padding: 24px; }
.login-wrap { width: 100%; max-width: 440px; }
.login-card { background: var(--card); border-radius: var(--radius-lg); padding: 44px 40px; box-shadow: 0 16px 48px rgba(0,0,0,0.22); }
.login-logo { text-align: center; margin-bottom: 32px; }
.login-logo h1 { font-size: 1.7rem; color: var(--primary); font-weight: 800; }
.login-logo p { color: var(--text-light); font-size: .88rem; margin-top: 6px; }
.login-links { text-align: center; margin-top: 20px; font-size: .85rem; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .88rem; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-size: .95rem; transition: border-color .2s, box-shadow .2s;
  background: #fff; color: var(--text); font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(46,109,164,0.12);
}
.form-group textarea { resize: vertical; min-height: 100px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-primary, .btn-secondary, .btn-danger, .btn-success {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: var(--radius); border: none; cursor: pointer;
  font-size: .92rem; font-weight: 600; transition: all .18s; font-family: inherit;
  text-decoration: none; line-height: 1.3;
}
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-dark); box-shadow: 0 4px 12px rgba(26,58,92,0.3); color: #fff; text-decoration: none; }
.btn-secondary { background: var(--bg2); color: var(--text); border: 1px solid var(--border-dark); }
.btn-secondary:hover { background: var(--border); color: var(--text); text-decoration: none; }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c53030; color: #fff; text-decoration: none; }
.btn-success  { background: var(--success); color: #fff; }
.btn-success:hover { background: #2f855a; color: #fff; text-decoration: none; }
.btn-full { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 18px; font-size: .9rem; display: flex; align-items: start; gap: 10px; }
.alert-danger  { background: #fff5f5; color: #c53030; border: 1px solid #fed7d7; }
.alert-success { background: #f0fff4; color: #276749; border: 1px solid #c6f6d5; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: #ebf8ff; color: #2b6cb0; border: 1px solid #bee3f8; }

/* ============================================================
   CARDS / LAYOUT INTERNO
   ============================================================ */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; border: 1px solid var(--border); }
.card-title { font-size: 1rem; font-weight: 700; color: var(--primary); margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }

/* Sidebar app */
.app-layout { display: flex; min-height: 100vh; background: var(--bg); }
.sidebar { width: 248px; background: var(--primary); color: #fff; display: flex; flex-direction: column; flex-shrink: 0; box-shadow: 2px 0 12px rgba(0,0,0,0.15); }
.sidebar-logo { padding: 22px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar-logo h2 { font-size: 1rem; color: #fff; font-weight: 700; }
.sidebar-logo small { color: rgba(255,255,255,.55); font-size: .72rem; }
.sidebar-nav { flex: 1; padding: 12px 8px; }
.sidebar-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: rgba(255,255,255,.75); font-size: .875rem; font-weight: 500; transition: all .15s; border-radius: 8px; margin-bottom: 2px; text-decoration: none; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
.sidebar-nav a.active { font-weight: 600; }
.sidebar-nav .nav-section { padding: 14px 14px 4px; font-size: .67rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.35); font-weight: 600; }
.sidebar-footer { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; color: rgba(255,255,255,.55); }
.sidebar-footer a { color: rgba(255,255,255,.7); text-decoration: none; }
.sidebar-footer a:hover { color: #fff; }

.main-content { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { background: var(--card); border-bottom: 1px solid var(--border); padding: 16px 28px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.topbar h1 { font-size: 1.1rem; color: var(--primary); font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.page-body { flex: 1; padding: 28px; overflow-y: auto; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card { background: var(--card); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); border-left: 4px solid var(--primary); border: 1px solid var(--border); border-left: 4px solid var(--primary); }
.stat-card.green  { border-left-color: var(--success); }
.stat-card.orange { border-left-color: var(--warning); }
.stat-card.red    { border-left-color: var(--danger); }
.stat-card.blue   { border-left-color: var(--info); }
.stat-value { font-size: 2.1rem; font-weight: 800; color: var(--primary); }
.stat-label { color: var(--text-light); font-size: .8rem; margin-top: 3px; font-weight: 500; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { background: var(--bg); padding: 10px 14px; text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-light); border-bottom: 2px solid var(--border); font-weight: 600; white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: .875rem; vertical-align: middle; }
tr:hover td { background: var(--bg); }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.badge-success   { background: #c6f6d5; color: #276749; }
.badge-warning   { background: #fef3c7; color: #92400e; }
.badge-danger    { background: #fed7d7; color: #c53030; }
.badge-info      { background: #bee3f8; color: #2b6cb0; }
.badge-secondary { background: #e2e8f0; color: #718096; }

/* Notif bell */
.notif-bell { position: relative; cursor: pointer; }
.notif-count { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff; border-radius: 50%; font-size: .65rem; width: 17px; height: 17px; display: flex; align-items: center; justify-content: center; font-weight: 700; }

/* Cidadão app */
.cidadao-wrap { max-width: 560px; margin: 0 auto; padding: 24px 20px 60px; }
.foto-upload { border: 2px dashed var(--border-dark); border-radius: var(--radius); padding: 36px; text-align: center; cursor: pointer; transition: all .2s; background: var(--bg); }
.foto-upload:hover { border-color: var(--accent); background: #ebf8ff; }
.foto-upload-icon { font-size: 2.5rem; margin-bottom: 10px; }
.foto-preview { width: 100%; max-height: 280px; object-fit: cover; border-radius: var(--radius); margin-top: 12px; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: #0a1929; color: rgba(255,255,255,.55); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-brand strong { color: #fff; font-size: 1.1rem; }
.footer-brand p { font-size: .85rem; margin-top: 10px; line-height: 1.7; }
.footer-col h4 { color: rgba(255,255,255,.8); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.footer-col a { display: block; color: rgba(255,255,255,.5); font-size: .85rem; margin-bottom: 8px; text-decoration: none; transition: color .15s; }
.footer-col a:hover { color: rgba(255,255,255,.85); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding-top: 20px; font-size: .8rem; display: flex; justify-content: space-between; align-items: center; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero h1 { font-size: 2rem; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .app-layout { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .sidebar-logo { padding: 12px 16px; border-bottom: none; border-right: 1px solid rgba(255,255,255,.1); }
  .sidebar-nav { display: flex; flex-wrap: wrap; padding: 8px; gap: 4px; }
  .sidebar-nav a { padding: 6px 10px; font-size: .8rem; }
  .sidebar-nav .nav-section { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .page-body { padding: 16px; }
  .hero h1 { font-size: 1.7rem; }
  .hero { padding: 48px 0 52px; }
  .hero-btns { flex-direction: column; }
  .btn-hero-primary, .btn-hero-secondary { text-align: center; justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .navbar-nav { gap: 2px; }
  .navbar-nav a { padding: 6px 10px; font-size: .82rem; }
}
