/* ── Meu Candidato — Campaign Intelligence Platform ── */
:root {
  --mc-bg:        #0a0a0f;
  --mc-surface:   #111118;
  --mc-card:      #16161f;
  --mc-border:    #22223a;
  --mc-accent:    #7c3aed;
  --mc-accent2:   #2563eb;
  --mc-green:     #22c55e;
  --mc-yellow:    #eab308;
  --mc-red:       #ef4444;
  --mc-orange:    #f97316;
  --mc-text:      #e8e8f0;
  --mc-muted:     #666688;
  --mc-sidebar-w: 240px;
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--mc-bg);
  color: var(--mc-text);
  min-height: 100vh;
}

/* ── Layout ── */
.mc-shell { display: flex; min-height: 100vh; }

.mc-sidebar {
  width: var(--mc-sidebar-w);
  flex-shrink: 0;
  background: var(--mc-surface);
  border-right: 1px solid var(--mc-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.2s;
}

.mc-main {
  margin-left: var(--mc-sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Sidebar header ── */
.mc-brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--mc-border);
  flex-shrink: 0;
}
.mc-brand-title {
  font-size: 14px; font-weight: 800; color: var(--mc-text);
  letter-spacing: 0.04em;
}
.mc-brand-sub { font-size: 10px; color: var(--mc-muted); margin-top: 2px; }
.mc-candidate-name {
  font-size: 11px; color: var(--mc-accent); font-weight: 600;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--mc-border);
}

/* ── Nav ── */
.mc-nav { flex: 1; padding: 6px 0; overflow-y: auto; }
.mc-nav-section {
  font-size: 9px; font-weight: 700; color: var(--mc-muted);
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 12px 16px 3px;
}
.mc-nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 16px;
  font-size: 12px; color: #7878a0;
  text-decoration: none;
  transition: all 0.12s;
  border-right: 2px solid transparent;
}
.mc-nav-item:hover { background: #1a1a28; color: var(--mc-text); }
.mc-nav-item.active { background: #1e1428; color: var(--mc-accent); font-weight: 600; border-right-color: var(--mc-accent); }
.mc-nav-item .ni { font-size: 13px; width: 16px; text-align: center; flex-shrink: 0; }

.mc-sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--mc-border);
  flex-shrink: 0;
}
.mc-back-link {
  display: flex; align-items: center; gap: 6px;
  color: var(--mc-muted); text-decoration: none; font-size: 11px;
  transition: color 0.15s;
}
.mc-back-link:hover { color: var(--mc-text); }

/* ── Topbar ── */
.mc-topbar {
  background: var(--mc-surface);
  border-bottom: 1px solid var(--mc-border);
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; flex-shrink: 0;
}
.mc-page-title { font-size: 17px; font-weight: 700; color: var(--mc-text); }
.mc-page-sub   { font-size: 11px; color: var(--mc-muted); margin-top: 1px; }
.mc-topbar-right { display: flex; align-items: center; gap: 10px; }

/* ── Content ── */
.mc-content { flex: 1; padding: 24px; }

/* ── Grids ── */
.mc-grid   { display: grid; gap: 14px; }
.mc-grid-4 { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.mc-grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.mc-grid-2 { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }

/* ── Cards ── */
.mc-card {
  background: var(--mc-card);
  border: 1px solid var(--mc-border);
  border-radius: 12px;
  padding: 16px;
}
.mc-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.mc-card-title {
  font-size: 11px; color: var(--mc-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
}
.mc-card-icon { font-size: 16px; }

.mc-kpi-value { font-size: 26px; font-weight: 800; color: var(--mc-text); line-height: 1; }
.mc-kpi-label { font-size: 11px; color: var(--mc-muted); margin-top: 3px; }
.mc-kpi-delta { font-size: 11px; margin-top: 5px; }
.mc-kpi-delta.up   { color: var(--mc-green); }
.mc-kpi-delta.down { color: var(--mc-red); }
.mc-kpi-delta.warn { color: var(--mc-yellow); }

/* ── Progress ── */
.mc-progress-label {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--mc-muted); margin-bottom: 5px; margin-top: 10px;
}
.mc-progress-bar {
  height: 5px; background: var(--mc-border); border-radius: 3px; overflow: hidden;
}
.mc-progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--mc-accent), var(--mc-accent2));
  transition: width 0.6s ease;
}

