*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

[hidden] {
  display: none !important;
}

:root {
  --bg: #0f0f0f;
  --card: #1a1a1a;
  --card2: #111;
  --gray: #2a2a2a;
  --gray2: #252525;
  --surface: rgba(255, 255, 255, .03);
  --surface-2: rgba(255, 255, 255, .05);
  --accent: #d136ca;
  --accent-l: #dc5ed6;
  --accent-dim: rgba(209, 54, 202, .12);
  --accent-glow: rgba(209, 54, 202, .35);
  --text: #e5e5e5;
  --muted: #a3a3a3;
  --faint: #666;
  --border: rgba(255, 255, 255, .06);
  --border-s: rgba(255, 255, 255, .12);
  --topbar-bg: rgba(15, 15, 15, .95);
  --success: #22c55e;
  --warning: #f5b50b;
  --danger: #ef4444;
  --info: #3b82f6;
  --sidebar-w: 250px;
  --topbar-h: 64px;
  --t: all 0.3s ease;
  --font-head: 'Montserrat', sans-serif;
  --font-body: 'Roboto', sans-serif;
  --r: 10px;
  --r-lg: 16px;
  --r-full: 9999px;
}

:root[data-theme="light"] {
  --bg: #f4f4f6;
  --card: #ffffff;
  --card2: #fbfbfc;
  --gray: #dcdce1;
  --gray2: #ececef;
  --surface: rgba(0, 0, 0, .025);
  --surface-2: rgba(0, 0, 0, .04);
  --accent-dim: rgba(209, 54, 202, .1);
  --accent-glow: rgba(209, 54, 202, .28);
  --text: #18181b;
  --muted: #52525b;
  --faint: #8a8a93;
  --border: rgba(0, 0, 0, .07);
  --border-s: rgba(0, 0, 0, .13);
  --topbar-bg: rgba(255, 255, 255, .95);
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-head);
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

h1 {
  font-size: 2rem;
  font-weight: 800;
}

p {
  color: var(--muted);
  font-weight: 300;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color .3s;
}

a:hover {
  color: var(--accent-l);
}

.btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem 1.5rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: .9rem;
  line-height: 1.25;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: var(--t);
  will-change: transform;
}

.btn:hover {
  transform: translateY(-3px);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  box-shadow: 0 5px 20px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-l);
  color: #fff;
  box-shadow: 0 10px 28px rgba(209, 54, 202, .45);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 500;
  border-color: var(--gray);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 5px 15px rgba(209, 54, 202, .2);
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-logout {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--faint);
  font-size: .95rem;
  padding: .4rem;
  border-radius: 8px;
  transition: color .2s;
}

.btn-logout:hover {
  color: var(--accent);
}

.copy-text {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
  text-align: left;
  cursor: pointer;
  transition: color .2s;
}

.copy-text:hover,
.copy-text:focus-visible {
  color: var(--accent);
  outline: none;
}

.text-link {
  color: var(--accent);
}

.status-ok {
  color: var(--accent);
}

.status-bad {
  color: var(--danger);
}

.status-warn {
  color: var(--warning);
}

.status-muted {
  color: var(--muted);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1rem;
}

.form-label {
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.form-control {
  width: 100%;
  padding: .7rem 1rem;
  border: 1px solid var(--border-s);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 400;
  transition: border-color .3s, box-shadow .3s;
  outline: none;
}

.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(209, 54, 202, .15);
}

.form-control::placeholder {
  color: var(--faint);
}

select.form-control {
  cursor: pointer;
}

select.form-control option {
  background: var(--card);
  color: var(--text);
}

textarea.form-control {
  resize: vertical;
  line-height: 1.6;
}

.form-help {
  font-size: .75rem;
  color: var(--faint);
}

.required-mark {
  color: var(--danger);
}

.input-otp {
  font-size: 1.8rem;
  letter-spacing: .35em;
  text-align: center;
  font-family: monospace;
}

.input-code {
  font-family: monospace;
  letter-spacing: .1em;
}

.input-uppercase {
  text-transform: uppercase;
}

.input-group {
  display: flex;
  align-items: stretch;
}

.input-group .form-control {
  flex: 1;
  min-width: 0;
  border-radius: 8px 0 0 8px;
}

.input-group-addon {
  display: flex;
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--border-s);
  border-left: none;
  padding: 0 .85rem;
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  white-space: nowrap;
  font-size: .875rem;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.input-group-select {
  flex-shrink: 0;
  max-width: 55%;
}

.input-group-select .custom-select-wrap {
  height: 100%;
}

.input-group-select .custom-select-trigger {
  height: 100%;
  padding: 0 .85rem;
  background: var(--surface-2);
  border-left: none;
  border-radius: 0 8px 8px 0;
  color: var(--muted);
  font-size: .875rem;
}

.input-group-select .custom-select-trigger[aria-expanded="true"] {
  border-bottom-right-radius: 8px;
}

.input-group-select [data-custom-select-label] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.input-group-select .custom-select-list {
  top: calc(100% + 4px);
  left: auto;
  min-width: 100%;
  width: max-content;
  max-width: 280px;
  max-height: 13rem;
  overflow-y: auto;
  border-top: 1px solid var(--border-s);
  border-radius: var(--r);
}

.password-field {
  position: relative;
  display: block;
  width: 100%;
}

