/* ============================================================
   Noir Copper Theme for Athena CRM
   A premium dark theme: charcoal surfaces, copper accents, subtle cyan links
   Designed to feel like an executive-grade ops tool
   ============================================================ */

/* -----------------------------
   Base tokens
   ----------------------------- */
:root {
  --bg0: #060607;
  --bg1: #0e0b09;
  --panel: rgba(20, 16, 13, .76);
  --panel2: rgba(20, 16, 13, .50);
  --text: #f2efe9;
  --muted: #cdbfae;
  --line: rgba(225, 160, 90, .18);

  --accent: #e1a05a;   /* copper */
  --accent2: #b8f3ff;  /* pale cyan */
  --warn: #ffd166;
  --danger: #ff4d6d;

  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --radius: 18px;

  --font: "Lucida Console","Lucida Sans Typewriter",Consolas,"Courier New",monospace;
  --headline: "Lucida Console","Lucida Sans Typewriter",Consolas,"Courier New",monospace;

  --noiseOpacity: .08;
  --scanOpacity: .10;
  --gridOpacity: .16;

  --btnText: #120c07;
  --btnBg: var(--accent);
  --btnBorder: rgba(225,160,90,.55);

  --inputBg: rgba(255,255,255,.03);
  --inputBorder: rgba(255,255,255,.12);
  --focusRing: 0 0 0 4px rgba(225,160,90,.18);

  --link: var(--accent2);
  --glow: 0 0 22px rgba(225,160,90,.18), 0 0 70px rgba(225,160,90,.08);

  /* subtle grain as inline SVG */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

/* -----------------------------
   Global resets + background effects
   ----------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 15% 18%, color-mix(in srgb, var(--accent2) 18%, transparent), transparent 58%),
    radial-gradient(900px 700px at 85% 22%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 55%),
    radial-gradient(800px 700px at 50% 92%, color-mix(in srgb, var(--danger) 10%, transparent), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  background-attachment: fixed;
  overflow-x: hidden;
  font-size: 14px;
  line-height: 1.5;
}

/* subtle grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--grain);
  opacity: var(--noiseOpacity);
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 1;
}

/* scanlines + vignette */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(80% 65% at 50% 40%, rgba(0,0,0,0), rgba(0,0,0,.45)),
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0),
      rgba(255,255,255,0) 2px,
      rgba(0,0,0,.25) 3px
    );
  opacity: var(--scanOpacity);
  pointer-events: none;
  z-index: 2;
}

/* subtle grid */
.grid {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(to right, rgba(255,255,255,0) 0, rgba(255,255,255,0) 97%, rgba(255,255,255,1) 100%),
    linear-gradient(to bottom, rgba(255,255,255,0) 0, rgba(255,255,255,0) 97%, rgba(255,255,255,1) 100%);
  background-size: 60px 60px;
  opacity: var(--gridOpacity);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(70% 55% at 50% 35%, rgba(0,0,0,1), rgba(0,0,0,.2), rgba(0,0,0,0));
}

.wrap { min-height: 100%; display: flex; flex-direction: column; position: relative; z-index: 3; }
a { color: var(--link); text-decoration: none; }
a:hover { filter: saturate(1.15); }
.mono { font-family: var(--font); }

/* -----------------------------
   Top bar
   ----------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  height: 38px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 16px;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 8px 12px;
  border-radius: 999px;
  transition: all .15s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,.03);
}

.nav-links a.active {
  color: var(--text);
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
}

/* -----------------------------
   Layout container
   ----------------------------- */
.container { max-width: 1100px; margin: 0 auto; padding: 22px 18px 44px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.inner { padding: 22px; }

h2, h3, h4 { font-family: var(--headline); letter-spacing: .02em; }
h1 { font-family: var(--headline); letter-spacing: .10em; text-transform: uppercase; font-size: 22px; margin: 0 0 6px; }
h2 { font-size: 15px; margin: 22px 0 10px; color: color-mix(in srgb, var(--text) 90%, var(--accent2)); }
h3 { font-size: 14px; margin: 0 0 8px; }
p { margin: 0 0 10px; color: color-mix(in srgb, var(--text) 88%, var(--muted)); line-height: 1.65; }
.lede { color: var(--muted); }

.divider {
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2), color-mix(in srgb, var(--danger) 70%, var(--accent)));
  border-radius: 4px;
  margin: 14px 0 18px;
  box-shadow: var(--glow);
}

