:root {
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-accent: #15803d;
  --color-accent-soft: rgba(21, 128, 61, 0.08);
  --color-text-main: #112033;
  --color-text-muted: #6b7280;
  --color-border-subtle: #e2e8f0;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.08);
  --shadow-subtle: 0 1px 3px rgba(15, 23, 42, 0.05);
}

/* Dark Mode */
body[data-theme="dark"] {
  --color-bg: #1e293b;
  --color-surface: #334155;
  --color-accent: #4ade80;
  --color-accent-soft: rgba(74, 222, 128, 0.15);
  --color-text-main: #f1f5f9;
  --color-text-muted: #94a3b8;
  --color-border-subtle: #475569;
  --shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.3);
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.2);
}

body[data-theme="dark"] {
  background: radial-gradient(circle at top left, #1e293b 0, #0f172a 100%);
  color: var(--color-text-main);
}

body[data-theme="dark"] .login-overlay {
  background: radial-gradient(circle at top left, #1e293b 0, #0f172a 100%);
}

body[data-theme="dark"] .app-header {
  background: linear-gradient(to bottom, rgba(30, 41, 59, 0.95), rgba(30, 41, 59, 0.9));
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

body[data-theme="dark"] .dl-timeline,
body[data-theme="dark"] .dl-timeline-lane-labels-wrap {
  background: var(--color-surface);
}

body[data-theme="dark"] .dl-lane-labels-toggle-bar {
  background: var(--color-surface);
  color: #94a3b8;
  border-color: var(--color-border-subtle);
}

body[data-theme="dark"] .dl-timeline-year-display {
  color: var(--color-text-main);
}

body[data-theme="dark"] .dl-help-popup {
  background: #475569;
  border-color: rgba(148, 163, 184, 0.3);
}

body[data-theme="dark"] .dl-help-popup-header,
body[data-theme="dark"] .dl-help-popup-body h1,
body[data-theme="dark"] .dl-help-popup-body h2,
body[data-theme="dark"] .dl-help-popup-body h3 {
  color: #fef3c7;
}

body[data-theme="dark"] .dl-help-popup-body {
  color: #e2e8f0;
}

body[data-theme="dark"] .dl-help-popup-close {
  color: #fef3c7;
}

body[data-theme="dark"] .gantt-day-layer,
body[data-theme="dark"] .dl-timeline-track {
  --gantt-weekend: rgba(71, 85, 105, 0.4);
  --gantt-holiday: rgba(100, 116, 139, 0.5);
}

body[data-theme="dark"] .card {
  background: var(--color-surface);
  border-color: var(--color-border-subtle);
}

body[data-theme="dark"] .result-box {
  background: rgba(30, 41, 59, 0.6);
  border-color: var(--color-border-subtle);
}

body[data-theme="dark"] input.blocks-name-input,
body[data-theme="dark"] input.blocks-duration-input,
body[data-theme="dark"] .dl-timeline-lane-labels-input {
  background: #1e293b;
  border-color: var(--color-border-subtle);
  color: var(--color-text-main);
}

body[data-theme="dark"] .milestone-blocks-table-wrap,
body[data-theme="dark"] .milestone-blocks-table {
  background: var(--color-surface);
  border-color: var(--color-border-subtle);
}

body[data-theme="dark"] .milestone-blocks-table th,
body[data-theme="dark"] .milestone-blocks-table td {
  border-color: var(--color-border-subtle);
  color: var(--color-text-main);
}

body[data-theme="dark"] .primary-button {
  background: var(--color-surface);
  border-color: var(--color-border-subtle);
  color: var(--color-text-main);
}

body[data-theme="dark"] .primary-button:hover {
  background: #475569;
  border-color: var(--color-text-muted);
}

body[data-theme="dark"] .primary-button:active {
  background: #64748b;
}

body[data-theme="dark"] .dl-timeline-extend-btn {
  background: var(--color-surface);
  border-color: var(--color-border-subtle);
  color: var(--color-text-muted);
}

body[data-theme="dark"] .dl-timeline-extend-btn:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 13px;
  background: radial-gradient(circle at top left, #eef2ff 0, #f9fafb 45%, #f5f7fb 100%);
  color: var(--color-text-main);
  -webkit-font-smoothing: antialiased;
}

/* Login-Overlay (Passwortschutz) */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top left, #eef2ff 0, #f9fafb 45%, #f5f7fb 100%);
  padding: 16px;
}
.login-overlay[aria-hidden="true"] {
  display: none;
}
.login-box {
  width: 100%;
  max-width: 360px;
  padding: 32px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border-subtle);
}
.login-title {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 800;
  text-align: center;
}
.login-title .app-logo-part { color: #b91c1c; }
.login-title .app-logo-strong {
  background: linear-gradient(135deg, #b91c1c 0%, #ea580c 50%, #f97316 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-hint {
  margin: 0 0 20px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-main);
  box-sizing: border-box;
}
.login-input:focus {
  outline: none;
  border-color: #ea580c;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}
.login-btn {
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #b91c1c 0%, #ea580c 100%);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.1s ease;
}
.login-btn:hover {
  opacity: 0.95;
}
.login-btn:active {
  transform: scale(0.99);
}
.login-error {
  margin: 12px 0 0;
  min-height: 20px;
  font-size: 13px;
  color: #b91c1c;
  text-align: center;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.9),
      rgba(255, 255, 255, 0.8)
    );
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* dateLogic: gleiches Layout, Branding in Grün */
body[data-app="vorkon"] .app-title-center .app-logo.app-logo-vorkon {
  background: linear-gradient(135deg, #15803d 0%, #22c55e 45%, #4ade80 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body[data-app="vorkon"] .hcv-version {
  background: linear-gradient(135deg, #15803d 0%, #22c55e 45%, #4ade80 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

body[data-app="vorkon"] .header-menu-trigger {
  color: var(--color-text-muted);
  border-color: rgba(22, 163, 74, 0.12);
}

body[data-app="vorkon"] .header-menu-trigger:hover,
body[data-app="vorkon"] .header-menu-group.open .header-menu-trigger {
  color: #15803d;
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.25);
}

body[data-app="vorkon"] .header-subnav a:hover,
body[data-app="vorkon"] .header-subnav a.active {
  color: #15803d;
  background: rgba(22, 163, 74, 0.08);
}

/* App-Umschalter: nur aktives Logo anzeigen */
body[data-app="vorkon"] .app-logo-hcv-wrap {
  display: none;
}

body[data-app="hcv"] .app-logo-vorkon-wrap {
  display: none;
}

.app-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 12px;
}

.app-switcher a {
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 500;
  transition: background 0.16s ease, color 0.16s ease;
}

.app-switcher a:hover {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.app-switcher a.app-switcher-active {
  color: var(--color-accent);
  font-weight: 700;
  pointer-events: none;
}

body[data-app="vorkon"] .app-switcher a:hover {
  color: #15803d;
  background: rgba(22, 163, 74, 0.08);
}

body[data-app="vorkon"] .app-switcher a.app-switcher-active {
  color: #15803d;
  background: transparent;
}

.app-switcher-sep {
  color: var(--color-border-subtle);
  font-weight: 300;
  user-select: none;
}

.app-title {
  max-width: 1040px;
  margin: 0 auto;
  padding: 8px 20px 6px;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  color: var(--color-accent);
}

.app-title-center {
  justify-content: center;
}

.app-title-center .app-logo {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 1.35rem;
  line-height: 27px;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: linear-gradient(135deg, #15803d 0%, #22c55e 45%, #4ade80 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: auto;
  height: auto;
  flex-shrink: 0;
  display: inline-block;
}

.app-title-center .app-logo .app-logo-part {
  font-weight: 400;
}

.app-title-center .app-logo .app-logo-strong {
  font-weight: 1000;
}

.app-title-center .logo-beta {
  font-size: 0.4em;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-left: 2px;
  background: linear-gradient(135deg, #15803d 0%, #22c55e 45%, #4ade80 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header-logo-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}
.header-logo-link:hover {
  opacity: 0.9;
}

.app-header-inner {
  position: relative;
  max-width: 1040px;
  margin: 0 auto;
  padding: 8px 20px 6px 12px;
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.app-header-inner .app-title.app-title-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  flex: none;
  justify-content: center;
  z-index: 2;
}

.header-app-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  z-index: 3;
}

.header-app-btn {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: rgba(0, 0, 0, 0.06);
  border: 1px solid var(--color-border-subtle);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.header-app-btn:hover {
  background: rgba(0, 0, 0, 0.09);
  color: var(--color-text-main);
}

.header-app-btn.active {
  background: rgba(0, 0, 0, 0.1);
  color: var(--color-text-main);
  border-color: rgba(0, 0, 0, 0.12);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  margin-left: auto;
}

.hcv-version {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #15803d 0%, #22c55e 45%, #4ade80 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.header-menu-group {
  position: relative;
}

.header-menu-trigger {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: none;
  border: 1px solid rgba(31, 111, 235, 0.12);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-menu-trigger:hover,
.header-menu-group.open .header-menu-trigger {
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-color: rgba(31, 111, 235, 0.25);
}

.header-menu-trigger::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.header-menu-group.open .header-menu-trigger::after {
  transform: rotate(180deg);
}

.header-subnav {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 2px;
  min-width: 180px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 6px 0;
  z-index: 20;
  display: none;
}

.header-menu-group.open .header-subnav {
  display: block;
}

.header-subnav a {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 8px 14px;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease;
}

.header-subnav a:hover {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.header-subnav a.active {
  color: var(--color-accent);
  font-weight: 600;
  background: var(--color-accent-soft);
}

.header-nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 8px;
  transition: background 0.16s ease, color 0.16s ease;
}

.header-nav a:hover {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

.header-nav a.active {
  color: var(--color-accent);
  font-weight: 600;
}

.header-theme-toggle {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
  margin-left: 8px;
}

.header-theme-toggle:hover {
  color: var(--color-accent);
  background: var(--color-accent-soft);
  border-color: rgba(22, 163, 74, 0.25);
}

.app-main {
  flex: 1;
  max-width: 100%;
  margin: 0;
  padding: 12px 20px 32px;
  display: flex;
  flex-direction: column;
}

.app-main > .card {
  margin-top: 24px;
}

.tabs {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.9);
  padding: 4px;
  border-radius: 999px;
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(226, 232, 240, 0.9);
  gap: 2px;
}

.tab {
  border: none;
  background: transparent;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease, transform 0.08s ease;
}

.tab.active {
  background: var(--color-accent);
  color: #f9fafb;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.35);
}

.tab:not(.active):hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.03);
  color: var(--color-text-main);
}

.tab.disabled {
  opacity: 0.55;
  cursor: default;
}

.tab-panel {
  display: none;
  margin-top: 20px;
}

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

.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 24px 26px 26px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(226, 232, 240, 0.9);
}

.card-imds {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
}

.dl-main-cols {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr) minmax(0, 6fr);
  gap: 24px;
  align-items: stretch;
  margin-top: 24px;
}

.dl-col-empty {
  min-width: 0;
}

.milestone-blocks-box {
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-subtle);
}

.milestone-blocks-box .card-title {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1rem;
}

.milestone-blocks-table-wrap {
  overflow-x: auto;
  display: none;
}

.milestone-blocks-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.milestone-blocks-table th,
.milestone-blocks-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--color-border-subtle);
}

.milestone-blocks-table th {
  font-weight: 600;
  color: var(--color-text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.milestone-blocks-table td {
  color: var(--color-text-main);
}

.milestone-blocks-table tbody tr:last-child td {
  border-bottom: none;
}

.milestone-blocks-empty {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
  font-style: italic;
}

/* DateLogic Layout */
.dl-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: stretch;
}

.dl-layout-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
  align-items: start;
}

.dl-layout-three-col {
  display: grid;
  grid-template-columns: minmax(180px, 280px) auto;
  gap: 20px 24px;
  align-items: start;
}

/* Card hat nur noch Blöcke-Spalte; Spalte nutzt volle Breite */
.card-imds .dl-layout-three-col {
  grid-template-columns: 1fr;
}

.dl-col-blocks {
  min-width: 0;
  width: 100%;
}

.card-imds .dl-layout .dl-col-blocks {
  width: 100%;
  max-width: 100%;
}

div.dl-col {
  align-items: flex-start;
}

.dl-col-presets {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.dl-main-cols .dl-col-presets {
  min-height: 0;
}

.presets-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-sizing: border-box;
  box-shadow: var(--shadow-subtle);
}

.presets-section .card-title {
  margin-top: 0;
  margin-bottom: 24px;
}

.dl-presets-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 0;
  height: centred;
  max-width: 100%;
}

