* {
  box-sizing: border-box;
}

:root {
  --violet: #f6c945;
  --violet2: #ffd95d;
  --ink: #f4f4f1;
  --muted: #a2a5a8;
  --line: #2b2e31;
  --soft: #191b1d;
  --green: #168657;
  --red: #d73d51;
  --gold: #a96b0b;
}

body {
  margin: 0;
  background: #f8f7fa;
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #b99add;
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 42% 58%;
  background: #fff;
}

.auth-visual {
  background: linear-gradient(145deg, #351168, #58249c 58%, #8c52ba);
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
}

.auth-visual:before,
.auth-visual:after {
  content: "";
  position: absolute;
  bottom: -100px;
  width: 120%;
  height: 260px;
  background: #30105e35;
  border-radius: 50% 50% 0 0;
  left: -10%;
}

.auth-visual:after {
  bottom: -155px;
  background: #210a4d44;
  transform: scaleX(1.2);
}

.visual-content {
  position: relative;
  z-index: 1;
}

.crest {
  width: 88px;
  height: 88px;
  border: 3px solid currentColor;
  border-radius: 25px;
  display: grid;
  place-items: center;
  margin: 0 auto 15px;
  font-size: 48px;
  line-height: 1;
}

.visual-content h1 {
  font: 800 42px/1 Manrope;
  margin: 0 0 16px;
  letter-spacing: -1.8px;
}

.visual-content p {
  font-size: 16px;
  line-height: 1.55;
  color: #eee4fa;
}

.visual-bottom {
  position: absolute;
  bottom: 20px;
  left: 0;
  width: 100%;
  font-size: 58px;
  opacity: 0.14;
  letter-spacing: 12px;
}

.auth-panel {
  width: min(430px, 100%);
  margin: auto;
  padding: 44px 30px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #31145f;
  font: 800 19px Manrope;
  letter-spacing: -0.5px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border: 2px solid var(--violet);
  color: var(--violet);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 23px;
}

.auth-brand {
  justify-content: center;
  margin-bottom: 38px;
}

.auth-panel h2 {
  font: 800 27px Manrope;
  margin: 0 0 7px;
}

.sub {
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.field {
  margin: 14px 0;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 7px;
}

.field input,
.field textarea,
.field select,
.search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 13px 14px;
  color: var(--ink);
  outline: none;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
.search:focus {
  border-color: #a987d1;
  box-shadow: 0 0 0 3px #5b25a510;
}

.primary {
  background: linear-gradient(105deg, #682fb0, #4f1d94);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 13px 18px;
  font-weight: 800;
  box-shadow: 0 6px 15px #56239b20;
}

.primary:hover {
  filter: brightness(1.06);
}

.primary.block {
  width: 100%;
  margin-top: 12px;
}

.secondary {
  border: 1px solid var(--line);
  background: white;
  color: #5e536f;
  border-radius: 11px;
  padding: 12px 16px;
  font-weight: 700;
}

.text-btn {
  border: 0;
  background: none;
  color: var(--violet);
  font-weight: 700;
  padding: 5px;
}

.forgot {
  text-align: right;
  margin-top: -6px;
}

.auth-foot {
  text-align: center;
  color: var(--muted);
  margin-top: 25px;
}

.demo {
  font-size: 11px;
  color: #aaa3b1;
  text-align: center;
  margin-top: 25px;
}

.agree {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  color: #746b81;
  font-size: 12px;
  line-height: 1.45;
  margin: 18px 0;
}

.agree input {
  accent-color: var(--violet);
  margin-top: 2px;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
}

.sidebar {
  background: #fff;
  border-right: 1px solid var(--line);
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 25px 17px;
  display: flex;
  flex-direction: column;
  z-index: 4;
}

.side-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 25px 5px 22px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #eee4f8;
  color: var(--violet);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 17px;
  flex: none;
}

.side-profile b {
  font-size: 13px;
}

.side-profile small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav button {
  border: 0;
  background: none;
  text-align: left;
  border-radius: 11px;
  padding: 13px 14px;
  color: #776d85;
  font-weight: 700;
}

.nav button span {
  display: inline-block;
  width: 27px;
  font-size: 17px;
}

.nav button.active,
.nav button:hover {
  background: #f1eafa;
  color: var(--violet);
}

.logout {
  margin-top: auto;
  background: none;
  border: 0;
  text-align: left;
  color: #c83b4b;
  padding: 14px;
}

.main {
  min-width: 0;
  padding: 0 34px 42px;
}

.topbar {
  height: 91px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 27px;
}

.topbar .eyebrow {
  font-size: 10px;
  letter-spacing: 1.2px;
  color: #9a92a4;
}

.topbar h2 {
  font: 800 22px Manrope;
  margin: 4px 0 0;
}

.top-avatar {
  margin-left: auto;
}

.menu-toggle {
  display: none;
  border: 0;
  background: none;
  font-size: 22px;
}

.wrap {
  max-width: 1180px;
  margin: auto;
}

.hero {
  border-radius: 18px;
  padding: 27px 30px;
  background: linear-gradient(110deg, #4a1c8c, #7542b7);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  overflow: hidden;
}

.hero h3 {
  font: 800 23px Manrope;
  margin: 0 0 8px;
}

.hero p {
  color: #e7daf6;
  margin: 0 0 17px;
}

.hero-art {
  font-size: 70px;
  opacity: 0.45;
  margin-right: 20px;
}

.hero .primary {
  background: #fff;
  color: #54239a;
  box-shadow: none;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 18px 0 25px;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 17px 19px;
}

.stat small {
  color: var(--muted);
}

.stat strong {
  font: 800 27px Manrope;
  display: block;
  margin-top: 8px;
}

.stat .ico {
  float: right;
  color: var(--violet);
  font-size: 21px;
}

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

.section-head h3 {
  font: 800 17px Manrope;
  margin: 0;
}

.link {
  border: 0;
  background: none;
  color: var(--violet);
  font-weight: 800;
}

.list {
  display: grid;
  gap: 11px;
}

.item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  grid-template-columns: 75px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  transition: 0.15s;
}

.item:hover {
  border-color: #d4c3e7;
  transform: translateY(-1px);
}

.photo {
  width: 75px;
  height: 75px;
  border-radius: 10px;
  background: linear-gradient(145deg, #e9e2ef, #d9d0e4);
  display: grid;
  place-items: center;
  color: #7653a1;
  font-size: 26px;
  overflow: hidden;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.item h4 {
  font-size: 13px;
  margin: 0 0 6px;
}

.item p {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 8px;
  line-height: 1.45;
}

.meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  color: #938a9e;
  font-size: 11px;
}

.status {
  display: inline-block;
  border-radius: 20px;
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 800;
  background: #fff1d8;
  color: #9d670b;
}

.status.true {
  background: #e0f4e8;
  color: #18764b;
}

.status.false {
  background: #ffe6e9;
  color: #bb3043;
}

.votes {
  white-space: nowrap;
  display: flex;
  gap: 9px;
  font-size: 12px;
}

.yes-txt {
  color: var(--green);
}

.no-txt {
  color: var(--red);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0 11px;
}

.filter {
  border: 1px solid var(--line);
  background: #fff;
  color: #746b80;
  border-radius: 22px;
  padding: 8px 14px;
  font-size: 12px;
}

.filter.active {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

.search {
  margin: 4px 0 15px;
}

.form-card,
.panel,
.profile-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}

.form-card {
  max-width: 760px;
}

.steps {
  display: flex;
  justify-content: space-between;
  margin: 0 0 26px;
  color: #9b93a6;
  font-size: 12px;
}

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

.step i {
  width: 27px;
  height: 27px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eeeaf3;
  font-style: normal;
}

.step.active {
  color: var(--violet);
  font-weight: 800;
}

.step.active i {
  background: var(--violet);
  color: white;
}

.form-card h3 {
  font: 800 17px Manrope;
  margin: 0 0 17px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.upload {
  border: 1px dashed #cfc3df;
  border-radius: 12px;
  padding: 17px;
  text-align: center;
  color: #82768f;
  background: #fcfbfd;
}

.preview-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.preview-row img {
  width: 76px;
  height: 70px;
  object-fit: cover;
  border-radius: 9px;
}

.review {
  background: #faf8fc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  line-height: 1.7;
}

.details {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(230px, 0.75fr);
  gap: 16px;
}

.panel h3 {
  font: 800 17px Manrope;
  margin: 0 0 14px;
}

.detail-title {
  font: 800 24px Manrope;
  margin: 13px 0;
}

.detail-description {
  line-height: 1.7;
  color: #5f566c;
}

.vote-box {
  background: #faf7fc;
  border-radius: 14px;
  padding: 17px;
}

.vote-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.vote {
  border: 0;
  border-radius: 12px;
  padding: 14px 8px;
  font-weight: 800;
}

.vote small {
  font-size: 11px;
  font-weight: 500;
}

.vote.yes {
  background: #def4e7;
  color: #14754a;
}

.vote.no {
  background: #ffe5e8;
  color: #b92c40;
}

.bar {
  height: 9px;
  border-radius: 10px;
  background: #f4d9dd;
  overflow: hidden;
  margin: 14px 0 8px;
}

.bar span {
  height: 100%;
  display: block;
  background: #249b69;
}

.profile-card {
  max-width: 720px;
}

.profile-head {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.profile-head .avatar {
  width: 64px;
  height: 64px;
  font-size: 23px;
}

.profile-head h3 {
  margin: 0 0 5px;
}

.profile-head p {
  margin: 0;
  color: var(--muted);
}

.profile-links {
  display: grid;
  margin-top: 8px;
}

.profile-links button {
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  padding: 16px 3px;
  color: #514760;
}

.profile-links button span {
  float: right;
  color: #9c92a8;
}

.empty {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 35px;
  text-align: center;
  color: var(--muted);
}

.toast {
  position: fixed;
  z-index: 9;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 15px);
  opacity: 0;
  pointer-events: none;
  background: #25163b;
  color: #fff;
  padding: 12px 18px;
  border-radius: 11px;
  box-shadow: 0 8px 25px #0002;
  transition: 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: #1b102d88;
  display: grid;
  place-items: center;
  z-index: 8;
  padding: 18px;
}

.modal {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  width: min(430px, 100%);
  box-shadow: 0 20px 70px #160b2b40;
}

.modal h3 {
  margin-top: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

.danger {
  color: #bd3546;
}

@media (max-width: 850px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: -270px;
    top: 0;
    width: 252px;
    transition: left 0.2s;
    box-shadow: 12px 0 35px #1c0b3020;
  }

  .sidebar.open {
    left: 0;
  }

  .main {
    padding: 0 16px 30px;
  }

  .topbar {
    height: 76px;
    margin-bottom: 18px;
  }

  .menu-toggle {
    display: block;
  }

  .topbar h2 {
    font-size: 19px;
  }

  .hero {
    padding: 22px;
  }

  .hero-art {
    display: none;
  }

  .stats {
    gap: 8px;
  }

  .stat {
    padding: 13px;
  }

  .stat strong {
    font-size: 22px;
  }

  .stat small {
    font-size: 10px;
  }

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

@media (max-width: 520px) {
  .auth {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-panel {
    padding: 35px 23px;
  }

  .auth-brand {
    margin-bottom: 30px;
  }

  .item {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
  }

  .photo {
    width: 58px;
    height: 62px;
  }

  .votes {
    grid-column: 2;
  }

  .item h4 {
    font-size: 12px;
  }

  .item p {
    font-size: 11px;
  }

  .form-card,
  .panel,
  .profile-card {
    padding: 17px;
  }

  .hero h3 {
    font-size: 19px;
  }

  .section-head h3 {
    font-size: 15px;
  }

  .steps {
    font-size: 10px;
  }

  .step {
    gap: 4px;
  }

  .step i {
    width: 23px;
    height: 23px;
  }
}

.ranking-section {
  margin: 24px 0 28px;
}

.rank-caption {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.rank-note {
  font-size: 11px;
  line-height: 1.55;
  color: #8b8297;
  background: #f1edf5;
  border-radius: 9px;
  padding: 10px 12px;
  margin: -3px 0 13px;
}

.ranking-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.rank-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.rank-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.rank-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 800;
}

.rank-icon.calm {
  background: #e2f4e9;
  color: #198451;
}

.rank-icon.alert {
  background: #fff0df;
  color: #b87513;
}

.rank-title h4 {
  font-size: 13px;
  margin: 0 0 3px;
}

.rank-title small {
  font-size: 10px;
  color: var(--muted);
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid #f2eff5;
}

.rank-row:last-child {
  border-bottom: 0;
  padding-bottom: 1px;
}

.rank-number {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f2edf8;
  color: var(--violet);
  font-weight: 800;
  font-size: 11px;
}

.rank-copy {
  min-width: 0;
  flex: 1;
}

.rank-copy b {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.rank-copy small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 3px;
}

.rank-pill {
  font-size: 9px;
  border-radius: 20px;
  padding: 5px 7px;
  white-space: nowrap;
}

.rank-pill.low {
  background: #e3f5eb;
  color: #18764b;
}

.rank-pill.high {
  background: #fff0dc;
  color: #a86a0c;
}

@media (max-width: 650px) {
  .ranking-grid {
    grid-template-columns: 1fr;
  }

  .rank-caption {
    max-width: 130px;
    text-align: right;
  }
}

/* Identidade visual e experiência mobile-first */
.brand-icon {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  width: 38px;
  height: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  flex: none;
}

.brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.splash-mark {
  width: 78px;
  height: 78px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 20px;
}

.splash-mark img {
  width: 44px;
  height: 42px;
  object-fit: contain;
  display: block;
}

.splash-screen {
  height: 100vh;
  height: 100dvh;
  min-height: 520px;
  position: relative;
  overflow: hidden;
  background: #111315 url("../assets/splash-community.svg") center / cover no-repeat;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 25px;
  border-radius: 0;
}

.splash-status {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 38px;
  padding: 12px 22px 0;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
}

.splash-center {
  position: relative;
  z-index: 2;
  margin-top: -22px;
}

.splash-logo {
  width: 74px;
  height: 74px;
  box-sizing: border-box;
  padding: 16px;
  object-fit: contain;
  filter: none;
  background: #fff;
  border-radius: 20px;
  margin-bottom: 0;
}

.splash-center h1 {
  font: 800 38px/0.91 Manrope, sans-serif;
  letter-spacing: -1.7px;
  margin: 0 0 18px;
}

.splash-center p {
  font-size: 14px;
  line-height: 1.45;
  color: #e0dfd7;
  margin: 0;
}

.splash-screen:after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 24%;
  background: linear-gradient(0deg, #11131566, transparent);
  z-index: 1;
  pointer-events: none;
}

@media (max-width: 850px) {
  body {
    background: #fff;
  }

  .shell {
    min-height: 100dvh;
  }

  .main {
    padding: 0 14px calc(24px + env(safe-area-inset-bottom));
  }

  .topbar {
    height: 65px;
    margin-bottom: 16px;
  }

  .sidebar {
    padding-top: calc(22px + env(safe-area-inset-top));
  }

  .hero {
    border-radius: 15px;
  }

  .form-card,
  .panel,
  .profile-card {
    border-radius: 14px;
  }

  .auth {
    min-height: 100dvh;
  }
}

@media (max-width: 520px) {
  .splash-screen {
    min-height: 100dvh;
    padding: 20px 18px;
  }

  .splash-center h1 {
    font-size: 37px;
  }

  .splash-logo {
    width: 70px;
    height: 70px;
  }

  .auth-panel {
    width: 100%;
    padding: 28px 21px;
    max-height: 100dvh;
    overflow: auto;
  }

  .auth-brand {
    margin-bottom: 25px;
  }

  .auth-panel h2 {
    font-size: 24px;
  }

  .field {
    margin: 12px 0;
  }

  .field input,
  .field textarea,
  .field select {
    min-height: 46px;
  }

  .primary.block {
    min-height: 48px;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat strong {
    font-size: 20px;
  }

  .stat {
    min-width: 0;
  }

  .hero p {
    font-size: 12px;
  }

  .hero .primary {
    font-size: 12px;
    padding: 11px 12px;
  }

  .filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .filter {
    white-space: nowrap;
  }

  .search {
    min-height: 44px;
  }

  .item {
    padding: 9px;
  }

  .form-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 12px 0 max(8px, env(safe-area-inset-bottom));
    z-index: 2;
  }

  .steps {
    gap: 6px;
  }

  .step {
    font-size: 10px;
  }

  .profile-head {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .profile-head p {
    overflow-wrap: anywhere;
  }

  .profile-head .link {
    margin-left: 0 !important;
  }
}


/* =========================================================
   OS GUARDIÕES — TEMA GRAFITE + AMARELO
   Sobrescreve a identidade roxa mantendo a estrutura e a lógica.
   ========================================================= */
:root {
  color-scheme: dark;
  --violet: #f6c945;
  --violet2: #ffd95d;
  --ink: #f4f4f1;
  --muted: #a2a5a8;
  --line: #2b2e31;
  --soft: #191b1d;
  --green: #39c987;
  --red: #ff6474;
  --gold: #f6c945;
}

body {
  background: #111315;
  color: #f4f4f1;
}

.auth { background: #111315; }
.auth-visual {
  background: radial-gradient(circle at 50% 25%, #343126 0, #191a1a 42%, #111315 100%);
}
.auth-visual:before { background: #f6c94512; }
.auth-visual:after { background: #00000038; }
.visual-content p { color: #c9c9c3; }

.brand { color: #f7f7f3; }
.brand-icon {
  border-color: #f6c945;
  background: #f6c945;
  color: #171819;
  overflow: hidden;
}
.brand-icon img { width: 100%; height: 100%; object-fit: contain; }
.auth-panel h2, .topbar h2, .hero h3, .section-head h3,
.form-card h3, .panel h3, .detail-title, .profile-head h3 {
  color: #f7f7f3;
}

.field input, .field textarea, .field select, .search {
  background: #1b1d1f;
  border-color: #34373a;
  color: #f4f4f1;
}
.field input::placeholder, .field textarea::placeholder, .search::placeholder {
  color: #85898c;
}
.field input:focus, .field textarea:focus, .field select:focus, .search:focus {
  border-color: #f6c945;
  box-shadow: 0 0 0 3px #f6c9451c;
}
button:focus-visible, a:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline-color: #f6c945;
}

.primary {
  background: #f6c945;
  color: #171819;
  box-shadow: 0 5px 18px #f6c94520;
}
.primary:hover { background: #ffda62; filter: none; }
.primary.block { color: #171819; }
.secondary {
  border-color: #36393c;
  background: #202224;
  color: #e7e7e1;
}
.text-btn, .link { color: #f6c945; }
.agree { color: #b4b5b0; }
.agree input { accent-color: #f6c945; }

.sidebar {
  background: #17191b;
  border-right-color: #2b2e31;
}
.side-profile { border-bottom-color: #2b2e31; }
.side-profile small, .topbar .eyebrow { color: #969a9d; }
.avatar {
  background: #f6c945;
  color: #171819;
}
.nav button { color: #a9abad; }
.nav button.active, .nav button:hover {
  background: #f6c945;
  color: #171819;
}
.logout { color: #ff7885; }
.main { background: #111315; }
.topbar { border-bottom-color: #2b2e31; }

.hero {
  background: linear-gradient(115deg, #25251f, #1b1d1e 65%, #27251b);
  border: 1px solid #39362a;
}
.hero p { color: #c0c0b8; }
.hero-art { color: #f6c945; }
.hero .primary { background: #f6c945; color: #171819; }

.stat, .item, .form-card, .panel, .profile-card, .rank-card, .modal {
  background: #1a1c1e;
  border-color: #2d3033;
  color: #f4f4f1;
}
.form-actions { background: #1a1c1e; }
.stat .ico { color: #f6c945; }
.stat small, .item p, .meta, .rank-caption, .rank-title small,
.rank-copy small, .profile-head p { color: #a2a5a8; }
.item:hover { border-color: #62552a; }
.photo {
  background: linear-gradient(145deg, #34332b, #242629);
  color: #f6c945;
}
.status { background: #3b321d; color: #f6d77a; }
.status.true { background: #173b2d; color: #63d8a1; }
.status.false { background: #422329; color: #ff8b98; }
.yes-txt { color: #55d39b; }
.no-txt { color: #ff7885; }

.filters .filter {
  background: #1b1d1f;
  border-color: #35383b;
  color: #c2c3bf;
}
.filter.active {
  background: #f6c945;
  border-color: #f6c945;
  color: #171819;
}
.steps { color: #9da0a1; }
.step i { background: #303235; color: #d7d7d1; }
.step.active { color: #f6c945; }
.step.active i { background: #f6c945; color: #171819; }
.upload {
  border-color: #49432c;
  background: #20211f;
  color: #b9b9b0;
}
.review, .vote-box { background: #202224; border-color: #34373a; }
.rank-note { background: #24241f; color: #b9b9b0; }
.rank-icon.calm { background: #173b2d; color: #63d8a1; }
.rank-icon.alert { background: #3b321d; color: #f6d77a; }
.rank-number { background: #39321e; color: #f6c945; }
.rank-row { border-bottom-color: #2b2e31; }
.profile-head { border-bottom-color: #2b2e31; }
.profile-links button { color: #e2e2dc; border-bottom-color: #2b2e31; }
.profile-links button span { color: #9da0a1; }
.empty { background: #1a1c1e; border-color: #2d3033; color: #a2a5a8; }
.toast { background: #f6c945; color: #171819; }
.modal-backdrop { background: #000000b8; }
.danger { color: #ff7885; }
.bar { background: #48272d; }
.bar span { background: #f6c945; }

@media (max-width: 850px) {
  .sidebar {
    left: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    height: auto;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-right: 0;
    border-top: 1px solid #2b2e31;
    background: #17191bf2;
    backdrop-filter: blur(18px);
    box-shadow: 0 -8px 30px #00000030;
    z-index: 10;
  }
  .sidebar .brand, .side-profile, .logout { display: none; }
  .sidebar .nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
  }
  .nav button {
    min-width: 0;
    text-align: center;
    padding: 8px 2px;
    border-radius: 10px;
    font-size: 10px;
    line-height: 1.2;
  }
  .nav button span {
    display: block;
    width: auto;
    font-size: 19px;
    margin-bottom: 4px;
  }
  .sidebar.open { left: 0; }
  .menu-toggle { display: none; }
  .main { padding: 0 14px calc(95px + env(safe-area-inset-bottom)); }
  .topbar { height: 74px; }
  .hero { border-radius: 16px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { border-radius: 13px; }
  .ranking-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .auth { background: #111315; }
  .auth-panel { padding: 35px 23px; }
  .auth-brand { margin-bottom: 30px; }
  .auth-panel h2 { font-size: 25px; }
  .hero { padding: 20px; }
  .hero h3 { font-size: 19px; }
  .stat { padding: 12px 10px; }
  .stat strong { font-size: 21px; }
  .stat small { font-size: 10px; }
  .item { background: #1a1c1e; }
  .form-card, .panel, .profile-card { padding: 16px; }
}
