:root {
  --text: #ffffff;
  --muted: #b7c3d9;
  --muted-2: #8fa4c7;
  --good: #28d07f;
  --warning: #f5b432;
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);

  --accent: #4da3ff;
  --accent-2: #1d63ff;
  --accent-soft: rgba(77, 163, 255, 0.12);
  --accent-border: rgba(29, 99, 255, 0.3);

  --page-start: #08111f;
  --page-end: #050a14;
  --page-glow-1: rgba(77, 163, 255, 0.16);
  --page-glow-2: rgba(29, 99, 255, 0.12);

  --topbar-start: rgba(9, 24, 48, 0.98);
  --topbar-mid: rgba(10, 21, 42, 0.98);
  --topbar-end: rgba(7, 16, 34, 0.98);

  --section-start: rgba(23, 61, 119, 0.92);
  --section-end: rgba(12, 34, 74, 0.92);

  --panel-start: rgba(6, 13, 28, 0.98);
  --panel-end: rgba(4, 9, 20, 0.98);

  --card-start: rgba(10, 24, 46, 1);
  --card-end: rgba(6, 14, 28, 1);

  --button-bg: linear-gradient(135deg, rgba(18, 48, 97, 0.9), rgba(10, 29, 66, 0.9));
  --field-bg: rgba(5, 12, 25, 0.96);
  --pill-bg: rgba(77, 163, 255, 0.12);
}

body[data-theme="blue"] {
  --accent: #4da3ff;
  --accent-2: #1d63ff;
  --accent-soft: rgba(77, 163, 255, 0.12);
  --accent-border: rgba(29, 99, 255, 0.3);

  --page-start: #08111f;
  --page-end: #050a14;
  --page-glow-1: rgba(77, 163, 255, 0.16);
  --page-glow-2: rgba(29, 99, 255, 0.12);

  --topbar-start: rgba(9, 24, 48, 0.98);
  --topbar-mid: rgba(10, 21, 42, 0.98);
  --topbar-end: rgba(7, 16, 34, 0.98);

  --section-start: rgba(23, 61, 119, 0.92);
  --section-end: rgba(12, 34, 74, 0.92);

  --panel-start: rgba(6, 13, 28, 0.98);
  --panel-end: rgba(4, 9, 20, 0.98);

  --card-start: rgba(10, 24, 46, 1);
  --card-end: rgba(6, 14, 28, 1);

  --button-bg: linear-gradient(135deg, rgba(18, 48, 97, 0.9), rgba(10, 29, 66, 0.9));
  --field-bg: rgba(5, 12, 25, 0.96);
  --pill-bg: rgba(77, 163, 255, 0.12);
}

body[data-theme="mono"] {
  --accent: #ffffff;
  --accent-2: #8c8c94;
  --accent-soft: rgba(255, 255, 255, 0.08);
  --accent-border: rgba(255, 255, 255, 0.2);

  --page-start: #111214;
  --page-end: #090a0c;
  --page-glow-1: rgba(255, 255, 255, 0.05);
  --page-glow-2: rgba(255, 255, 255, 0.03);

  --topbar-start: rgba(19, 19, 23, 0.98);
  --topbar-mid: rgba(22, 22, 26, 0.98);
  --topbar-end: rgba(18, 18, 24, 0.98);

  --section-start: rgba(40, 40, 45, 0.92);
  --section-end: rgba(20, 20, 24, 0.92);

  --panel-start: rgba(7, 8, 10, 0.98);
  --panel-end: rgba(5, 6, 8, 0.98);

  --card-start: rgba(16, 16, 18, 1);
  --card-end: rgba(8, 8, 10, 1);

  --button-bg: rgba(11, 12, 15, 0.92);
  --field-bg: rgba(4, 5, 7, 0.96);
  --pill-bg: rgba(255, 255, 255, 0.05);
}

body[data-theme="redblue"] {
  --accent: #ff4d5e;
  --accent-2: #2d7dff;
  --accent-soft: rgba(255, 77, 94, 0.12);
  --accent-border: rgba(91, 126, 255, 0.3);

  --page-start: #170b10;
  --page-end: #090d16;
  --page-glow-1: rgba(255, 77, 94, 0.16);
  --page-glow-2: rgba(45, 125, 255, 0.14);

  --topbar-start: rgba(40, 14, 20, 0.98);
  --topbar-mid: rgba(19, 22, 34, 0.98);
  --topbar-end: rgba(13, 25, 52, 0.98);

  --section-start: rgba(70, 18, 28, 0.9);
  --section-end: rgba(17, 44, 92, 0.9);

  --panel-start: rgba(19, 10, 14, 0.98);
  --panel-end: rgba(8, 11, 20, 0.98);

  --card-start: rgba(31, 12, 17, 1);
  --card-end: rgba(9, 13, 24, 1);

  --button-bg: linear-gradient(135deg, rgba(66, 19, 29, 0.9), rgba(17, 38, 84, 0.9));
  --field-bg: rgba(11, 12, 19, 0.96);
  --pill-bg: rgba(255, 77, 94, 0.12);
}

