/* ===========================================================================
   Barracks Life — web app styles
   Layered on top of /css/style.css (which provides the brand tokens).
   =========================================================================== */

/* Reset body padding from the marketing nav, the app has its own chrome */
body.bl-app {
  background: var(--canvas);
  min-height: 100dvh;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Boot splash ---------------------------------------------------------- */
#boot {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  background: var(--canvas);
  z-index: 100;
  transition: opacity 320ms ease;
}
#boot.fade { opacity: 0; pointer-events: none; }
.boot-mark {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-500);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 8px rgba(180,157,97,.06);
}
.boot-wm {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 4px;
  color: var(--text-on-dark);
}

/* --- App shell ------------------------------------------------------------ */
#root { min-height: 100dvh; min-height: 100vh; }

.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100dvh; min-height: 100vh;
}
@media (max-width: 880px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
}

/* --- Sidebar (desktop) ---------------------------------------------------- */
.side {
  background: var(--surface-1);
  border-right: 1px solid rgba(244,242,236,.06);
  padding: 22px 14px;
  position: sticky; top: 0;
  height: 100dvh; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
}
@media (max-width: 880px) { .side { display: none; } }
.side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  margin-bottom: 16px;
}
.side-brand .mark {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-500);
  display: flex; align-items: center; justify-content: center;
}
.side-brand .wm {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 2.5px;
  font-size: 15px;
  color: var(--text-on-dark);
}
.side-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-md);
  color: var(--text-on-dark-muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.side-link:hover { background: var(--surface-2); color: var(--text-on-dark); }
.side-link.active {
  background: rgba(180,157,97,.12);
  color: var(--gold-500);
}
.side-link svg { width: 20px; height: 20px; }
.side-bottom { margin-top: auto; }
.side-me {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  cursor: pointer;
}
.side-me .av {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--olive-500); flex-shrink: 0;
  background-size: cover; background-position: center;
}
.side-me .nm { font-size: 13px; font-weight: 600; color: var(--text-on-dark); }
.side-me .sub { font-size: 11px; color: var(--text-on-dark-muted); }

/* --- Bottom tab bar (mobile) --------------------------------------------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--surface-1);
  border-top: 1px solid rgba(244,242,236,.06);
  display: none;
  justify-content: space-around;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  z-index: 50;
}
@media (max-width: 880px) { .tabs { display: flex; } }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-on-dark-muted); font-size: 9px;
  letter-spacing: 1.5px; font-weight: 700; text-transform: uppercase;
  padding: 6px 0;
  cursor: pointer;
  position: relative;
}
.tab svg { width: 22px; height: 22px; }
.tab.active { color: var(--gold-500); }
.tab.active::before {
  content: ''; position: absolute; top: 0; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 2px;
  background: var(--gold-500); border-radius: 2px;
}
.tab .badge {
  position: absolute;
  top: 2px; right: calc(50% - 22px);
  background: var(--gold-500);
  color: var(--olive-700);
  font-size: 9px; font-weight: 800;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
}

/* --- Main view ------------------------------------------------------------ */
.main {
  padding: 28px 32px 100px;
  max-width: 1100px;
  width: 100%;
}
@media (max-width: 880px) { .main { padding: 16px 16px 96px; } }

.view-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.view-head h1 {
  font-family: var(--font-display);
  font-size: 24px;
  letter-spacing: 2px;
  color: var(--text-on-dark);
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
}
.view-sub {
  color: var(--text-on-dark-muted);
  font-size: 13px;
  margin-top: 4px;
}

