/* RootPlan Liquid Glass — design tokens & utilities from Stitch */

:root {
  --rp-surface: #f9f9ff;
  --rp-surface-dim: #d3daea;
  --rp-surface-bright: #f9f9ff;
  --rp-surface-container-lowest: #ffffff;
  --rp-surface-container-low: #f0f3ff;
  --rp-surface-container: #e7eefe;
  --rp-surface-container-high: #e2e8f8;
  --rp-surface-container-highest: #dce2f3;
  --rp-surface-variant: #dce2f3;
  --rp-on-surface: #151c27;
  --rp-on-surface-variant: #424844;
  --rp-outline: #727974;
  --rp-outline-variant: #c2c8c2;
  --rp-primary: #466254;
  --rp-primary-container: #5e7b6c;
  --rp-on-primary: #ffffff;
  --rp-on-primary-container: #f6fff7;
  --rp-primary-fixed: #caead8;
  --rp-secondary: #496177;
  --rp-secondary-container: #c9e2fd;
  --rp-on-secondary-container: #4d657b;
  --rp-tertiary: #705838;
  --rp-tertiary-fixed: #ffddb6;
  --rp-on-tertiary-fixed: #291801;
  --rp-error: #ba1a1a;
  --rp-error-container: #ffdad6;

  /* Compact shell */
  --rp-sidebar-w-expanded: 14.75rem;
  --rp-sidebar-w-collapsed: 3.85rem;
  --rp-topbar-h: 3.15rem;
  --rp-main-pad: 1rem;
  --rp-radius: 0.85rem;
  --rp-radius-sm: 0.55rem;

  /* Motion */
  --rp-nav-duration: 0.45s;
  --rp-nav-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --rp-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --rp-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --rp-duration: 0.28s;
  --rp-duration-fast: 0.18s;

  /* Liquid glass */
  --rp-glass-blur: 42px;
  --rp-glass-blur-strong: 64px;
  --rp-glass-saturate: 185%;
  --rp-glass-bg: rgba(255, 255, 255, 0.22);
  --rp-glass-bg-elevated: rgba(255, 255, 255, 0.32);
  --rp-glass-border: rgba(255, 255, 255, 0.55);
  --rp-glass-highlight: rgba(255, 255, 255, 0.7);
  --rp-glass-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.65),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.25),
    0 8px 28px -10px rgba(70, 98, 84, 0.14),
    0 2px 8px rgba(70, 98, 84, 0.06);
}

body.rp-body {
  font-family: Inter, system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--rp-on-surface);
  background-color: var(--rp-surface);
  background-image:
    radial-gradient(at 8% 12%, hsla(145, 28%, 42%, 0.18) 0px, transparent 42%),
    radial-gradient(at 88% 18%, hsla(210, 40%, 55%, 0.16) 0px, transparent 45%),
    radial-gradient(at 70% 88%, hsla(35, 45%, 55%, 0.12) 0px, transparent 40%),
    radial-gradient(at 18% 78%, hsla(165, 25%, 40%, 0.1) 0px, transparent 38%);
  background-attachment: fixed;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
}

/* Density: slightly tighter Bootstrap chrome */
body.rp-body .btn {
  --bs-btn-font-size: 0.8125rem;
  --bs-btn-padding-y: 0.32rem;
  --bs-btn-padding-x: 0.8rem;
  --bs-btn-border-radius: 9999px;
  transition:
    background-color var(--rp-duration) var(--rp-ease),
    border-color var(--rp-duration) var(--rp-ease),
    color var(--rp-duration) var(--rp-ease),
    box-shadow var(--rp-duration) var(--rp-ease),
    filter var(--rp-duration-fast) var(--rp-ease),
    transform var(--rp-duration-fast) var(--rp-ease);
}

body.rp-body .btn-sm {
  --bs-btn-font-size: 0.75rem;
  --bs-btn-padding-y: 0.22rem;
  --bs-btn-padding-x: 0.6rem;
}

body.rp-body .form-control,
body.rp-body .form-select {
  font-size: 0.8125rem;
  min-height: 2.15rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

body.rp-body .form-control-sm,
body.rp-body .form-select-sm {
  font-size: 0.75rem;
  min-height: 1.9rem;
  padding-top: 0.22rem;
  padding-bottom: 0.22rem;
}

body.rp-body .card-header,
body.rp-body .card-body {
  padding: 0.75rem 0.9rem;
}

body.rp-body .modal-header,
body.rp-body .modal-footer {
  padding: 0.75rem 1rem;
}

body.rp-body .modal-body {
  padding: 0.85rem 1rem;
}

body.rp-body .modal-title {
  font-size: 1.05rem;
}

.glass-panel {
  background: var(--rp-glass-bg);
  backdrop-filter: blur(var(--rp-glass-blur)) saturate(var(--rp-glass-saturate));
  -webkit-backdrop-filter: blur(var(--rp-glass-blur)) saturate(var(--rp-glass-saturate));
  border: 1px solid var(--rp-glass-border);
  box-shadow: var(--rp-glass-shadow);
  transition:
    background var(--rp-duration) var(--rp-ease),
    box-shadow var(--rp-duration) var(--rp-ease),
    border-color var(--rp-duration) var(--rp-ease);
}

.glass-card {
  background: rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 10px 28px -12px rgba(70, 98, 84, 0.14);
  transition:
    box-shadow var(--rp-duration) var(--rp-ease),
    transform var(--rp-duration) var(--rp-ease),
    background var(--rp-duration) var(--rp-ease),
    border-color var(--rp-duration) var(--rp-ease);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 16px 36px -12px rgba(70, 98, 84, 0.18);
  transform: translateY(-1px);
}

.glass-btn-primary {
  background: linear-gradient(180deg, rgba(70, 98, 84, 0.95) 0%, rgba(49, 76, 63, 0.98) 100%);
  color: var(--rp-on-primary);
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 8px 18px -8px rgba(49, 76, 63, 0.45);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition:
    filter var(--rp-duration) var(--rp-ease),
    box-shadow var(--rp-duration) var(--rp-ease),
    transform var(--rp-duration-fast) var(--rp-ease);
}

.glass-btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 55%);
  pointer-events: none;
}

.glass-btn-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    0 12px 22px -8px rgba(49, 76, 63, 0.5);
}

