/* Wanting To — black & gold theme. No external fonts/CDNs: system font stacks only. */

:root {
  --bg: #0b0b0d;
  --bg-raised: #141417;
  --bg-card: #17171b;
  --border: #2a2a2f;

  /* Metallic gold ramp — shadow to hot highlight, used to build brushed/polished
     gold surfaces and text (see --gold-metal / --gold-metal-steep below) rather
     than a single flat gold fill. */
  --gold-deep: #5a4318;
  --gold-dim: #8a712f;
  --gold: #c9a24b;
  --gold-bright: #f0d78c;
  --gold-shine: #fff6da;

  /* A diagonal sheen band, like light crossing a polished bar of gold. Used on
     large surfaces (buttons, badges). */
  --gold-metal: linear-gradient(120deg, var(--gold-deep) 0%, var(--gold) 22%, var(--gold-shine) 46%, var(--gold-bright) 62%, var(--gold-dim) 82%, var(--gold) 100%);
  /* A tighter, higher-contrast version for small text/line accents where the
     wide version above would just look like a flat mid-tone. */
  --gold-metal-steep: linear-gradient(100deg, var(--gold-dim) 0%, var(--gold-bright) 38%, var(--gold-shine) 50%, var(--gold-bright) 62%, var(--gold-dim) 100%);

  --text: #f3efe6;
  --text-dim: #b3aea3;
  --text-faint: #746f66;
  --red: #d9534f;
  --yellow: #e0b83f;
  --green: #4caf7d;
  --danger-bg: #3a1414;
  --radius: 14px;
  --serif: Georgia, 'Iowan Old Style', 'Palatino Linotype', 'URW Palladio L', P052, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Reusable metallic treatments */
.metal-text {
  background: var(--gold-metal-steep);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold-bright); /* fallback if background-clip: text isn't supported */
}
.metal-surface {
  background: var(--gold-metal);
  border: 1px solid var(--gold-deep);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.5;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--gold-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  margin: 0 0 0.5em;
}
h1 { font-size: 2.1rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

p { color: var(--text-dim); }

.brand {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 11px;
  text-align: left;
}
.brand-mark { flex: none; display: block; }
.brand-text {
  font-family: var(--serif);
  font-size: 1.4rem;
  letter-spacing: 0.12em;
  font-weight: 600;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.brand-text { background: var(--gold-metal-steep); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; color: var(--gold-bright); }
.brand-text small { display: block; font-family: var(--sans); font-size: 0.6rem; letter-spacing: 0.3em; color: var(--text-faint); -webkit-text-fill-color: var(--text-faint); margin-top: 2px; text-align: center; }

nav.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #101012, #0b0b0d);
  position: sticky;
  top: 0;
  z-index: 10;
}
nav.topnav .links { display: flex; gap: 22px; align-items: center; font-size: 0.92rem; }
nav.topnav .links a { color: var(--text-dim); }
nav.topnav .links a.active, nav.topnav .links a:hover { color: var(--gold-bright); }
/* The plain nav-link color above (a light tan) was winning over .btn's own dark text
   color for any button that lives in the nav — like "Get started" — because this
   selector is more specific. Buttons in the nav should always keep .btn's own color. */
nav.topnav .links a.btn { color: #241a06; }
nav.topnav .links a.btn.secondary, nav.topnav .links a.btn.ghost { color: var(--gold-bright); }
.lang-switcher { margin: 0; }
.lang-switcher select { width: auto; padding: 6px 10px; font-size: 0.82rem; border-radius: 999px; }

main.container {
  flex: 1;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 80px;
}
main.container.wide { max-width: 980px; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 22px;
}

.card.center { text-align: center; }

.notice {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  font-size: 0.92rem;
  border: 1px solid var(--gold-dim);
  background: rgba(201, 162, 75, 0.08);
  color: var(--gold-bright);
}
.notice.error { border-color: #7a2b28; background: var(--danger-bg); color: #f2a8a5; }

label { display: block; font-size: 0.85rem; color: var(--text-dim); margin: 16px 0 6px; }
label:first-child { margin-top: 0; }
label .hint { display: block; font-size: 0.78rem; color: var(--text-faint); font-weight: normal; margin-top: 2px; }
label .required-mark, .required-mark { color: var(--gold-bright); margin-left: 2px; }

input[type="text"], input[type="email"], input[type="password"], input[type="date"],
input[type="number"], select, textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--sans);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
}
textarea { resize: vertical; min-height: 80px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--gold-deep);
  background: var(--gold-metal);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), inset 0 -1px 0 rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.35);
  color: #241a06;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  text-align: center;
}
.btn:hover { filter: brightness(1.1); }
.btn:active { filter: brightness(0.96); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4); }
.btn.secondary {
  background: transparent;
  color: var(--gold-bright);
}
.btn.ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text-dim);
}
.btn.danger {
  background: transparent;
  border-color: #7a2b28;
  color: #f2a8a5;
}
.btn.block { width: 100%; }
.btn.small { padding: 7px 14px; font-size: 0.8rem; }