.password-field .form-control {
  padding-right: 4.75rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: .4rem;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 500;
  padding: .35rem .6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: color .2s;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--accent);
  outline: none;
}

.stacked-form {
  display: flex;
  flex-direction: column;
}

.form-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: .5rem;
}

.form-narrow {
  max-width: 460px;
}

.field-narrow {
  max-width: 280px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 1rem;
}

.inline-form {
  display: inline;
  margin: 0;
}

.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  width: 100%;
  min-height: 150px;
  padding: 1.5rem;
  border: 1.5px dashed var(--border-s);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.dropzone:hover,
.dropzone:focus-within,
.dropzone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.dropzone-text {
  font-size: .9rem;
  color: var(--text);
  font-weight: 400;
}

.dropzone-text strong {
  color: var(--accent);
  font-weight: 500;
}

.dropzone-hint {
  font-size: .75rem;
  color: var(--faint);
}

.dropzone-file {
  font-size: .8rem;
  color: var(--muted);
  word-break: break-all;
}

.dropzone-preview {
  max-width: 100%;
  max-height: 180px;
  border-radius: var(--r);
  object-fit: contain;
  margin-bottom: .5rem;
}

.dropzone-compact {
  min-height: 110px;
  padding: 1rem;
}

.dropzone-compact .dropzone-preview {
  max-height: 90px;
}

.card {
  background: var(--card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
  padding: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}

.card-title {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.card-heading {
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}

.empty-state h3 {
  margin-bottom: .35rem;
}

.empty-state .btn {
  margin-top: 1.25rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1.25rem;
}

.stat-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
  transition: border-color .2s;
  container-type: inline-size;
}

.stat-card:hover {
  border-color: rgba(209, 54, 202, .25);
}

.stat-card .icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(145deg, var(--gray), var(--gray2));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--accent);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
}

.stat-card .label {
  font-family: var(--font-head);
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  font-weight: 700;
}

.stat-card .value {
  font-family: var(--font-head);
  font-size: min(2rem, 16.5cqi);
  font-weight: 800;
  color: var(--text);
  margin-top: .2rem;
  line-height: 1.3;
  white-space: nowrap;
}

.stat-card .delta {
  font-size: .75rem;
  color: var(--faint);
  margin-top: .2rem;
}

.quick-actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: stretch;
}

.discord-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
  background-color: #16101f;
  background-image:
    radial-gradient(circle at 18% 20%, rgba(209, 54, 202, .38) 0%, transparent 55%),
    radial-gradient(circle at 85% 85%, rgba(88, 101, 242, .3) 0%, transparent 55%);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.discord-banner-content {
  max-width: 680px;
}

.discord-banner-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: .55rem;
}

.discord-banner-text {
  color: rgba(255, 255, 255, .82);
  font-size: .95rem;
  margin-bottom: 1.5rem;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

thead th {
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .85rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody tr {
  transition: background .2s;
}

tbody tr:hover {
  background: var(--surface);
}

tbody td {
  padding: .9rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
  font-weight: 400;
}

tbody tr:last-child td {
  border-bottom: none;
}

.cell-strong {
  font-weight: 500;
}

.cell-muted {
  color: var(--muted);
}

.cell-nowrap {
  white-space: nowrap;
}

.cell-empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
}

.action-group {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

.flash {
  display: none;
}

.toast-container {
  position: fixed;
  top: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  width: min(460px, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .9rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--border-s);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
  color: var(--text);
  font-family: var(--font-body);
  animation: toastIn .4s cubic-bezier(.2, .9, .3, 1.15) both;
}

.toast.is-leaving {
  animation: toastOut .35s ease forwards;
}

.toast-message {
  flex: 1;
  font-size: .9rem;
  font-weight: 400;
  word-break: break-word;
}

.toast-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--muted);
  font-size: .9rem;
  transition: background .2s, color .2s;
}

.toast-close:hover {
  background: var(--gray);
  color: var(--text);
}

.toast-icon {
  flex-shrink: 0;
  font-size: 1.05rem;
}

.toast-success .toast-icon {
  color: var(--accent);
}

.toast-danger .toast-icon {
  color: var(--danger);
}

.toast-warning .toast-icon {
  color: var(--warning);
}

.toast-info .toast-icon {
  color: var(--info);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(-28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(-18px);
  }
}

.cf-turnstile {
  display: flex;
  justify-content: center;
  min-height: 65px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-overlay-top {
  z-index: 2000;
}

.modal {
  background: var(--card);
  border: 1px solid var(--border-s);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  width: min(540px, 100%);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
  transform: translateY(16px) scale(.97);
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1);
}

.modal-wide {
  width: min(680px, 100%);
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.modal-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  text-decoration: none;
  transition: background .2s, color .2s;
}

.modal-close:hover,
.modal-close:focus-visible {
  background: var(--gray);
  color: var(--text);
  outline: none;
}

.modal-footer {
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.modal-section {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.modal-section-title {
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: .5rem;
}

.modal-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}

.modal-action:last-child {
  border-bottom: none;
}

.modal-action-label {
  font-size: .9rem;
  color: var(--text);
  font-weight: 400;
}

.modal-action-hint {
  font-size: .78rem;
  color: var(--muted);
}

.confirm-title {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .6rem;
}

.confirm-message {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.6;
  word-break: break-word;
}

#confirm-dialog .modal {
  width: min(460px, 100%);
  text-align: center;
}

.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border);
}