.glass-input,
.glass-input.form-control,
.glass-input.form-select,
select.glass-input,
input.glass-input,
textarea.glass-input {
  background-color: rgba(255, 255, 255, 0.28) !important;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.58) !important;
  border-radius: var(--rp-radius) !important;
  color: var(--rp-on-surface) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition:
    background-color var(--rp-duration) var(--rp-ease),
    border-color var(--rp-duration) var(--rp-ease),
    box-shadow var(--rp-duration) var(--rp-ease);
}

.glass-input:focus,
.glass-input.form-control:focus,
.glass-input.form-select:focus {
  background-color: rgba(255, 255, 255, 0.48) !important;
  border-color: rgba(70, 98, 84, 0.55) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 0 0 2px rgba(70, 98, 84, 0.18) !important;
  outline: none;
}

/* Layout shell */
.rp-sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--rp-sidebar-w-expanded);
  height: 100vh;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0.65rem;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(var(--rp-glass-blur-strong)) saturate(var(--rp-glass-saturate));
  -webkit-backdrop-filter: blur(var(--rp-glass-blur-strong)) saturate(var(--rp-glass-saturate));
  border-right: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.2),
    8px 0 40px rgba(70, 98, 84, 0.08);
  transition:
    width var(--rp-nav-duration) var(--rp-nav-ease),
    padding var(--rp-nav-duration) var(--rp-nav-ease);
  overflow-x: hidden;
  overflow-y: auto;
}

.rp-sidebar-brand {
  margin-bottom: 1rem;
  padding: 0 0.35rem;
  white-space: nowrap;
  transition:
    margin var(--rp-nav-duration) var(--rp-nav-ease),
    padding var(--rp-nav-duration) var(--rp-nav-ease);
}

.rp-sidebar-brand h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--rp-primary);
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  transition:
    font-size var(--rp-nav-duration) var(--rp-nav-ease),
    letter-spacing var(--rp-nav-duration) var(--rp-nav-ease);
}

.rp-sidebar-brand p {
  margin: 0.15rem 0 0;
  font-size: 0.7rem;
  color: var(--rp-on-surface-variant);
  opacity: 0.85;
}

.rp-nav-label {
  display: inline-block;
  max-width: 11rem;
  overflow: hidden;
  white-space: nowrap;
  opacity: 1;
  transform: translateX(0);
  transition:
    opacity 0.22s var(--rp-ease) 0.12s,
    max-width var(--rp-nav-duration) var(--rp-nav-ease),
    transform 0.32s var(--rp-nav-ease) 0.08s,
    margin var(--rp-nav-duration) var(--rp-nav-ease);
}

.rp-nav-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.7rem;
  border-radius: var(--rp-radius-sm);
  color: var(--rp-on-surface-variant);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8125rem;
  transition:
    background var(--rp-duration) var(--rp-ease),
    color var(--rp-duration) var(--rp-ease),
    transform var(--rp-duration-fast) var(--rp-ease),
    padding var(--rp-nav-duration) var(--rp-nav-ease),
    gap var(--rp-nav-duration) var(--rp-nav-ease),
    box-shadow var(--rp-duration) var(--rp-ease);
  white-space: nowrap;
}

.rp-nav-link:hover {
  background: rgba(255, 255, 255, 0.32);
  color: var(--rp-on-surface);
}

.rp-nav-link.active {
  font-weight: 700;
}

/* Section colors when active (soft fill only — no edge accents) */
.rp-nav-link.rp-nav-planning.active {
  color: #314c3f;
  background: rgba(70, 98, 84, 0.16);
}

.rp-nav-link.rp-nav-vacation.active {
  color: #0f5c6b;
  background: rgba(31, 122, 140, 0.16);
}

.rp-nav-link.rp-nav-offerten.active {
  color: #31495e;
  background: rgba(73, 97, 119, 0.16);
}

.rp-nav-link.rp-nav-verwaltung.active {
  color: #594325;
  background: rgba(139, 112, 79, 0.16);
}

.rp-nav-link.rp-nav-hilfe.active {
  color: #314c3f;
  background: rgba(94, 123, 108, 0.16);
}

