/* ── IdP Tricagono — identidade da rede ─────────────────────────────────── */

:root {
  --bg: #080b08;
  --surface: #101510;
  --surface-2: #151d15;
  --line: #243224;
  --line-soft: #1b251b;
  --text: #e6ede3;
  --muted: #8b9a8b;
  --faint: #5d6c5d;
  --green: #5d9a6d;
  --green-strong: #74b585;
  --green-dim: #2f5239;
  --danger: #c06055;
  --danger-dim: #4a2420;
  --warn: #c9a24a;
  --radius: 6px;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 500px at 50% -160px, rgba(70, 122, 84, 0.16), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 15px/1.6 ui-monospace, "Cascadia Mono", "DejaVu Sans Mono", Menlo, Consolas, monospace;
}

a { color: var(--green-strong); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navegação ── */

.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(8, 11, 8, 0.86);
}

.brand {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 13px;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
}

.pill {
  border: 1px solid var(--green-dim);
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(93, 154, 109, 0.10);
}

.inline-form { display: inline; margin: 0; }

.linklike {
  background: none;
  border: 0;
  padding: 0;
  color: var(--green-strong);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.linklike:hover { color: var(--text); }

/* ── Estrutura ── */

.wrap {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 20px 56px;
  flex: 1;
}

.wrap.wide { max-width: 1080px; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 24px;
  border-top: 1px solid var(--line-soft);
  color: var(--faint);
  font-size: 12px;
}

.page-title { margin: 0 0 20px; font-size: 22px; font-weight: 600; }

h1 { font-size: 26px; line-height: 1.25; margin: 0 0 12px; font-weight: 600; }
h2 { font-size: 17px; margin: 0 0 12px; font-weight: 600; }

.muted { color: var(--muted); }
.small { font-size: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.card.center { text-align: center; max-width: 560px; margin: 8vh auto; }
.card.center p { margin: 10px 0 18px; }

.auth-card { max-width: 460px; margin: 6vh auto 0; }

hr {
  border: 0;
  border-top: 1px solid var(--line-soft);
  margin: 20px 0;
}

/* ── Alertas ── */

.alert {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 0 0 18px;
  font-size: 14px;
}

.alert-error { border-color: var(--danger-dim); background: rgba(192, 96, 85, 0.10); color: #edb9b2; }
.alert-ok { border-color: var(--green-dim); background: rgba(93, 154, 109, 0.10); color: #bfe0c7; }
.alert-warn { border-color: #4d4022; background: rgba(201, 162, 74, 0.08); color: #e6d29a; }

/* ── Formulários ── */

label {
  display: block;
  margin: 16px 0 6px;
  font-size: 13px;
  color: var(--muted);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea {
  width: 100%;
  padding: 11px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit;
  outline: none;
}

input:focus, textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(93, 154, 109, 0.16);
}

textarea { resize: vertical; }

.button {
  display: inline-block;
  margin: 16px 8px 0 0;
  padding: 11px 20px;
  border: 1px solid var(--green-dim);
  border-radius: var(--radius);
  background: var(--green-dim);
  color: #eef6ef;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.button:hover { background: #3a6446; text-decoration: none; }
.button.block { display: block; width: 100%; text-align: center; }
.button.ghost { background: transparent; color: var(--green-strong); }
.button.ghost:hover { background: rgba(93, 154, 109, 0.10); }
.button.danger { border-color: var(--danger-dim); background: var(--danger-dim); color: #f3c7c1; }
.button.danger:hover { background: #5d2c27; }
.button[disabled] { opacity: 0.45; cursor: not-allowed; }

.hint { color: var(--faint); font-size: 12px; margin: 6px 0 0; }
.hint.ok { color: var(--green-strong); }
.hint.bad { color: #d98a80; }
.field-error { color: #d98a80; font-size: 12px; margin: 6px 0 0; }
.optional { color: var(--faint); font-weight: 400; }

.links { margin: 18px 0 0; font-size: 13px; }

/* honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Abas ── */

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-bottom: 1px solid var(--line-soft);
  margin: 0 0 22px;
  padding-bottom: 2px;
}

.tabs a {
  padding: 9px 12px;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 2px solid transparent;
}

.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.active { color: var(--text); border-bottom-color: var(--green); }

/* ── Perfil ── */

.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid > .card { margin-bottom: 0; }

.profile-card { padding: 0; overflow: hidden; }

.banner {
  height: 120px;
  background: linear-gradient(120deg, #1a2a1d, #101710);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.banner-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.banner.preview { height: 96px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; }
.banner.empty { background: repeating-linear-gradient(45deg, #121812, #121812 10px, #151d15 10px, #151d15 20px); }
.public-banner { height: 190px; }

.profile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px 0;
}

.profile-card .profile-head { padding: 18px 20px 0; }

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface);
  background: var(--green-dim);
  flex: 0 0 auto;
}

.avatar.big { width: 84px; height: 84px; }

.avatar-empty {
  display: grid;
  place-items: center;
  color: #d8e8da;
  font-weight: 700;
  font-size: 22px;
}

.profile-head h1, .profile-head h2 { margin: 0; font-size: 21px; }
.handle { margin: 2px 0 4px; color: var(--green-strong); font-size: 14px; }
.bio { white-space: pre-wrap; margin: 16px 24px; }
.profile-card .bio { margin: 16px 20px; }
.profile-card .button, .profile-card p { margin-left: 20px; }

.public-profile { padding: 0; overflow: hidden; }
.public-profile .profile-head { padding: 22px 26px 0; }
.public-profile .bio { margin: 18px 26px; }
.public-profile > p { margin: 14px 26px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.ok-badge { border-color: var(--green-dim); color: var(--green-strong); background: rgba(93, 154, 109, 0.10); }
.warn-badge { border-color: #4d4022; color: var(--warn); background: rgba(201, 162, 74, 0.08); }

.big-handle { font-size: 24px; color: var(--green-strong); margin: 4px 0 8px; }

/* ── Listas e tabelas ── */

.facts { list-style: none; margin: 16px 0 0; padding: 0; }
.facts li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.facts li:last-child { border-bottom: 0; }
.facts span { color: var(--muted); }

.history { list-style: none; margin: 0; padding: 0; }
.history li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.history li:last-child { border-bottom: 0; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 16px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; }
.table tr:last-child td { border-bottom: 0; }

.danger-zone { border-color: var(--danger-dim); }
.danger-zone h2 { color: #dfa49c; }

/* ── Responsivo ── */

@media (max-width: 720px) {
  .grid.two { grid-template-columns: 1fr; }
  .topnav { padding: 14px 16px; }
  .navlinks { gap: 12px; }
  .wrap { padding: 24px 14px 40px; }
  .card { padding: 18px; }
  .profile-head { padding: 16px 16px 0; }
  .public-profile .profile-head { padding: 18px 16px 0; }
  .public-profile .bio, .public-profile > p { margin-left: 16px; margin-right: 16px; }
}
