﻿:root {
  --bg: #05080d;
  --bg-soft: #0c1724;
  --panel: rgba(11, 18, 28, 0.86);
  --panel-strong: rgba(7, 12, 20, 0.96);
  --panel-border: rgba(74, 146, 218, 0.22);
  --text: #f4f7fb;
  --muted: #9eb6cd;
  --accent: #1769b1;
  --accent-strong: #0f5fa5;
  --accent-bright: #46a2ff;
  --secondary: rgba(255, 255, 255, 0.08);
  --secondary-text: #e8f2ff;
  --danger: #cf4d4d;
  --shadow: 0 24px 50px rgba(0, 0, 0, 0.38);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Bahnschrift, "Arial Narrow", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(23, 105, 177, 0.4), transparent 28%),
    radial-gradient(circle at top right, rgba(70, 162, 255, 0.18), transparent 20%),
    linear-gradient(180deg, #02050a 0%, var(--bg) 38%, var(--bg-soft) 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

.page-shell {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  padding: 28px;
  margin-bottom: 24px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(125deg, rgba(23, 105, 177, 0.16), transparent 40%),
    linear-gradient(160deg, rgba(7, 12, 20, 0.96), rgba(11, 18, 28, 0.92));
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(70, 162, 255, 0.22), transparent 68%);
  pointer-events: none;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 22px;
  width: 100%;
  min-width: 0;
}

.hero-brand > :last-child {
  flex: 1;
  min-width: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(74, 146, 218, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.brand-logo {
  display: block;
  width: min(380px, 28vw);
  min-width: 220px;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.24));
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--accent-bright);
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 700;
}

.hero h1,
.panel h2,
.panel h3 {
  margin: 0;
}

