/* Cassoria — admin panel */
@font-face {
  font-family: "Syne";
  src: url("../fonts/syne-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Syne";
  src: url("../fonts/syne-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Syne";
  src: url("../fonts/syne-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dmsans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dmsans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("../fonts/dmsans-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #070709;
  --surface: #101014;
  --card: #15151b;
  --border: rgba(168, 85, 247, 0.25);
  --accent: #a855f7;
  --accent-bright: #c084fc;
  --accent-dim: rgba(168, 85, 247, 0.12);
  --text: #f5f3f7;
  --text-muted: #a7a3ad;
  --success: #34d399;
  --warning: #fbbf24;
  --error: #f87171;
  --info: #60a5fa;
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 40px rgba(168, 85, 247, 0.22);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --font-display: "Syne", "Segoe UI Variable", "Avenir Next", Georgia, serif;
  --font-body: "DM Sans", "Segoe UI Variable", "Avenir Next", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --transition: 220ms var(--ease);
  --sidebar-w: 260px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-bright);
  text-decoration: none;
}
a:hover {
  color: #e9d5ff;
}

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Auth / install shells */
body.auth,
body.install {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(168, 85, 247, 0.18), transparent 55%),
    var(--bg);
}

.auth-card,
.install-card {
  width: min(100%, 480px);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.install-card {
  width: min(100%, 640px);
}

.auth-card__brand,
.install-card__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-card__brand img,
.install-card__brand img {
  width: 40px;
  height: 40px;
}

.auth-card h1,
.install-card h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.auth-card .lead,
.install-card .lead {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.install-steps {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.install-steps span {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: #1c1c24;
}

.install-steps span.is-done,
.install-steps span.is-current {
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
}

.req-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.req-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--surface);
  font-size: 0.92rem;
}

.req-list .ok {
  color: var(--success);
}
.req-list .bad {
  color: var(--error);
}

/* Admin shell */
body.admin {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--border);
  background: linear-gradient(180deg, #0d0d12, #0a0a0e);
  z-index: 50;
}

.admin-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 0.5rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.admin-sidebar__brand img {
  width: 32px;
  height: 32px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.92rem;
  transition: background var(--transition), color var(--transition);
}

.admin-nav a:hover,
.admin-nav a.is-active {
  color: var(--text);
  background: var(--accent-dim);
}

.admin-sidebar__foot {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 50% 30% at 100% 0%, rgba(168, 85, 247, 0.08), transparent 50%),
    var(--bg);
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(168, 85, 247, 0.15);
  background: rgba(7, 7, 9, 0.7);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 40;
}

.admin-topbar__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.admin-content {
  padding: 1.5rem;
  flex: 1;
}

.sidebar-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 960px) {
  body.admin {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(86vw, var(--sidebar-w));
    transform: translateX(-105%);
    transition: transform 280ms var(--ease);
    box-shadow: var(--shadow-md);
  }
  body.admin.sidebar-open .admin-sidebar {
    transform: none;
  }
  .sidebar-toggle {
    display: inline-grid;
    place-items: center;
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms var(--ease);
    z-index: 45;
  }
  body.admin.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 42px;
  padding: 0.55rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition), opacity var(--transition);
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
}
.btn:hover {
  color: var(--text);
}
.btn--primary {
  color: #0b0612;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent));
  box-shadow: var(--shadow-glow);
}
.btn--primary:hover {
  color: #0b0612;
  filter: brightness(1.05);
}
.btn--ghost {
  background: transparent;
  border-color: var(--border);
}
.btn--danger {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}
.btn--sm {
  min-height: 34px;
  padding: 0.35rem 0.8rem;
  font-size: 0.82rem;
}
.btn:disabled,
.btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

/* Cards / stats */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-head h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.7rem;
}
.page-head p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  position: relative;
  padding: 1.15rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  top: -30px;
  right: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.15);
  filter: blur(20px);
}

.stat-card__label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stat-card__value {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
}

.panel {
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  margin-bottom: 1.25rem;
}

.panel__title {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
}

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

/* Chart */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  height: 180px;
  padding-top: 0.5rem;
}

.bar-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  height: 100%;
  justify-content: flex-end;
}

.bar-chart__bar {
  width: 100%;
  max-width: 48px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent));
  min-height: 4px;
  transition: height 400ms var(--ease);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.25);
}

.bar-chart__label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
}

.bar-chart__val {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.data-table th,
table.data-table td {
  padding: 0.8rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

table.data-table th {
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.28);
}

table.data-table tr:last-child td {
  border-bottom: 0;
}

table.data-table tr:hover td {
  background: rgba(168, 85, 247, 0.04);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.badge--new {
  color: #bfdbfe;
  background: rgba(96, 165, 250, 0.15);
  border-color: rgba(96, 165, 250, 0.3);
}
.badge--reviewing {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
}
.badge--accepted {
  color: #a7f3d0;
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
}
.badge--rejected {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.3);
}
.badge--ok {
  color: #a7f3d0;
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.3);
}
.badge--off {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

/* Filters */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-bar a {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--surface);
}
.filter-bar a:hover,
.filter-bar a.is-active {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-dim);
}

