/* IT Manager -- shared stylesheet. Ported verbatim from DMARCLenz's own
   style.css (itself ported from DnsCHK/MailCHK - see ../../../DevLogBook.md
   "Fase 6" for why: the Pedro asked for the same look and feel as the
   sibling projects, not a new design) - same design system, same accent
   colour (Secure Networks red, #ff1700), system fonts only, no external
   font/CDN dependency, strict `default-src 'self'` CSP. All classes below
   already existed upstream (.status-pill, .secret-reveal, table.list,
   etc.) and are reused as-is; nothing IT Manager-specific was added. */

:root {
  --bg: #faf9f8;
  --surface: #ffffff;
  --border: #e8e5e3;
  --text: #1c1b1a;
  --text-muted: #6b6764;
  --accent: #ff1700;
  --accent-dark: #cc1200;
  --accent-tint: #fff0ee;
  --pass: #1a7f4b;
  --pass-tint: #eaf6ef;
  --fail-tint: #fdeceb;
  --warn: #8a5a00;
  --warn-tint: #fdf3e2;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(28, 27, 26, 0.04), 0 8px 24px rgba(28, 27, 26, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ---- Layout shell ---- */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 860px;
  margin: 0 auto;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-link {
  display: block;
  line-height: 0;
}

.brand-logo-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.brand img {
  height: 38px;
  width: auto;
  display: block;
}

.brand-tagline {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--border);
}

.brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.005em;
}

.brand-desc {
  font-size: 14px;
  color: var(--text-muted);
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 14px;
  font-weight: 600;
}

.header-nav a {
  color: var(--text-muted);
}
.header-nav a:hover {
  color: var(--accent);
}
.header-nav a.active {
  color: var(--accent);
}

.header-nav .logout-form {
  margin: 0;
}
.header-nav .logout-form button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.header-nav .logout-form button:hover {
  color: var(--accent);
}

.alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
}

main {
  flex: 1;
  padding: 56px 24px 64px;
}

.container {
  max-width: 860px;
  margin: 0 auto;
}

.container-narrow {
  max-width: 480px;
  margin: 0 auto;
}

.site-footer {
  padding: 22px 24px 32px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ---- Typography ---- */

h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.005em;
  margin: 0 0 8px;
}

.lede {
  font-size: 16px;
  color: var(--text-muted);
  margin: 0 0 36px;
}

/* ---- Cards ---- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.card + .card {
  margin-top: 20px;
}

/* ---- Form controls ---- */

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

input[type="email"],
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  margin-bottom: 16px;
}
input[type="email"]:focus,
input[type="text"]:focus,
input[type="password"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.captcha-image {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  max-width: 100%;
  height: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.btn:hover {
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg);
  color: var(--text);
}

.btn-small {
  width: auto;
  padding: 6px 14px;
  font-size: 13px;
}

/* A .btn sitting on its own in the page flow (not inside a form/card,
   which already has its own spacing/width rules). */
.btn-standalone {
  display: inline-flex;
  width: auto;
  margin-top: 20px;
}

/* A .btn used as a standalone link straight in .container (not inside a
   form/card, which already has its own spacing). */
.container > .btn,
.container-narrow > .btn {
  margin-top: 20px;
}

/* ---- Notes / status ---- */

.note {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: 16px;
}

.error {
  background: var(--fail-tint);
  color: var(--accent-dark);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.status-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 24px;
}
.status-banner.pending {
  background: #f1efec;
  color: var(--text-muted);
}
.status-banner.verified {
  background: var(--pass-tint);
  color: var(--pass);
}
.status-banner.error {
  background: var(--fail-tint);
  color: var(--accent-dark);
}
.status-banner.warn {
  background: var(--warn-tint);
  color: var(--warn);
}

.status-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}
.status-pill.verified {
  background: var(--pass-tint);
  color: var(--pass);
}
.status-pill.pending {
  background: var(--warn-tint);
  color: var(--warn);
}

.meta-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 14px;
  margin-bottom: 24px;
}
.meta-list dt {
  color: var(--text-muted);
}
.meta-list dd {
  margin: 0;
  font-weight: 600;
}

/* ---- Secret reveal (temporary password shown once) ---- */

.secret-reveal {
  background: var(--accent-tint);
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 16px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--accent-dark);
  word-break: break-all;
}

/* ---- Tables (domains, alerts, users) ---- */

table.list {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.list th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0 16px 10px 0;
  border-bottom: 1px solid var(--border);
}
table.list td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.list tr:last-child td {
  border-bottom: none;
}
table.list form {
  display: inline;
}

@media (max-width: 600px) {
  table.list thead {
    display: none;
  }
  table.list tr {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 10px;
    row-gap: 6px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  table.list tr:last-child {
    border-bottom: none;
  }
  table.list td {
    display: block;
    width: auto;
    padding: 0;
    border-bottom: none;
  }
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: lowercase;
}
.badge.pass {
  background: var(--pass-tint);
  color: var(--pass);
}
.badge.warn {
  background: var(--warn-tint);
  color: var(--warn);
}
.badge.fail {
  background: var(--fail-tint);
  color: var(--accent-dark);
}

/* ---- Report cards (página de relatórios) ---- */

.report-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.report-org {
  font-size: 16px;
  font-weight: 700;
}

.report-id {
  font-size: 13px;
  color: var(--text-muted);
}

.report-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--fail-tint);
  overflow: hidden;
  margin-bottom: 18px;
}

.report-bar-pass {
  height: 100%;
  background: var(--pass);
  border-radius: 999px;
}

.report-card .meta-list {
  margin-bottom: 0;
}

/* ---- Alignment boxes (DKIM/SPF, per report) ---- */

.alignment-boxes {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.alignment-box {
  flex: 1;
  min-width: 140px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--bg);
}

.alignment-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.alignment-box .badge {
  margin-bottom: 8px;
}

.alignment-box .report-bar {
  margin-bottom: 8px;
}

.alignment-counts {
  font-size: 12.5px;
  color: var(--text-muted);
}

.chart {
  max-width: 100%;
  margin: 20px 0;
}
.chart svg {
  width: 100%;
  height: auto;
}
.chart-empty {
  color: var(--text-muted);
  font-style: italic;
}

pre {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  overflow-x: auto;
  font-size: 13px;
}
