:root {
  --blue: #2b6cb0;
  --blue-dark: #1a365d;
  --bg: #f7fafc;
  --border: #cbd5e0;
  --critico: #c53030;
  --info: #2b6cb0;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: #1a202c;
}
.hidden { display: none !important; }
.muted { color: #718096; font-weight: normal; font-size: 0.85em; }
.mfa-secret {
  background: #edf2f7;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px;
  word-break: break-all;
  font-size: 1.05em;
}
.scan-segment-picker {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  margin: 8px 0;
  max-width: 480px;
}
.scan-segment-option { display: block; font-weight: 600; margin-bottom: 6px; }
.scan-segment-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px 12px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}
.scan-segment-list label { font-weight: normal; display: block; }
.scan-segment-list.disabled { opacity: 0.5; pointer-events: none; }

/* --- Login --- */
#login-view {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  background: white;
  padding: 36px 40px;
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  width: 360px;
}
.login-card h1 { color: var(--blue-dark); margin-bottom: 4px; }
.subtitle { color: #718096; margin-top: 0; font-size: 0.9em; margin-bottom: 24px; }
.login-card label { display: block; font-size: 0.85em; margin: 12px 0 4px; color: #4a5568; }
.login-card input {
  width: 100%; padding: 9px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 1em;
}
.login-card button {
  margin-top: 20px; width: 100%; padding: 10px; background: var(--blue); color: white;
  border: none; border-radius: 6px; font-size: 1em; cursor: pointer;
}
.login-card button:hover { background: var(--blue-dark); }
.error { color: var(--critico); font-size: 0.85em; margin-top: 14px; }
.info-text { color: var(--blue); font-size: 0.85em; }

/* --- App --- */
header {
  background: var(--blue-dark); color: white; padding: 14px 24px;
  display: flex; justify-content: space-between; align-items: center;
}
header h1 { margin: 0; font-size: 1.2em; }
header .muted { color: #a0aec0; }
.header-actions { display: flex; align-items: center; gap: 14px; }
button.secondary {
  background: transparent; border: 1px solid #a0aec0; color: white; padding: 6px 14px;
  border-radius: 5px; cursor: pointer;
}
button.secondary.small { color: var(--blue); border-color: var(--blue); margin-bottom: 10px; }

.tabs { display: flex; gap: 4px; background: white; padding: 0 24px; border-bottom: 1px solid var(--border); }
.tab-btn {
  padding: 12px 16px; border: none; background: none; cursor: pointer; font-size: 0.95em;
  color: #4a5568; border-bottom: 3px solid transparent;
}
.tab-btn.active { color: var(--blue); border-bottom-color: var(--blue); font-weight: 600; }

main { padding: 24px; max-width: 1100px; margin: 0 auto; }
h2 { color: var(--blue-dark); font-size: 1.1em; }

table { width: 100%; border-collapse: collapse; background: white; margin-top: 10px; font-size: 0.9em; }
th { background: var(--blue); color: white; text-align: left; padding: 8px 10px; }
td { padding: 8px 10px; border-bottom: 1px solid var(--border); }
tr:hover td { background: #ebf8ff; }

.filters { display: flex; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.filters select, .filters input, .inline-form input, .inline-form select {
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 5px;
}
.filters button, .inline-form button, #login-form button, #report-form button {
  padding: 7px 16px; background: var(--blue); color: white; border: none; border-radius: 5px; cursor: pointer;
}
.inline-form { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }

.sev-CRITICO { color: var(--critico); font-weight: 600; }
.sev-INFORMATIVO { color: var(--info); font-weight: 600; }

.button-link {
  display: inline-block; margin-top: 12px; padding: 8px 18px; background: var(--blue);
  color: white; text-decoration: none; border-radius: 6px;
}
#report-summary table { margin-bottom: 16px; }