body[data-theme="pinkpurple"] {
  --accent: #ff69c7;
  --accent-2: #8a4dff;
  --accent-soft: rgba(255, 105, 199, 0.12);
  --accent-border: rgba(138, 77, 255, 0.3);

  --page-start: #170913;
  --page-end: #0d0a1a;
  --page-glow-1: rgba(255, 105, 199, 0.16);
  --page-glow-2: rgba(138, 77, 255, 0.16);

  --topbar-start: rgba(46, 15, 34, 0.98);
  --topbar-mid: rgba(30, 18, 44, 0.98);
  --topbar-end: rgba(23, 12, 52, 0.98);

  --section-start: rgba(88, 26, 68, 0.9);
  --section-end: rgba(60, 24, 110, 0.9);

  --panel-start: rgba(20, 10, 18, 0.98);
  --panel-end: rgba(12, 8, 20, 0.98);

  --card-start: rgba(33, 13, 28, 1);
  --card-end: rgba(14, 10, 28, 1);

  --button-bg: linear-gradient(135deg, rgba(84, 28, 68, 0.9), rgba(58, 28, 112, 0.9));
  --field-bg: rgba(14, 10, 20, 0.96);
  --pill-bg: rgba(255, 105, 199, 0.12);
}

body[data-theme="ice"] {
  --accent: #8ae7ff;
  --accent-2: #1dd8ff;
  --accent-soft: rgba(29, 216, 255, 0.14);
  --accent-border: rgba(29, 216, 255, 0.3);

  --page-start: #071217;
  --page-end: #071018;
  --page-glow-1: rgba(138, 231, 255, 0.16);
  --page-glow-2: rgba(29, 216, 255, 0.14);

  --topbar-start: rgba(11, 30, 38, 0.98);
  --topbar-mid: rgba(11, 26, 34, 0.98);
  --topbar-end: rgba(8, 22, 31, 0.98);

  --section-start: rgba(18, 67, 80, 0.9);
  --section-end: rgba(10, 56, 71, 0.9);

  --panel-start: rgba(8, 18, 22, 0.98);
  --panel-end: rgba(6, 14, 18, 0.98);

  --card-start: rgba(10, 24, 29, 1);
  --card-end: rgba(7, 16, 20, 1);

  --button-bg: linear-gradient(135deg, rgba(18, 71, 86, 0.9), rgba(8, 53, 68, 0.9));
  --field-bg: rgba(7, 18, 22, 0.96);
  --pill-bg: rgba(29, 216, 255, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  background:
    radial-gradient(circle at top left, var(--page-glow-1), transparent 26%),
    radial-gradient(circle at top right, var(--page-glow-2), transparent 22%),
    linear-gradient(180deg, var(--page-start) 0%, var(--page-end) 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

body {
  color-scheme: dark;
}

body.modal-open {
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.12);
}

button,
input,
textarea,
select,
a {
  font: inherit;
}

svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.app {
  min-height: 100vh;
  padding: 16px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(90deg, var(--topbar-start) 0%, var(--topbar-mid) 50%, var(--topbar-end) 100%);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 250px;
  flex: 0 0 auto;
}

.brand-favicon {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.brand-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 42px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--button-bg);
  color: #ebedf3;
  cursor: pointer;
  transition: 0.18s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  overflow: hidden;
  text-decoration: none;
}

.top-btn:hover,
.top-btn:focus-visible {
  border-color: var(--accent-border);
}

.top-btn--pill {
  padding: 0 11px;
}

.top-btn--pill span {
  max-width: 120px;
  opacity: 1;
  overflow: hidden;
  white-space: nowrap;
}

.top-btn--static {
  gap: 8px;
}

.top-btn--discord {
  background: linear-gradient(135deg, #5865f2, #404eed);
  border-color: transparent;
  color: #ffffff;
}

.top-btn--discord:hover,
.top-btn--discord:focus-visible {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.18);
}

.mode-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mode-label,
.theme-menu-title,
.theme-color-field,
.sidebar-desc,
.summary-label,
.copy-status,
.card-note {
  font-size: 12px;
}

.mode-label {
  color: var(--muted-2);
  font-weight: 700;
}

.mode-label.is-active {
  color: var(--accent);
}

.switch {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 26px;
  flex: 0 0 auto;
}

.switch input {
  display: none;
}

.switch span {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(82, 82, 92, 0.62);
  transition: 0.2s ease;
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  transition: 0.2s ease;
}

.switch input:checked + span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.switch input:checked + span::after {
  transform: translateX(22px);
}

.switch--compact {
  width: 44px;
  height: 24px;
}

.switch--compact span::after {
  width: 18px;
  height: 18px;
}

.switch--compact input:checked + span::after {
  transform: translateX(20px);
}

.theme-dropdown {
  position: relative;
}

.theme-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 100;
  width: 320px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel-start), var(--panel-end));
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.theme-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.theme-preset {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--button-bg);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.theme-preset:hover,
.theme-preset.is-active {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.theme-menu-divider {
  height: 1px;
  margin: 14px 0;
  background: rgba(255, 255, 255, 0.08);
}

.theme-custom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.theme-color-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
}