/* --- Auth screens (login/register) --------------------------------------- */
.auth {
  min-height: 100dvh; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
  background:
    radial-gradient(900px 600px at 20% 10%, rgba(180,157,97,.08), transparent 60%),
    radial-gradient(800px 600px at 100% 100%, rgba(61,64,47,.5), transparent 60%),
    var(--canvas);
}
.auth-card {
  background: var(--surface-1);
  border: 1px solid rgba(244,242,236,.06);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4vw, 44px);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-soft);
}
.auth-mark {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-500);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.auth-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: 2.5px;
  text-align: center;
  color: var(--text-on-dark);
  margin-bottom: 6px;
}
.auth-tag {
  text-align: center;
  font-size: 12px;
  letter-spacing: 2.5px;
  color: var(--gold-500);
  text-transform: uppercase;
  margin-bottom: 28px;
  font-weight: 600;
}
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form .field { display: flex; flex-direction: column; gap: 6px; }
.auth-form label {
  font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-on-dark-muted); font-weight: 600;
}
.auth-form input,
.auth-form select {
  background: var(--surface-2);
  border: 1px solid transparent;
  color: var(--text-on-dark);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s ease;
}
.auth-form input:focus,
.auth-form select:focus { border-color: var(--gold-500); }
.auth-form input::placeholder { color: var(--text-on-dark-muted); }
.auth-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-actions { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.auth-foot {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: var(--text-on-dark-muted);
}
.auth-foot a { color: var(--gold-500); font-weight: 700; text-decoration: none; }
.auth-foot a:hover { color: var(--gold-300); }
.auth-error {
  background: rgba(194,84,80,.12);
  border: 1px solid rgba(194,84,80,.4);
  color: #f3a39f;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: none;
}
.auth-error.show { display: block; }

/* --- Discover grid -------------------------------------------------------- */
.discover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.dc-card {
  background: var(--surface-1);
  border: 1px solid rgba(244,242,236,.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 3/4;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.dc-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}
.dc-photo {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  background-color: var(--olive-700);
}
.dc-photo .ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-300);
}
.dc-grad {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 60%;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.85));
}
.dc-info {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  color: #fff;
}
.dc-info .nm {
  font-size: 18px; font-weight: 700;
}
.dc-info .nm .age { font-weight: 400; opacity: .85; margin-left: 4px; }
.dc-info .meta {
  margin-top: 6px;
  display: flex; flex-wrap: wrap; gap: 4px;
}
.dc-chip {
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(180,157,97,.35);
  color: var(--gold-300);
  font-size: 10px; font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  display: inline-flex; align-items: center; gap: 4px;
}

/* --- Messages list -------------------------------------------------------- */
.msg-list {
  background: var(--surface-1);
  border: 1px solid rgba(244,242,236,.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.msg-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(244,242,236,.06);
  cursor: pointer;
  transition: background 0.15s ease;
}
.msg-row:last-child { border-bottom: 0; }
.msg-row:hover { background: var(--surface-2); }
.msg-row.unread { background: rgba(180,157,97,.05); }
.msg-row .av {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--olive-500); flex-shrink: 0;
  background-size: cover; background-position: center;
  position: relative;
}
.msg-row .av .pill {
  position: absolute; bottom: -2px; right: -2px;
  background: var(--gold-500);
  color: var(--olive-700);
  font-size: 9px; font-weight: 800;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  border: 2px solid var(--surface-1);
  display: flex; align-items: center; justify-content: center;
}
.msg-row.unread .av .pill { border-color: rgba(180,157,97,.05); }
.msg-row .body { flex: 1; min-width: 0; }
.msg-row .head { display: flex; justify-content: space-between; gap: 8px; }
.msg-row .nm { font-weight: 700; color: var(--text-on-dark); font-size: 14px; }
.msg-row .ts { font-size: 11px; color: var(--text-on-dark-muted); }
.msg-row.unread .ts { color: var(--gold-500); font-weight: 600; }
.msg-row .pv {
  font-size: 13px; color: var(--text-on-dark-muted);
  margin-top: 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.msg-row.unread .pv { color: var(--text-on-dark); font-weight: 500; }

/* --- Chat detail ---------------------------------------------------------- */
.chat-wrap {
  background: var(--surface-1);
  border: 1px solid rgba(244,242,236,.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: calc(100dvh - 130px);
  height: calc(100vh - 130px);
  display: flex; flex-direction: column;
}
@media (max-width: 880px) {
  .chat-wrap { height: calc(100dvh - 130px); height: calc(100vh - 130px); border-radius: 0; border: 0;}
}
.chat-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(244,242,236,.06);
  background: var(--olive-700);
}
.chat-head .back {
  background: none; border: 0; cursor: pointer;
  color: var(--gold-500);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.chat-head .back:hover { background: rgba(0,0,0,.2); }
.chat-head .av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--olive-500);
  background-size: cover; background-position: center;
  flex-shrink: 0;
  position: relative;
}
.chat-head .dot {
  position: absolute; bottom: -1px; right: -1px;
  width: 12px; height: 12px;
  border-radius: 50%; background: var(--success);
  border: 2px solid var(--olive-700);
}
.chat-head .nm { color: #fff; font-size: 15px; font-weight: 700; }
.chat-head .stat { color: var(--gold-300); font-size: 11px; }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--canvas);
}
.bubble-row { display: flex; align-items: flex-end; gap: 6px; margin: 2px 0; }
.bubble-row.me { justify-content: flex-end; }
.bubble-row .b-av {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--olive-500);
  background-size: cover; background-position: center;
  flex-shrink: 0;
}
.bubble {
  max-width: 70%;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  font-size: 14.5px;
  line-height: 1.45;
  word-wrap: break-word;
}
.bubble.them {
  background: var(--surface-1);
  color: var(--text-on-dark);
  border: 1px solid rgba(244,242,236,.06);
  border-bottom-left-radius: 4px;
}
.bubble.me {
  background: linear-gradient(135deg, var(--olive-500), var(--olive-700));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.bubble .ts {
  font-size: 10px; opacity: 0.65; margin-top: 2px;
}
.day-sep {
  text-align: center;
  font-size: 10px; letter-spacing: 2px;
  color: var(--text-on-dark-muted);
  margin: 14px 0 6px;
  font-weight: 700;
}
.chat-input {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  background: var(--surface-1);
  border-top: 1px solid rgba(244,242,236,.06);
}
.chat-input input {
  flex: 1;
  background: var(--surface-2);
  border: 0;
  color: var(--text-on-dark);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-family: var(--font-body);
  outline: none;
}
.chat-input input::placeholder { color: var(--text-on-dark-muted); }
.chat-input .send {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--gold-500);
  color: var(--olive-700);
  border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.15s ease;
}
.chat-input .send:disabled { opacity: 0.5; cursor: not-allowed; background: var(--surface-2); color: var(--text-on-dark-muted); }