.presets-description {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  color: var(--color-text-muted, #64748b);
}

.dl-preset-btn {
  min-width: 160px;
  justify-content: center;
  text-align: center;
}

.dl-presets-reload-btn {
  margin-top: 8px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--color-text-muted);
  background: transparent;
  border: 1px solid var(--color-border-subtle);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.dl-presets-reload-btn:hover:not(:disabled) {
  color: var(--color-text-main);
  border-color: var(--color-text-muted);
  background: rgba(0, 0, 0, 0.03);
}

.dl-presets-reload-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

body[data-theme="dark"] .dl-presets-reload-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}

.dl-col .form {
  margin-bottom: 0;
}

.dl-col-blocks .form {
  width: 100%;
  min-width: 0;
}

.dl-col-blocks .blocks-editor {
  width: 100%;
  max-width: 100%;
}

.dl-col .form + .form {
  margin-top: 10px;
}

.dl-calendar-box {
  margin-top: 16px;
  width: 100%;
}

.dl-calendar-wrap {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-subtle);
  padding: 14px;
  width: 100%;
}

/* placement-info nur so breit wie die Timeline (rechter Rand vor dem +-Button) */
.dl-calendar-wrap > .form:first-of-type {
  max-width: calc(100% - 50px);
}

.blocks-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 280px;
  width: 100%;
}