.toggle-wrap:last-child {
  border-bottom: none;
}

.toggle-label {
  font-size: .9rem;
  color: var(--text);
  font-weight: 400;
}

.toggle-hint {
  font-size: .78rem;
  color: var(--muted);
}

.toggle-group .toggle-wrap {
  border-bottom: none;
}

.toggle-reveal {
  margin-bottom: 0;
  padding-bottom: .85rem;
}

.toggle-group:has([data-reveal]:not(:checked)) .toggle-reveal {
  display: none;
}

.toggle {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--gray);
  border-radius: var(--r-full);
  transition: background .2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}

.toggle input:checked + .toggle-slider {
  background: var(--accent);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.toggle input:focus-visible + .toggle-slider {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.pagination {
  display: flex;
  gap: .4rem;
  padding: 1.25rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--card2);
  border-right: 1px solid var(--border);
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}

.sidebar-header {
  padding: 1.35rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
  min-width: 0;
}

.sidebar-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

.sidebar-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .95rem;
  color: var(--text);
  letter-spacing: .03em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-subtitle {
  font-size: .7rem;
  color: var(--muted);
  margin-top: .1rem;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: .6rem 0;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: .75rem 0;
}

.nav-section-label {
  font-family: var(--font-head);
  font-size: .6rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--faint);
  font-weight: 700;
  padding: .9rem 1.25rem .3rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .65rem 1.1rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 400;
  cursor: pointer;
  transition: background .2s, color .2s;
  text-decoration: none;
  margin: 2px 8px;
  border-radius: 8px;
  border: 0;
  min-width: 0;
}

button.nav-item {
  width: calc(100% - 16px);
  background: none;
  font: inherit;
  font-size: .875rem;
  text-align: left;
}

.nav-item:hover {
  background: var(--gray);
  color: var(--text);
  text-decoration: none;
}

.nav-item.active,
.nav-item.active:hover {
  background: var(--accent-dim);
  color: var(--accent);
}

.nav-item .nav-icon {
  width: 16px;
  text-align: center;
  flex-shrink: 0;
  font-size: .85rem;
}

.nav-item .nav-chevron {
  margin-left: auto;
  font-size: .7rem;
  transition: transform .2s;
}

.nav-item.category-open .nav-chevron {
  transform: rotate(90deg);
}

.nav-sub {
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease;
}

.sidebar.no-transition .nav-sub,
.sidebar.no-transition .nav-chevron {
  transition: none;
}

.nav-sub.open {
  max-height: 50vh;
  overflow-y: auto;
}

.nav-sub .nav-item {
  padding-left: 2rem;
  font-size: .83rem;
}

.nav-sub .nav-item .nav-icon {
  font-size: .78rem;
}

.nav-address {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-count {
  flex-shrink: 0;
  margin-left: auto;
  color: var(--accent);
  font-size: .75rem;
  font-weight: 500;
}

.nav-count-muted {
  color: var(--faint);
  font-weight: 400;
}

.nav-item .nav-count + .nav-chevron {
  margin-left: .5rem;
}

.sidebar-footer {
  padding: 1rem 1.1rem;
  border-top: 1px solid var(--border);
}

.sidebar-footer .nav-item {
  margin: 0 0 .25rem;
}

.user-mini {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: .6rem;
}

.user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border-s);
  background: var(--gray);
}

.user-mini-info {
  flex: 1;
  overflow: hidden;
}

.user-mini-name {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-mini-role {
  font-size: .75rem;
  color: var(--muted);
}

.user-mini-crown {
  color: var(--accent);
  font-size: .7rem;
}

.role-admin {
  color: var(--danger);
}

.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  padding: 2rem 2.5rem;
  width: 100%;
}

.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.7rem;
  font-weight: 800;
}

.page-header p {
  margin-top: .3rem;
  color: var(--muted);
  font-size: .9rem;
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}

.toolbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.toolbar-heading {
  flex: 1;
  min-width: 0;
}

.toolbar-title {
  font-size: 1.3rem;
  word-break: break-word;
}

.topbar {
  display: none;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--border);
  padding: 0 1.25rem;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-head);
  font-weight: 800;
  color: var(--text);
  font-size: .95rem;
  letter-spacing: .03em;
  text-decoration: none;
  min-width: 0;
}

.topbar-brand:hover {
  color: var(--text);
}