.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
/* A <form> wrapping a lone submit button (e.g. a "Disconnect"/"Leave"/"Cancel" action)
   would otherwise be the .row child that gets flex:1 above, while its <button> just
   hugs its own text width — leaving it visibly smaller than sibling .btn links (and,
   with more than 2-3 siblings in the row, even a nested flex:1-in-flex:1 form/button
   pair doesn't always land on the exact same width as a plain <a class="btn">, since
   the browser sizes the form and the button as two separate flex computations).
   `display: contents` removes the form's own box from layout entirely — it still
   works as a real <form> for submission, but for sizing purposes its <button> becomes
   a direct flex item of .row, measured exactly like its sibling buttons/links. */
.row form { display: contents; margin: 0; }
.row form > button,
.row form > .btn { flex: 1; }

.muted { color: var(--text-faint); font-size: 0.85rem; }

hr.sep { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.pill.mood-in_the_mood {
  border-color: var(--gold-deep);
  background: var(--gold-metal);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
  color: #241a06;
  font-weight: 700;
}
.pill.mood-open { border-color: var(--green); color: var(--green); }
.pill.mood-not_now { border-color: var(--border); color: var(--text-faint); }

.light-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.light-dot.red { background: var(--red); }
.light-dot.yellow { background: var(--yellow); }
.light-dot.green { background: var(--green); }

.wanting-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; align-items: stretch; }
.wanting-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--bg-raised);
  /* CSS Grid stretches every card in a row to the tallest one's height, but labels
     and descriptions vary a lot in length (especially in Further Exploration) — a
     flex column with the light-choices row pinned to the bottom keeps the red/
     yellow/green boxes lined up across a row regardless of how much text is above
     them, the same fix used for the admin Paid Subscriptions price alignment. */
  display: flex;
  flex-direction: column;
}
.wanting-item .label { font-weight: 600; font-size: 0.92rem; display: flex; align-items: center; gap: 8px; }
.wanting-item .desc { font-size: 0.78rem; color: var(--text-faint); margin: 4px 0 8px; }
.light-choices { display: flex; gap: 6px; margin-top: auto; }
.light-choices label {
  margin: 0;
  flex: 1;
  text-align: center;
  padding: 6px 0;
  border-radius: 7px;
  border: 1px solid var(--border);
  font-size: 0.72rem;
  cursor: pointer;
  color: var(--text-faint);
}
.light-choices input { display: none; }
.light-choices input:checked + span { font-weight: 700; }
.light-choices .opt-red input:checked ~ * { color: var(--red); }
.light-choices label:has(input:checked) { border-color: var(--gold); }

.category-group {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-raised);
  overflow: hidden;
}
.category-group + .category-group { margin-top: 12px; }
.category-group .wanting-grid,
.category-group .category-body,
.category-group table.data { margin: 16px; width: calc(100% - 32px); }
/* .category-body: a plain (non-grid) inset wrapper for category-group content that
   isn't a .wanting-item grid — e.g. the checkbox rows on the Intimacy Session picker
   and the match rows on the Partner page — so it gets the same 16px left/right inset
   as .wanting-grid instead of running flush to the card's edges. */