.rp-nav-link .material-symbols-outlined {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.rp-sidebar-cta {
  transition:
    padding var(--rp-nav-duration) var(--rp-nav-ease),
    gap var(--rp-nav-duration) var(--rp-nav-ease),
    min-height var(--rp-nav-duration) var(--rp-nav-ease);
  gap: 0.4rem !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.8125rem !important;
  margin-bottom: 0.85rem !important;
  border-radius: var(--rp-radius) !important;
  min-height: 2.35rem;
}

.rp-sidebar-cta .material-symbols-outlined {
  font-size: 1.1rem !important;
}

.rp-sidebar .d-flex.flex-column.gap-2 {
  gap: 0.3rem !important;
}

.rp-sidebar .mt-auto.d-flex.flex-column.gap-1 {
  gap: 0.15rem !important;
  padding-top: 0.65rem !important;
}

.rp-brand-full,
.rp-brand-short {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
  transition:
    opacity 0.24s var(--rp-ease),
    max-width var(--rp-nav-duration) var(--rp-nav-ease),
    transform 0.32s var(--rp-nav-ease);
}

.rp-brand-full {
  max-width: 10rem;
  opacity: 1;
  transform: translateX(0);
}

.rp-brand-short {
  max-width: 0;
  opacity: 0;
  transform: translateX(-0.25rem);
  pointer-events: none;
}

/* Collapsed rail */
html.rp-nav-collapsed .rp-sidebar {
  width: var(--rp-sidebar-w-collapsed);
  padding: 0.75rem 0.4rem;
  align-items: stretch;
}

html.rp-nav-collapsed .rp-sidebar-brand {
  text-align: center;
  padding: 0;
  margin-bottom: 0.85rem;
}

html.rp-nav-collapsed .rp-sidebar-brand h1 {
  font-size: 0.95rem;
  letter-spacing: -0.04em;
  justify-content: center;
}

html.rp-nav-collapsed .rp-brand-full {
  max-width: 0;
  opacity: 0;
  transform: translateX(0.35rem);
  pointer-events: none;
  transition:
    opacity 0.14s var(--rp-ease),
    max-width var(--rp-nav-duration) var(--rp-nav-ease),
    transform 0.22s var(--rp-nav-ease);
}

html.rp-nav-collapsed .rp-brand-short {
  max-width: 2.5rem;
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  transition:
    opacity 0.24s var(--rp-ease) 0.14s,
    max-width var(--rp-nav-duration) var(--rp-nav-ease),
    transform 0.32s var(--rp-nav-ease) 0.1s;
}

html.rp-nav-collapsed .rp-nav-label {
  max-width: 0;
  opacity: 0;
  margin: 0;
  transform: translateX(-0.35rem);
  pointer-events: none;
  transition:
    opacity 0.12s var(--rp-ease),
    max-width var(--rp-nav-duration) var(--rp-nav-ease),
    transform 0.22s var(--rp-nav-ease),
    margin var(--rp-nav-duration) var(--rp-nav-ease);
}

html.rp-nav-collapsed .rp-nav-link {
  justify-content: center;
  gap: 0;
  padding: 0.55rem 0.35rem;
  border-right: none !important;
  position: relative;
}

html.rp-nav-collapsed .rp-sidebar-cta {
  padding-left: 0.35rem !important;
  padding-right: 0.35rem !important;
  min-height: 2.35rem;
  gap: 0 !important;
}

.rp-topbar {
  position: fixed;
  top: 0;
  left: var(--rp-sidebar-w-expanded);
  right: 0;
  height: var(--rp-topbar-h);
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.85rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(var(--rp-glass-blur-strong)) saturate(var(--rp-glass-saturate));
  -webkit-backdrop-filter: blur(var(--rp-glass-blur-strong)) saturate(var(--rp-glass-saturate));
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 -1px 0 rgba(255, 255, 255, 0.15),
    0 8px 28px rgba(70, 98, 84, 0.06);
  transition: left var(--rp-nav-duration) var(--rp-nav-ease);
}

html.rp-nav-collapsed .rp-topbar {
  left: var(--rp-sidebar-w-collapsed);
}

.rp-main {
  margin-left: var(--rp-sidebar-w-expanded);
  margin-top: var(--rp-topbar-h);
  padding: var(--rp-main-pad);
  min-height: calc(100vh - var(--rp-topbar-h));
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  transition: margin-left var(--rp-nav-duration) var(--rp-nav-ease);
}

html.rp-nav-collapsed .rp-main {
  margin-left: var(--rp-sidebar-w-collapsed);
}

@media (prefers-reduced-motion: reduce) {
  html,
  .rp-sidebar,
  .rp-sidebar-brand,
  .rp-sidebar-brand h1,
  .rp-nav-label,
  .rp-nav-link,
  .rp-sidebar-cta,
  .rp-brand-full,
  .rp-brand-short,
  .rp-topbar,
  .rp-main {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}

/* Kalkulation: keep wide bundle cards inside the content column */
#bundles_container {
  min-width: 0;
  max-width: 100%;
}

#bundles_container .draggable-bundle,
#bundles_container .card {
  max-width: 100%;
  overflow: hidden;
}

#bundles_container .card-header {
  flex-wrap: wrap;
  gap: 0.75rem;
}

#bundles_container .card-header > .d-flex.align-items-center.w-50 {
  width: auto !important;
  flex: 1 1 16rem;
  min-width: 0;
}

#bundles_container .card-header > .d-flex.gap-2 {
  flex: 1 1 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rp-kalk-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1rem;
  min-width: 0;
}

.rp-kalk-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
  min-width: 0;
}

.rp-topbar-search {
  max-width: 16rem;
  width: 100%;
}

.rp-topbar-search-ico {
  color: var(--rp-on-surface-variant);
  opacity: 0.55;
  font-size: 1rem !important;
  pointer-events: none;
}

.rp-topbar-search .glass-input {
  min-height: 1.9rem;
  font-size: 0.78rem !important;
  padding-left: 2rem !important;
}

.rp-main > .d-flex.justify-content-between.mb-4,
.rp-main > .d-flex.justify-content-between.align-items-end.mb-4,
.rp-main > .d-flex.justify-content-between.align-items-start.mb-4 {
  margin-bottom: 0.85rem !important;
  gap: 0.75rem !important;
}

.rp-kalk-toolbar-actions .glass-panel {
  flex: 1 1 18rem;
  min-width: 0;
}

.rp-kalk-toolbar-actions form {
  min-width: 0;
  flex-wrap: wrap;
}

.rp-kalk-toolbar-actions .form-control,
.rp-kalk-toolbar-actions .form-select {
  min-width: 0;
  flex: 1 1 10rem;
}

.rp-help-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--rp-on-surface-variant);
  line-height: 1.55;
}

.rp-help-list li + li {
  margin-top: 0.35rem;
}

.rp-feedback-item {
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.45);
}

html[data-bs-theme="dark"] .rp-feedback-item {
  background: rgba(15, 20, 26, 0.45);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-bs-theme="dark"] .rp-nav-link.rp-nav-hilfe.active {
  color: #caead8;
  background: rgba(94, 123, 108, 0.28);
}

.rp-note-panel {
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.rp-note-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--rp-on-surface);
  margin-bottom: 0.35rem;
}

.rp-note-hint {
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--rp-on-surface-variant);
  opacity: 0.8;
}

.rp-note-field .glass-input,
.rp-note-panel .glass-input {
  min-height: 4.5rem;
  resize: vertical;
}

.rp-page-title {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--rp-on-surface);
  margin: 0;
  line-height: 1.25;
}

.rp-page-sub {
  margin: 0.15rem 0 0;
  color: var(--rp-on-surface-variant);
  font-size: 0.8125rem;
}

.rp-pill-group {
  display: inline-flex;
  gap: 0.15rem;
  padding: 0.18rem;
  border-radius: 9999px;
}

.rp-pill {
  border: none;
  background: transparent;
  color: var(--rp-on-surface-variant);
  padding: 0.32rem 0.7rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.78rem;
  text-decoration: none;
  cursor: pointer;
  transition:
    background var(--rp-duration) var(--rp-ease),
    color var(--rp-duration) var(--rp-ease),
    box-shadow var(--rp-duration) var(--rp-ease);
}

.rp-pill:hover {
  background: rgba(255, 255, 255, 0.32);
  color: var(--rp-on-surface);
}