/* --- Profile view --------------------------------------------------------- */
.profile {
  max-width: 720px;
  margin: 0 auto;
}
.profile-hero {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4/5;
  max-height: 560px;
  background: var(--olive-700);
  background-size: cover; background-position: center;
  margin-bottom: 18px;
}
.profile-hero .grad {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.92) 100%);
}
.profile-hero .info {
  position: absolute; left: 24px; right: 24px; bottom: 24px;
  color: #fff;
}
.profile-hero .nm {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.profile-hero .nm .age { font-weight: 400; margin-left: 8px; opacity: 0.9; }
.profile-hero .meta {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 10px;
}
.profile-section {
  background: var(--surface-1);
  border: 1px solid rgba(244,242,236,.06);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 14px;
}
.profile-section .lbl {
  font-family: var(--font-display);
  font-size: 11px; letter-spacing: 2.5px;
  color: var(--gold-500);
  text-transform: uppercase; font-weight: 600;
  margin-bottom: 10px;
}
.profile-section p {
  color: var(--text-on-dark);
  font-size: 15px; line-height: 1.6;
  margin: 0;
}
.profile-actions {
  position: sticky;
  bottom: 16px;
  background: var(--surface-1);
  border: 1px solid rgba(244,242,236,.06);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex; gap: 10px;
  margin-top: 18px;
}
.profile-actions .btn-message {
  flex: 1;
  background: var(--gold-500);
  color: var(--olive-700);
  border: 0;
  border-radius: var(--radius-md);
  padding: 13px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 13px;
  text-transform: uppercase;
  cursor: pointer;
}
.profile-actions .btn-message:hover { background: var(--gold-300); }
.profile-actions .btn-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(180,157,97,.4);
  background: var(--surface-2);
  color: var(--gold-500);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}