/* -----------------------------
   Badges
   ----------------------------- */
.badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  color: var(--text);
  box-shadow: 0 10px 22px rgba(0,0,0,.25);
  white-space: nowrap;
}

.badge.featured {
  background: color-mix(in srgb, var(--accent) 18%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.badge.time {
  background: color-mix(in srgb, var(--accent2) 14%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, var(--accent2) 35%, var(--line));
  color: color-mix(in srgb, var(--text) 92%, var(--accent2));
}

/* -----------------------------
   Buttons
   ----------------------------- */
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 900;
  letter-spacing: .06em;
  border: 1px solid var(--btnBorder);
  color: var(--btnText);
  background: linear-gradient(135deg, var(--btnBg), color-mix(in srgb, var(--btnBg) 55%, #fff));
  cursor: pointer;
  box-shadow: 0 14px 40px rgba(0,0,0,.45);
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease;
  text-decoration: none;
  font-family: var(--font);
  font-size: 14px;
}

.btn:hover {
  transform: translateY(-1px);
  filter: saturate(1.15);
  box-shadow: 0 18px 52px rgba(0,0,0,.58);
  color: var(--btnText);
}

.btn:focus-visible { outline: none; box-shadow: var(--focusRing); }

.btn.ghost {
  background: rgba(255,255,255,.02);
  border-color: var(--line);
  color: var(--text);
}

.btn.ghost:hover {
  color: var(--text);
  background: rgba(255,255,255,.05);
}

.btn-mini {
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: var(--font);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all .15s ease;
}

.btn-mini:hover {
  box-shadow: var(--glow);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

/* -----------------------------
   Alerts / Flash messages
   ----------------------------- */
.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  margin: 10px 0;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}

.alert strong { color: var(--text); }
.alert.success { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.alert.info { border-color: color-mix(in srgb, var(--accent2) 45%, var(--line)); }
.alert.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.alert.error { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }

/* Rails flash messages */
.flash-notice {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.flash-alert {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}

/* -----------------------------
   Table
   ----------------------------- */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  box-shadow: 0 10px 26px rgba(0,0,0,.30);
}

th, td { padding: 10px 12px; text-align: left; }

thead th {
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  font-weight: 900;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

tbody tr + tr td { border-top: 1px solid var(--line); }

.pillstat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--line);
  font-weight: 900;
  color: var(--text);
}

.dot-mini {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: var(--glow);
}

.dot-mini.alt { background: var(--accent2); }
.dot-mini.warn { background: var(--warn); }
.dot-mini.danger { background: var(--danger); }

/* -----------------------------
   Filter bar
   ----------------------------- */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  color: var(--muted);
  font-family: var(--font);
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s ease;
}

.filter-btn:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  color: var(--text);
  background: rgba(255,255,255,.04);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--btnBg), color-mix(in srgb, var(--btnBg) 55%, #fff));
  color: var(--btnText);
  border-color: var(--btnBorder);
  font-weight: 900;
}

/* Dimmed row for deleted users */
tr.row-deleted td {
  opacity: .55;
}

/* -----------------------------
   Forms
   ----------------------------- */
form { display: grid; gap: 14px; }

.field { position: relative; }

.hint {
  position: absolute;
  left: 12px;
  top: -30px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
  font-weight: 800;
  font-size: 12px;
  white-space: nowrap;
}

.field:focus-within .hint { opacity: 1; transform: translateY(0); }

.field input,
.field textarea,
.field select,
input[type="email"],
input[type="text"],
input[type="password"],
textarea,
select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--inputBorder);
  background: var(--inputBg);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .2s ease, background .15s ease;
  font-family: var(--font);
}

.field select, select { padding-right: 42px; }
.field textarea, textarea { min-height: 110px; resize: none; }

.field input::placeholder,
.field textarea::placeholder,
input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
  font-weight: 600;
}