.dl-col-blocks .blocks-editor {
  min-width: 0;
}

.blocks-editor + #plan-button {
  margin-top: 12px;
}

/* Gemeinsame Spaltenbreite für Button-Spalte (Ausrichtung Add/Remove) */
.blocks-header {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr 52px;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}

.blocks-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.blocks-row {
  display: grid;
  grid-template-columns: 2.4fr 0.6fr 52px;
  gap: 6px;
  align-items: center;
  min-height: 44px;
  width: 100%;
  min-width: 0;
}

.blocks-row .blocks-name-input,
.blocks-row .blocks-duration-input {
  font-size: 14px;
  padding: 8px 12px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: #f9fafb;
  color: var(--color-text-main);
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.blocks-row .blocks-name-input {
  min-width: 0;
}

.blocks-row .blocks-name-input::placeholder {
  color: #9ca3af;
}

.blocks-row .blocks-name-input:focus,
.blocks-row .blocks-duration-input:focus {
  outline: none;
  border-color: rgba(22, 163, 74, 0.75);
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.2);
  background: #ffffff;
}

/* Wrapper für Dauer-Input inkl. eigener Pfeile */
.blocks-duration-wrap {
  position: relative;
  width: 100%;
  max-width: 4.5em;
  display: flex;
  align-items: stretch;
}