.theme-color-field input[type="color"] {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: transparent;
  padding: 4px;
  cursor: pointer;
}

.theme-apply-btn {
  width: 100%;
  margin-top: 12px;
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.quickbar {
  align-self: start;
  min-width: 0;
}

.quickbar-inner {
  position: sticky;
  top: 16px;
  width: 100%;
  height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel-start), var(--panel-end));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
  z-index: 20;
  overflow-y: auto;
  overflow-x: hidden;
}

.quickbar-inner::-webkit-scrollbar {
  width: 6px;
}

.quickbar-inner::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.quickbar-inner::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.12);
}

.quickbar-main {
  display: grid;
  gap: 10px;
}

.quickbar-bottom {
  margin-top: auto;
  display: grid;
  gap: 10px;
}

.quick-btn {
  width: 100%;
  justify-content: flex-start;
  min-height: 42px;
  padding: 0 12px;
}

.quick-btn--report {
  justify-content: flex-start;
}

.quickbar-update-box {
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--field-bg);
}

.quickbar-update-box--button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.quickbar-update-box--button:hover,
.quickbar-update-box--button:focus-visible {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.quickbar-update-label {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quickbar-update-date {
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.quickbar-update-hint {
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 700;
}

.content {
  min-width: 0;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.search-wrap {
  position: relative;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  color: var(--muted-2);
  pointer-events: none;
}

.search-wrap input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--field-bg);
  color: var(--text);
  outline: none;
}

.search-wrap input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.search-wrap input::placeholder {
  color: var(--muted-2);
}

.selected-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--pill-bg);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.catalog-section + .catalog-section {
  margin-top: 14px;
}

.section-title {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  margin-bottom: 10px;
  border-left: 4px solid var(--accent);
  border-radius: 0 16px 16px 0;
  background: linear-gradient(90deg, var(--section-start), var(--section-end));
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.card {
  position: relative;
  min-height: 132px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--card-start) 0%, var(--card-end) 100%);
  overflow: hidden;
  cursor: pointer;
  transition: 0.18s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 38%);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
}

.card.is-selected {
  border-color: var(--accent-border);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 0 0 1px var(--accent-border),
    0 18px 30px rgba(0, 0, 0, 0.28);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.card-para {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.card-link {
  color: var(--muted-2);
  font-size: 14px;
}

.card-name {
  min-height: 38px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
}

.card-fine {
  margin-bottom: 5px;
  color: var(--good);
  font-size: 14px;
  font-weight: 900;
}

.card-note {
  min-height: 18px;
  margin-bottom: 10px;
  line-height: 1.3;
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.card-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 22px;
  flex-wrap: wrap;
}

.star-on {
  color: var(--warning);
  font-size: 14px;
}

.star-off {
  color: rgba(255, 255, 255, 0.12);
  font-size: 14px;
}

.gray-wanted-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(5, 12, 24, 0.75);
}

.gray-btn {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 999px;
  background: rgba(39, 54, 82, 0.95);
  color: #dce7f9;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.gray-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.gray-count {
  min-width: 30px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 6px;
}

.sidebar.is-pinned {
  position: sticky;
  top: 16px;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.1);
}

.reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--button-bg);
  color: #d1d1d6;
  font-weight: 800;
  cursor: pointer;
}

.reset-btn:hover {
  border-color: var(--accent-border);
}