.rp-pill.active {
  background: rgba(255, 255, 255, 0.48);
  color: var(--rp-primary);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 1px 3px rgba(70, 98, 84, 0.08);
}

.rp-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: var(--rp-on-surface-variant);
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--rp-duration) var(--rp-ease),
    color var(--rp-duration) var(--rp-ease),
    transform var(--rp-duration-fast) var(--rp-ease);
}

.rp-icon-btn .material-symbols-outlined {
  font-size: 1.2rem !important;
}

.rp-icon-btn:hover {
  background: rgba(94, 123, 108, 0.15);
  color: var(--rp-primary);
  transform: scale(1.04);
}

/* Bootstrap modal → glass */
.modal-content {
  background: rgba(255, 255, 255, 0.42) !important;
  backdrop-filter: blur(var(--rp-glass-blur-strong)) saturate(var(--rp-glass-saturate)) !important;
  -webkit-backdrop-filter: blur(var(--rp-glass-blur-strong)) saturate(var(--rp-glass-saturate)) !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  border-radius: 1rem !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 28px 60px -16px rgba(70, 98, 84, 0.28) !important;
}

.modal-header,
.modal-footer {
  background: transparent !important;
  border-color: rgba(194, 200, 194, 0.28) !important;
}

.btn-primary,
.btn-success {
  background: linear-gradient(180deg, #466254 0%, #314c3f 100%) !important;
  border-color: #314c3f !important;
  border-radius: 9999px !important;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-light,
.btn-outline-info {
  border-radius: 9999px !important;
}

.btn-secondary {
  background: var(--rp-secondary) !important;
  border-color: var(--rp-secondary) !important;
  border-radius: 9999px !important;
}

.alert {
  border-radius: var(--rp-radius) !important;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  font-size: 0.8125rem;
  padding: 0.65rem 0.9rem;
}

.offcanvas {
  background: rgba(255, 255, 255, 0.38) !important;
  backdrop-filter: blur(var(--rp-glass-blur-strong)) saturate(var(--rp-glass-saturate)) !important;
  -webkit-backdrop-filter: blur(var(--rp-glass-blur-strong)) saturate(var(--rp-glass-saturate)) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.45) !important;
}

.dropdown-menu {
  background: rgba(255, 255, 255, 0.48) !important;
  backdrop-filter: blur(36px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(36px) saturate(180%) !important;
  border: 1px solid rgba(255, 255, 255, 0.55) !important;
  border-radius: var(--rp-radius) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 16px 40px rgba(70, 98, 84, 0.14) !important;
  font-size: 0.8125rem;
}

/* Planner matrix restyle */
.rp-matrix {
  border-radius: var(--rp-radius);
  overflow: auto;
  max-height: calc(100vh - 12.5rem);
}

.rp-matrix table {
  margin: 0;
  background: transparent;
}

.rp-matrix th,
.rp-matrix td {
  border-color: rgba(255, 255, 255, 0.2) !important;
  vertical-align: middle;
  padding: 0.28rem 0.35rem !important;
}

.rp-matrix thead th {
  background: rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rp-on-surface-variant);
  position: sticky;
  top: 0;
  z-index: 5;
}

.rp-matrix .weekend-col,
.rp-matrix td.weekend {
  background: rgba(220, 226, 243, 0.35) !important;
}

.rp-matrix .today-col {
  background: rgba(70, 98, 84, 0.06) !important;
  color: var(--rp-primary) !important;
}

/* Booking chips */
.rp-chip {
  display: block;
  border-radius: 0.4rem;
  padding: 0.12rem 0.3rem;
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  border: 1px solid transparent;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition:
    filter var(--rp-duration-fast) var(--rp-ease),
    transform var(--rp-duration-fast) var(--rp-ease);
}

.rp-chip:hover {
  filter: brightness(1.04);
  transform: translateY(-0.5px);
}

.rp-chip-secondary {
  background: rgba(201, 226, 253, 0.85);
  color: var(--rp-on-secondary-container);
  border-color: var(--rp-secondary-container);
}

.rp-chip-tertiary {
  background: rgba(255, 221, 182, 0.85);
  color: var(--rp-on-tertiary-fixed);
  border-color: var(--rp-tertiary-fixed);
}

.rp-chip-primary {
  background: rgba(202, 234, 216, 0.85);
  color: #042015;
  border-color: var(--rp-primary-fixed);
}

.rp-chip-muted {
  background: rgba(220, 226, 243, 0.7);
  color: var(--rp-on-surface-variant);
}

.rp-chip-danger {
  background: rgba(255, 218, 214, 0.9);
  color: #93000a;
}

/* Kanban */
.rp-kanban {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  min-height: calc(100vh - 10rem);
}

.rp-kanban-col {
  width: 17.5rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 0.7rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(28px) saturate(170%);
  -webkit-backdrop-filter: blur(28px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 10px 28px -12px rgba(70, 98, 84, 0.12);
  transition:
    background var(--rp-duration) var(--rp-ease),
    box-shadow var(--rp-duration) var(--rp-ease);
}

.rp-kanban-col-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 6rem;
}

.rp-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  border-radius: 9999px;
  background: rgba(70, 98, 84, 0.12);
  color: var(--rp-primary);
  font-size: 0.68rem;
  font-weight: 700;
}

/* Admin tabs */
.rp-admin-tabs .nav-link {
  border: none !important;
  border-radius: 9999px !important;
  color: var(--rp-on-surface-variant) !important;
  font-weight: 600;
  font-size: 0.78rem !important;
  padding: 0.35rem 0.85rem !important;
  transition:
    background var(--rp-duration) var(--rp-ease),
    color var(--rp-duration) var(--rp-ease),
    box-shadow var(--rp-duration) var(--rp-ease);
}

.rp-admin-tabs .nav-link.active {
  background: rgba(255, 255, 255, 0.48) !important;
  color: var(--rp-primary) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 1px 3px rgba(70, 98, 84, 0.08);
}

.rp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.rp-table th {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--rp-on-surface-variant);
  font-weight: 600;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid rgba(194, 200, 194, 0.4);
}

.rp-table td {
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  vertical-align: middle;
  font-size: 0.8125rem;
}

.control-panel.glass-panel {
  overflow: visible;
  position: relative;
  z-index: 20;
}

.rp-sort-wrap {
  position: relative;
}