.topbar-logo {
  height: 30px;
  border-radius: 6px;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  z-index: 150;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(15, 15, 15, .97);
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-brand {
  color: var(--text);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: .04em;
  transition: color .2s;
  font-family: var(--font-head);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.nav-brand:hover {
  color: var(--accent);
}

.nav-logo {
  height: 28px;
  border-radius: 6px;
}

.nav-menu {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: .5rem 1rem;
  border-radius: 6px;
  transition: color .2s, background-color .2s;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.nav-link:hover {
  color: var(--accent);
  background: rgba(209, 54, 202, .1);
}

.nav-login {
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  padding: .5rem 1.2rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .18);
  transition: var(--t);
  display: flex;
  align-items: center;
  gap: .5rem;
  line-height: 1.25;
  will-change: transform;
}

.nav-login:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.nav-button {
  background: var(--accent);
  color: #fff;
  padding: .5rem 1.2rem;
  border-radius: 6px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  transition: var(--t);
  display: flex;
  align-items: center;
  gap: .5rem;
  box-shadow: 0 4px 12px var(--accent-glow);
  font-family: var(--font-head);
  font-size: .875rem;
  line-height: 1.25;
  will-change: transform;
}

.nav-button:hover {
  background: var(--accent-l);
  transform: translateY(-2px);
  color: #fff;
}

.land-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.land-hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background: var(--text);
  border-radius: 3px;
  transition: transform .3s, opacity .3s;
  transform-origin: center;
}

.land-hamburger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.land-hamburger.active span:nth-child(2) {
  opacity: 0;
}

.land-hamburger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 400px;
  height: 100vh;
  background: var(--card);
  z-index: 999;
  padding: 8rem 2rem 2rem;
  transition: right .4s ease;
  box-shadow: -5px 0 25px rgba(0, 0, 0, .2);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu .nav-link {
  opacity: 0;
  transform: translateX(50px);
  padding: 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
}

.mobile-menu.active .nav-link {
  opacity: 1;
  transform: translateX(0);
}

.mobile-menu .nav-link:nth-child(1) {
  transition: opacity .4s ease .1s, transform .4s ease .1s;
}

.mobile-menu .nav-link:nth-child(2) {
  transition: opacity .4s ease .2s, transform .4s ease .2s;
}

.mobile-menu .nav-link:nth-child(3) {
  transition: opacity .4s ease .3s, transform .4s ease .3s;
}

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 0 4rem;
  position: relative;
  z-index: 1;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 15, 15, .7), rgba(15, 15, 15, .85));
  z-index: -2;
}

.hero .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: linear-gradient(90deg, #e37fde, #d136ca, #a3209d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.5px;
  line-height: 1.1;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero-primary {
  position: relative;
  z-index: 1;
  background: var(--accent);
  color: #fff;
  padding: .85rem 2.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  box-shadow: 0 5px 20px var(--accent-glow);
  font-family: var(--font-head);
  font-size: .95rem;
  line-height: 1.25;
  border: 1px solid transparent;
  cursor: pointer;
  will-change: transform;
}

.btn-hero-primary:hover {
  background: var(--accent-l);
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(209, 54, 202, .45);
  color: #fff;
}

.btn-hero-secondary {
  position: relative;
  z-index: 1;
  background: transparent;
  color: var(--text);
  padding: .85rem 2.2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--gray);
  transition: var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-size: .95rem;
  line-height: 1.25;
  will-change: transform;
}

.btn-hero-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(209, 54, 202, .2);
}

.btn-inline {
  display: inline-flex;
}

.section {
  padding: 5rem 0;
}

.section-flush {
  padding-top: 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text);
}

.section-title span {
  background: linear-gradient(90deg, #e37fde, #d136ca);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.stat-card-land {
  background: var(--card);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .1);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease, box-shadow .3s ease, border-color .3s ease;
}

.stat-card-land.visible {
  opacity: 1;
  transform: none;
}

.stat-card-land.visible:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .2);
  border-color: rgba(209, 54, 202, .3);
  transition: opacity .6s ease, transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.stat-icon-land {
  width: 70px;
  height: 70px;
  background: linear-gradient(145deg, var(--gray), var(--gray2));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--accent);
  font-size: 1.8rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
}

.stat-number-land {
  font-family: var(--font-head);
  font-size: 3rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: .5rem;
}

.stat-label-land {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 500;
}

.game-mode {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin-bottom: 3rem;
  background: var(--card);
  border-radius: 16px;
  padding: 2.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .1);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

.game-mode.visible {
  opacity: 1;
  transform: none;
}

@media (min-width: 768px) {
  .game-mode {
    flex-direction: row;
    align-items: center;
  }
}

.gm-image {
  flex: 1;
  min-width: 0;
}

.gm-image img {
  display: block;
  width: 100%;
  border-radius: 18px;
  object-fit: cover;
}

.gm-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
}

.gm-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .02em;
}

.gm-desc {
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.05rem;
  font-weight: 300;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card-land {
  background: var(--card);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .1);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease, box-shadow .3s ease, border-color .3s ease;
}

.feature-card-land.visible {
  opacity: 1;
  transform: none;
}

.feature-card-land.visible:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .2);
  border-color: rgba(209, 54, 202, .25);
  transition: opacity .6s ease, transform .3s ease, box-shadow .3s ease, border-color .3s ease;
  transition-delay: 0s;
}

.feature-icon-land {
  width: 60px;
  height: 60px;
  background: linear-gradient(145deg, var(--gray), var(--gray2));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--accent);
  font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
}

.feature-card-land h3 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .6rem;
}

.feature-card-land p {
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.7;
  font-weight: 300;
}

@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 580px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
}

.contact-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 900px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

.contact-info-title {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: .75rem;
}

.contact-info-desc {
  color: var(--muted);
  font-weight: 300;
  line-height: 1.75;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.contact-info-items {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(145deg, var(--gray), var(--gray2));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .2);
}

.contact-info-item strong {
  display: block;
  font-family: var(--font-head);
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .2rem;
}

.contact-info-item p {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 300;
  line-height: 1.5;
  margin: 0;
}

.contact-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
}

.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .contact-form-grid {
    grid-template-columns: 1fr;
  }
}

.contact-success {
  text-align: center;
  padding: 3rem 2rem;
}

.contact-success-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(145deg, var(--gray), #252525);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--accent);
  font-size: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}

.contact-success-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: .6rem;
  color: var(--text);
}