.blocks-row .blocks-duration-input {
  width: 100%;
  max-width: none;
  text-align: right;
  padding-right: 28px;
  -moz-appearance: textfield;
  appearance: textfield;
}

.blocks-row .blocks-duration-input::-webkit-inner-spin-button,
.blocks-row .blocks-duration-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.blocks-duration-stepper {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 22px;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  pointer-events: none;
  border-left: 1px solid var(--color-border-subtle);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  overflow: hidden;
}

.blocks-duration-stepper .blocks-duration-btn {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-bottom: 1px solid var(--color-border-subtle);
  background: rgba(0, 0, 0, 0.04);
  color: var(--color-text-muted);
  cursor: pointer;
  pointer-events: auto;
  transition: background 0.15s ease, color 0.15s ease;
}

.blocks-duration-stepper .blocks-duration-btn:last-child {
  border-bottom: none;
}

.blocks-duration-stepper .blocks-duration-btn:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.blocks-duration-stepper .blocks-duration-btn:active {
  background: rgba(21, 128, 61, 0.15);
}

.blocks-duration-stepper .blocks-duration-btn svg {
  flex-shrink: 0;
}

/* Dark Mode: Dauer-Stepper */
body[data-theme="dark"] .blocks-duration-stepper .blocks-duration-btn {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-text-muted);
}

body[data-theme="dark"] .blocks-duration-stepper .blocks-duration-btn:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