.rp-sort-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem !important;
  color: var(--rp-on-surface-variant);
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
}

.rp-sort-select {
  padding-left: 2.1rem !important;
  font-weight: 600;
  min-height: 2.15rem;
  cursor: pointer;
}

.rp-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-bottom: 0.85rem;
}

.rp-footer-line {
  width: min(14rem, 36%);
  height: 1px;
  margin: 0 auto 0.7rem;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(70, 98, 84, 0.22),
    transparent
  );
}

.rp-footer-credit {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--rp-on-surface-variant);
  opacity: 0.72;
}

.rp-footer-sep {
  margin: 0 0.4rem;
  opacity: 0.55;
}

.rp-footer-version {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.06em;
  opacity: 0.95;
  border-bottom: 1px dotted currentColor;
}

.rp-footer-version:hover,
.rp-footer-version:focus-visible {
  color: var(--rp-primary);
  opacity: 1;
  border-bottom-style: solid;
  outline: none;
}

.rp-footer-clock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  margin-top: 0.35rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--rp-on-surface-variant);
  opacity: 0.62;
  font-variant-numeric: tabular-nums;
}

.rp-footer-clock-icon {
  font-size: 0.95rem !important;
  line-height: 1 !important;
  opacity: 0.85;
}

.rp-footer-clock-text {
  line-height: 1;
}

.rp-main .rp-footer {
  margin-top: auto;
  padding-top: 0.65rem;
}

body.rp-body .card {
  border-radius: var(--rp-radius);
  transition:
    box-shadow var(--rp-duration) var(--rp-ease),
    border-color var(--rp-duration) var(--rp-ease),
    background var(--rp-duration) var(--rp-ease);
}

body.rp-body h1,
body.rp-body .h1 { font-size: 1.5rem; }
body.rp-body h2,
body.rp-body .h2 { font-size: 1.25rem; }
body.rp-body h3,
body.rp-body .h3 { font-size: 1.1rem; }
body.rp-body h4,
body.rp-body .h4 { font-size: 1rem; }
body.rp-body h5,
body.rp-body .h5 { font-size: 0.9rem; }
body.rp-body .fs-5 { font-size: 1rem !important; }
body.rp-body .fs-6 { font-size: 0.875rem !important; }


.rp-table tr:hover td {
  background: rgba(255, 255, 255, 0.2);
}

/* Compact Material icons in UI chrome */
.rp-ico {
  font-size: 0.95rem !important;
  line-height: 1 !important;
  vertical-align: middle;
}

.rp-ico-sm {
  font-size: 0.85rem !important;
  line-height: 1 !important;
  vertical-align: middle;
}

.rp-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--rp-on-surface-variant);
}

.rp-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
}

.rp-meta-badge .material-symbols-outlined {
  font-size: 0.9rem !important;
  line-height: 1;
}

.rp-meta-ok {
  background: rgba(202, 234, 216, 0.85);
  color: #042015;
  border-color: rgba(70, 98, 84, 0.25);
}

.rp-meta-warn {
  background: rgba(255, 221, 182, 0.85);
  color: #291801;
  border-color: rgba(139, 112, 79, 0.3);
}

.rp-meta-danger {
  background: rgba(255, 218, 214, 0.9);
  color: #93000a;
  border-color: rgba(186, 26, 26, 0.25);
}

.rp-meta-info {
  background: rgba(201, 226, 253, 0.85);
  color: #011d31;
  border-color: rgba(73, 97, 119, 0.25);
}

.rp-meta-muted {
  background: rgba(220, 226, 243, 0.75);
  color: var(--rp-on-surface-variant);
  border-color: rgba(194, 200, 194, 0.45);
}

/* Sprung zum nächsten/ersten Planungstermin */
.rp-jump-date {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0.45rem 0.12rem 0.3rem;
  border-radius: 9999px;
  border: 1px solid rgba(70, 98, 84, 0.28);
  background: rgba(70, 98, 84, 0.08);
  color: var(--rp-primary);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.rp-jump-date .material-symbols-outlined {
  font-size: 0.85rem !important;
  line-height: 1 !important;
}

.rp-jump-date:hover {
  background: rgba(70, 98, 84, 0.16);
  border-color: rgba(70, 98, 84, 0.45);
}

.rp-jump-date:active {
  transform: scale(0.97);
}

.rp-jump-date-past {
  border-color: rgba(114, 121, 116, 0.35);
  background: rgba(114, 121, 116, 0.08);
  color: var(--rp-on-surface-variant);
}

.rp-jump-date-past:hover {
  background: rgba(114, 121, 116, 0.14);
  border-color: rgba(114, 121, 116, 0.5);
}

td.day-cell.rp-jump-flash {
  animation: rp-jump-pulse 1.2s ease;
  outline: 2px solid rgba(70, 98, 84, 0.55);
  outline-offset: -2px;
  z-index: 2;
}

@keyframes rp-jump-pulse {
  0% { background-color: rgba(70, 98, 84, 0.32); }
  100% { background-color: transparent; }
}

.rp-row-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.3rem;
  vertical-align: middle;
}

.rp-row-actions .rp-icon-action {
  min-width: 1.75rem;
  height: 1.75rem;
}

.rp-icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-width: 1.65rem;
  height: 1.65rem;
  padding: 0 0.35rem;
  border-radius: 9999px;
  border: 1px solid rgba(194, 200, 194, 0.45);
  background: rgba(255, 255, 255, 0.35);
  color: var(--rp-on-surface-variant);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition:
    background var(--rp-duration) var(--rp-ease),
    color var(--rp-duration) var(--rp-ease),
    border-color var(--rp-duration) var(--rp-ease),
    transform var(--rp-duration-fast) var(--rp-ease);
}

.rp-icon-action:hover {
  background: rgba(255, 255, 255, 0.65);
  color: var(--rp-on-surface);
  transform: translateY(-1px);
}

.rp-icon-action .material-symbols-outlined {
  font-size: 1rem !important;
}

.rp-icon-action.success {
  color: #146c43;
  border-color: rgba(20, 108, 67, 0.3);
  background: rgba(209, 231, 221, 0.65);
}

.rp-icon-action.danger {
  color: #842029;
  border-color: rgba(132, 32, 41, 0.3);
  background: rgba(248, 215, 218, 0.55);
}

