:root { color-scheme: dark; }
html, body { font-family: 'Plus Jakarta Sans', ui-sans-serif, system-ui; background: #080c14; color: #e2e8f0; }

.page-shell {
  position: relative;
  isolation: isolate;
  background-color: #080c14;
  background-image:
    radial-gradient(ellipse 90% 55% at 72% -8%, rgba(124, 58, 237, 0.22), transparent 58%),
    radial-gradient(ellipse 70% 45% at -5% 35%, rgba(6, 182, 212, 0.14), transparent 55%),
    radial-gradient(ellipse 55% 40% at 95% 88%, rgba(124, 58, 237, 0.12), transparent 52%),
    linear-gradient(165deg, #0a1019 0%, #080c14 42%, #060910 100%);
  background-attachment: fixed;
}

.page-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
  background:
    radial-gradient(circle at 18% 78%, rgba(6, 182, 212, 0.08), transparent 38%),
    radial-gradient(circle at 88% 22%, rgba(167, 139, 250, 0.1), transparent 32%);
}

#main-shell {
  position: relative;
  z-index: 1;
}

.page-chrome {
  background: rgba(8, 12, 20, 0.72) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.label-k { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: #94a3b8; }
.panel { background: #0f172a; border: 1px solid rgba(30, 41, 59, .8); }
.elev { background: #1e293b; border: 1px solid rgba(51, 65, 85, .55); }
.hair { border-color: rgba(30, 41, 59, .8); }
.tabular { font-variant-numeric: tabular-nums; }
.scrollbar-thin::-webkit-scrollbar { width: 8px; height: 8px; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: #334155; border-radius: 99px; }
.scrollbar-none { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-none::-webkit-scrollbar { display: none; width: 0; height: 0; }
.side-bar { background: #25293c; color: #b6bee0; }
.side-sec { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; color: #6d748f; }
.nav-item { color: #a8b0c8; }
.nav-item:hover { background: rgba(255,255,255,.05); color: #e8eaf4; }
.nav-item.is-on { background: rgba(255,255,255,.08); color: #fff; }
.nav-item.is-on .nav-ico { color: #fff; }
.nav-ico { color: #8b92ab; }
.nav-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #28c76f; color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; text-align: center; }
.brand-word { font-family: Fredoka, 'Plus Jakarta Sans', sans-serif; }
.dash-card { background: #1a2336; border: 1px solid rgba(148,163,184,.12); border-radius: 1rem; }
.dash-ico { width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; }
.dash-sticky { background: #1a2336; }
.btn-primary-maniac {
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  font-weight: 600;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 13px;
}
.btn-primary-maniac:hover { filter: brightness(1.08); }

.maniac-header-mail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 0.5rem;
  background: transparent;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}
.maniac-header-mail-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
html.light .maniac-header-mail-btn {
  color: #0f172a;
}
html.light .maniac-header-mail-btn:hover {
  background: rgba(15, 23, 42, 0.06);
}
.btn-ghost-maniac {
  border: 1px solid #475569;
  color: #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 13px;
  background: transparent;
}
.btn-ghost-maniac:hover { background: rgba(148, 163, 184, .16); }

.btn-create-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 2.25rem;
  min-height: 2.25rem;
  padding: 0 0.875rem;
  border: none;
  border-radius: 0.5rem;
  background: #f4f4f5;
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: background-color 175ms ease;
}
.btn-create-cta:hover {
  background: #fff;
  color: #0f172a;
}
.btn-create-cta:active {
  background: #e4e4e7;
  color: #0f172a;
}
.btn-create-cta:focus { outline: none; }
.btn-create-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(244, 244, 245, 0.35);
}
.btn-create-cta__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: currentColor;
}
html.light .btn-create-cta {
  background: #000;
  color: #fff;
}
html.light .btn-create-cta:hover {
  background: #171717;
  color: #fff;
}
html.light .btn-create-cta:active {
  background: #262626;
  color: #fff;
}
html.light .btn-create-cta:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
  .maniac-native-toolbar {
    flex-wrap: nowrap;
    align-items: center;
  }

  .maniac-native-toolbar .maniac-native-mobile-search,
  .maniac-native-toolbar .maniac-native-mobile-client {
    flex: 1 1 9rem;
    width: auto;
    min-width: 0;
    max-width: 13rem;
  }

  .maniac-native-toolbar .field-inp,
  .maniac-native-toolbar .btn-ghost-maniac,
  .maniac-native-toolbar .btn-create-cta,
  .maniac-native-toolbar select.field-inp,
  .maniac-native-toolbar [data-combo-trigger] {
    height: 2.25rem;
    min-height: 2.25rem;
    box-sizing: border-box;
    padding-top: 0;
    padding-bottom: 0;
  }

  .maniac-toolbar-actions {
    margin-left: auto;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
  }

  .maniac-toolbar-actions .btn-create-cta {
    margin-left: 0;
  }

  [data-invoice-list-page] .maniac-invoice-search-toolbar,
  [data-quote-list-page] .maniac-native-toolbar {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
  }
}

.maniac-mobile-create-slot:empty { display: none; }
@media (max-width: 767px) {
  .maniac-mobile-create-slot:not(:empty) {
    display: flex;
    align-items: center;
  }
  .btn-create-cta--in-header {
    height: 2rem;
    min-height: 2rem;
    padding: 0 0.7rem;
    font-size: 12px;
    border-radius: 0.5rem;
  }
  .btn-create-cta--in-header .btn-create-cta__icon {
    width: 0.875rem;
    height: 0.875rem;
  }
}
.field-inp {
  background: #0f172a;
  border: 1px solid rgba(51, 65, 85, .55);
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  font-size: 13px;
  width: 100%;
  color: #e2e8f0;
}
.field-inp:focus { outline: none; border-color: #7367f0; box-shadow: 0 0 0 3px rgba(115, 103, 240, .2); }
html.light { color-scheme: light; background: #f4f6f9; }
html.light body,
html.light .page-shell {
  color: #2f3349;
  background-color: #f4f6f9 !important;
  background-image:
    radial-gradient(ellipse 85% 50% at 80% -5%, rgba(124, 58, 237, 0.09), transparent 55%),
    radial-gradient(ellipse 65% 42% at 0% 40%, rgba(6, 182, 212, 0.07), transparent 50%),
    linear-gradient(180deg, #f8f9fc 0%, #f4f6f9 45%, #eef1f7 100%) !important;
}

html.light .page-shell::before {
  opacity: 0.65;
  background:
    radial-gradient(circle at 15% 85%, rgba(6, 182, 212, 0.06), transparent 40%),
    radial-gradient(circle at 92% 12%, rgba(124, 58, 237, 0.07), transparent 35%);
}
html.light .brand-word { color: #2f3349; }
html.light .side-bar { background: #fff; color: #4b5675; border-right: 1px solid #e7eaf3; }
html.light .side-sec { color: #a1a9c3; }
html.light .nav-item { color: #6d748f; }
html.light .nav-item:hover { background: #f5f6fa; color: #2f3349; }
html.light .nav-item.is-on { background: #f1f0ff; color: #7367f0; }
html.light .nav-ico { color: #a8aaae; }
html.light .nav-item.is-on .nav-ico { color: #7367f0; }
html.light .dash-card { background: #fff; border-color: #e8ecf4; }
html.light .dash-sticky { background: #fff; }
html.light .panel { background: #fff; border-color: #e2e8f0; }
html.light .label-k { color: #8b92ab; }
html.light .page-chrome { background: rgba(255,255,255,.92) !important; border-color: #e7eaf3; color: #2f3349; }
html.light .field-inp { background: #fff !important; color: #2f3349 !important; border-color: #d8dbe6 !important; }
html.light .btn-ghost-maniac { border-color: #d8dbe6; color: #5d6480; }
html.light .scrollbar-thin::-webkit-scrollbar-thumb { background: #cfd4e0; }

.maniac-sidebar { width: 268px; }
@media (max-width: 767px) {
  .maniac-sidebar { transform: translateX(-100%); }
}
@media (min-width: 768px) {
  #main-shell { margin-left: 268px; }
  .maniac-sidebar { transform: translateX(0); }
  html.maniac-layout-ready #main-shell { transition: margin-left .2s ease; }
  html.maniac-layout-ready .maniac-sidebar {
    transition: width .2s ease, padding-left .2s ease, padding-right .2s ease, transform .2s ease;
  }
  html[data-sidebar-collapsed="1"] #main-shell { margin-left: 76px; }
  html[data-sidebar-collapsed="1"] .maniac-sidebar { width: 76px !important; padding-left: 0.5rem; padding-right: 0.5rem; }
  html[data-sidebar-collapsed="1"] .maniac-sidebar-text { display: none; }
  html[data-sidebar-collapsed="1"] .maniac-sidebar-collapse-btn { display: none !important; }
  html[data-sidebar-collapsed="1"] .maniac-sidebar-expand-btn { display: inline-flex !important; }
  html[data-sidebar-collapsed="1"] .maniac-sidebar-brand { justify-content: center; }
  html[data-sidebar-collapsed="1"] .maniac-sidebar-footer { display: none; }
  html[data-sidebar-collapsed="1"] [data-nav-panel] { display: none !important; }
}
[data-mobile-overlay] { display: none; }
body[data-sidebar-open="1"] .maniac-sidebar { transform: translateX(0); }
body[data-sidebar-open="1"] [data-mobile-overlay] { display: block; }
@media (max-width: 767px) {
  #main-shell { margin-left: 0 !important; }
}
.badge-maniac {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  background: rgba(51, 65, 85, .55);
  color: #cbd5e1;
  border: 1px solid rgba(71, 85, 105, .45);
}
.badge-maniac.is-violet { background: rgba(124, 58, 237, .2); color: #c4b5fd; border-color: rgba(124, 58, 237, .35); }
.badge-maniac.is-cyan { background: rgba(6, 182, 212, .18); color: #67e8f9; border-color: rgba(6, 182, 212, .35); }
.badge-maniac.is-emerald { background: rgba(16, 185, 129, .18); color: #6ee7b7; border-color: rgba(16, 185, 129, .35); }
.badge-maniac.is-rose { background: rgba(244, 63, 94, .18); color: #fda4af; border-color: rgba(244, 63, 94, .35); }
html.light .badge-maniac.is-cyan { background: rgba(6, 182, 212, .12); color: #0e7490; }
html.light .badge-maniac.is-emerald { background: rgba(16, 185, 129, .12); color: #047857; }
html.light .badge-maniac.is-rose { background: rgba(244, 63, 94, .12); color: #be123c; }
html.light .quote-line { background: #fff; border-color: #e2e8f0; }
.btn-ghost-maniac.is-active-ghost { background: rgba(148, 163, 184, .16); border-color: #64748b; }
.field-error { font-size: 11px; color: #f87171; margin-top: 0.25rem; }
.field-inp.is-invalid { border-color: #f87171; }

.glass {
  background: rgba(15, 23, 42, .96);
  border: 1px solid rgba(51, 65, 85, .65);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}
html.light .glass { background: rgba(255, 255, 255, .98); border-color: #e2e8f0; box-shadow: 0 12px 32px rgba(15, 23, 42, .12); }

.kpi-mini-ico {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .maniac-kpi-grid {
    display: flex !important;
    grid-template-columns: none !important;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.625rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    touch-action: pan-x;
    margin-left: -0.875rem;
    margin-right: -0.875rem;
    padding-left: 0.875rem;
    padding-right: 0.875rem;
  }

  .maniac-kpi-grid::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .maniac-kpi-grid > .kpi-mini {
    flex: 0 0 calc((100% - 0.625rem) / 2);
    min-width: calc((100% - 0.625rem) / 2);
    max-width: calc((100% - 0.625rem) / 2);
    scroll-snap-align: start;
    scroll-snap-stop: always;
    padding: 0.625rem 0.7rem;
    gap: 0.5rem;
    align-items: center;
  }

  .maniac-kpi-grid > .kpi-mini .kpi-mini-ico {
    width: 2rem;
    height: 2rem;
  }

  .maniac-kpi-grid > .kpi-mini .kpi-mini-ico svg,
  .maniac-kpi-grid > .kpi-mini .kpi-mini-ico i {
    width: 0.875rem;
    height: 0.875rem;
  }

  .maniac-kpi-grid > .kpi-mini .kpi-mini-label {
    font-size: 9px;
    line-height: 1.25;
  }

  .maniac-kpi-grid > .kpi-mini .kpi-mini-value {
    font-size: 0.95rem;
    margin-top: 0.125rem;
  }

  .maniac-kpi-grid > .kpi-mini .kpi-mini-sub {
    font-size: 9px;
    margin-top: 0.125rem;
    line-height: 1.25;
  }

  #maniac-main:has(#view-client-detail) {
    padding: 0.75rem 0.875rem calc(3.25rem + env(safe-area-inset-bottom, 0px));
  }

  #view-client-detail .maniac-client-show-actions {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  #view-client-detail .maniac-client-show-actions::-webkit-scrollbar {
    display: none;
  }

  #view-client-detail .maniac-client-show-actions .btn-create-cta,
  #view-client-detail .maniac-client-show-actions .btn-ghost-maniac {
    flex-shrink: 0;
    height: 2rem;
    min-height: 2rem;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    font-size: 12px;
    white-space: nowrap;
  }

  #view-client-detail .maniac-client-show-actions .btn-create-cta .btn-create-cta__icon {
    width: 0.8rem;
    height: 0.8rem;
  }

  #view-client-detail .maniac-client-show-edit {
    width: 2rem;
    padding: 0;
  }

  #view-client-detail .maniac-client-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: -0.875rem;
    margin-right: -0.875rem;
    padding-left: 0.875rem;
    padding-right: 0.875rem;
  }

  #view-client-detail .maniac-client-tabs::-webkit-scrollbar {
    display: none;
  }
}

#view-client-detail .maniac-client-show-actions .btn-ghost-maniac {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

@media (min-width: 640px) {
  #view-client-detail .maniac-client-show-actions .btn-ghost-maniac,
  #view-client-detail .maniac-client-show-actions .btn-create-cta {
    height: 2.25rem;
    min-height: 2.25rem;
  }

  #view-client-detail .maniac-client-show-edit {
    width: 2.25rem;
    padding: 0;
  }
}

.maniac-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #1e293b;
  overflow: hidden;
}
.maniac-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
}

.maniac-tag-chip {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 6px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 500;
  border: 1px solid rgba(30, 41, 59, .9);
  color: #94a3b8;
}

.maniac-segmented-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(30, 41, 59, .8);
  color: #94a3b8;
  text-decoration: none;
}
.maniac-segmented-btn.is-active {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

.maniac-doc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0.5rem;
  font-size: 11px;
  font-weight: 600;
  color: #ddd6fe;
  background: rgba(139, 92, 246, .1);
  border: 1px solid rgba(139, 92, 246, .25);
  border-radius: 6px;
  padding: 4px 8px;
  text-decoration: none;
  max-width: 100%;
}
.maniac-doc-chip.is-cyan { color: #a5f3fc; background: rgba(6, 182, 212, .1); border-color: rgba(6, 182, 212, .25); }
.maniac-doc-chip.is-amber { color: #fde68a; background: rgba(245, 158, 11, .1); border-color: rgba(245, 158, 11, .25); }
.maniac-doc-chip:hover { filter: brightness(1.08); }

.maniac-empty-ico {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(51, 65, 85, .35);
  display: grid;
  place-items: center;
}

.maniac-combo-option.is-selected { background: rgba(124, 58, 237, .15); }

.no-zoom, input, select, textarea, [contenteditable="true"] { font-size: 13px !important; line-height: 1.35; }
.wysiwyg:empty:before { content: attr(data-placeholder); color: #64748b; pointer-events: none; }
.wysiwyg ul { list-style: disc; padding-left: 1.1rem; margin: .35rem 0; }
.wysiwyg ol { list-style: decimal; padding-left: 1.1rem; margin: .35rem 0; }
.wysiwyg h2 { font-size: .95rem; font-weight: 700; margin: .15rem 0; }
.wysiwyg p { margin: .4rem 0; }
.wysiwyg a { color: #22d3ee; text-decoration: underline; }
html.light .wysiwyg a { color: #0e7490; }

.task-kanban-board {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  align-items: flex-start;
}
.task-kanban-col {
  min-width: 260px;
  width: 260px;
  flex: 1 0 auto;
  min-height: 320px;
}

.crm-kanban-col { min-width: 250px; width: 250px; }
#crm-kanban-board { overflow-x: auto; }
.lead-card .crm-stage-combo .field-inp { font-size: 11px; }
.crm-stage-combo .maniac-combo-panel { max-height: min(16rem, 70vh); }
.lead-card-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  width: 24px;
  border-radius: 6px;
  border: 1px solid rgba(51, 65, 85, .8);
  background: #080c14;
  color: #94a3b8;
}
.lead-card-ico:hover { color: #67e8f9; border-color: #475569; }
.lead-highlight, .lead-highlight-row {
  box-shadow: 0 0 0 2px rgba(6, 182, 212, .55);
  transition: box-shadow .3s ease;
}

.maniac-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, .65);
}
.maniac-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 71;
  width: min(100%, 420px);
  height: 100%;
  background: #0f172a;
  border-left: 1px solid rgba(51, 65, 85, .65);
  box-shadow: -12px 0 40px rgba(0, 0, 0, .35);
  transform: translateX(100%);
  transition: transform .2s ease;
  overflow-y: auto;
}
.maniac-drawer.is-open { transform: translateX(0); }
html.light .maniac-drawer { background: #fff; }

.client-tab-btn.is-active {
  background: #f4f4f5;
  border-color: #f4f4f5;
  color: #0f172a;
}

html.light .client-tab-btn.is-active {
  background: #000;
  border-color: #000;
  color: #fff;
}
.maniac-switch { position: relative; }
.maniac-switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.maniac-switch-track {
  display: block;
  width: 2.5rem;
  height: 1.35rem;
  border-radius: 9999px;
  background: rgba(51, 65, 85, .9);
  border: 1px solid rgba(71, 85, 105, .8);
  transition: background .15s ease, border-color .15s ease;
  position: relative;
}
.maniac-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  border-radius: 9999px;
  background: #e2e8f0;
  transition: transform .15s ease;
}
.maniac-switch-input:focus-visible + .maniac-switch-track {
  outline: 2px solid #7c3aed;
  outline-offset: 2px;
}
.maniac-switch-input:checked + .maniac-switch-track {
  background: #7c3aed;
  border-color: #6d28d9;
}
.maniac-switch-input:checked + .maniac-switch-track::after {
  transform: translateX(1.1rem);
}

.client-tab-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(30, 41, 59, .8);
  color: #94a3b8;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
}

/* —— Login (guest) —— */
.auth-login-shell {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  color: #fff;
  background-color: #101012;
  background-image:
    linear-gradient(155deg, #1e1e22 0%, #141416 45%, #0a0a0c 100%),
    radial-gradient(ellipse 110% 75% at 50% -12%, rgba(255, 255, 255, 0.14) 0%, transparent 58%),
    radial-gradient(ellipse 60% 55% at 95% 18%, rgba(255, 255, 255, 0.07) 0%, transparent 52%),
    radial-gradient(ellipse 55% 50% at 4% 78%, rgba(255, 255, 255, 0.06) 0%, transparent 54%),
    radial-gradient(ellipse 90% 65% at 50% 105%, rgba(255, 255, 255, 0.05) 0%, transparent 52%);
}

.auth-login-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      ellipse 78% 62% at 50% 36%,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.035) 40%,
      transparent 70%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 28%);
}

.auth-login-shell::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 125% 88% at 50% 50%, transparent 44%, rgba(0, 0, 0, 0.38) 100%);
}

.auth-login-shell__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 22rem;
  transform: translateY(clamp(-1.25rem, -3.5vh, -2.75rem));
}

.auth-login-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1rem 1.25rem 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #6b6b6b;
}

.auth-login-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.auth-login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.auth-login-brand__mark {
  width: 5rem;
  height: 5rem;
  border-radius: 1rem;
  object-fit: cover;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.auth-login-card {
  position: relative;
  overflow: hidden;
  color: #0a0a0a;
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  background: linear-gradient(165deg, #ffffff 0%, #f4f4f5 38%, #e8e8ea 100%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 -1px 0 rgba(0, 0, 0, 0.04) inset,
    0 28px 56px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.25);
}

.auth-login-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(255, 255, 255, 0.98) 0%, transparent 62%),
    radial-gradient(ellipse 45% 40% at 100% 0%, rgba(255, 255, 255, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 0% 100%, rgba(0, 0, 0, 0.04) 0%, transparent 60%);
}

.auth-login-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.08) 22%,
    transparent 45%
  );
}

.auth-login-card > * {
  position: relative;
  z-index: 1;
}

.auth-login-alert {
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #7f1d1d;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.auth-login-form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.auth-login-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-login-label {
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #525252;
}

.auth-login-field {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.875rem;
  font-size: 1rem;
  line-height: 1.35;
  color: #0a0a0a !important;
  background: #fafafa !important;
  border: 1px solid #d4d4d4 !important;
  border-radius: 0.625rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-login-field::placeholder {
  color: #a3a3a3;
}

.auth-login-field:focus {
  outline: none;
  background: #fff !important;
  border-color: #000 !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08) !important;
}

.auth-login-password-wrap {
  position: relative;
}

.auth-login-field--password {
  padding-right: 2.75rem;
}

.auth-login-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: #737373;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.15s ease, background 0.15s ease;
}

.auth-login-password-toggle:hover {
  color: #0a0a0a;
  background: rgba(0, 0, 0, 0.05);
}

.auth-login-password-toggle:focus-visible {
  outline: none;
  color: #0a0a0a;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.auth-login-password-toggle__icon--hide {
  display: none;
}

.auth-login-password-wrap.is-password-visible .auth-login-password-toggle__icon--show {
  display: none;
}

.auth-login-password-wrap.is-password-visible .auth-login-password-toggle__icon--hide {
  display: block;
}

.auth-login-remember {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #525252;
  cursor: pointer;
  user-select: none;
}

.auth-login-checkbox {
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
  accent-color: #000;
  border-radius: 0.25rem;
}

.auth-login-submit {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  background: #000;
  color: #fff;
  font-weight: 600;
  border-radius: 0.625rem;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.25;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.auth-login-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 55%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 38%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0.06) 62%,
    transparent 100%
  );
  transform: translateX(-130%) skewX(-20deg);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-login-submit:hover {
  background: #141414;
}

.auth-login-submit:hover::before {
  transform: translateX(240%) skewX(-20deg);
}

.auth-login-submit:active {
  transform: scale(0.99);
}

@media (prefers-reduced-motion: reduce) {
  .auth-login-submit::before {
    display: none;
  }
}

@media (hover: none) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
  select,
  textarea,
  [contenteditable="true"],
  .wysiwyg,
  .field-inp {
    font-size: 16px !important;
    line-height: 1.35;
  }
}

@media (min-width: 768px) and (hover: hover) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
  select,
  textarea,
  [contenteditable="true"],
  .no-zoom {
    font-size: 13px !important;
    line-height: 1.35;
  }
}

@media (min-width: 768px) {
  .maniac-sidebar--desktop {
    display: flex !important;
  }
}

/* —— Login (guest) —— */
.auth-login-shell {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  color: #fff;
  background-color: #101012;
  background-image:
    linear-gradient(155deg, #1e1e22 0%, #141416 45%, #0a0a0c 100%),
    radial-gradient(ellipse 110% 75% at 50% -12%, rgba(255, 255, 255, 0.14) 0%, transparent 58%),
    radial-gradient(ellipse 60% 55% at 95% 18%, rgba(255, 255, 255, 0.07) 0%, transparent 52%),
    radial-gradient(ellipse 55% 50% at 4% 78%, rgba(255, 255, 255, 0.06) 0%, transparent 54%),
    radial-gradient(ellipse 90% 65% at 50% 105%, rgba(255, 255, 255, 0.05) 0%, transparent 52%);
}

.auth-login-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(
      ellipse 78% 62% at 50% 36%,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0.035) 40%,
      transparent 70%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, transparent 28%);
}

.auth-login-shell::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse 125% 88% at 50% 50%, transparent 44%, rgba(0, 0, 0, 0.38) 100%);
}

.auth-login-shell__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 22rem;
  transform: translateY(clamp(-1.25rem, -3.5vh, -2.75rem));
}

.auth-login-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1rem 1.25rem 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #6b6b6b;
}

.auth-login-page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.auth-login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.auth-login-brand__mark {
  width: 5rem;
  height: 5rem;
  border-radius: 1rem;
  object-fit: cover;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.auth-login-card {
  position: relative;
  overflow: hidden;
  color: #0a0a0a;
  border-radius: 1.25rem;
  padding: 1.75rem 1.5rem;
  background: linear-gradient(165deg, #ffffff 0%, #f4f4f5 38%, #e8e8ea 100%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 1px 0 rgba(255, 255, 255, 0.65) inset,
    0 -1px 0 rgba(0, 0, 0, 0.04) inset,
    0 28px 56px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.25);
}

.auth-login-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(255, 255, 255, 0.98) 0%, transparent 62%),
    radial-gradient(ellipse 45% 40% at 100% 0%, rgba(255, 255, 255, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 0% 100%, rgba(0, 0, 0, 0.04) 0%, transparent 60%);
}

.auth-login-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55) 0%,
    rgba(255, 255, 255, 0.08) 22%,
    transparent 45%
  );
}

.auth-login-card > * {
  position: relative;
  z-index: 1;
}

.auth-login-alert {
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.625rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: #7f1d1d;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.auth-login-form {
  display: flex;
  flex-direction: column;
  gap: 1.125rem;
}

.auth-login-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-login-label {
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #525252;
}

.auth-login-field {
  width: 100%;
  box-sizing: border-box;
  padding: 0.75rem 0.875rem;
  font-size: 1rem;
  line-height: 1.35;
  color: #0a0a0a !important;
  background: #fafafa !important;
  border: 1px solid #d4d4d4 !important;
  border-radius: 0.625rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.auth-login-field::placeholder {
  color: #a3a3a3;
}

.auth-login-field:focus {
  outline: none;
  background: #fff !important;
  border-color: #000 !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08) !important;
}

.auth-login-password-wrap {
  position: relative;
}

.auth-login-field--password {
  padding-right: 2.75rem;
}

.auth-login-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  color: #737373;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 0.15s ease, background 0.15s ease;
}

.auth-login-password-toggle:hover {
  color: #0a0a0a;
  background: rgba(0, 0, 0, 0.05);
}

.auth-login-password-toggle:focus-visible {
  outline: none;
  color: #0a0a0a;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
}

.auth-login-password-toggle__icon--hide {
  display: none;
}

.auth-login-password-wrap.is-password-visible .auth-login-password-toggle__icon--show {
  display: none;
}

.auth-login-password-wrap.is-password-visible .auth-login-password-toggle__icon--hide {
  display: block;
}

.auth-login-remember {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #525252;
  cursor: pointer;
  user-select: none;
}

.auth-login-checkbox {
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
  flex-shrink: 0;
  accent-color: #000;
  border-radius: 0.25rem;
}

.auth-login-submit {
  position: relative;
  overflow: hidden;
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  background: #000;
  color: #fff;
  font-weight: 600;
  border-radius: 0.625rem;
  padding: 0.875rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.25;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.auth-login-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 55%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 38%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0.06) 62%,
    transparent 100%
  );
  transform: translateX(-130%) skewX(-20deg);
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.auth-login-submit:hover {
  background: #141414;
}

.auth-login-submit:hover::before {
  transform: translateX(240%) skewX(-20deg);
}

.auth-login-submit:active {
  transform: scale(0.99);
}

@media (prefers-reduced-motion: reduce) {
  .auth-login-submit::before {
    display: none;
  }
}

@media (hover: none) and (pointer: coarse) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
  select,
  textarea,
  [contenteditable="true"],
  .wysiwyg,
  .field-inp {
    font-size: 16px !important;
    line-height: 1.35;
  }
}

@media (min-width: 768px) and (hover: hover) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="range"]):not([type="color"]),
  select,
  textarea,
  [contenteditable="true"],
  .no-zoom {
    font-size: 13px !important;
    line-height: 1.35;
  }
}

@media (min-width: 768px) {
  .maniac-sidebar--desktop {
    display: flex !important;
  }
}