.contact-success-text {
  color: var(--muted);
  font-weight: 300;
  max-width: 380px;
  margin: 0 auto;
}

.custom-select-wrap {
  position: relative;
  user-select: none;
}

.custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .7rem 1rem;
  background: var(--gray);
  border: 1px solid var(--border-s);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 400;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  text-align: left;
}

.custom-select-trigger:hover {
  border-color: var(--accent);
}

.custom-select-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(209, 54, 202, .15);
}

.custom-select-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.custom-select-trigger .is-placeholder {
  color: var(--faint);
}

.custom-select-chevron {
  color: var(--muted);
  font-size: .8rem;
  flex-shrink: 0;
  transition: transform .2s;
}

.custom-select-trigger[aria-expanded="true"] .custom-select-chevron {
  transform: rotate(180deg);
}

.custom-select-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--card);
  border: 1px solid var(--border-s);
  border-top: none;
  border-radius: 0 0 var(--r) var(--r);
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  padding: .3rem 0;
  list-style: none;
}

.custom-select-list.open {
  display: block;
}

.custom-select-option {
  padding: .55rem 1rem;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 400;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.custom-select-option:hover,
.custom-select-option.is-active {
  background: rgba(209, 54, 202, .1);
  color: var(--text);
}

.custom-select-option.selected {
  color: var(--accent);
  background: rgba(209, 54, 202, .06);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}

.faq-land {
  max-width: 860px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

.faq-land.visible {
  opacity: 1;
  transform: none;
}

.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .1);
  transition: border-color .3s ease, box-shadow .3s ease;
}

.faq-item:hover,
.faq-item.open {
  border-color: rgba(209, 54, 202, .25);
}

.faq-item.open {
  box-shadow: 0 16px 36px rgba(0, 0, 0, .18);
}

.faq-heading {
  font-size: inherit;
  margin: 0;
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.5rem;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  transition: color .2s;
}

.faq-question:hover,
.faq-item.open .faq-question {
  color: var(--accent);
}

.faq-question:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 16px;
}

.faq-chevron {
  flex-shrink: 0;
  font-size: .85rem;
  color: var(--muted);
  transition: transform .3s ease, color .2s;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows .3s ease, visibility .3s;
}

.faq-item.open .faq-answer {
  grid-template-rows: 1fr;
  visibility: visible;
}

.faq-answer-inner {
  overflow: hidden;
}

.faq-answer p {
  padding: 0 1.5rem 1.3rem;
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.75;
  font-weight: 300;
}

.card .faq-item {
  box-shadow: none;
  background: var(--surface);
}

.cta-land {
  background: var(--card);
  border-radius: 20px;
  padding: 4rem 2.5rem;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .15);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

.cta-land.visible {
  opacity: 1;
  transform: none;
}

.cta-title {
  font-size: 2.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.2rem;
}

.cta-description {
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  font-size: 1.1rem;
  line-height: 1.6;
  font-weight: 300;
}

.footer {
  background: var(--card);
  padding: 3.5rem 0 0;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-logo {
  height: 32px;
  border-radius: 8px;
  margin-bottom: .75rem;
}

.footer-brand-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: .03em;
  margin-bottom: .5rem;
}

.footer-brand-desc {
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.65;
  font-weight: 300;
  max-width: 300px;
}

.footer-col-title {
  font-family: var(--font-head);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--faint);
  margin-bottom: .9rem;
}

.footer-link {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 300;
  margin-bottom: .5rem;
  transition: color .2s;
}

.footer-link:hover {
  color: var(--accent);
}

.footer-bottom {
  text-align: center;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  margin-top: 0;
}

.footer-bottom p {
  color: var(--faint);
  font-size: .8rem;
}

.footer-bottom a {
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}

.footer-bottom a:hover {
  color: var(--accent);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 2rem 1rem;
  position: relative;
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(209, 54, 202, .1) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--border-s);
  border-radius: var(--r-lg);
  padding: 2.5rem 2.25rem;
  width: min(420px, 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
  position: relative;
  z-index: 1;
}

.auth-card-narrow {
  max-width: 380px;
}

.auth-logo-wrap {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  object-fit: cover;
}

.auth-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  margin-bottom: .3rem;
  letter-spacing: .02em;
}

.auth-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: .875rem;
  margin-bottom: 1.75rem;
  font-weight: 300;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-form .form-group {
  margin-bottom: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1rem 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-s);
}

.auth-divider span {
  color: var(--faint);
  font-size: .75rem;
}

.auth-footer-link {
  text-align: center;
  font-size: .875rem;
  color: var(--muted);
  margin-top: 1.25rem;
}

.error-code {
  font-family: var(--font-head);
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  text-align: center;
  margin-bottom: 1rem;
}

.error-actions {
  display: flex;
  gap: .75rem;
}

.error-actions .btn {
  flex: 1;
}

@media (max-width: 480px) {
  .error-actions {
    flex-direction: column;
  }
}

.discord-btn {
  width: 100%;
}

.auth-static-value {
  padding: .7rem 1rem;
  border: 1px solid var(--border-s);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: .9rem;
  font-weight: 500;
  word-break: break-all;
}

.card-flush {
  padding: 0;
  overflow: hidden;
}

.card-header-padded {
  padding: 1.1rem 1.5rem;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
}

.card-tools {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

.table-search {
  width: 240px;
  max-width: 100%;
}

.sort-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: inherit;
}