.field input:focus,
.field textarea:focus,
.field select:focus,
input:focus,
textarea:focus,
select:focus {
  border-color: color-mix(in srgb, var(--accent2) 40%, var(--inputBorder));
  box-shadow: var(--focusRing);
  background: color-mix(in srgb, var(--inputBg) 70%, rgba(255,255,255,.04));
}

.check {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-weight: 700;
}

.check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* Toggle switch (checkbox styled as switch) */
.toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.toggle-wrap label {
  cursor: pointer;
  font-weight: 700;
  color: var(--text);
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--inputBg);
  border: 1px solid var(--inputBorder);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
/* Invisible checkbox covers whole switch so clicking anywhere toggles */
.toggle-switch input[type="checkbox"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
  accent-color: unset;
  border: none;
  border-radius: inherit;
}
.toggle-switch .toggle-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform .2s ease, background .2s ease;
  pointer-events: none;
  z-index: 0;
}
.toggle-switch:has(input:checked) {
  background: color-mix(in srgb, var(--accent) 35%, var(--inputBg));
  border-color: var(--accent);
}
.toggle-switch:has(input:checked) .toggle-switch-knob {
  transform: translateX(20px);
  background: var(--accent);
}

/* Permissions table: three permissions per row */
.permissions-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: rgba(255,255,255,.02);
}
.permissions-table th,
.permissions-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.permissions-table tr:last-child td {
  border-bottom: none;
}
.permissions-table .permission-cell {
  width: 33.33%;
}
.permissions-table .permission-cell--empty {
  background: transparent;
}
.permission-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.permission-key {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

/* Accordion (details/summary) */
.accordion {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,.02);
}
.accordion summary {
  padding: 12px 14px;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "▼";
  font-size: 10px;
  color: var(--muted);
  transition: transform .2s ease;
}
.accordion[open] summary::after {
  transform: rotate(-180deg);
}
.accordion .accordion-body {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

/* Devise form styling */
.devise-form {
  max-width: 420px;
  margin: 60px auto;
}

.devise-form .card {
  padding: 0;
}

.devise-form .inner {
  padding: 32px;
}

.devise-form h1 {
  text-align: center;
  margin-bottom: 8px;
}

.devise-form .lede {
  text-align: center;
  margin-bottom: 24px;
}

.devise-links {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.devise-links a {
  display: block;
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
}

.devise-links a:hover {
  color: var(--accent2);
}

/* Error messages */
#error_explanation {
  background: rgba(255, 77, 109, .1);
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line));
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
}

#error_explanation h2 {
  color: var(--danger);
  font-size: 14px;
  margin: 0 0 8px;
}

#error_explanation ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

/* -----------------------------
   Footer
   ----------------------------- */
footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 18%, transparent), color-mix(in srgb, var(--accent2) 10%, transparent));
}

.footer-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 18px;
  text-align: center;
}

.footer-logo {
  max-width: 140px;
  height: auto;
  display: block;
  margin: 0 auto;
}

.footer-content nav a {
  margin: 0 10px;
  font-weight: 900;
}

.footer-content small {
  display: block;
  margin-top: 10px;
  color: var(--muted);
}

/* -----------------------------
   Assist Tickets
   ----------------------------- */
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.header-row h1 {
  margin: 0;
}

.ticket-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.ticket-filter {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}

.ticket-select {
  min-width: 180px;
}

/* Ticket header form layout */
.ticket-header-form {
  display: contents;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* -----------------------------
   Multi-Select Dropdown Component
   Reusable across the application
   ----------------------------- */
.ms-container {
  position: relative;
  display: inline-block;
}

.ms-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 140px;
  max-width: 200px;
  height: 44px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.03);
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s ease;
}

.ms-trigger:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  background: rgba(255,255,255,.05);
}

.ms-trigger.active {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  box-shadow: var(--focusRing);
}

.ms-trigger.placeholder .ms-trigger-text {
  color: var(--muted);
}

.ms-trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  text-align: left;
}

.ms-trigger-icon {
  font-size: 10px;
  color: var(--muted);
  transition: transform .15s ease;
}

.ms-trigger.active .ms-trigger-icon {
  transform: rotate(180deg);
}