body[data-theme="dark"] .blocks-duration-stepper .blocks-duration-btn:active {
  background: rgba(74, 222, 128, 0.2);
}

/* Add- und Remove-Button einheitlich (primary-button) und ausgerichtet */
.blocks-editor .blocks-add-button,
.blocks-editor .blocks-remove-button {
  width: 52px;
  min-width: 52px;
  height: 39px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  justify-content: center;
  justify-self: center;
}

.dl-timeline-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.dl-timeline-actions-wrap {
  margin-top: 12px;
  margin-bottom: 12px;
}

.dl-timeline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
}

.dl-timeline-title-wrap {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 120px;
}

.dl-timeline-title-input {
  width: 100%;
  max-width: 320px;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text-main);
  text-align: center;
  outline: none;
  font-family: inherit;
}

.dl-timeline-title-input::placeholder {
  color: var(--color-text-muted);
}

.dl-timeline-year-display {
  margin-left: auto;
  margin-right: 50px;
  font-weight: 700;
  font-size: 2rem;
  color: var(--color-text-main);
  border: none;
  outline: none;
}

#reset-timeline-btn {
  margin-left: 14px;
}

.dl-holidays-inline-wrap {
  margin-top: 24px;
}

.dl-holidays-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  margin-bottom: 0;
}

.dl-holidays-inline .field-label {
  margin-right: 0;
  margin-bottom: 0;
}

.dl-holidays-inline .holiday-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

/* Feiertags-Optionen als Schalter (Toggle) */
.dl-holidays-inline .holiday-toggle-group .checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding-left: 44px;
  min-height: 24px;
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text-main);
}

.dl-holidays-inline .holiday-toggle-group .checkbox-inline input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

/* Schalter-Track */
.dl-holidays-inline .holiday-toggle-group .checkbox-inline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: var(--color-border-subtle);
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.dl-holidays-inline .holiday-toggle-group .checkbox-inline:has(input:checked)::before {
  background: var(--color-accent);
}

/* Schalter-Knopf */
.dl-holidays-inline .holiday-toggle-group .checkbox-inline::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: left 0.2s ease, transform 0.2s ease;
}

.dl-holidays-inline .holiday-toggle-group .checkbox-inline:has(input:checked)::after {
  left: 19px;
}

.dl-holiday-separator {
  color: var(--color-text-muted);
  margin: 0 4px;
  user-select: none;
}

/* Spalte links: Freitext pro Planungslane, beim Scrollen fixiert */
.dl-timeline-lane-labels-wrap {
  flex-shrink: 0;
  width: 160px;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--color-border-subtle);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  box-shadow: var(--shadow-subtle);
  padding: 10px 8px 14px 12px;
  box-sizing: border-box;
}

.dl-timeline-lane-labels {
  position: relative;
  flex: 1;
  min-height: 0;
}

.dl-timeline-lane-labels-head {
  height: 60px;
  padding-bottom: 12px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  align-items: flex-end;
}

.dl-timeline-lane-labels-head span {
  font-weight: 600;
}

.dl-timeline-lane-labels-body {
  position: relative;
  margin-top: 10px;
  width: 100%;
}

.dl-timeline-lane-labels-input {
  position: absolute;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 4px 6px;
  font-size: 12px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-main);
  outline: none;
}

.dl-timeline-lane-labels-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

/* Schmaler Balken zum Ein-/Ausblenden der Planungsspalte */
.dl-lane-labels-toggle-bar {
  flex-shrink: 0;
  width: 22px;
  min-width: 22px;
  padding: 0;
  border: 1px solid var(--color-border-subtle);
  border-radius: 0;
  margin-left: -1px;
  background: var(--color-surface);
  color: #6b7280;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.dl-lane-labels-toggle-bar:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.dl-timeline-row .dl-timeline {
  flex: 1;
  min-width: 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.dl-timeline-extend-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  background: var(--color-surface);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.dl-timeline-extend-btn:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-color: rgba(22, 163, 74, 0.4);
}

.dl-timeline {
  position: relative;
  width: 100%;
  max-width: 100%;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  box-shadow: var(--shadow-subtle);
  padding: 10px 12px 14px;
  overflow-x: auto;
  overflow-y: visible;
}

