:root {
  --ink: #4a4a4f;
  --muted: #7a7b81;
  --surface: #f4f4f5;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-strong: #ffffff;
  --border: #dddde1;
  --shadow: 0 18px 36px rgba(88, 77, 77, 0.12);

  --fogo: #d07563;
  --terra: #b68d73;
  --ar: #a77d74;
  --agua: #917a7d;

  --primary: #cf6b58;
  --primary-strong: #b85b4b;
  --ok-bg: #ddf6ec;
  --ok-text: #0f513c;
  --info-bg: #f6f1f1;
  --info-text: #6f6366;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  position: relative;
  min-height: 100vh;
  font-family: "Montserrat", "Avenir Next", "Trebuchet MS", sans-serif;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(1200px 520px at 0% -10%, rgba(207, 107, 88, 0.2) 0%, transparent 58%),
    radial-gradient(1200px 520px at 100% -6%, rgba(145, 122, 125, 0.16) 0%, transparent 60%),
    linear-gradient(160deg, #f8f7f7 0%, #f6f3f3 45%, #f7f6f6 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -2;
}

body::before {
  inset: 0;
  background-image: linear-gradient(rgba(86, 78, 80, 0.03) 1px, transparent 1px);
  background-size: 100% 48px;
}

body::after {
  inset: auto -180px -160px auto;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(145, 122, 125, 0.2), transparent 70%);
  z-index: -1;
}

h1,
h2,
h3 {
  margin: 0 0 10px;
  font-family: "Montserrat", "Avenir Next", sans-serif;
  letter-spacing: 0.35px;
  line-height: 1.15;
  color: #565257;
}

h1 { font-size: clamp(2rem, 3.4vw, 3rem); }
h2 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 2vw, 1.8rem); }

p {
  margin: 0 0 12px;
  color: var(--muted);
}

a {
  color: var(--primary-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.bg-orb {
  position: fixed;
  z-index: -1;
  filter: blur(68px);
  opacity: 0.28;
  pointer-events: none;
}

.orb-fogo {
  width: 270px;
  height: 270px;
  border-radius: 50%;
  background: rgba(207, 107, 88, 0.56);
  top: 72px;
  left: -72px;
}

.orb-terra {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(182, 141, 115, 0.46);
  bottom: 70px;
  left: 24%;
}

.orb-ar {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(167, 125, 116, 0.44);
  top: 130px;
  right: -60px;
}

.orb-agua {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(145, 122, 125, 0.42);
  bottom: 30px;
  right: 8%;
}

.container {
  width: min(1180px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(9px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 246, 246, 0.88) 100%);
  border-bottom: 1px solid rgba(186, 173, 175, 0.32);
}

.header-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0 6px;
}

.brand-block {
  display: flex;
  align-items: center;
}

.brand-logo-link {
  display: inline-flex;
  text-decoration: none;
}

.brand-logo-link:hover {
  text-decoration: none;
}

.brand-logo-img {
  display: block;
  width: clamp(130px, 15vw, 220px);
  height: auto;
  object-fit: contain;
}

.brand-title {
  display: inline-block;
  font-size: clamp(1.62rem, 2.4vw, 2.15rem);
  color: #5e565b;
  text-decoration: none;
}

.brand-title:hover {
  text-decoration: none;
}

.brand-subtitle {
  margin: 2px 0 0;
  font-size: 0.92rem;
  color: #8a8288;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-status {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #7a767d;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(179, 168, 170, 0.35);
}

.lang-switch {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.lang-switch .flag-link {
  width: 32px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  border: 1px solid rgba(179, 168, 170, 0.35);
  background: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.lang-switch .flag-link:hover {
  transform: translateY(-1px);
  border-color: rgba(207, 107, 88, 0.55);
  box-shadow: 0 10px 20px rgba(92, 75, 77, 0.14);
  text-decoration: none;
}

.lang-switch .flag-link.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(207, 107, 88, 0.18);
}

.flag-emoji {
  font-size: 0.88rem;
  line-height: 1;
}

.element-strip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 0 0 5px;
}

.element-chip {
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.35px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.44);
  box-shadow: 0 10px 20px rgba(91, 74, 76, 0.16);
}