.rp-icon-action.primary {
  color: var(--rp-primary);
  border-color: rgba(70, 98, 84, 0.35);
  background: rgba(202, 234, 216, 0.55);
}

.rp-label-ico {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.rp-label-ico .material-symbols-outlined {
  font-size: 1rem !important;
  color: var(--rp-primary);
}

/* Booking modal – Zuordnung options */
.rp-assign-box {
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.rp-assign-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.rp-assign-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0.6rem 0.4rem;
  border-radius: var(--rp-radius);
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  color: var(--rp-on-surface-variant);
  cursor: pointer;
  text-align: center;
  transition:
    background var(--rp-duration) var(--rp-ease),
    border-color var(--rp-duration) var(--rp-ease),
    box-shadow var(--rp-duration) var(--rp-ease),
    transform var(--rp-duration) var(--rp-ease),
    color var(--rp-duration) var(--rp-ease);
  user-select: none;
}

.rp-assign-option:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
}

.rp-assign-option .material-symbols-outlined {
  font-size: 1.25rem;
  line-height: 1;
}

.rp-assign-title {
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.2;
  color: var(--rp-on-surface);
}

.rp-assign-sub {
  font-size: 0.68rem;
  line-height: 1.2;
  opacity: 0.75;
}

.btn-check:checked + .rp-assign-option {
  box-shadow: 0 8px 18px -10px rgba(70, 98, 84, 0.35);
  transform: translateY(-1px);
}

.btn-check:checked + .rp-assign-none {
  color: #424844;
  background: rgba(220, 226, 243, 0.75);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-check:checked + .rp-assign-none .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.btn-check:checked + .rp-assign-projekt {
  color: #314c3f;
  background: rgba(202, 234, 216, 0.75);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-check:checked + .rp-assign-projekt .material-symbols-outlined {
  color: var(--rp-primary);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.btn-check:checked + .rp-assign-wartung {
  color: #594325;
  background: rgba(255, 221, 182, 0.7);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-check:checked + .rp-assign-wartung .material-symbols-outlined {
  color: var(--rp-tertiary);
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.btn-check:focus-visible + .rp-assign-option {
  outline: 2px solid var(--rp-primary);
  outline-offset: 2px;
}

.rp-task-card {
  border: 1px solid rgba(255, 255, 255, 0.5) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.5) !important;
  background: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 8px 20px -10px rgba(70, 98, 84, 0.12);
}

.rp-task-sub {
  border-left: none !important;
  padding-left: 0.65rem !important;
  margin-left: 0.85rem !important;
  background: rgba(255, 255, 255, 0.22);
  border-radius: var(--rp-radius-sm, 0.55rem);
}

html[data-bs-theme="dark"] .rp-task-card {
  background: rgba(35, 44, 58, 0.5);
  border-color: rgba(255, 255, 255, 0.1) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 8px 20px -10px rgba(0, 0, 0, 0.35);
}

html[data-bs-theme="dark"] .rp-task-sub {
  background: rgba(15, 20, 26, 0.4);
}

@media (max-width: 520px) {
  .rp-assign-group {
    grid-template-columns: 1fr;
  }
}

.matrix-scroll::-webkit-scrollbar,
.rp-kanban-col-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.matrix-scroll::-webkit-scrollbar-thumb,
.rp-kanban-col-body::-webkit-scrollbar-thumb {
  background: rgba(70, 98, 84, 0.25);
  border-radius: 4px;
}

@media (max-width: 991.98px) {
  .rp-sidebar {
    transform: translateX(-100%);
  }
  .rp-sidebar.open {
    transform: translateX(0);
  }
  .rp-topbar,
  .rp-main {
    left: 0;
    margin-left: 0;
  }
}

/* ========== Dark Mode (Liquid Glass) ========== */
html[data-bs-theme="dark"] {
  color-scheme: dark;
  --rp-surface: #12161c;
  --rp-surface-dim: #0b0f14;
  --rp-surface-bright: #1a212b;
  --rp-surface-container-lowest: #0f141a;
  --rp-surface-container-low: #171d26;
  --rp-surface-container: #1c2430;
  --rp-surface-container-high: #232c3a;
  --rp-surface-container-highest: #2a3444;
  --rp-surface-variant: #2a3444;
  --rp-on-surface: #e8eef6;
  --rp-on-surface-variant: #aeb8c6;
  --rp-outline: #84909e;
  --rp-outline-variant: #3a4554;
  --rp-primary: #afcebc;
  --rp-primary-container: #5e7b6c;
  --rp-on-primary: #042015;
  --rp-on-primary-container: #e8f5ee;
  --rp-primary-fixed: #314c3f;
  --rp-secondary: #b0c9e3;
  --rp-secondary-container: #31495e;
  --rp-on-secondary-container: #c9e2fd;
  --rp-tertiary: #e2c19b;
  --rp-tertiary-fixed: #594325;
  --rp-on-tertiary-fixed: #ffddb6;
  --rp-error: #ffb4ab;
  --rp-error-container: #93000a;
}

html[data-bs-theme="dark"] body.rp-body {
  background-color: var(--rp-surface);
  background-image:
    radial-gradient(at 8% 12%, hsla(145, 28%, 32%, 0.35) 0px, transparent 42%),
    radial-gradient(at 88% 18%, hsla(210, 35%, 35%, 0.28) 0px, transparent 45%),
    radial-gradient(at 70% 88%, hsla(35, 30%, 30%, 0.18) 0px, transparent 40%),
    radial-gradient(at 18% 78%, hsla(165, 25%, 28%, 0.2) 0px, transparent 38%);
  color: var(--rp-on-surface);
}

html[data-bs-theme="dark"] {
  --rp-glass-bg: rgba(28, 36, 48, 0.38);
  --rp-glass-bg-elevated: rgba(35, 44, 58, 0.48);
  --rp-glass-border: rgba(255, 255, 255, 0.12);
  --rp-glass-highlight: rgba(255, 255, 255, 0.16);
  --rp-glass-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.1),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.06),
    0 10px 32px -10px rgba(0, 0, 0, 0.45),
    0 2px 10px rgba(0, 0, 0, 0.25);
}

html[data-bs-theme="dark"] .glass-panel {
  background: var(--rp-glass-bg);
  border-color: var(--rp-glass-border);
  box-shadow: var(--rp-glass-shadow);
}

html[data-bs-theme="dark"] .glass-card {
  background: rgba(35, 44, 58, 0.42);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 28px -12px rgba(0, 0, 0, 0.4);
}

html[data-bs-theme="dark"] .glass-card:hover {
  background: rgba(42, 52, 68, 0.55);
}

html[data-bs-theme="dark"] .glass-btn-primary {
  background: linear-gradient(180deg, #5e7b6c 0%, #3d5649 100%);
  color: #f6fff7;
  border-top-color: rgba(255, 255, 255, 0.18);
}

html[data-bs-theme="dark"] .glass-input,
html[data-bs-theme="dark"] .glass-input.form-control,
html[data-bs-theme="dark"] .glass-input.form-select,
html[data-bs-theme="dark"] select.glass-input,
html[data-bs-theme="dark"] input.glass-input,
html[data-bs-theme="dark"] textarea.glass-input {
  background-color: rgba(15, 20, 26, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--rp-on-surface) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html[data-bs-theme="dark"] .glass-input:focus,
html[data-bs-theme="dark"] .glass-input.form-control:focus,
html[data-bs-theme="dark"] .glass-input.form-select:focus {
  background-color: rgba(15, 20, 26, 0.78) !important;
  border-color: var(--rp-primary) !important;
  box-shadow: 0 0 0 2px rgba(175, 206, 188, 0.25) !important;
}

html[data-bs-theme="dark"] .rp-sidebar {
  background: rgba(12, 16, 22, 0.45);
  border-right-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset -1px 0 0 rgba(255, 255, 255, 0.05),
    8px 0 40px rgba(0, 0, 0, 0.35);
}

html[data-bs-theme="dark"] .rp-topbar {
  background: rgba(12, 16, 22, 0.42);
  border-bottom-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 -1px 0 rgba(255, 255, 255, 0.05),
    0 8px 28px rgba(0, 0, 0, 0.28);
}

html[data-bs-theme="dark"] .rp-nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

html[data-bs-theme="dark"] .rp-nav-link.rp-nav-planning.active {
  color: #caead8;
  background: rgba(94, 123, 108, 0.28);
}

html[data-bs-theme="dark"] .rp-nav-link.rp-nav-vacation.active {
  color: #9fd4df;
  background: rgba(31, 122, 140, 0.28);
}

html[data-bs-theme="dark"] .rp-nav-link.rp-nav-offerten.active {
  color: #c9e2fd;
  background: rgba(73, 97, 119, 0.3);
}

html[data-bs-theme="dark"] .rp-nav-link.rp-nav-verwaltung.active {
  color: #e2c19b;
  background: rgba(139, 112, 79, 0.28);
}

html[data-bs-theme="dark"] .rp-pill.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--rp-primary);
}

html[data-bs-theme="dark"] .rp-icon-btn:hover {
  background: rgba(175, 206, 188, 0.12);
}

html[data-bs-theme="dark"] .modal-content {
  background: rgba(28, 36, 48, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--rp-on-surface);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 28px 60px -16px rgba(0, 0, 0, 0.55) !important;
}

html[data-bs-theme="dark"] .modal-header,
html[data-bs-theme="dark"] .modal-footer {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-bs-theme="dark"] .dropdown-menu,
html[data-bs-theme="dark"] .offcanvas {
  background: rgba(28, 36, 48, 0.58) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--rp-on-surface);
}

html[data-bs-theme="dark"] .dropdown-item {
  color: var(--rp-on-surface);
}

html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

html[data-bs-theme="dark"] .dropdown-item.active {
  background: rgba(94, 123, 108, 0.35);
  color: #caead8;
}

html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .bg-white,
html[data-bs-theme="dark"] .bg-light {
  background-color: rgba(28, 36, 48, 0.85) !important;
  color: var(--rp-on-surface) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-bs-theme="dark"] .text-dark {
  color: var(--rp-on-surface) !important;
}

html[data-bs-theme="dark"] .text-muted,
html[data-bs-theme="dark"] .text-secondary {
  color: var(--rp-on-surface-variant) !important;
}

html[data-bs-theme="dark"] .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--rp-on-surface);
  --bs-table-border-color: rgba(255, 255, 255, 0.08);
  color: var(--rp-on-surface);
}