.dl-timeline-content {
  display: block;
  position: relative;
  min-width: 100%;
  flex-shrink: 0;
}

.dl-timeline-axis {
  position: relative;
  height: 60px;
  padding-bottom: 12px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.dl-timeline-axis-month {
  position: absolute;
  top: 0;
  height: 24px;
  border-left: 1px solid rgba(148, 163, 184, 0.5);
  padding-left: 6px;
  display: flex;
  align-items: flex-end;
}

.dl-timeline-axis-month-label {
  font-weight: 600;
}

.dl-timeline-axis-day {
  position: absolute;
  top: 24px;
  width: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.dl-timeline-axis-day-week {
  font-weight: 600;
  text-transform: uppercase;
}

.dl-timeline-axis-day-num {
  font-size: 11px;
}

.dl-timeline-track {
  position: relative;
  margin-top: 10px;
  height: 52px;
  min-height: 52px;
  flex-shrink: 0;
  /* Gitter wie Tabelle: vertikale und horizontale Linien */
  background-image:
    linear-gradient(
      to right,
      rgba(148, 163, 184, 0.25) 1px,
      transparent 1px
    ),
    linear-gradient(
      to bottom,
      rgba(148, 163, 184, 0.18) 1px,
      transparent 1px
    );
  /* Tagesbreite 24px; Zeilenhöhe (Lane/Leerzeile) 34px */
  background-size: 24px 100%, 100% 34px;
}

.gantt-row-blank {
  position: absolute;
  left: 0;
  right: 0;
  background: #ffffff;
  z-index: 1;
  pointer-events: none;
}

body[data-theme="dark"] .gantt-row-blank {
  background: #1e293b;
}

.gantt-bar {
  position: absolute;
  z-index: 2;
  /* top + height per Zeile via JS (laneTop, LANE_HEIGHT) – exakt am Raster */
  border-radius: 0;
  padding: 0 8px;
  display: flex;
  align-items: center;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.gantt-bar-preview {
  border: 1px dashed rgba(22, 163, 74, 0.6);
  color: var(--color-text-main);
  pointer-events: none;
}

.gantt-bar-active {
  color: #f9fafb;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.4);
}

.gantt-bar-active.gantt-bar-light-bg {
  color: #1f2937;
}

.gantt-text-block {
  position: absolute;
  z-index: 2;
  display: flex;
  align-items: center;
  padding: 0 6px;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #4b5563;
  border-radius: 2px;
}

.gantt-text-block-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  color: var(--color-text-main);
  outline: none;
}

.gantt-text-block-mirror {
  position: absolute;
  visibility: hidden;
  white-space: pre;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  pointer-events: none;
  left: 0;
  top: 0;
}

.gantt-text-block-input::placeholder {
  color: var(--color-text-muted);
}

.gantt-day-mark {
  position: absolute;
  z-index: 3;
  background: rgba(37, 99, 235, 0.5);
  pointer-events: none;
  box-sizing: border-box;
}

.gantt-milestone-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(249, 115, 22, 0.95);
  pointer-events: none;
  z-index: 4;
}

.gantt-milestone-label {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: rgba(248, 113, 113, 0.95);
}

.gantt-milestone-day {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 24px;
  background: rgba(249, 115, 22, 0.28);
  border-left: 1px solid rgba(249, 115, 22, 0.95);
  border-right: 1px solid rgba(249, 115, 22, 0.95);
  pointer-events: none;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gantt-milestone-x {
  font-size: 14px;
  font-weight: 700;
  color: rgba(249, 115, 22, 0.95);
  line-height: 1;
  pointer-events: none;
}

.gantt-milestone-day-draggable {
  pointer-events: auto;
  cursor: grab;
}

.gantt-milestone-arrow {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-size: 16px;
  color: rgba(249, 115, 22, 0.85);
}

.gantt-milestone-arrow::before {
  content: '←';
}

.gantt-milestone-day-draggable:active {
  cursor: grabbing;
}

.gantt-milestone-note {
  position: absolute;
  z-index: 5;
  transform: translateX(-50%);
  min-width: 100px;
  width: 180px;
  box-sizing: border-box;
  padding: 4px 8px;
  border: none;
  background: transparent;
  color: var(--color-text-main);
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  outline: none;
}

.gantt-hover-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(148, 163, 184, 0.7);
  pointer-events: none;
  z-index: 4;
}

.gantt-hover-tooltip {
  position: absolute;
  top: 4px;
  transform: translateX(-50%);
  padding: 4px 8px;
  background: var(--color-text-main);
  color: var(--color-surface);
  font-size: 12px;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  pointer-events: none;
  z-index: 5;
  box-shadow: var(--shadow-soft);
}

/* Wochenenden und Feiertage über gesamten Kalender */
.gantt-day-layer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Kalenderwochen-Trennlinien (zwischen So und Mo), über alle Zeilen */
.gantt-week-separator-layer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}