.panel {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel-start), var(--panel-end));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.panel-title,
.sidebar-name,
.field-title {
  font-size: 13px;
  font-weight: 800;
}

.panel-title {
  margin-bottom: 14px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.summary-box {
  padding: 16px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--field-bg);
  text-align: center;
}

.summary-value {
  font-size: 17px;
  font-weight: 900;
}

.summary-value .wanted-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.sidebar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-row:first-of-type {
  padding-top: 0;
  border-top: none;
}

.field-block {
  margin-top: 14px;
}

.field-input,
.textarea,
.fibco-field input,
.fibco-field textarea,
.fibco-law-picker textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--field-bg);
  color: var(--text);
  outline: none;
}

.field-input,
.fibco-field input,
select.field-input {
  height: 42px;
  padding: 0 12px;
}

.fibco-field textarea,
.fibco-law-picker textarea {
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
}

.field-input:focus,
.textarea:focus,
.fibco-field input:focus,
.fibco-field textarea:focus,
.fibco-law-picker textarea:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.textarea {
  min-height: 170px;
  padding: 12px;
  resize: vertical;
}

.textarea-large {
  min-height: 420px;
}

.textarea--compact {
  min-height: 54px;
  height: 54px;
  resize: none;
  overflow: hidden;
}

#aktenOutput {
  cursor: pointer;
}

.field-block--first {
  margin-top: 0;
}

.copy-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.copy-actions {
  display: flex;
  gap: 10px;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}

.copy-btn--secondary {
  border: 1px solid var(--border);
  background: var(--button-bg);
  color: #dce7f9;
}

.copy-btn--primary {
  border: none;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #04121e;
}

.warning-box {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 80, 80, 0.35);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(70, 12, 12, 0.92), rgba(40, 8, 8, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.warning-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 90, 90, 0.16);
  color: #ff7b7b;
  font-weight: 900;
}

.warning-title {
  color: #ff9b9b;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 2px;
}

.warning-text {
  color: #f0b7b7;
  font-size: 12px;
  line-height: 1.35;
}

.transport-fields {
  margin-top: 6px;
}

.side-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: end;
}

.side-plate-field {
  display: grid;
  gap: 6px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 14, 0.74);
  backdrop-filter: blur(7px);
  z-index: 999;
}

.hidden,
.is-hidden {
  display: none !important;
}

.modal {
  width: min(720px, 100%);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: linear-gradient(180deg, var(--panel-start), var(--panel-end));
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.45);
}

.modal-lg {
  width: min(900px, 100%);
}

.modal-xl {
  width: min(1200px, 100%);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title {
  font-size: 18px;
  font-weight: 900;
}

.modal-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--button-bg);
  color: white;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
}

.text-section + .text-section {
  margin-top: 16px;
}

.empty-card {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--field-bg);
  color: var(--muted);
}

.report-form {
  display: grid;
  gap: 14px;
}

.report-field {
  display: grid;
  gap: 6px;
}

.report-textarea {
  min-height: 160px;
}

.report-submit-btn {
  width: 100%;
  justify-content: center;
}

.report-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.leader-list {
  display: grid;
  gap: 10px;
}

.leader-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--field-bg);
}

.leader-org {
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.leader-info {
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.fibco-modal-body {
  display: grid;
  gap: 18px;
}

.fibco-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.fibco-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fibco-field label {
  color: #cedaf0;
  font-size: 13px;
  font-weight: 700;
}

.fibco-field--full {
  grid-column: 1 / -1;
}

.fibco-preview-wrap {
  display: grid;
  gap: 10px;
}

.fibco-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.fibco-law-picker {
  display: grid;
  gap: 10px;
}

.fibco-law-results {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.fibco-law-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--field-bg);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.fibco-law-option:hover {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.fibco-law-option-para {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.fibco-law-option-name {
  font-size: 13px;
  font-weight: 700;
}

.fibco-law-selected-wrap {
  display: grid;
  gap: 8px;
}

.fibco-mini-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.fibco-law-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 120px;
  overflow-y: auto;
  padding-right: 4px;
}

.fibco-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--accent-border);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.fibco-chip button {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  cursor: pointer;
}

.fibco-chip button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.anwalt-section + .anwalt-section {
  margin-top: 18px;
}

.anwalt-section-title {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.anwalt-list {
  display: grid;
  gap: 8px;
}

.anwalt-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 140px 140px;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--field-bg);
}

.anwalt-row--head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.03);
}

.anwalt-row span {
  min-width: 0;
  word-break: break-word;
}

.settings-stack {
  display: grid;
  gap: 16px;
}