.category-title {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-size: 1.02rem;
  user-select: none;
}
.category-title .category-name {
  background: var(--gold-metal-steep);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--gold-bright);
}
.category-title::-webkit-details-marker { display: none; }
.category-title .category-name::before {
  content: '▸';
  display: inline-block;
  margin-right: 10px;
  font-size: 0.8em;
  color: var(--gold-dim);
  transition: transform 0.15s ease;
}
details[open] > .category-title .category-name::before { transform: rotate(90deg); }
.category-title .category-name { font-weight: 600; }
.category-title .category-meta { font-size: 0.78rem; color: var(--text-faint); font-weight: 400; white-space: nowrap; }
.category-title:hover { background: rgba(255, 255, 255, 0.03); }

.avatar {
  width: 84px; height: 84px; border-radius: 50%;
  object-fit: cover; border: 2.5px solid transparent;
  background: var(--gold-metal-steep) padding-box, var(--gold-metal) border-box;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
}
.avatar.lg { width: 128px; height: 128px; border-width: 3px; }
.avatar-picker { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; }
.avatar-picker img { width: 56px; height: 56px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.avatar-picker img.selected { border-color: var(--gold); }

.partner-card { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
.partner-card:last-child { border-bottom: none; }
.partner-card .info { flex: 1; }
.partner-card .username { font-weight: 600; }
.match-icons { margin-top: 6px; }
.match-icons .icon { font-size: 1.1rem; }
.match-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.match-list li { font-size: 0.85rem; }
.tier-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; }
.tier-dot.match { background: var(--green); }
.tier-dot.open { background: var(--yellow); }

table.data { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
table.data th, table.data td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); }
table.data th { color: var(--text-faint); font-weight: 500; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.05em; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 20px 0; }
.stat { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.stat .num { font-family: var(--serif); font-size: 1.8rem; font-weight: 600; background: var(--gold-metal-steep); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; color: var(--gold-bright); }
.stat .num.num-compact { font-size: 1.3rem; }
.stat .label { font-size: 0.78rem; color: var(--text-faint); }

.message-thread { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; }
.message-row { display: flex; flex-direction: column; align-items: flex-start; margin-top: 10px; }
.message-row.mine { align-items: flex-end; }
.message-row.grouped { margin-top: 2px; }
.message-bubble { max-width: 70%; padding: 10px 14px; border-radius: 16px; background: var(--bg-raised); border: 1px solid var(--border); }
.message-bubble.mine { background: rgba(201,162,75,0.12); border-color: var(--gold-dim); }
.message-bubble img { max-width: 220px; border-radius: 10px; display: block; cursor: zoom-in; }
.message-meta { font-size: 0.68rem; color: var(--text-faint); margin-top: 4px; }
.message-meta.seen-label { color: var(--gold-dim); font-style: italic; }

.reaction-picker { display: inline-block; margin-top: 4px; }
.reaction-picker summary {
  list-style: none; cursor: pointer; font-size: 0.72rem; color: var(--text-faint);
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; user-select: none;
}
.reaction-picker summary::-webkit-details-marker { display: none; }
.reaction-picker summary:hover { border-color: var(--gold-dim); color: var(--gold-bright); }
.reaction-options { display: flex; gap: 4px; margin-top: 6px; }
.reaction-option {
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 999px;
  padding: 3px 8px; font-size: 0.95rem; cursor: pointer; line-height: 1;
}
.reaction-option:hover { border-color: var(--gold); transform: scale(1.1); }
.reaction-pills { display: flex; gap: 4px; margin-top: 4px; flex-wrap: wrap; }
.reaction-pill {
  font-size: 0.75rem; background: var(--bg-raised); border: 1px solid var(--border);
  border-radius: 999px; padding: 1px 7px;
}
.reaction-pill.mine { border-color: var(--gold); background: rgba(201,162,75,0.15); }

.richtext-toolbar { display: flex; gap: 4px; margin-top: 6px; flex-wrap: wrap; }
.richtext-toolbar button {
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 7px;
  color: var(--text-dim); padding: 6px 11px; font-size: 0.85rem; cursor: pointer; min-width: 34px;
}
.richtext-toolbar button:hover { border-color: var(--gold-dim); color: var(--gold-bright); }
.richtext-editor {
  min-height: 160px; border: 1px solid var(--border); border-radius: 9px; background: var(--bg-raised);
  color: var(--text); padding: 12px 14px; margin-top: 6px; font-size: 0.95rem; line-height: 1.5;
}
.richtext-editor:focus { outline: none; border-color: var(--gold); }
.richtext-editor:empty::before { content: attr(data-placeholder); color: var(--text-faint); }
.richtext-editor h3 { margin: 0.4em 0; font-size: 1.1rem; }
.richtext-editor ul, .richtext-editor ol { margin: 0.4em 0; padding-left: 1.4em; }
.richtext-editor a { color: var(--gold-bright); }

.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,0.88); display: none;
  align-items: center; justify-content: center; padding: 5vh 5vw; z-index: 200; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }

.badge-admin {
  background: var(--gold-metal);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 -1px 0 rgba(0, 0, 0, 0.3);
  color: #241a06;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
}

.badge-explicit {
  background: rgba(224, 92, 92, 0.15);
  border: 1px solid rgba(224, 92, 92, 0.5);
  color: #e05c5c;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.footer-note {
  text-align: center; color: var(--text-faint); font-size: 0.78rem; padding: 30px 20px;
}

.nav-bell {
  position: relative;
  font-size: 1.1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.notif-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: #e05c5c;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  line-height: 1.3;
}

.invite-banner {
  border: 1px solid rgba(201, 162, 75, 0.6);
  background: rgba(201, 162, 75, 0.08);
}

.notif-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.notif-row:last-child { border-bottom: none; }
.notif-row.unread { background: rgba(201, 162, 75, 0.08); }
.notif-icon { font-size: 1.2rem; }
.notif-body { display: flex; flex-direction: column; gap: 2px; }
.notif-type { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold-dim); font-weight: 700; }
.notif-desc { font-size: 0.78rem; }
.notif-time { font-size: 0.76rem; }

.composer-picker { margin: 8px 0; }
.composer-picker-toggles { display: flex; gap: 8px; }
.picker-panel {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel, rgba(255, 255, 255, 0.03));
  max-height: 180px;
  overflow-y: auto;
}
.picker-panel.emoji-panel { grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); }
.picker-panel.gif-panel { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
/* `display: grid` above always wins over the plain-attribute `[hidden]` rule the
   browser applies by default (same specificity, but this is an author stylesheet),
   so without this the panel never actually hides — it just sits open the whole time,
   which also makes the 😀/🎬 toggle buttons look like they don't do anything. */
.picker-panel[hidden] { display: none; }
.emoji-btn {
  background: none; border: none; cursor: pointer; font-size: 1.3rem;
  padding: 4px; border-radius: 6px; line-height: 1;
}
.emoji-btn:hover { background: rgba(201, 162, 75, 0.15); }
.gif-btn {
  background: none; border: 1px solid transparent; cursor: pointer; padding: 2px;
  border-radius: 8px;
}
.gif-btn:hover { border-color: var(--gold-bright); }
.gif-btn img { width: 100%; border-radius: 6px; display: block; }
.gif-preview { position: relative; display: inline-block; margin-top: 8px; }
.gif-preview img { max-width: 96px; border-radius: 8px; display: block; }
.gif-preview-clear {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px;
  border-radius: 50%; border: none; background: #e05c5c; color: #fff;
  font-size: 0.7rem; cursor: pointer; line-height: 1;
}
.gif-message { max-width: 140px; border-radius: 8px; display: block; }

.status-picker { display: flex; gap: 10px; }
.status-picker label {
  flex: 1; text-align: center; padding: 14px; border-radius: 12px; border: 1px solid var(--border);
  cursor: pointer; margin: 0;
}
.status-picker input { display: none; }
.status-picker label:has(input:checked) { border-color: var(--gold); background: rgba(201,162,75,0.1); }

/* Evenly aligned radio-button groups (e.g. "Who can register") */
.radio-row { display: flex; gap: 22px; align-items: center; margin: 10px 0 6px; flex-wrap: wrap; }
.radio-option { display: flex; align-items: center; gap: 8px; margin: 0; flex: none; cursor: pointer; color: var(--text); font-size: 0.92rem; }
.radio-option input[type="radio"] { width: auto; margin: 0; accent-color: var(--gold); cursor: pointer; }

/* Color picker paired with a hex text field */
.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type="text"] { width: 120px; font-family: monospace; }
input[type="color"] {
  width: 44px; height: 40px; padding: 3px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--bg-raised); cursor: pointer;
}