.gantt-week-separator {
  position: absolute;
  top: 0;
  height: 100%;
  width: 1px;
  background: rgba(148, 163, 184, 0.35);
}

/* KW-Labels in der ersten Leerzeile (über Leerzeile, unter Tooltip) */
.gantt-kw-labels-layer {
  position: absolute;
  top: 0;
  left: 0;
  height: 34px;
  z-index: 3;
  pointer-events: none;
}

.gantt-kw-label {
  position: absolute;
  top: 0;
  height: 34px;
  display: flex;
  align-items: center;
  padding-left: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.gantt-day-weekend {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(148, 163, 184, 0.08);
}

.gantt-day-holiday {
  position: absolute;
  top: 0;
  height: 100%;
  background: rgba(100, 116, 139, 0.2);
}

.gantt-today {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(34, 197, 94, 0.12);
  border-left: 1px solid rgba(22, 163, 74, 0.8);
  border-right: 1px solid rgba(22, 163, 74, 0.8);
  pointer-events: none;
  z-index: 3;
}

.preview-phase {
  opacity: 0.4 !important;
  pointer-events: none;
  filter: saturate(0.7);
  border-style: dashed !important;
}

.phase-active {
  opacity: 0.95;
}

.milestone-event {
  background-color: #f97316 !important;
  border-color: #ea580c !important;
  color: #fff !important;
}

@media (max-width: 900px) {
  .dl-layout-two-col {
    grid-template-columns: 1fr;
  }
  .dl-layout-three-col {
    grid-template-columns: 1fr;
  }
  .dl-main-cols {
    grid-template-columns: 1fr;
  }
  .dl-col-presets {
    justify-content: flex-start;
  }
}

.card-title {
  margin: 2px 0 6px;
  font-size: 20px;
  letter-spacing: 0.01em;
}

.card-subtitle {
  margin: 0 0 20px;
  color: var(--color-text-muted);
  font-size: 14px;
}

.form {
  margin-bottom: 18px;
}

.form-spacer {
  height: 8px;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.field-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.field-row.mod-part-row > * {
  flex: 1;
}

.text-input {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  padding: 9px 11px;
  font-size: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  background: #f9fafb;
}

.text-input::placeholder {
  color: #9ca3af;
}

.text-input:focus {
  outline: none;
  border-color: rgba(22, 163, 74, 0.75);
  box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.35);
  background: #ffffff;
}

.display-field {
  background: #fffbe6;
  font-weight: 600;
  font-style: italic;
  cursor: default;
}

.display-field:focus {
  box-shadow: none;
  border-color: var(--color-border-subtle);
}

.primary-button {
  border-radius: 6px;
  border: 1px solid var(--color-border-subtle);
  background: #ffffff;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-main);
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: none;
  transition: background 0.12s ease, border-color 0.12s ease;
}

/* Gleiche Schriftstärke für Button und Label (Browser-Standards überschreiben) */
button.primary-button,
label.primary-button {
  font-weight: 600;
}

.primary-button:hover {
  background: #f8fafc;
  border-color: var(--color-text-muted);
  box-shadow: none;
}

.primary-button:active {
  background: #f1f5f9;
  box-shadow: none;
}

.primary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
  pointer-events: none;
}

/* Dialog: Überschrift vor Export */
.export-heading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.export-heading-dialog {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--color-border-subtle);
  padding: 20px 24px;
  min-width: 320px;
  max-width: 90vw;
}

.export-heading-dialog-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-main);
  margin-bottom: 14px;
}

.export-heading-dialog-label {
  display: block;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.export-heading-dialog-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-family: inherit;
}