.sort-link i {
  font-size: .7rem;
  opacity: .5;
}

.sort-link:hover,
.sort-link.active {
  color: var(--text);
}

.sort-link.active i {
  opacity: 1;
  color: var(--accent);
}

.cell-actions {
  width: 1%;
  white-space: nowrap;
}

.action-group-end {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.file-cell {
  white-space: nowrap;
}

.file-cell .file-icon {
  vertical-align: middle;
  margin-right: .7rem;
}

.file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--gray), var(--gray2));
  color: var(--accent);
  font-size: .95rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .15);
}

.file-icon-lg {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  font-size: 2.4rem;
  margin-bottom: .5rem;
}

.file-name {
  display: inline-block;
  max-width: 300px;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  transition: color .2s;
}

button.file-name {
  cursor: pointer;
}

button.file-name:hover,
button.file-name:focus-visible {
  color: var(--accent);
  outline: none;
}

.visibility {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 500;
  white-space: nowrap;
}

.visibility i {
  font-size: .75rem;
}

.visibility-public {
  color: var(--accent);
}

.visibility-private {
  color: var(--muted);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.file-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: background .2s, border-color .2s;
}

.file-row:hover {
  background: var(--surface);
  border-color: var(--border-s);
}

.file-row-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: .9rem;
  color: var(--text);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-row-size,
.file-row-date {
  flex-shrink: 0;
  font-size: .78rem;
  color: var(--faint);
  white-space: nowrap;
}

.row-link {
  color: inherit;
  text-decoration: none;
}

.row-link:hover {
  color: inherit;
}

.row-link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
}

.row-link:focus-visible {
  outline: none;
}

.row-link:focus-visible::after {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.storage-meter {
  height: 12px;
  background: var(--surface-2);
  border-radius: var(--r-full);
  overflow: hidden;
}

.storage-meter-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #e37fde, var(--accent));
  border-radius: var(--r-full);
  transition: width .6s ease;
}

.storage-meter.is-full .storage-meter-fill {
  background: linear-gradient(90deg, var(--warning), var(--danger));
}

.storage-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  margin-top: 1rem;
  font-size: .82rem;
  color: var(--muted);
}

.storage-legend-item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.storage-legend-item i {
  color: var(--accent);
}

.file-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-align: center;
}

.file-preview-image {
  display: block;
  max-width: 100%;
  max-height: 280px;
  margin-bottom: .5rem;
  border-radius: var(--r);
  object-fit: contain;
  background: var(--gray2);
}

.file-preview-name {
  max-width: 100%;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  word-break: break-all;
}

.file-preview-meta {
  font-size: .8rem;
  color: var(--muted);
}

.file-facts {
  display: flex;
  flex-direction: column;
  font-size: .875rem;
}

.file-fact {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
}

.file-fact:last-child {
  border-bottom: none;
}

.file-fact-label {
  flex-shrink: 0;
  color: var(--muted);
}

.file-fact-value {
  min-width: 0;
  color: var(--text);
  font-weight: 400;
  text-align: right;
  word-break: break-word;
}

.file-hash {
  font-family: monospace;
  font-size: .78rem;
  word-break: break-all;
}

.dropzone-icon {
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: .35rem;
}

.upload-queue {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: 1rem;
  max-height: 320px;
  overflow-y: auto;
}

.upload-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .75rem .9rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color .2s;
}

.upload-info {
  flex: 1;
  min-width: 0;
}

.upload-name {
  font-size: .875rem;
  color: var(--text);
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-meta {
  font-size: .75rem;
  color: var(--muted);
  margin-top: .1rem;
}

.upload-bar {
  display: block;
  height: 6px;
  margin-top: .45rem;
  background: var(--surface-2);
  border-radius: var(--r-full);
  overflow: hidden;
}

.upload-bar-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  border-radius: var(--r-full);
  transition: width .2s ease;
}

.upload-item.is-done {
  border-color: rgba(209, 54, 202, .3);
}

.upload-item.is-done .upload-meta {
  color: var(--accent);
}

.upload-item.is-error {
  border-color: rgba(239, 68, 68, .35);
}

.upload-item.is-error .upload-meta {
  color: var(--danger);
}

.upload-item.is-error .upload-bar-fill {
  background: var(--danger);
}

.upload-cancel {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: none;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  transition: background .2s, color .2s;
}

.upload-cancel:hover,
.upload-cancel:focus-visible {
  background: var(--gray);
  color: var(--text);
  outline: none;
}

.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(0, 0, 0, .72);
  pointer-events: none;
  animation: fadeIn .2s ease forwards;
}

.drop-overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  height: 100%;
  border: 2px dashed var(--accent);
  border-radius: 24px;
  background: var(--accent-dim);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
}

.drop-overlay-inner i {
  font-size: 3rem;
  color: var(--accent);
}

.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1000px) {
  .analytics-grid {
    grid-template-columns: 1fr;
  }
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-s);
  background: var(--gray);
  flex-shrink: 0;
}

.avatar-upload {
  flex: 1;
  min-width: 220px;
}

.totp-scan {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  text-align: center;
}

.secret-code {
  display: inline-block;
  margin-top: .35rem;
  font-family: monospace;
  font-size: 1.05rem;
  letter-spacing: .06em;
  word-break: break-all;
  color: var(--accent);
}

.secret-code:hover {
  color: var(--accent-l);
}