.settings-block {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: var(--field-bg);
}

.settings-block-title {
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-row:first-of-type {
  padding-top: 0;
  border-top: none;
}

.settings-label-group {
  display: grid;
  gap: 3px;
}

.theme-dropdown--modal {
  width: 100%;
}

.theme-dropdown--modal .theme-menu {
  position: static;
  top: auto;
  right: auto;
  width: 100%;
  margin-top: 12px;
}

.modal-blitzer {
  width: min(760px, 100%);
  border: 1px solid var(--accent-border);
  background:
    radial-gradient(circle at top left, var(--accent-soft), transparent 42%),
    linear-gradient(180deg, var(--panel-start), var(--panel-end));
}

.modal-header--blitzer {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-title--blitzer {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
}

.blitzer-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.modal-close--blitzer {
  border-color: var(--accent-border);
  color: var(--accent);
}

.modal-body--blitzer {
  display: grid;
  gap: 16px;
}

.blitzer-intro {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.blitzer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.blitzer-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.blitzer-field label {
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.blitzer-input {
  border-color: rgba(255, 255, 255, 0.08);
  background: var(--field-bg);
}

.blitzer-input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.blitzer-calc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #04121e;
  font-weight: 900;
  cursor: pointer;
}

.blitzer-calc-btn:hover {
  filter: brightness(1.04);
}

.blitzer-result-box,
.blitzer-summary-box {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--field-bg);
}

.blitzer-result-title,
.blitzer-summary-title,
.extra-info-title {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.blitzer-result-text,
.blitzer-summary-text,
.extra-info-text {
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-line;
}

.extra-info-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.extra-info-item {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.extra-info-item-title {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.extra-info-item-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-line;
}

.summary-info-mount {
  margin-top: 14px;
}

.blitzer-open-btn {
  width: 100%;
  justify-content: center;
  gap: 10px;
}

.update-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid var(--accent-border);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, var(--accent-soft), transparent 45%),
    linear-gradient(180deg, var(--panel-start), var(--panel-end));
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

.update-banner-copy {
  min-width: 0;
}

.update-banner-title {
  color: var(--accent);
  font-size: 14px;
  font-weight: 900;
  margin-bottom: 4px;
}

.update-banner-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.update-banner-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.update-changelog {
  display: grid;
  gap: 16px;
}

.update-version-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.update-version-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--pill-bg);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.update-version-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.update-change-list {
  display: grid;
  gap: 10px;
}

.update-change-item {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--field-bg);
}

.update-change-title {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
}

.update-change-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.update-confirm-btn {
  width: 100%;
  justify-content: center;
}

select.field-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 44px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
  color-scheme: dark;
}

select.field-input::-ms-expand {
  display: none;
}

select.field-input option {
  background: #0b1220;
  color: #ffffff;
}

@media (max-width: 1680px) {
  .cards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1500px) {
  .layout {
    grid-template-columns: 220px minmax(0, 1fr) 360px;
  }
}

@media (max-width: 1450px) {
  .cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1250px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .topbar-left,
  .topbar-right {
    flex-wrap: wrap;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .quickbar {
    order: -1;
  }

  .quickbar-inner {
    position: static;
    width: auto;
    min-height: auto;
    height: auto;
    max-height: none;
    top: auto;
    bottom: auto;
    overflow: visible;
  }

  .quickbar-main {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .quickbar-bottom {
    margin-top: 0;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .sidebar {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .sidebar.is-pinned {
    position: static;
  }

  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .fibco-grid,
  .blitzer-grid,
  .side-action-grid {
    grid-template-columns: 1fr;
  }

  .fibco-preview-head {
    flex-direction: column;
    align-items: stretch;
  }

  .theme-menu {
    right: auto;
    left: 0;
    width: min(320px, calc(100vw - 32px));
  }

  .update-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .update-banner-actions {
    justify-content: stretch;
  }

  .update-banner-actions .copy-btn {
    width: 100%;
  }
}

@media (max-width: 820px) {
  .search-row,
  .summary-grid,
  .copy-footer {
    grid-template-columns: 1fr;
  }

  .copy-footer {
    display: grid;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-row {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-row .mode-switch {
    justify-content: space-between;
  }
}

@media (max-width: 700px) {
  .anwalt-row,
  .leader-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .anwalt-row--head {
    display: none;
  }
}

@media (max-width: 560px) {
  .app {
    padding: 10px;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .theme-presets,
  .theme-custom-grid {
    grid-template-columns: 1fr;
  }

  .top-btn--pill span {
    font-size: 13px;
  }
}