.export-heading-dialog-input:focus {
  outline: none;
  border-color: rgba(22, 163, 74, 0.6);
}

.export-heading-dialog-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.export-heading-dialog-cancel {
  padding: 8px 16px;
  font-size: 14px;
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text-main);
  cursor: pointer;
  font-family: inherit;
}

.export-heading-dialog-cancel:hover {
  background: #f3f4f6;
}

.result-box {
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-subtle);
  padding: 12px 14px;
  background: linear-gradient(
      120deg,
      rgba(22, 163, 74, 0.04),
      rgba(22, 163, 74, 0.015)
    ),
    #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  font-size: 15px;
}

.result-box-empty {
  font-style: italic;
  color: var(--color-text-muted);
}

.result-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  color: var(--color-text-muted);
}

.result-value {
  font-weight: 550;
}

.result-error {
  color: #b91c1c;
}

.result-success {
  color: #14532d;
}

.lane-context-menu {
  position: fixed;
  z-index: 1000;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 4px 0;
  min-width: 180px;
}
.lane-context-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 14px;
  border: none;
  background: none;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  color: var(--color-text-main);
}
.lane-context-menu button:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}

.lane-context-menu button.lane-context-menu-milestone {
  font-weight: 700;
}

.lane-context-menu-separator {
  height: 1px;
  margin: 4px 10px;
  background: var(--color-border-subtle);
  pointer-events: none;
}

/* Kontextmenü: Block einfärben */
.block-color-menu {
  position: fixed;
  z-index: 1000;
  background: var(--color-surface);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 10px 12px;
  min-width: 140px;
}

.block-color-menu-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.block-color-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.block-color-swatch {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(148, 163, 184, 0.5);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}

.block-color-swatch:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.copy-button {
  margin-left: auto;
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.copy-button:hover {
  background: rgba(226, 232, 240, 0.9);
}

.imds-result {
  min-height: 120px;
  padding: 18px 20px;
  margin-top: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  white-space: pre;
  font-size: 13px;
}

.imds-result .result-value {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 4px;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 4px;
  font-size: 13px;
}

.result-table thead {
  background: rgba(148, 163, 184, 0.08);
}

.result-table th,
.result-table td {
  padding: 4px 6px;
  text-align: left;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  user-select: text;
}

.result-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  font-weight: 600;
}

.result-table tr:last-child td {
  border-bottom: none;
}

.result-table tbody tr:hover {
  background: rgba(22, 163, 74, 0.06);
}

.app-footer {
  padding: 14px 20px 20px;
  font-size: 11px;
  color: var(--color-text-muted);
  text-align: center;
}

@media (max-width: 640px) {
  .app-main {
    padding-inline: 14px;
  }

  .card {
    padding-inline: 16px;
  }

  .field-row {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-button {
    justify-content: center;
    width: 100%;
  }
}

/* Hilfe-Popup (Post-it-Stil, sanftes Gelb) */
.dl-help-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  box-sizing: border-box;
}

.dl-help-popup {
  background: #fef9e6;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(180, 160, 80, 0.25);
}

.dl-help-popup-header {
  flex-shrink: 0;
  padding: 14px 16px 12px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #5c4a00;
  border-bottom: 1px solid rgba(180, 160, 80, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dl-help-popup-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #5c4a00;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dl-help-popup-close:hover {
  background: rgba(180, 160, 80, 0.2);
}

.dl-help-popup-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #3d3600;
}

.dl-help-popup-body h1 {
  font-size: 1.25rem;
  margin: 0 0 12px;
  color: #5c4a00;
}

.dl-help-popup-body h2 {
  font-size: 1.1rem;
  margin: 16px 0 8px;
  color: #5c4a00;
}

.dl-help-popup-body h3 {
  font-size: 1rem;
  margin: 12px 0 6px;
  color: #5c4a00;
}

.dl-help-popup-body p {
  margin: 0 0 10px;
}

.dl-help-popup-body ul {
  margin: 8px 0 12px;
  padding-left: 20px;
}

.dl-help-popup-body li {
  margin: 4px 0;
}

.dl-help-popup-body hr {
  border: none;
  border-top: 1px solid rgba(180, 160, 80, 0.3);
  margin: 14px 0;
}

.dl-help-error {
  color: var(--color-text-muted);
}