.link-copy {
  display: block;
  margin: .15rem 0;
  font-family: monospace;
  font-size: .82rem;
  word-break: break-all;
  color: var(--accent);
}

.link-copy:hover {
  color: var(--accent-l);
}

.modal-action-info {
  min-width: 0;
}

.qr-wrap {
  text-align: center;
  padding: 1rem;
  background: #fff;
  border-radius: var(--r);
  display: inline-block;
  min-width: 232px;
  min-height: 232px;
}

.qr-image {
  display: block;
  width: 200px;
  height: 200px;
  image-rendering: pixelated;
}

.plan-status {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.plan-status-icon {
  font-size: 2.5rem;
  color: var(--accent);
}

.plan-status-title {
  font-size: 1.3rem;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.plan-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .1);
  text-align: center;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}

.plan-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, .22);
  border-color: rgba(209, 54, 202, .35);
}

.plan-card.is-current,
.plan-card.is-current:hover {
  border-color: var(--accent);
}

.plan-card-premium {
  background-image: radial-gradient(circle at 50% 0%, rgba(209, 54, 202, .14) 0%, transparent 65%);
}

.plan-head {
  padding: 2rem 1.5rem 1.6rem;
  border-bottom: 1px solid var(--border);
}

.plan-name {
  font-size: 1.45rem;
  font-weight: 800;
}

.plan-tagline {
  margin-top: .3rem;
  font-size: .85rem;
  color: var(--muted);
}

.plan-features {
  list-style: none;
  flex: 1;
}

.plan-features li {
  padding: .95rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: .92rem;
  font-weight: 400;
  color: var(--text);
}

.plan-foot {
  padding: 1.1rem 1.5rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
}

.plan-card.is-current .plan-foot {
  color: var(--accent);
}

.redeem-card {
  text-align: center;
  padding: 2rem 1.5rem;
}

.redeem-title {
  font-size: 1.15rem;
}

.redeem-hint {
  margin-top: .35rem;
  font-size: .875rem;
}

.redeem-form {
  display: flex;
  gap: .75rem;
  max-width: 560px;
  margin: 1.4rem auto 0;
}

.redeem-form .form-control {
  flex: 1;
  min-width: 0;
  text-align: center;
}

@media (max-width: 700px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .redeem-form {
    flex-direction: column;
  }
}

.news-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.news-image {
  width: 100%;
  border-radius: var(--r);
  margin-bottom: 1rem;
  max-height: 220px;
  object-fit: cover;
}

@media (max-width: 1200px) {
  .news-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 800px) {
  .news-list {
    grid-template-columns: 1fr;
  }
}

.news-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}

.news-title {
  font-size: 1.1rem;
}

.news-date {
  margin-left: auto;
  white-space: nowrap;
}

.news-body {
  color: var(--text);
  font-size: .9rem;
  line-height: 1.7;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.filter-bar {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  align-items: center;
}

.ticket-current {
  border-color: rgba(209, 54, 202, .35);
}

.ticket-current-info {
  min-width: 0;
  flex: 1;
}

.ticket-current-title {
  font-size: 1.1rem;
  margin: .25rem 0;
  word-break: break-word;
}

.ticket-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.5rem;
  align-items: start;
}

.ticket-layout .admin-card {
  margin-bottom: 0;
}

.chat-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  height: min(62vh, 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-message {
  display: flex;
  align-items: flex-end;
  align-self: flex-start;
  gap: .7rem;
  max-width: min(78%, 640px);
}

.chat-message.is-own {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gray);
  border: 1px solid var(--border-s);
}

.chat-bubble {
  min-width: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .65rem .95rem;
}

.chat-message.is-own .chat-bubble {
  background: var(--accent-dim);
  border-color: rgba(209, 54, 202, .25);
}

.chat-meta {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .2rem;
  font-size: .72rem;
  color: var(--faint);
}

.chat-author {
  color: var(--text);
  font-weight: 500;
  font-size: .8rem;
}

.chat-role {
  color: var(--accent);
  font-weight: 500;
}

.chat-text {
  color: var(--text);
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-image-link {
  display: block;
  margin-top: .45rem;
}

.chat-image {
  display: block;
  max-width: 100%;
  max-height: 320px;
  border-radius: 10px;
  object-fit: contain;
  background: var(--gray);
}

.chat-system {
  align-self: center;
  max-width: 90%;
  text-align: center;
  font-size: .78rem;
  color: var(--faint);
  overflow-wrap: anywhere;
}

.chat-composer {
  display: flex;
  gap: .75rem;
  align-items: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--card2);
}

.chat-input {
  flex: 1;
  min-height: 46px;
  max-height: 180px;
  resize: none;
  overflow-y: auto;
}

.chat-actions {
  display: flex;
  gap: .6rem;
  align-items: center;
  flex-shrink: 0;
}

.chat-attach {
  position: relative;
  max-width: 180px;
}

.chat-attach span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-closed {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--card2);
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
}

@media (max-width: 1000px) {
  .ticket-layout {
    grid-template-columns: 1fr;
  }
}

.chart-wrap {
  position: relative;
  height: 240px;
  width: 100%;
}