.field-group { margin-top: 26px; }

/* Simple dependency-free horizontal bar charts for admin analytics */
.bar-chart { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 44px; align-items: center; gap: 10px; font-size: 0.85rem; }
.bar-label { color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { background: var(--bg-raised); border: 1px solid var(--border); border-radius: 999px; height: 14px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--gold-metal); }
.bar-count { text-align: right; color: var(--text-faint); font-size: 0.78rem; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }

/* Address autocomplete dropdown */
.address-autocomplete { position: relative; }
.address-suggestions {
  list-style: none; margin: 4px 0 0; padding: 6px; position: absolute; left: 0; right: 0; top: 100%;
  z-index: 30; background: var(--bg-raised); border: 1px solid var(--border); border-radius: 10px;
  max-height: 240px; overflow-y: auto; box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.address-suggestions:empty { display: none; }
.address-suggestions li {
  padding: 9px 10px; border-radius: 7px; cursor: pointer; font-size: 0.85rem; color: var(--text-dim);
}
.address-suggestions li:hover, .address-suggestions li.active { background: rgba(201,162,75,0.12); color: var(--text); }

/* Ticket system */
.ticket-status { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; border: 1px solid var(--border); text-transform: capitalize; }
.ticket-status.open { border-color: var(--gold-dim); color: var(--gold-bright); }
.ticket-status.in_progress { border-color: #6f9fd8; color: #a9c8f0; }
.ticket-status.waiting_on_user { border-color: var(--yellow); color: var(--yellow); }
.ticket-status.resolved, .ticket-status.closed { border-color: var(--green); color: var(--green); }
.ticket-note { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-top: 10px; background: var(--bg-raised); }
.ticket-note.reply { border-color: var(--gold-dim); background: rgba(201,162,75,0.06); }
.ticket-note .meta { font-size: 0.72rem; color: var(--text-faint); margin-bottom: 6px; }
.icon-select option { font-size: 1.1rem; }

/* Admin section nav — a compact, non-wrapping tab bar instead of pill buttons */
.admin-nav {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}
.admin-nav a {
  flex: none;
  white-space: nowrap;
  padding: 11px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-faint);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.admin-nav a:hover { color: var(--text-dim); text-decoration: none; }
.admin-nav a.active { color: var(--gold-bright); border-bottom-color: var(--gold); }

/* Compact "Actions" dropdown for table rows, instead of a wall of individual buttons */
.row-menu { position: relative; display: inline-block; }
.row-menu summary { list-style: none; cursor: pointer; user-select: none; }
.row-menu summary::-webkit-details-marker { display: none; }
.row-menu summary::after { content: ' ▾'; }
.row-menu .menu-items {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; min-width: 190px;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 10px;
  padding: 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}
.row-menu .menu-items form { margin: 0; }
.row-menu .menu-items button {
  display: block; width: 100%; text-align: left; background: transparent; border: none;
  color: var(--text-dim); padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 0.85rem;
}
.row-menu .menu-items button:hover { background: rgba(201, 162, 75, 0.12); color: var(--text); }
.row-menu .menu-items button.danger { color: #f2a8a5; }
.row-menu .menu-items button.danger:hover { background: rgba(122, 43, 40, 0.25); }
table.data td.col-actions { text-align: right; }

/* Compact, non-wrapping filter chips (e.g. ticket status filters) — a row of small
   pill toggles that wrap onto a new line as a group if needed, instead of a `.row`
   of equal-width `.btn` buttons squeezing each other's text onto multiple lines. */
.filter-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chip {
  flex: none; white-space: nowrap; display: inline-flex; align-items: center;
  padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text-dim); font-size: 0.78rem; font-weight: 600;
}
.filter-chip:hover { color: var(--text); border-color: var(--gold-deep); text-decoration: none; }
.filter-chip.active {
  background: var(--gold-metal); border-color: var(--gold-deep); color: #241a06;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

@media (max-width: 600px) {
  main.container { padding: 24px 14px 60px; }
  nav.topnav { padding: 14px 16px; }
  nav.topnav .links { gap: 14px; font-size: 0.82rem; }
}