.hero-copy {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.hero .eyebrow {
  margin-bottom: 12px;
  font-size: 1.32rem;
  letter-spacing: 0.16em;
}

.hero h1 {
  font-size: clamp(2.7rem, 4vw, 4rem);
  line-height: 1.02;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.site-footer {
  margin-top: 28px;
  padding: 18px 16px 16px;
  border-top: 1px solid rgba(74, 146, 218, 0.14);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}

.site-footer__logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.site-footer__logo-frame {
  width: 210px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(12, 23, 36, 0.06);
}

.site-footer__logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 6px;
}

.site-footer__logo-frame--vettari {
  padding: 6px 10px;
}

.site-footer__logo-frame--webhaus {
  padding: 10px 16px;
}

.site-footer__text {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.tabs-subtle {
  margin-bottom: 20px;
}

.tab-button {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(74, 146, 218, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  box-shadow: none;
  text-align: center;
}

.tab-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.tab-button.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(9, 69, 121, 0.32);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.users-editor-table input[type="email"],
.users-editor-table select,
.editor-table input[type="text"],
.editor-table input[type="email"],
.editor-table input[type="date"],
.editor-table select {
  width: 100%;
}

.users-editor-table th,
.users-editor-table td,
.editor-table th,
.editor-table td {
  white-space: nowrap;
}

.editor-filter-row th {
  padding-top: 8px;
  padding-bottom: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.editor-filter-row input {
  width: 100%;
  min-width: 140px;
}

.users-editor-table .checkbox-cell {
  text-align: center;
}

.users-editor-table .checkbox-cell input {
  width: 18px;
  height: 18px;
}

.users-editor-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.editor-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.panel {
  grid-column: span 6;
  padding: 24px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-bright));
}

.panel-wide {
  grid-column: 1 / -1;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.subpanel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  max-width: min(100%, 520px);
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(23, 105, 177, 0.14);
  color: #dcecff;
  border: 1px solid rgba(74, 146, 218, 0.22);
  font-size: 0.92rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack {
  display: grid;
  gap: 14px;
}

.auth-form {
  width: min(420px, 100%);
}

.context-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.form-grid {
  display: grid;
  gap: 14px;
}

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

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

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

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--secondary-text);
}

.checkbox-row {
  align-items: center;
  align-content: start;
}

.checkbox-row span {
  display: block;
}

.permissions-fieldset {
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(74, 146, 218, 0.18);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.permissions-fieldset legend {
  padding: 0 8px;
  color: var(--secondary-text);
  font-weight: 700;
}

.permissions-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.permission-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(74, 146, 218, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.checkbox-row input[type="checkbox"] {
  width: 22px;
  height: 22px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(74, 146, 218, 0.18);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

select {
  background-color: #1a2432;
  color: #f4f7fb;
}

select option {
  background: #f4f7fb;
  color: #17212e;
}

input::placeholder,
textarea::placeholder {
  color: #86a0ba;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(70, 162, 255, 0.18);
  border-color: rgba(70, 162, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(23, 105, 177, 0.12);
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

button,
.file-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  transition: transform 140ms ease, background 140ms ease, box-shadow 140ms ease;
  box-shadow: 0 10px 24px rgba(9, 69, 121, 0.32);
}

button:hover,
.file-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(16, 96, 166, 0.38);
}

button.secondary,
.file-button {
  background: var(--secondary);
  color: var(--secondary-text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

button.secondary:hover,
.file-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

button.ghost {
  background: transparent;
  color: var(--secondary-text);
  border: 1px solid rgba(74, 146, 218, 0.22);
}

button.danger {
  background: var(--danger);
  box-shadow: 0 10px 24px rgba(124, 27, 27, 0.28);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.file-button input {
  display: none;
}

.table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(74, 146, 218, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.bulk-actions {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(74, 146, 218, 0.1);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(23, 105, 177, 0.12);
}

tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

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

.split {
  display: grid;
  gap: 24px;
  grid-template-columns: 1.25fr 1fr;
  align-items: start;
}

.relations-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
}

.relations-layout--two {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.picker-panel {
  min-height: 100%;
  padding: 18px;
  border: 1px solid rgba(74, 146, 218, 0.14);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
}

.picker-list {
  display: grid;
  gap: 10px;
  max-height: 454px;
  overflow-y: auto;
  padding-right: 4px;
}

.picker-item {
  width: 100%;
  justify-content: flex-start;
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
  min-height: 64px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(74, 146, 218, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: var(--secondary-text);
  box-shadow: none;
}

.picker-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.picker-item.active {
  background: linear-gradient(135deg, rgba(23, 105, 177, 0.28), rgba(15, 95, 165, 0.32));
  border-color: rgba(70, 162, 255, 0.52);
  box-shadow: 0 10px 24px rgba(9, 69, 121, 0.24);
}

.picker-item span {
  color: var(--muted);
  font-size: 0.92rem;
}

.picker-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.operational-table-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.operational-table-filters {
  align-items: end;
}

.operational-action-button {
  width: 188px;
  max-width: 100%;
}

.operational-export-action {
  display: flex;
  justify-content: center;
}

.panel-heading .operational-action-button {
  width: 188px;
  flex: 0 0 auto;
  align-self: center;
}

.picker-empty {
  padding: 22px 14px;
}

.helper,
.muted {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.empty-state {
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 5, 10, 0.78);
  backdrop-filter: blur(4px);
}

.modal__card {
  position: relative;
  width: min(420px, calc(100% - 32px));
  margin: 12vh auto 0;
  padding: 24px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.modal__header {
  margin-bottom: 18px;
}

.top-spaced {
  margin-top: 28px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(23, 105, 177, 0.18);
  color: #cfe6ff;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid rgba(74, 146, 218, 0.18);
}

.status-pill.inactive {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-actions button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.88rem;
}

@media (max-width: 1100px) {
  .panel {
    grid-column: 1 / -1;
  }

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

  .context-grid,
  .permissions-grid,
  .form-grid-4,
  .form-grid-3,
  .form-grid-2,
  .split,
  .relations-layout {
    grid-template-columns: 1fr;
  }

  .picker-actions {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 14px;
  }

  .hero,
  .panel {
    padding: 18px;
    border-radius: 18px;
  }

  .site-footer {
    padding: 16px 12px 14px;
    border-radius: 0;
  }

  .hero {
    flex-direction: column;
  }

  .hero-brand {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-lockup {
    width: 100%;
    padding: 16px;
  }

  .brand-logo {
    width: 100%;
    min-width: 0;
  }

  .tabs {
    grid-template-columns: 1fr;
  }

  .site-footer__logos {
    gap: 12px;
  }

  .site-footer__logo-frame {
    width: min(210px, 100%);
    height: 58px;
  }

  .site-footer__logo-frame--vettari {
    padding: 6px 10px;
  }

  .site-footer__logo-frame--webhaus {
    padding: 10px 14px;
  }

  .hero-actions,
  .button-row {
    width: 100%;
  }

  button,
  .file-button {
    width: 100%;
  }
}