.usage-bars {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.usage-bar {
  display: grid;
  grid-template-columns: minmax(0, 200px) 1fr 4.5rem;
  align-items: center;
  gap: 1rem;
}

.usage-bar-label {
  font-size: .875rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.usage-bar-label:hover {
  color: var(--accent);
}

.usage-bar-track {
  display: block;
  height: 10px;
  background: var(--surface-2);
  border-radius: var(--r-full);
  overflow: hidden;
}

.usage-bar-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: var(--r-full);
}

.usage-bar-count {
  font-size: .875rem;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .usage-bar {
    grid-template-columns: minmax(0, 110px) 1fr 4rem;
    gap: .65rem;
  }
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-s);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--faint);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.fade-in {
  animation: fadeIn .3s ease forwards;
}

@media (max-width: 768px) {
  .topbar {
    display: flex;
    z-index: 300;
  }

  .sidebar {
    top: var(--topbar-h);
    left: auto;
    right: 0;
    width: 80%;
    max-width: 400px;
    padding: 1.5rem 1.5rem 1.25rem;
    transform: translateX(110%);
    transition: transform .4s ease;
    background: var(--card);
    border-left: none;
    border-right: none;
    box-shadow: -5px 0 25px rgba(0, 0, 0, .2);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-header,
  .sidebar-divider,
  .sidebar-nav > .nav-section-label {
    display: none;
  }

  .sidebar-nav {
    padding: 0;
  }

  .nav-item,
  button.nav-item {
    width: 100%;
    margin: 0 0 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 1rem;
    font-weight: 500;
    gap: .6rem;
  }

  .nav-item:hover {
    background: rgba(209, 54, 202, .1);
    color: var(--accent);
  }

  .nav-item.active,
  .nav-item.active:hover {
    background: var(--accent-dim);
    color: var(--accent);
  }

  .nav-sub .nav-item {
    margin: 0 0 .75rem;
    padding: .85rem 1rem .85rem 1.5rem;
    font-size: .95rem;
  }

  .nav-sub.open {
    max-height: none;
    overflow: visible;
  }

  .sidebar-footer {
    padding: 1rem 0 0;
    border-top: 1px solid var(--border);
  }

  .sidebar-footer .nav-item {
    margin: 0 0 1rem;
  }

  .sidebar-nav > .nav-item,
  .sidebar-nav > .nav-section-label,
  .sidebar-footer .nav-item,
  .sidebar-footer .user-mini {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity .4s ease, transform .4s ease, background .2s, color .2s;
  }

  .sidebar.open .sidebar-nav > .nav-item,
  .sidebar.open .sidebar-nav > .nav-section-label,
  .sidebar.open .sidebar-footer .nav-item,
  .sidebar.open .sidebar-footer .user-mini {
    opacity: 1;
    transform: translateX(0);
  }

  .sidebar-backdrop {
    top: var(--topbar-h);
  }

  .sidebar-backdrop.active {
    display: block;
  }

  .main-content {
    margin-left: 0;
  }

  .page-content {
    padding: 1.25rem 1rem 2rem;
  }

  .page-header {
    margin-bottom: 1.5rem;
  }

  .page-header h1 {
    font-size: 1.45rem;
  }

  .page-header-row {
    align-items: flex-start;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
  }

  .stat-card {
    padding: 1.1rem;
  }

  .stat-card .value {
    font-size: min(1.6rem, 16.5cqi);
  }

  .card {
    padding: 1.15rem;
  }

  .quick-actions .btn {
    flex: 1 1 200px;
  }

  .discord-banner {
    min-height: 200px;
    padding: 2rem 1.25rem;
  }

  .discord-banner-title {
    font-size: 1.4rem;
  }

  .file-row {
    flex-wrap: wrap;
    gap: .35rem .9rem;
  }

  .file-row-name {
    flex: 1 1 calc(100% - 60px);
  }

  .file-name {
    max-width: 180px;
  }

  .card-header-padded {
    padding: 1rem;
  }

  .card-tools,
  .table-search {
    width: 100%;
  }

  .drop-overlay-inner {
    font-size: 1.05rem;
  }

  .chat-log {
    padding: 1rem;
    height: 60vh;
  }

  .chat-message {
    max-width: 92%;
  }

  .chat-composer {
    flex-direction: column;
    align-items: stretch;
    padding: .85rem 1rem;
  }

  .chat-actions .btn {
    flex: 1;
  }

  .chat-attach {
    max-width: none;
  }

  .filter-bar .btn {
    flex: 1 1 auto;
  }

  .modal {
    padding: 1.25rem;
  }

  .modal-footer .btn {
    flex: 1;
  }

  .modal-action {
    flex-wrap: wrap;
  }

  .toast-container {
    top: .75rem;
  }

  .field-narrow {
    max-width: none;
  }

  .nav-menu {
    display: none;
  }

  .land-hamburger {
    display: flex;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  thead th,
  tbody td {
    padding: .7rem .8rem;
  }

  .page-actions,
  .page-actions .btn,
  .page-actions form {
    width: 100%;
  }

  .page-actions form .btn {
    width: 100%;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-sm {
  font-size: .875rem;
}

.text-xs {
  font-size: .75rem;
}

.text-muted {
  color: var(--muted);
}

.text-strong {
  color: var(--text);
}

.text-accent {
  color: var(--accent);
}

.w-full {
  width: 100%;
}

.push-right {
  margin-left: auto;
}

.mt-2 {
  margin-top: .5rem;
}

.mt-3 {
  margin-top: .75rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mb-0 {
  margin-bottom: 0;
}

.mb-2 {
  margin-bottom: .5rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