.element-chip.fogo { background: linear-gradient(90deg, #b95f4d, var(--fogo)); }
.element-chip.terra { background: linear-gradient(90deg, #9c7460, var(--terra)); }
.element-chip.ar { background: linear-gradient(90deg, #916a63, var(--ar)); }
.element-chip.agua { background: linear-gradient(90deg, #7f686d, var(--agua)); }

.app-shell {
  display: grid;
  grid-template-columns: minmax(220px, 250px) 1fr;
  gap: 24px;
  padding: 26px 0 52px;
}

.side-nav {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(249, 247, 247, 0.92));
  border: 1px solid rgba(215, 204, 206, 0.82);
  border-radius: 18px;
  box-shadow: 0 18px 34px rgba(95, 84, 85, 0.12);
  padding: 18px 14px;
  align-self: start;
  position: sticky;
  top: 96px;
}

.side-nav-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.menu-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.menu-label {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: #9b8a8d;
  font-weight: 700;
  padding-left: 8px;
}

.menu-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: stretch;
}

.side-nav a,
.side-nav .btn-nav {
  display: flex;
  align-items: center;
  min-height: 28px;
  border-radius: 10px;
  padding: 4px 8px;
  color: #605b60;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.side-nav a:hover,
.side-nav .btn-nav:hover {
  background: rgba(207, 107, 88, 0.1);
  border-color: rgba(207, 107, 88, 0.3);
  text-decoration: none;
  transform: translateX(2px);
}

.side-nav a:focus-visible,
.side-nav .btn-nav:focus-visible {
  outline: 2px solid rgba(207, 107, 88, 0.45);
  outline-offset: 2px;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid rgba(207, 107, 88, 0.3);
  background: rgba(255, 255, 255, 0.78);
  color: #7c5251;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.btn-nav:hover {
  transform: translateY(-1px);
  border-color: rgba(207, 107, 88, 0.45);
  box-shadow: 0 10px 18px rgba(114, 83, 81, 0.14);
  text-decoration: none;
}

.logout-form {
  margin: 0;
}

.page-body {
  padding: 0;
}

.content-inner {
  padding-top: 4px;
}

.reveal-in {
  animation: reveal 0.46s ease;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.82));
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
}

.hero-card {
  padding: 26px;
}

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.metric-card {
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 4px;
  height: 100%;
}

.metric-card.fogo::before { background: var(--fogo); }
.metric-card.terra::before { background: var(--terra); }
.metric-card.ar::before { background: var(--ar); }
.metric-card.agua::before { background: var(--agua); }

.metric-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.95px;
  color: #8a8187;
}

.metric {
  margin-top: 8px;
  font-size: 2rem;
  font-weight: 800;
  color: #5d565c;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.compact-head {
  margin-bottom: 10px;
}

.section-spacing {
  margin-top: 14px;
}

.actions-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-foot-link {
  margin-top: 10px;
}

.gmail-status-card {
  position: relative;
  overflow: hidden;
}

.gmail-status-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #e48573, #d87461, #c86553, #b95b4c);
  opacity: 0.75;
}

.form-group {
  margin-bottom: 12px;
}

.question-item {
  border: 1px solid #e2d9db;
  background: rgba(255, 251, 251, 0.9);
  border-radius: 12px;
  padding: 12px;
}

.question-number {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  border-radius: 50%;
  background: rgba(207, 107, 88, 0.16);
  color: #8f5c56;
  font-size: 0.82rem;
  font-weight: 700;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
  color: #6a6268;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #ddd4d6;
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
  font-family: inherit;
  box-shadow: inset 0 1px 0 rgba(86, 74, 75, 0.04);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  outline: 2px solid rgba(207, 107, 88, 0.2);
}

button {
  font-family: inherit;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--primary), var(--primary-strong));
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(144, 87, 81, 0.28);
}

button:focus-visible {
  outline: 2px solid rgba(207, 107, 88, 0.45);
  outline-offset: 2px;
}

.btn-inline {
  padding: 6px 9px;
  border-radius: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.2px;
}

.table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e3dadd;
  background: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: none;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid #eee5e6;
  text-align: left;
  font-size: 0.92rem;
}

th {
  background: #faf4f3;
  color: #8a6967;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  font-weight: 700;
}

tr:hover td {
  background: #fff9f9;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.status-chip.done {
  background: rgba(44, 165, 117, 0.16);
  color: #1b6c4d;
  border: 1px solid rgba(44, 165, 117, 0.28);
}

.status-chip.pending {
  background: rgba(217, 117, 51, 0.16);
  color: #8b4b21;
  border: 1px solid rgba(217, 117, 51, 0.26);
}

.alert {
  margin-bottom: 16px;
  border-radius: 11px;
  padding: 10px 12px;
  border: 1px solid transparent;
  font-weight: 600;
}

.alert.success {
  background: var(--ok-bg);
  color: var(--ok-text);
  border-color: #bde9d7;
}

.alert.info {
  background: var(--info-bg);
  color: var(--info-text);
  border-color: #e8dada;
}

.validation {
  color: #aa2f2f;
  font-size: 0.88rem;
}

.site-footer {
  padding-bottom: 28px;
}

.site-footer p {
  margin: 0;
  font-size: 0.86rem;
  color: #7a7b81;
  text-align: center;
}

.element-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-top: 14px;
}

.element-card {
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(168, 151, 154, 0.24);
  background: rgba(255, 255, 255, 0.74);
}

.element-card h3 {
  margin-bottom: 5px;
  font-size: 1.35rem;
}

.element-card.fogo h3 { color: var(--fogo); }
.element-card.terra h3 { color: var(--terra); }
.element-card.ar h3 { color: var(--ar); }
.element-card.agua h3 { color: var(--agua); }

.result-grid {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 16px;
  align-items: center;
}

.result-summary-card {
  border-left: 4px solid rgba(207, 107, 88, 0.52);
}

.result-highlight-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 252, 252, 0.9)),
    radial-gradient(600px 260px at 100% 0%, rgba(207, 107, 88, 0.08), transparent 75%);
}

.result-interpretation-card {
  border-top: 4px solid rgba(145, 122, 125, 0.42);
}

.result-image-box {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e4d9dc;
  background: #fcf8f8;
}

.temperament-hero-image {
  width: 100%;
  height: auto;
  display: block;
}

.thumb-image {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e4d9dc;
  background: #fcf8f8;
}

.multiline-text {
  white-space: pre-line;
}

ol {
  margin: 10px 0 0;
  padding-left: 18px;
}

ol li {
  margin-bottom: 7px;
  color: #71686e;
}

@media (max-width: 980px) {
  .header-shell {
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 780px) {
  .header-shell {
    flex-direction: column;
    align-items: flex-start;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding-top: 18px;
  }

  .side-nav {
    position: static;
    width: 100%;
  }

  .bg-orb {
    opacity: 0.21;
  }

  .result-grid {
    grid-template-columns: 1fr;
  }

  .element-strip { gap: 4px; }
}