.ms-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  max-width: 280px;
  max-height: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(20, 16, 13, .98), rgba(14, 11, 9, .98));
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(0,0,0,.3);
  opacity: 0;
  transform: translateY(-8px);
  transition: all .15s ease;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.ms-dropdown.open {
  max-height: 260px;
  opacity: 1;
  transform: translateY(0);
}

.ms-options {
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
}

/* Custom scrollbar for noir copper theme */
.ms-options::-webkit-scrollbar {
  width: 8px;
}

.ms-options::-webkit-scrollbar-track {
  background: rgba(255,255,255,.02);
  border-radius: 4px;
}

.ms-options::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 40%, var(--line));
  border-radius: 4px;
}

.ms-options::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--accent) 60%, var(--line));
}

.ms-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .1s ease;
  color: var(--muted);
}

.ms-option:hover {
  background: rgba(255,255,255,.05);
  color: var(--text);
}

.ms-option.selected {
  background: color-mix(in srgb, var(--accent) 15%, rgba(255,255,255,.02));
  color: var(--text);
}

.ms-option.selected:hover {
  background: color-mix(in srgb, var(--accent) 22%, rgba(255,255,255,.03));
}

.ms-option-check {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  font-size: 11px;
  color: transparent;
  transition: all .1s ease;
}

.ms-option.selected .ms-option-check {
  background: color-mix(in srgb, var(--accent) 80%, #fff);
  border-color: var(--accent);
  color: var(--bg0);
}

.ms-option-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

/* Divider between selected and unselected (visual separation) */
.ms-option.selected + .ms-option:not(.selected) {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.filter-dropdown {
  position: relative;
}

.ticket-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, rgba(255,255,255,.02));
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  font-weight: 800;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
}

.ticket-grid {
  display: grid;
  gap: 16px;
}

.ticket-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  box-shadow: var(--shadow);
}

.ticket-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.ticket-id {
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ticket-user {
  margin-top: 6px;
  color: var(--text);
}

.ticket-email {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.ticket-card-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
}

.ticket-card-actions {
  display: flex;
  justify-content: flex-end;
}

.status-badge {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
}

.status-open {
  background: color-mix(in srgb, var(--accent2) 18%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, var(--accent2) 40%, var(--line));
}

.status-working_on {
  background: color-mix(in srgb, var(--accent) 18%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.status-resolved {
  background: color-mix(in srgb, #9ef0a6 20%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, #9ef0a6 45%, var(--line));
}

.status-rejected {
  background: color-mix(in srgb, var(--danger) 18%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}

.ticket-panel {
  flex: 1 1 420px;
}

.ticket-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.ticket-label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ticket-value {
  font-weight: 800;
  margin-top: 6px;
}

.ticket-subvalue {
  color: var(--muted);
  font-size: 12px;
}

.ticket-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.ticket-message {
  margin-top: 12px;
  white-space: pre-line;
}

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

.attachment-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,.02);
}

.attachment-card button {
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

.attachment-card img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.attachment-card span {
  display: block;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}

.attachment-image {
  position: relative;
  width: 100%;
}

.attachment-image img {
  opacity: 0;
  transition: opacity .2s ease;
}

.attachment-image.loaded img {
  opacity: 1;
}

.image-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 6, 7, 0.45);
}

.attachment-image.loaded .image-loader,
.attachment-image.error .image-loader {
  display: none;
}

.attachment-image.modal-preview {
  min-height: 220px;
}

.attachment-thumb {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255,255,255,.02);
  padding: 0;
  width: 100%;
  max-width: 220px;
  cursor: pointer;
}

.attachment-thumb img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.attachment-placeholder {
  color: var(--muted);
  font-size: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 8px 10px;
}

.attachment-modal {
  position: fixed;
  inset: 0;
  background: rgba(6, 6, 7, 0.78);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 40;
}

.attachment-modal.open {
  display: flex;
}

.attachment-modal-content {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 720px;
  width: 100%;
  padding: 16px;
}

.attachment-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.attachment-modal-title {
  font-weight: 800;
}

.attachment-modal-content img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.audit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.audit-action {
  font-weight: 800;
}

.audit-meta {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.note-stream {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.note-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.02);
}

.note-header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.note-body {
  margin-top: 8px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  background: rgba(255,255,255,.01);
}

/* -----------------------------
   Early Closers
   ----------------------------- */
.ec-header-form { display: contents; }

.ec-flag-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}