/* --- Empty + loading + alerts -------------------------------------------- */
.spinner {
  display: inline-block;
  width: 28px; height: 28px;
  border: 2.5px solid rgba(180,157,97,.2);
  border-top-color: var(--gold-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.center-row { display: flex; justify-content: center; padding: 50px 0; }

.empty {
  text-align: center;
  padding: 60px 20px;
}
.empty .ico {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: rgba(180,157,97,.12);
  color: var(--gold-500);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.empty h3 {
  font-family: var(--font-display);
  font-size: 14px; letter-spacing: 2px;
  color: var(--text-on-dark);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.empty p {
  color: var(--text-on-dark-muted);
  max-width: 360px; margin: 0 auto;
  line-height: 1.55; font-size: 14px;
}

/* --- Feed (Squads) ------------------------------------------------------- */
.feed-composer {
  background: var(--surface-1);
  border: 1px solid rgba(244,242,236,.06);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 14px;
}
.feed-composer .fc-row { display: flex; gap: 12px; align-items: flex-start; }
.feed-composer .av {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--olive-500); flex-shrink: 0;
  background-size: cover; background-position: center;
}
.feed-composer textarea {
  flex: 1;
  background: var(--surface-2);
  border: 0;
  color: var(--text-on-dark);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-family: var(--font-body);
  resize: vertical;
  outline: none;
  min-height: 44px;
}
.feed-composer .fc-actions {
  display: flex; justify-content: flex-end;
  margin-top: 10px;
}
.btn-ghost-sm {
  background: var(--gold-500);
  color: var(--olive-700);
  border: 0;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 1.5px;
  cursor: pointer;
}
.btn-ghost-sm:hover { background: var(--gold-300); }
.btn-ghost-sm:disabled { opacity: 0.5; cursor: not-allowed; }

.feed-list { display: flex; flex-direction: column; gap: 14px; }
.feed-card {
  background: var(--surface-1);
  border: 1px solid rgba(244,242,236,.06);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.feed-card .fc-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 10px;
}
.feed-card .fc-head .av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--olive-500);
  background-size: cover; background-position: center;
  flex-shrink: 0; cursor: pointer;
}
.feed-card .fc-head .nm {
  font-weight: 700; color: var(--text-on-dark); font-size: 14px;
  cursor: pointer;
}
.feed-card .fc-head .nm:hover { color: var(--gold-500); }
.feed-card .fc-head .ts { font-size: 11px; color: var(--text-on-dark-muted); }
.feed-card .fc-text {
  color: var(--text-on-dark);
  font-size: 14.5px;
  line-height: 1.55;
  margin-bottom: 10px;
}
.feed-card .fc-img {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}
.feed-card .fc-actions-row {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(244,242,236,.06);
  padding-top: 10px;
}
.feed-card .fc-act {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0;
  color: var(--text-on-dark-muted);
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}
.feed-card .fc-act:hover { color: var(--gold-500); }
.feed-card .fc-act.liked { color: var(--gold-500); }
.feed-card .fc-meta { color: var(--text-on-dark-muted); font-size: 12px; }

/* --- Intel categories ---------------------------------------------------- */
.i-cats {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding-bottom: 16px;
  margin-bottom: 4px;
  scrollbar-width: none;
}
.i-cats::-webkit-scrollbar { display: none; }
.i-cat {
  background: var(--surface-1);
  color: var(--text-on-dark);
  border: 1px solid rgba(244,242,236,.08);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.i-cat:hover { border-color: var(--gold-500); }
.i-cat.on {
  background: var(--olive-700);
  color: #fff;
  border-color: var(--olive-700);
}
.i-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

/* --- Settings ------------------------------------------------------------ */
.set-section { margin-bottom: 22px; }
.set-label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 2.5px;
  font-weight: 600;
  color: var(--text-on-dark-muted);
  text-transform: uppercase;
  margin: 0 4px 10px;
}
.set-card {
  background: var(--surface-1);
  border: 1px solid rgba(244,242,236,.06);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.set-row {
  display: flex; align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(244,242,236,.06);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  width: 100%;
  background: none; border-right: 0; border-left: 0; border-top: 0;
  text-align: left;
  font: inherit;
  transition: background 0.15s ease;
}
.set-row:last-child { border-bottom: 0; }
.set-row.act:hover { background: var(--surface-2); }
a.set-row:hover { background: var(--surface-2); }
.set-row.disabled { opacity: 0.5; pointer-events: none; }
.set-ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(180,157,97,.12);
  color: var(--gold-500);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-right: 14px;
}
.set-ico.danger {
  background: rgba(194,84,80,.12);
  color: var(--danger);
}
.set-text { flex: 1; min-width: 0; }
.set-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-on-dark);
}
.set-title.danger { color: var(--danger); }
.set-sub {
  font-size: 12px;
  color: var(--text-on-dark-muted);
  margin-top: 2px;
}
.set-chev { color: var(--text-on-dark-muted); flex-shrink: 0; }

/* iOS-style toggle */
.set-sw { position: relative; flex-shrink: 0; cursor: pointer; }
.set-sw input { position: absolute; opacity: 0; width: 0; height: 0; }
.set-sw-track {
  display: block;
  width: 44px; height: 26px;
  background: var(--surface-2);
  border-radius: 999px;
  border: 1px solid rgba(244,242,236,.1);
  position: relative;
  transition: background 0.2s ease;
}
.set-sw-track::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: var(--text-on-dark-muted);
  border-radius: 50%;
  transition: transform 0.2s ease, background 0.2s ease;
}
.set-sw input:checked + .set-sw-track {
  background: var(--gold-500);
  border-color: var(--gold-500);
}
.set-sw input:checked + .set-sw-track::after {
  transform: translateX(18px);
  background: var(--olive-700);
}
.set-sw input:disabled + .set-sw-track {
  opacity: 0.4;
}
.set-foot {
  text-align: center;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--text-on-dark-muted);
  margin: 24px 0 8px;
}

/* --- Toast --------------------------------------------------------------- */
#toast {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: 90px;
  background: var(--surface-2);
  color: var(--text-on-dark);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(244,242,236,.08);
  font-size: 13px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow-soft);
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}
