:root {
  --bg: #f6f5f2;
  --panel: #fff;
  --text: #171717;
  --muted: #79766f;
  --line: #e7e3dc;
  --blue: #b28a42;
  --gold: #b28a42;
  --gold-soft: #f4ead7;
  --green: #16926b;
  --violet: #222;
  --amber: #c08a2d;
  --red: #d94b4b;
  --shadow: 0 8px 24px rgba(45,35,18,.055);
}

.brand-mark {
  background: #171717;
  color: #d4ad62;
  border: 1px solid #cfa75d;
  box-shadow: 0 8px 18px #17171720;
}

.nav-item.active {
  background: var(--gold-soft);
  color: #765719;
}

.settings-nav {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.primary {
  background: #171717;
  color: #fff;
  border-color: #171717;
  box-shadow: 0 6px 14px #17171720;
}

.primary:hover { background: #2a2a2a; }
.kpi.violet, .kpi.dark { border-top-color: #171717; }
.kpi.amber, .kpi.gold { border-top-color: var(--gold); }
.notice { background: #faf5eb; border-color: #eadabb; color: #685634; }
.notice > span { background: #ebdcc0; color: #765719; }
.profile > span { background: var(--gold-soft); color: #765719; }
.product-icon { background: linear-gradient(135deg,#f3ead8,#dfcba4); color: #6e5220; }
.filter span { background: var(--gold-soft); color: #765719; }

.criteria {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 13px;
}
.criteria > div {
  padding: 2px 28px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.criteria > div:first-child { padding-left: 4px; }
.criteria small { color: var(--muted); margin-bottom: 4px; }
.criteria button { margin-left: auto; }
.traffic-rules { display: grid; grid-template-columns: repeat(3,1fr); gap: 13px; margin-bottom: 13px; }
.traffic { background: #fff; border: 1px solid var(--line); border-left: 4px solid; border-radius: 11px; padding: 12px 14px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.traffic span { color: var(--muted); font-size: 12px; }
.traffic small { font-weight: 700; }
.red-traffic { border-left-color: var(--red); }
.red-traffic small { color: var(--red); }
.yellow-traffic { border-left-color: var(--amber); }
.yellow-traffic small { color: #9a6c16; }
.green-traffic { border-left-color: var(--green); }
.green-traffic small { color: var(--green); }

.settings-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}
.settings-card.wide { grid-column: 1 / 3; }
.members { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.member-head, .member {
  display: grid;
  grid-template-columns: minmax(260px,1fr) repeat(4,100px) 90px;
  align-items: center;
  padding: 10px 14px;
  gap: 10px;
}
.member-head {
  background: #f7f5f1;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.member { border-top: 1px solid var(--line); }
.member > div { display: flex; gap: 10px; align-items: center; }
.member p { margin: 0; display: flex; flex-direction: column; }
.member p small { color: var(--muted); margin-top: 3px; }
.member input { justify-self: center; accent-color: var(--gold); }
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #171717;
  color: #d4ad62;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.gold-avatar { background: var(--gold-soft); color: #7b5a1b; }
.theme-preview { display: flex; gap: 8px; align-items: center; margin: 8px 0 18px; }
.theme-preview > div { display: flex; flex-direction: column; margin-left: 7px; }
.theme-preview small { color: var(--muted); margin-top: 4px; }
.swatch { width: 31px; height: 31px; border-radius: 50%; border: 1px solid var(--line); }
.swatch.white { background: #fff; }
.swatch.black { background: #171717; }
.swatch.gold-swatch { background: #b28a42; }
.logo-preview {
  height: 112px;
  border-radius: 12px;
  background: #171717;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-bottom: 12px;
  color: #fff;
}
.logo-gold {
  width: 48px;
  height: 48px;
  border: 1px solid #cfa75d;
  color: #d4ad62;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 900;
}
.logo-preview > div { display: flex; flex-direction: column; }
.logo-preview b { font-size: 24px; letter-spacing: .14em; }
.logo-preview small { color: #cfa75d; letter-spacing: .22em; font-size: 9px; }
.full { width: 100%; margin-top: 9px; }
.settings-card label {
  display: flex;
  flex-direction: column;
  color: #666159;
  font-size: 11px;
  font-weight: 650;
  margin: 10px 0;
}
.settings-card label input {
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 8px;
  margin-top: 5px;
}
.dark-button {
  border: 1px solid #171717;
  background: #171717;
  color: #fff;
  border-radius: 9px;
  padding: 10px;
  font-weight: 700;
}
.form-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 0 12px; }
.form-grid label { margin: 2px 0; }

@media (max-width: 1250px) {
  .settings-layout { grid-template-columns: 1fr; }
  .settings-card.wide { grid-column: auto; }
  .form-grid { grid-template-columns: repeat(2,1fr); }
  .traffic-rules { grid-template-columns: 1fr; }
}