html[data-bs-theme="dark"] .table-light {
  --bs-table-bg: rgba(42, 52, 68, 0.85);
  --bs-table-color: var(--rp-on-surface);
}

html[data-bs-theme="dark"] .table-secondary {
  --bs-table-bg: rgba(42, 52, 68, 0.55);
  --bs-table-color: var(--rp-on-surface);
}

html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select {
  background-color: rgba(15, 20, 26, 0.75);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--rp-on-surface);
}

html[data-bs-theme="dark"] .form-control:focus,
html[data-bs-theme="dark"] .form-select:focus {
  background-color: rgba(15, 20, 26, 0.9);
  border-color: var(--rp-primary);
  color: var(--rp-on-surface);
  box-shadow: 0 0 0 0.2rem rgba(175, 206, 188, 0.2);
}

html[data-bs-theme="dark"] .btn-light {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--rp-on-surface);
}

html[data-bs-theme="dark"] .btn-outline-secondary,
html[data-bs-theme="dark"] .btn-outline-primary,
html[data-bs-theme="dark"] .btn-outline-success,
html[data-bs-theme="dark"] .btn-outline-danger,
html[data-bs-theme="dark"] .btn-outline-info {
  color: var(--rp-on-surface-variant);
  border-color: rgba(255, 255, 255, 0.18);
}

html[data-bs-theme="dark"] .kanban-col,
html[data-bs-theme="dark"] .rp-kanban-col {
  background: rgba(28, 36, 48, 0.4);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-bs-theme="dark"] .kanban-card {
  background: rgba(35, 44, 58, 0.75);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--rp-on-surface);
}