.ec-flag-filter input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

/* Member table */
.ec-table-wrap { overflow-x: auto; }

.ec-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.02);
  box-shadow: 0 10px 26px rgba(0,0,0,.30);
  font-size: 13px;
}

.ec-table th,
.ec-table td { padding: 10px 12px; text-align: left; white-space: nowrap; }

.ec-table thead th {
  background: linear-gradient(135deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  font-weight: 900;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.ec-table tbody tr + tr td { border-top: 1px solid var(--line); }

.ec-table tbody tr:hover td {
  background: rgba(255,255,255,.03);
}

/* Sortable headers */
.ec-sortable a {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.ec-sortable a:hover { color: var(--text); }

.ec-sorted a { color: var(--accent); }

/* Member link */
.ec-member-link {
  font-weight: 800;
  color: var(--link);
}

/* Flagged row highlight */
.ec-flagged-row td {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}

.ec-flag-icon {
  color: var(--accent);
  font-size: 14px;
  vertical-align: middle;
  margin-left: 4px;
}

/* Outreach status badges */
.ec-status-not_contacted {
  background: rgba(255,255,255,.04);
  border-color: var(--line);
  color: var(--muted);
}

.ec-status-contacted {
  background: color-mix(in srgb, var(--accent2) 14%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, var(--accent2) 35%, var(--line));
}

.ec-status-scheduled {
  background: color-mix(in srgb, var(--accent) 16%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
}

.ec-status-active {
  background: color-mix(in srgb, #9ef0a6 18%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, #9ef0a6 40%, var(--line));
}

.ec-status-churned {
  background: color-mix(in srgb, var(--danger) 16%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, var(--danger) 40%, var(--line));
}

/* Onboarding badges */
.ec-badge-yes {
  background: color-mix(in srgb, #9ef0a6 18%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, #9ef0a6 40%, var(--line));
}

.ec-badge-no {
  background: color-mix(in srgb, var(--warn) 14%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, var(--warn) 35%, var(--line));
  color: var(--warn);
}

.ec-badge-flagged {
  background: color-mix(in srgb, var(--accent) 22%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  color: var(--accent);
}

/* Survey status badges */
.ec-survey-completed {
  background: color-mix(in srgb, #9ef0a6 18%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, #9ef0a6 40%, var(--line));
}

.ec-survey-draft {
  background: color-mix(in srgb, var(--warn) 18%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, var(--warn) 45%, var(--line));
  color: var(--warn);
}

/* Draft survey banner (show page) */
.ec-draft-banner {
  margin: 12px 0;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  background: color-mix(in srgb, var(--warn) 10%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line));
  color: var(--warn);
}

/* Draft survey notice (print report) */
.report-draft-notice {
  margin: 16px 0;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13px;
  background: color-mix(in srgb, var(--warn) 8%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line));
  color: var(--warn);
  text-align: center;
}

/* Involvement tags */
.ec-involvement-tag {
  font-size: 11px;
  padding: 4px 8px;
  background: color-mix(in srgb, var(--accent2) 10%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, var(--accent2) 30%, var(--line));
}

/* Notes count badge */
.ec-notes-badge {
  background: color-mix(in srgb, var(--accent) 14%, rgba(255,255,255,.02));
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
  min-width: 28px;
  text-align: center;
  justify-content: center;
}

.text-muted { color: var(--muted); }

/* Detail view sections */
.ec-involvement-section {
  margin-top: 16px;
}

/* Flagged button */
.ec-btn-flagged {
  background: color-mix(in srgb, var(--accent) 18%, rgba(255,255,255,.03));
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  color: var(--accent);
}

/* Onboarding response list */
.ec-response-list {
  margin: 8px 0 18px;
  padding: 0;
}

.ec-response-list dt {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 12px;
}

.ec-response-list dt:first-child { margin-top: 0; }

.ec-response-list dd {
  margin: 4px 0 0;
  color: var(--text);
  line-height: 1.6;
}

/* Outreach timeline */
.ec-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.ec-timeline-entry {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}

.ec-timeline-date {
  font-weight: 800;
  font-size: 13px;
}

.ec-timeline-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}

.ec-timeline-note {
  margin-top: 6px;
  color: color-mix(in srgb, var(--text) 85%, var(--muted));
  line-height: 1.6;
}

/* Outreach form layout */
.ec-outreach-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ec-outreach-form .field:last-of-type {
  grid-column: 1 / -1;
}

.ec-outreach-form .btn-mini {
  grid-column: 1 / -1;
  justify-self: start;
}

/* Date input fix for noir copper */
input[type="date"] {
  color-scheme: dark;
}

/* -----------------------------
   Responsive
   ----------------------------- */
@media (max-width: 780px) {
  .brand { min-width: auto; }
  h1 { font-size: 18px; }
  .topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  .nav-links {
    justify-content: center;
  }
  .ec-outreach-form {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   CRM Sales Pipeline Styles
   ============================================================ */

/* --- Modal overlay --- */
.crm-modal {
  display: none;
}
.crm-modal--open {
  display: block;
}
.crm-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}
.crm-modal-container {
  width: 100%;
  max-width: 820px;
}
.crm-modal-content {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--glow), var(--shadow);
  padding: 28px 32px;
  color: var(--text);
}
.crm-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.crm-modal-header h2 {
  margin: 0;
  font-size: 1.35rem;
}
.crm-modal-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.crm-modal-close {
  cursor: pointer;
}

/* --- Badge row --- */
.crm-badge-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* --- CRM tables --- */
.crm-table-wrap {
  overflow-x: auto;
  margin-top: 12px;
}
.crm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .87rem;
}
.crm-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.crm-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  vertical-align: middle;
}
.crm-table tbody tr:hover {
  background: rgba(225, 160, 90, .04);
}
.crm-table-compact {
  font-size: .82rem;
}
.crm-table-compact th,
.crm-table-compact td {
  padding: 6px 10px;
}

/* --- CRM links --- */
.crm-link {
  color: var(--accent2);
  text-decoration: none;
}
.crm-link:hover {
  text-decoration: underline;
}
.crm-ext-link {
  color: var(--accent2);
  font-size: .82rem;
}

/* --- Detail grid --- */
.crm-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.crm-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.crm-value {
  font-size: .9rem;
}

/* --- Notes section --- */
.crm-notes-section {
  margin: 16px 0;
}
.crm-notes-text {
  background: var(--inputBg);
  border: 1px solid var(--inputBorder);
  border-radius: 8px;
  padding: 12px;
  font-size: .87rem;
  line-height: 1.5;
}

/* --- Section header with action --- */
.crm-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.crm-section-header h3 {
  margin: 0;
}

/* --- Status badges --- */
.crm-status-prospect { background: rgba(184, 243, 255, .15); color: var(--accent2); }
.crm-status-client { background: rgba(125, 226, 184, .18); color: #7de2b8; }
.crm-status-former_client { background: rgba(255, 209, 102, .15); color: var(--warn); }
.crm-status-do_not_contact { background: rgba(255, 77, 109, .15); color: var(--danger); }

.crm-result-attempted { background: rgba(255, 209, 102, .15); color: var(--warn); }
.crm-result-successful { background: rgba(125, 226, 184, .18); color: #7de2b8; }

.crm-badge-pipeline { background: rgba(225, 160, 90, .22); color: var(--accent); }
.crm-badge-in-system { background: rgba(125, 226, 184, .18); color: #7de2b8; font-size: .7rem; }
.crm-badge-dnc { background: rgba(255, 77, 109, .18); color: var(--danger); }
.crm-badge-overdue { background: rgba(255, 77, 109, .18); color: var(--danger); font-size: .72rem; }
.crm-badge-completed { background: rgba(125, 226, 184, .15); color: #7de2b8; font-size: .72rem; }

.crm-btn-dnc {
  border-color: var(--danger) !important;
  color: var(--danger) !important;
}

/* --- Do Not Contact overlay --- */
.crm-dnc-overlay {
  opacity: .45;
  pointer-events: none;
  user-select: none;
}
.crm-dnc-row {
  opacity: .5;
}

/* --- Overdue row highlight --- */
.crm-overdue {
  border-left: 3px solid var(--danger);
}
.crm-completed-row {
  opacity: .6;
}

/* --- Contact toggles --- */
.crm-contact-toggles {
  display: flex;
  gap: 8px;
  margin: 12px 0;
  flex-wrap: wrap;
}

/* --- Follow-up list in contact modal --- */
.crm-follow-up-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.crm-follow-up-item {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: .85rem;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,.02);
}

/* --- Form grid --- */
.crm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 16px 0;
}
.crm-form-grid .field-full {
  grid-column: 1 / -1;
}
.crm-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.crm-required {
  color: var(--danger);
}

/* --- Follow-up form section --- */
.crm-follow-up-section {
  margin: 12px 0;
}
.crm-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  cursor: pointer;
}
.crm-follow-up-period {
  margin-top: 10px;
  padding-left: 26px;
}

/* --- Search input --- */
.crm-search-input {
  min-width: 160px;
}

/* --- Filter tabs --- */
.crm-filter-tabs {
  display: flex;
  gap: 4px;
}
.crm-filter-active {
  background: var(--accent) !important;
  color: var(--btnText) !important;
  border-color: var(--accent) !important;
}

/* --- Header form --- */
.crm-header-form {
  width: 100%;
}

/* --- Delay dropdown --- */
.crm-delay-wrap {
  position: relative;
  display: inline-block;
}
.crm-delay-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 100;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  min-width: 180px;
  padding: 6px 0;
  margin-top: 4px;
}
.crm-delay-dropdown--open {
  display: block;
}
.crm-delay-option {
  display: block;
  width: 100%;
  padding: 6px 14px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: .82rem;
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
}
.crm-delay-option:hover {
  background: rgba(225, 160, 90, .10);
}

/* --- Actions cell --- */
.crm-actions-cell {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

/* --- Tooltip --- */
.crm-tooltip {
  position: fixed;
  z-index: 2000;
  max-width: 320px;
  padding: 8px 12px;
  background: #1a1510;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font-size: .8rem;
  line-height: 1.4;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* ─── Passkey Management (Settings) ─── */
.passkey-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.passkey-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(225, 160, 90, .06);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color .2s;
}
.passkey-row:hover {
  border-color: var(--accent);
}
.passkey-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.passkey-label {
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.passkey-meta {
  font-size: .78rem;
  color: var(--muted);
}
.passkey-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.passkey-empty {
  padding: 16px;
  text-align: center;
}
.passkey-empty .muted {
  color: var(--muted);
  font-style: italic;
}
.passkey-rename-input {
  width: 100%;
  max-width: 220px;
  padding: 3px 8px;
  font-size: .85rem;
  background: var(--bg1);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--text);
  font-family: var(--font);
  outline: none;
}
.passkey-rename-input:focus {
  box-shadow: 0 0 0 2px rgba(225, 160, 90, .25);
}
.passkey-status {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: .85rem;
  margin-bottom: 12px;
}
.passkey-status--info {
  background: rgba(184, 243, 255, .08);
  border: 1px solid rgba(184, 243, 255, .2);
  color: var(--accent2);
}
.passkey-status--error {
  background: rgba(255, 77, 109, .08);
  border: 1px solid rgba(255, 77, 109, .2);
  color: var(--danger);
}
.passkey-add-form {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

/* ─── Passkey Verification (Login) ─── */
.passkey-verification-prompt {
  text-align: center;
  padding: 20px 0;
}
.passkey-icon {
  margin: 0 auto 16px;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(225, 160, 90, .10);
  border: 1px solid var(--line);
  color: var(--accent);
}
.passkey-icon svg {
  width: 36px;
  height: 36px;
}
.passkey-verification-status {
  font-size: .9rem;
  padding: 10px;
  border-radius: 8px;
  margin: 12px 0;
}
.passkey-verification-status--info {
  color: var(--accent2);
}
.passkey-verification-status--error {
  color: var(--danger);
  background: rgba(255, 77, 109, .06);
  border: 1px solid rgba(255, 77, 109, .15);
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .crm-form-grid {
    grid-template-columns: 1fr;
  }
  .crm-modal-overlay {
    padding: 20px 8px;
  }
  .crm-modal-content {
    padding: 20px 16px;
  }
  .crm-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
  .passkey-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .passkey-actions {
    align-self: flex-end;
  }
}