/* ── Badges ── */
.mc-badge {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 20px; letter-spacing: 0.04em;
}
.mc-badge-forte        { background: #0d281833; color: #4ade80; }
.mc-badge-media        { background: #2d1a0033; color: #facc15; }
.mc-badge-fraca        { background: #2d0a0a33; color: #f87171; }
.mc-badge-critica      { background: #2d0a0a33; color: #f87171; }
.mc-badge-oportunidade { background: #0a1a2d33; color: #60a5fa; }
.mc-badge-confirmado   { background: #0d281833; color: #4ade80; }
.mc-badge-planejado    { background: #1a1a2d33; color: #9090aa; }
.mc-badge-realizado    { background: #0d281833; color: #4ade80; }
.mc-badge-cancelado    { background: #2d0a0a33; color: #f87171; }
.mc-badge-alta         { background: #2d0a0a33; color: #f87171; }
.mc-badge-baixa        { background: #0d281833; color: #4ade80; }
.mc-badge-aberta       { background: #2d1a0033; color: #facc15; }
.mc-badge-em-andamento { background: #0a1a2d33; color: #60a5fa; }
.mc-badge-concluida    { background: #0d281833; color: #4ade80; }
.mc-badge-vigente      { background: #0d281833; color: #4ade80; }

/* ── Table ── */
.mc-table-wrap { overflow-x: auto; }
.mc-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.mc-table th {
  text-align: left; padding: 8px 12px;
  font-size: 10px; font-weight: 700; color: var(--mc-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 1px solid var(--mc-border);
}
.mc-table td { padding: 9px 12px; border-bottom: 1px solid #1a1a28; color: var(--mc-text); }
.mc-table tr:last-child td { border-bottom: none; }
.mc-table tr:hover td { background: #1a1a2408; }

/* ── Buttons ── */
.mc-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 7px 14px;
  border-radius: 8px; cursor: pointer; border: none; font-family: inherit;
  transition: all 0.14s; text-decoration: none;
}
.mc-btn-primary { background: var(--mc-accent); color: #fff; }
.mc-btn-primary:hover { background: #6d28d9; }
.mc-btn-ghost { background: transparent; color: var(--mc-muted); border: 1px solid var(--mc-border); }
.mc-btn-ghost:hover { color: var(--mc-text); border-color: #3a3a5a; }
.mc-btn-sm { padding: 5px 10px; font-size: 11px; border-radius: 6px; }
.mc-btn-danger { background: #2d0a0a; color: var(--mc-red); border: 1px solid #3d1010; }
.mc-btn-danger:hover { background: #3d1010; }

/* ── Forms ── */
.mc-form { display: flex; flex-direction: column; gap: 12px; }
.mc-form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.mc-field { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 5px; }
.mc-label { font-size: 11px; color: var(--mc-muted); font-weight: 500; }
.mc-input, .mc-select, .mc-textarea {
  background: var(--mc-surface); border: 1px solid var(--mc-border);
  color: var(--mc-text); border-radius: 8px; padding: 7px 11px;
  font-size: 12px; font-family: inherit; outline: none;
  transition: border-color 0.15s;
}
.mc-input:focus, .mc-select:focus, .mc-textarea:focus { border-color: var(--mc-accent); }
.mc-select option { background: #1a1a28; }
.mc-textarea { resize: vertical; min-height: 75px; }

/* ── Section header ── */
.mc-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; flex-wrap: wrap; gap: 8px;
}
.mc-section-title { font-size: 14px; font-weight: 700; color: var(--mc-text); }
.mc-spacer { height: 20px; }

/* ── Alerts ── */
.mc-alert {
  padding: 10px 14px; border-radius: 8px; font-size: 12px;
  margin-bottom: 14px; display: flex; gap: 8px; align-items: flex-start; line-height: 1.5;
}
.mc-alert-warning { background: #2d1a0022; border: 1px solid #f9731633; color: #fb923c; }
.mc-alert-info    { background: #0a1a2d22; border: 1px solid #2563eb33; color: #60a5fa; }
.mc-alert-danger  { background: #2d0a0a22; border: 1px solid #ef444433; color: #f87171; }

/* ── Modal ── */
.mc-modal-backdrop {
  display: none; position: fixed; inset: 0;
  background: #00000088; z-index: 500;
  align-items: center; justify-content: center;
}
.mc-modal-backdrop.open { display: flex; }
.mc-modal {
  background: var(--mc-card); border: 1px solid var(--mc-border);
  border-radius: 14px; padding: 24px; width: 100%; max-width: 520px;
  max-height: 90vh; overflow-y: auto; margin: 16px;
}
.mc-modal-title { font-size: 16px; font-weight: 700; color: var(--mc-text); margin-bottom: 16px; }
.mc-modal-footer { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* ── Biblioteca ── */
.mc-bib-card {
  background: var(--mc-card); border: 1px solid var(--mc-border);
  border-radius: 12px; padding: 16px; margin-bottom: 10px;
}
.mc-bib-card-title { font-size: 13px; font-weight: 700; color: var(--mc-text); margin-bottom: 4px; }
.mc-bib-card-cat   { font-size: 9px; color: var(--mc-accent); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.mc-bib-card-resumo { font-size: 12px; color: #8888a8; line-height: 1.6; margin-bottom: 10px; }
.mc-bib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mc-bib-col { padding: 8px 10px; border-radius: 8px; }
.mc-bib-pode    { background: #0d281822; border: 1px solid #22c55e22; }
.mc-bib-naopode { background: #2d0a0a22; border: 1px solid #ef444422; }
.mc-bib-risco   { background: #2d150022; border: 1px solid #f9731622; }
.mc-bib-col-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 5px; }
.mc-bib-pode    .mc-bib-col-label { color: var(--mc-green); }
.mc-bib-naopode .mc-bib-col-label { color: var(--mc-red); }
.mc-bib-risco   .mc-bib-col-label { color: var(--mc-orange); }
.mc-bib-col p { font-size: 11px; color: #9090b0; line-height: 1.5; }
.mc-bib-footer {
  margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--mc-border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 6px;
}
.mc-bib-source { font-size: 10px; color: var(--mc-muted); }
.mc-bib-source a { color: var(--mc-accent2); text-decoration: none; }
.mc-bib-source a:hover { text-decoration: underline; }

/* ── Filters bar ── */
.mc-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.mc-filter-chip {
  padding: 5px 12px; border-radius: 20px; font-size: 11px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--mc-border); background: var(--mc-card);
  color: var(--mc-muted); transition: all 0.12s;
}
.mc-filter-chip:hover  { color: var(--mc-text); border-color: #3a3a5a; }
.mc-filter-chip.active { background: var(--mc-accent); color: #fff; border-color: var(--mc-accent); }

/* ── Search ── */
.mc-search-wrap { position: relative; flex: 1; min-width: 200px; max-width: 320px; }
.mc-search-wrap input { width: 100%; padding-left: 30px; }
.mc-search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--mc-muted); pointer-events: none; }

/* ── Toast ── */
.mc-toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: #1e1e2e; border: 1px solid var(--mc-border);
  color: var(--mc-text); padding: 11px 18px; border-radius: 10px;
  font-size: 13px; box-shadow: 0 8px 24px #00000060;
  animation: mcSlide 0.18s ease;
}
@keyframes mcSlide { from { opacity: 0; transform: translateY(6px); } }

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

/* ── Coming soon ── */
.mc-coming-soon {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 380px; gap: 10px;
  color: var(--mc-muted); text-align: center;
}
.mc-coming-soon .icon { font-size: 44px; }
.mc-coming-soon h2 { font-size: 18px; font-weight: 700; color: var(--mc-text); }
.mc-coming-soon p { font-size: 12px; max-width: 340px; line-height: 1.6; }

/* ── Agenda ── */
.mc-agenda-day { margin-bottom: 20px; }
.mc-agenda-day-header {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--mc-accent); margin-bottom: 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--mc-border);
}
.mc-agenda-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid #1a1a28;
}
.mc-agenda-item:last-child { border-bottom: none; }
.mc-agenda-time { font-size: 12px; font-weight: 700; color: var(--mc-text); min-width: 42px; padding-top: 2px; }
.mc-agenda-dot {
  width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex-shrink: 0;
}
.mc-agenda-dot.confirmado { background: #22c55e; }
.mc-agenda-dot.planejado  { background: #eab308; }
.mc-agenda-dot.realizado  { background: #7c3aed; }
.mc-agenda-dot.cancelado  { background: #ef4444; }
.mc-agenda-body { flex: 1; }
.mc-agenda-title { font-size: 13px; font-weight: 600; color: var(--mc-text); margin-bottom: 3px; }
.mc-agenda-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 10px; color: var(--mc-muted); }
.mc-agenda-desc { font-size: 11px; color: #666688; margin-top: 4px; line-height: 1.5; }

/* ── Mobile ── */
.mc-menu-toggle {
  display: none; background: none; border: none;
  color: var(--mc-text); font-size: 18px; cursor: pointer; padding: 4px;
}
@media (max-width: 768px) {
  .mc-sidebar { transform: translateX(-100%); }
  .mc-sidebar.open { transform: translateX(0); box-shadow: 4px 0 20px #00000066; }
  .mc-main { margin-left: 0; }
  .mc-menu-toggle { display: flex; }
  .mc-content { padding: 14px; }
  .mc-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .mc-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .mc-grid-2 { grid-template-columns: 1fr; }
  .mc-bib-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .mc-grid-4, .mc-grid-3 { grid-template-columns: 1fr; }
}