html[data-bs-theme="dark"] .rp-matrix thead th,
html[data-bs-theme="dark"] thead tr.month-row th,
html[data-bs-theme="dark"] thead tr.day-row th {
  background: rgba(28, 36, 48, 0.92) !important;
  color: var(--rp-on-surface-variant);
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html[data-bs-theme="dark"] thead tr.month-row th.sticky-corner,
html[data-bs-theme="dark"] thead tr.day-row th.sticky-corner {
  background: rgba(15, 20, 26, 0.95) !important;
  color: var(--rp-on-surface);
}

html[data-bs-theme="dark"] .rp-emp-name {
  color: var(--rp-on-surface);
}

html[data-bs-theme="dark"] .rp-emp-kuerzel {
  background: rgba(42, 52, 68, 0.85) !important;
  color: var(--rp-on-surface-variant) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-bs-theme="dark"] tbody th.sticky-col {
  background: rgba(23, 29, 38, 0.95) !important;
  color: var(--rp-on-surface);
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-bs-theme="dark"] .th-weekday {
  background-color: rgba(28, 36, 48, 0.7) !important;
  color: var(--rp-on-surface-variant) !important;
}

html[data-bs-theme="dark"] .th-weekend,
html[data-bs-theme="dark"] .weekend-cell {
  background-color: rgba(15, 20, 26, 0.65) !important;
  color: rgba(174, 184, 198, 0.7) !important;
}

html[data-bs-theme="dark"] .today-cell {
  background-color: rgba(175, 206, 188, 0.1) !important;
}

html[data-bs-theme="dark"] .today-head {
  background-color: rgba(175, 206, 188, 0.18) !important;
  color: var(--rp-primary) !important;
}

html[data-bs-theme="dark"] td.day-cell {
  border-color: rgba(255, 255, 255, 0.06) !important;
}

html[data-bs-theme="dark"] .rp-footer-credit,
html[data-bs-theme="dark"] .rp-footer-clock {
  color: var(--rp-on-surface-variant);
}

html[data-bs-theme="dark"] .rp-meta-ok {
  background: rgba(94, 123, 108, 0.35);
  color: #caead8;
}

html[data-bs-theme="dark"] .rp-meta-warn {
  background: rgba(139, 112, 79, 0.35);
  color: #ffddb6;
}

html[data-bs-theme="dark"] .rp-meta-danger {
  background: rgba(147, 0, 10, 0.45);
  color: #ffdad6;
}

html[data-bs-theme="dark"] .rp-meta-info {
  background: rgba(73, 97, 119, 0.4);
  color: #c9e2fd;
}

html[data-bs-theme="dark"] .rp-meta-muted {
  background: rgba(42, 52, 68, 0.8);
  color: var(--rp-on-surface-variant);
}

html[data-bs-theme="dark"] .rp-jump-date {
  background: rgba(202, 234, 216, 0.12);
  border-color: rgba(202, 234, 216, 0.28);
  color: var(--rp-primary-fixed);
}

html[data-bs-theme="dark"] .rp-jump-date:hover {
  background: rgba(202, 234, 216, 0.2);
}

html[data-bs-theme="dark"] .rp-assign-option {
  background: rgba(15, 20, 26, 0.45);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-bs-theme="dark"] .btn-check:checked + .rp-assign-none {
  background: rgba(42, 52, 68, 0.9);
  color: var(--rp-on-surface);
}

html[data-bs-theme="dark"] .btn-check:checked + .rp-assign-projekt {
  background: rgba(94, 123, 108, 0.35);
  color: #caead8;
}

html[data-bs-theme="dark"] .btn-check:checked + .rp-assign-wartung {
  background: rgba(139, 112, 79, 0.35);
  color: #ffddb6;
}

html[data-bs-theme="dark"] .accordion-button {
  background: rgba(28, 36, 48, 0.9);
  color: var(--rp-on-surface);
}

html[data-bs-theme="dark"] .accordion-button:not(.collapsed) {
  background: rgba(94, 123, 108, 0.28);
  color: var(--rp-primary);
}

html[data-bs-theme="dark"] .accordion-item {
  background: rgba(28, 36, 48, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-bs-theme="dark"] .alert {
  border-color: rgba(255, 255, 255, 0.1);
}

html[data-bs-theme="dark"] .border,
html[data-bs-theme="dark"] .border-bottom,
html[data-bs-theme="dark"] .border-top,
html[data-bs-theme="dark"] .border-end {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-bs-theme="dark"] .list-group-item {
  background: rgba(28, 36, 48, 0.85);
  color: var(--rp-on-surface);
  border-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .progress {
  background-color: rgba(42, 52, 68, 0.9);
}

html[data-bs-theme="dark"] .ts-control {
  background-color: rgba(15, 20, 26, 0.75) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: var(--rp-on-surface) !important;
}

html[data-bs-theme="dark"] .ts-dropdown {
  background-color: rgba(28, 36, 48, 0.98) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: var(--rp-on-surface) !important;
}

html[data-bs-theme="dark"] .ts-dropdown .option.active,
html[data-bs-theme="dark"] .ts-dropdown .option:hover {
  background: rgba(94, 123, 108, 0.35);
}

/* Filter restore: Liste unsichtbar halten, bis JS den gespeicherten Filter gesetzt hat */
html.rp-ff-pending.rp-ff-katalog #katalogTable > tbody {
  visibility: hidden;
}

html.rp-ff-pending.rp-ff-search .filterable-row,
html.rp-ff-pending.rp-ff-search .kanban-card {
  visibility: hidden;
}

/* Login */
.rp-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rp-login-wrap {
  width: min(28rem, calc(100% - 2rem));
  text-align: center;
}
.rp-login-card {
  padding: 2rem 1.75rem 1.75rem;
  border-radius: 1.5rem;
}
.rp-login-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rp-on-surface-variant);
  margin-bottom: 0.35rem;
}
.rp-login-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.4rem;
}
.rp-login-sub {
  color: var(--rp-on-surface-variant);
  margin-bottom: 1.5rem;
}
.rp-login-ms {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 9999px;
  font-weight: 600;
  color: var(--rp-on-surface);
  background: var(--rp-glass-bg-elevated);
  border: 1px solid var(--rp-glass-border);
  box-shadow: var(--rp-glass-shadow);
  text-decoration: none;
  transition: transform var(--rp-duration-fast) var(--rp-ease);
}
.rp-login-ms:hover {
  color: var(--rp-on-surface);
  transform: translateY(-1px);
}
.rp-login-hint {
  margin: 1.15rem 0 0;
  font-size: 0.8rem;
  color: var(--rp-on-surface-variant);
}
.rp-login-version {
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--rp-on-surface-variant);
}