.search-field {
  position: relative;
  margin-bottom: 1rem;
  max-width: 320px;
}

.search-field input {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.9rem 0.55rem 2.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.search-field svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Forms */
.form-grid {
  display: grid;
  gap: 1rem;
}

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

@media (max-width: 700px) {
  .form-grid--2 {
    grid-template-columns: 1fr;
  }
}

.form-field label,
.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.88rem;
}

.form-help {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.form-error {
  margin: 0.35rem 0 0;
  color: var(--error);
  font-size: 0.85rem;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(168, 85, 247, 0.28);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.textarea {
  min-height: 110px;
  resize: vertical;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.18);
}

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23c084fc' stroke-width='2'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.3rem;
}

.password-field {
  position: relative;
}
.password-field .input {
  padding-right: 3rem;
}
.password-toggle {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.password-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
}
.switch input {
  position: absolute;
  opacity: 0;
}
.switch__track {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #1c1c24;
  border: 1px solid var(--border);
  position: relative;
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: transform var(--transition), background var(--transition);
}
.switch input:checked + .switch__track {
  background: rgba(168, 85, 247, 0.35);
}
.switch input:checked + .switch__track::after {
  transform: translateX(20px);
  background: var(--accent-bright);
}

.file-upload {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 110px;
  padding: 1rem;
  border: 1.5px dashed rgba(168, 85, 247, 0.4);
  border-radius: var(--radius);
  background: rgba(168, 85, 247, 0.05);
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
}
.file-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.file-upload:hover {
  border-color: var(--accent);
  color: var(--text);
}

.preview-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.options-editor {
  display: grid;
  gap: 0.55rem;
}
.options-editor__row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.5rem;
}

.reorder-hint {
  margin: 0 0 0.75rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--accent-dim);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

/* Application detail */
.answer-list {
  display: grid;
  gap: 0.85rem;
}
.answer-item {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--surface);
}
.answer-item strong {
  display: block;
  margin-bottom: 0.35rem;
}
.answer-item .meta {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.timeline li {
  position: relative;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.status-config {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

/* Toast + modal (shared with site) */
#toast-region {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: min(100% - 2rem, 380px);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(16, 16, 20, 0.96);
  box-shadow: var(--shadow-md);
  animation: toastIn 280ms var(--ease);
}
.toast.is-leaving {
  animation: toastOut 220ms var(--ease) forwards;
}
.toast__icon {
  width: 22px;
  height: 22px;
}
.toast--success {
  border-color: rgba(52, 211, 153, 0.35);
}
.toast--success .toast__icon {
  color: var(--success);
}
.toast--error {
  border-color: rgba(248, 113, 113, 0.4);
}
.toast--error .toast__icon {
  color: var(--error);
}
.toast--warning {
  border-color: rgba(251, 191, 36, 0.4);
}
.toast--warning .toast__icon {
  color: var(--warning);
}
.toast--info {
  border-color: rgba(96, 165, 250, 0.4);
}
.toast--info .toast__icon {
  color: var(--info);
}
.toast__msg {
  margin: 0;
  font-size: 0.92rem;
}
.toast__close {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.toast__bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  transform-origin: left;
  background: var(--accent);
  animation: toastBar linear forwards;
}
.toast--success .toast__bar {
  background: var(--success);
}
.toast--error .toast__bar {
  background: var(--error);
}

#modal-root {
  z-index: 500;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}
.modal {
  width: min(100%, 440px);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow-md);
}
.modal h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
}
.modal p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}
.modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(12px);
  }
}
@keyframes toastBar {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

.color-field {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.color-field input[type="color"] {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
}

.color-field .input {
  flex: 1;
}

.tag-live-preview {
  margin-bottom: 1.25rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px dashed rgba(168, 85, 247, 0.35);
  background: rgba(0, 0, 0, 0.25);
}

.tag-assign-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tag-assign-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(168, 85, 247, 0.2);
  background: var(--surface);
  cursor: pointer;
}

.tag-assign-item.is-inactive {
  opacity: 0.85;
  border-style: dashed;
}

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

.chip--warn {
  display: inline-flex;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.member-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 28px;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--tag-color, #e9d5ff);
  background: var(--tag-bg, #1a1026);
  border: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 0 12px color-mix(in srgb, var(--tag-glow, #a855f7) 25%, transparent);
}

.member-tag__emoji {
  line-height: 1;
}

.form-grid--3 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .form-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
