:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.92);
  --ink: #111827;
  --muted: #667085;
  --line: rgba(18, 37, 64, 0.1);
  --blue: #005fc9;
  --blue-deep: #073c88;
  --blue-soft: #e8f2ff;
  --gray-soft: #edf1f7;
  --shadow: 0 24px 80px rgba(18, 37, 64, 0.14);
  --tile-shadow: 0 18px 50px rgba(20, 56, 111, 0.12);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #050914;
  --panel: rgba(12, 18, 32, 0.9);
  --panel-strong: rgba(10, 16, 28, 0.96);
  --ink: #f8fafc;
  --muted: #b7c3d4;
  --line: rgba(226, 232, 240, 0.16);
  --blue: #5eb1ff;
  --blue-deep: #b8dcff;
  --blue-soft: rgba(94, 177, 255, 0.16);
  --gray-soft: rgba(148, 163, 184, 0.16);
  --shadow: 0 26px 90px rgba(0, 0, 0, 0.46);
  --tile-shadow: 0 20px 62px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(0, 95, 201, 0.16), transparent 30rem),
    linear-gradient(135deg, #ffffff 0%, #f7faff 38%, #e9eef7 100%);
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 20% 8%, rgba(37, 99, 235, 0.22), transparent 28rem),
    radial-gradient(circle at 88% 14%, rgba(94, 177, 255, 0.1), transparent 24rem),
    linear-gradient(135deg, #030712 0%, #07111f 52%, #0b1220 100%);
}

button,
a {
  font: inherit;
}

button {
  color: inherit;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1.25rem;
}

.login-panel {
  display: grid;
  gap: 1.1rem;
  width: min(28rem, 100%);
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.login-panel img {
  width: min(14rem, 100%);
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
}

.login-form {
  display: grid;
  gap: 0.85rem;
}

.login-form label {
  display: grid;
  gap: 0.35rem;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 800;
}

.login-form input {
  min-height: 2.85rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.9);
}

.password-field {
  position: relative;
  display: grid;
}

.password-field input {
  padding-right: 6rem;
}

.password-toggle {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  min-height: 2.15rem;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
}

.login-settings,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.login-settings label,
.settings-grid label,
.top-select {
  display: grid;
  gap: 0.3rem;
  color: #344054;
  font-size: 0.78rem;
  font-weight: 800;
}

.login-settings select,
.settings-grid select,
.top-select select {
  min-height: 2.45rem;
  padding: 0 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
}

.toggle-row,
.theme-switch {
  display: flex !important;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.45rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.72);
}

.switch-label {
  color: inherit;
  font-weight: 800;
  white-space: nowrap;
}

.theme-switch .switch-label {
  display: none;
}

.flag-language {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.45rem;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.flag-language button {
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.flag-language button.is-selected {
  border-color: rgba(0, 95, 201, 0.22);
  background: #fff;
  box-shadow: 0 8px 18px rgba(18, 37, 64, 0.1);
}

.flag {
  position: relative;
  display: block;
  width: 1.45rem;
  height: 1rem;
  overflow: hidden;
  border-radius: 0.18rem;
  box-shadow: inset 0 0 0 1px rgba(18, 37, 64, 0.16);
}

.flag-de {
  background: linear-gradient(#111 0 33.33%, #dd0000 33.33% 66.66%, #ffce00 66.66%);
}

.flag-pl {
  background: linear-gradient(#fff 0 50%, #dc143c 50%);
}

.flag-ru {
  background: linear-gradient(#fff 0 33.33%, #0039a6 33.33% 66.66%, #d52b1e 66.66%);
}

.flag-tr {
  background: #e30a17;
}

.flag-tr::before {
  content: "";
  position: absolute;
  top: 0.22rem;
  left: 0.34rem;
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 50%;
  box-shadow: -0.12rem 0 0 0.1rem #fff;
}

.flag-tr::after {
  content: "";
  position: absolute;
  top: 0.37rem;
  left: 0.86rem;
  width: 0;
  height: 0;
  border-right: 0.16rem solid transparent;
  border-bottom: 0.12rem solid #fff;
  border-left: 0.16rem solid transparent;
  transform: rotate(35deg);
}

.flag-gb {
  background:
    linear-gradient(27deg, transparent 42%, #fff 42% 48%, #c8102e 48% 53%, #fff 53% 59%, transparent 59%),
    linear-gradient(153deg, transparent 42%, #fff 42% 48%, #c8102e 48% 53%, #fff 53% 59%, transparent 59%),
    linear-gradient(#012169 0 35%, #fff 35% 43%, #c8102e 43% 57%, #fff 57% 65%, #012169 65%),
    linear-gradient(90deg, #012169 0 36%, #fff 36% 44%, #c8102e 44% 56%, #fff 56% 64%, #012169 64%);
}

.flag-language.compact {
  min-height: 2.45rem;
}

.switch-control {
  position: relative;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 3rem;
  height: 1.65rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.38);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 180ms ease;
}

.theme-switch .switch-track {
  width: 2.7rem;
  height: 1.38rem;
}

.theme-switch .switch-track::before {
  content: none;
}

.theme-switch::before,
.theme-switch::after {
  color: #344054;
  font-size: 0.95rem;
  line-height: 1;
}

.theme-switch::before {
  content: "☀";
}

.theme-switch::after {
  content: "☾";
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 0.18rem;
  left: 0.18rem;
  z-index: 2;
  width: 1.29rem;
  height: 1.29rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 12px rgba(18, 37, 64, 0.18);
  transition: transform 180ms ease;
}

.theme-switch .switch-track::after {
  top: 0.16rem;
  left: 0.16rem;
  width: 1.06rem;
  height: 1.06rem;
}

.switch-control input:checked + .switch-track {
  background: linear-gradient(145deg, #0ea5e9, #005fc9);
}

.switch-control input:checked + .switch-track::after {
  transform: translateX(1.35rem);
}

.theme-switch input:checked + .switch-track::after {
  transform: translateX(1.32rem);
}

.login-help {
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(0, 95, 201, 0.14);
  border-radius: 0.95rem;
  color: var(--blue-deep);
  background: rgba(232, 242, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 800;
}

.link-button {
  min-height: 2.2rem;
  border: 0;
  color: var(--blue-deep);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.app-shell {
  display: grid;
  grid-template-columns: 18rem 1fr;
  min-height: 100vh;
  padding: 1.25rem;
  gap: 1.25rem;
}

.sidebar,
.status-band,
.tile,
.admin-panel,
.topbar {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.sidebar {
  position: sticky;
  top: 1.25rem;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 2.5rem);
  padding: 1rem;
  border-radius: 1.5rem;
}

.brand {
  display: grid;
  min-height: 4.75rem;
  place-items: center;
  padding: 0.75rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  overflow: hidden;
}

.brand img {
  width: 100%;
  max-width: 13.5rem;
  height: auto;
  display: block;
}

.nav-stack {
  display: grid;
  gap: 0.4rem;
  margin-top: 1.25rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.85rem;
  padding: 0 0.85rem;
  color: #344054;
  text-decoration: none;
  border-radius: 0.9rem;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-item:hover,
.nav-item.is-active {
  color: var(--blue-deep);
  background: var(--blue-soft);
}

.nav-item:hover {
  transform: translateY(-1px);
}

.nav-icon {
  display: grid;
  flex: 0 0 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border-radius: 0.6rem;
  background: #fff;
  color: var(--blue);
  border: 1px solid rgba(0, 95, 201, 0.12);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding: 0.75rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.avatar {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(145deg, var(--blue), #111827);
}

.user-card strong,
.user-card span {
  display: block;
}

.user-card strong {
  font-size: 0.88rem;
}

.user-card span {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.workspace {
  min-width: 0;
  padding: 0.25rem 0.25rem 2rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 8.5rem;
  padding: clamp(1.25rem, 3vw, 2.15rem);
  border-radius: 1.75rem;
  background:
    linear-gradient(145deg, rgba(226, 232, 240, 0.98), rgba(248, 250, 252, 0.9)),
    radial-gradient(circle at 12% 12%, rgba(0, 95, 201, 0.16), transparent 15rem);
  border-color: rgba(15, 23, 42, 0.12);
}

.topbar h1 {
  color: #0f172a;
}

.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2rem, 4vw, 4.6rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.65rem, 2.2vw, 2.25rem);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.45rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #344054;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.78rem;
  font-weight: 900;
}

.sync-pill span {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0.3rem rgba(22, 163, 74, 0.14);
}

.sync-pill.is-offline span {
  background: #dc2626;
  box-shadow: 0 0 0 0.3rem rgba(220, 38, 38, 0.14);
}

.icon-button,
.primary-button,
.segmented-control button {
  border: 0;
  cursor: pointer;
}

.icon-button {
  display: grid;
  width: 2.85rem;
  height: 2.85rem;
  place-items: center;
  border-radius: 50%;
  color: var(--blue);
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.primary-button {
  min-height: 2.85rem;
  padding: 0 1rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  background: linear-gradient(145deg, var(--blue), var(--blue-deep));
  box-shadow: 0 14px 30px rgba(0, 95, 201, 0.24);
}

.status-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding: 1.15rem 1.25rem;
  border-radius: 1.35rem;
}

.status-band > div:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.25rem 0.55rem;
  align-items: center;
}

.status-band p {
  grid-column: 2;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.status-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0.35rem rgba(22, 163, 74, 0.13);
}

.status-dot.is-offline {
  background: #dc2626;
  box-shadow: 0 0 0 0.35rem rgba(220, 38, 38, 0.13);
}

.status-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.status-metrics span {
  padding: 0.5rem 0.72rem;
  border-radius: 999px;
  color: #344054;
  font-size: 0.82rem;
  font-weight: 700;
  background: #fff;
  border: 1px solid var(--line);
}

.module-section {
  margin-top: 2rem;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0 0.25rem;
}

.segmented-control {
  display: flex;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.segmented-control button {
  min-height: 2.2rem;
  padding: 0 0.85rem;
  color: var(--muted);
  border-radius: 999px;
  background: transparent;
  font-weight: 700;
}

.segmented-control button.is-selected {
  color: var(--blue-deep);
  background: #fff;
  box-shadow: 0 8px 22px rgba(18, 37, 64, 0.08);
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
  gap: 1rem;
}

.tile-grid.tile-list {
  grid-template-columns: 1fr;
}

.tile {
  position: relative;
  display: flex;
  min-height: 8.6rem;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
  padding: 1rem;
  color: inherit;
  border-radius: 1.35rem;
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  box-shadow: var(--tile-shadow);
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(240, 246, 255, 0.66)),
    radial-gradient(circle at 80% 18%, var(--accent), transparent 5rem);
  opacity: 0.95;
  z-index: -1;
}

.tile:hover {
  border-color: rgba(0, 95, 201, 0.28);
  box-shadow: 0 24px 70px rgba(20, 56, 111, 0.18);
  transform: translateY(-4px);
}

.tile:focus-visible {
  outline: 3px solid rgba(0, 95, 201, 0.28);
  outline-offset: 3px;
}

.favorite-star {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  display: grid;
  width: 2.1rem;
  height: 2.1rem;
  place-items: center;
  border: 1px solid rgba(0, 95, 201, 0.16);
  border-radius: 50%;
  color: #667085;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(20, 56, 111, 0.12);
  cursor: pointer;
  font-size: 1.15rem;
  line-height: 1;
}

.favorite-star.is-favorite {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(255, 251, 235, 0.96);
}

.tile[data-state="planned"] {
  opacity: 0.78;
}

.tile[data-state="planned"]::before {
  opacity: 0.58;
  filter: saturate(0.72);
}

.tile-active {
  border-color: rgba(0, 95, 201, 0.42);
  box-shadow: 0 22px 58px rgba(0, 95, 201, 0.18);
}

.tile-active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(0, 95, 201, 0.18);
  pointer-events: none;
}

.tile-active .tile-mark {
  background: linear-gradient(145deg, #005fc9, #0b2f75);
  box-shadow: 0 14px 34px rgba(0, 95, 201, 0.28);
}

.tile-active-badge {
  position: absolute;
  top: 3.15rem;
  right: 0.75rem;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.65rem;
  border-radius: 999px;
  color: #075985;
  background: rgba(224, 242, 254, 0.9);
  border: 1px solid rgba(14, 116, 144, 0.18);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
}

.tile-active-badge::before {
  content: "";
  width: 0.48rem;
  height: 0.48rem;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0.24rem rgba(34, 197, 94, 0.14);
}

.tile-planned-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.48);
  box-shadow: inset 0 0 0 1px rgba(100, 116, 139, 0.22);
}

.tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tile-mark {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  border-radius: 0.95rem;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(145deg, var(--blue), #111827);
  box-shadow: 0 10px 26px rgba(0, 95, 201, 0.22);
}

.tile-mark svg {
  width: 1.85rem;
  height: 1.85rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.6;
}

.tile-mark-logo {
  width: min(8.75rem, 74%);
  height: 3.25rem;
  padding: 0.45rem 0.65rem;
  color: #111827;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(18, 37, 64, 0.1);
  box-shadow: 0 10px 28px rgba(18, 37, 64, 0.08);
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  min-width: 0;
  font-size: 0.9rem;
  line-height: 1;
  white-space: nowrap;
}

.brand-logo strong {
  font-weight: 800;
}

.logo-symbol,
.leaf,
.sun {
  flex: 0 0 auto;
}

.aurubis-logo {
  color: #5f6368;
  font-weight: 800;
}

.aurubis-logo .logo-symbol {
  width: 1rem;
  height: 1rem;
  border-radius: 50% 50% 50% 0;
  background: #f47b20;
  transform: rotate(-35deg);
}

.arcelor-logo {
  align-items: baseline;
  color: #222;
  font-size: 0.78rem;
  gap: 0.08rem;
}

.arcelor-logo::before {
  content: "";
  width: 0.8rem;
  height: 0.8rem;
  margin-right: 0.18rem;
  border: 0.18rem solid #f7941d;
  border-left-color: transparent;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(18deg);
}

.adm-logo {
  color: #0f6b3d;
  font-size: 1rem;
  font-weight: 900;
}

.adm-logo .leaf {
  width: 1rem;
  height: 1.2rem;
  border-radius: 100% 0 100% 0;
  background: #4b9f45;
  transform: rotate(35deg);
}

.barry-logo {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  color: #8a1538;
  font-size: 0.74rem;
  font-weight: 700;
}

.barry-logo strong {
  font-size: 0.88rem;
}

.vattenfall-logo {
  color: #0f5aa6;
  font-weight: 800;
}

.vattenfall-logo .sun {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: #ffd200;
  box-shadow: inset 0 0 0 0.22rem #fff, 0 0 0 0.08rem #ffd200;
}

.tile-arrow {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
}

.tile h3 {
  margin: 1rem 0 0;
  max-width: 11rem;
  font-size: 1.05rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.tile-list-meta {
  display: none;
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.tile-grid.tile-list .tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 5rem;
  align-items: center;
}

.tile-grid.tile-list .tile-top {
  justify-content: start;
}

.tile-grid.tile-list .tile h3 {
  margin-top: 0;
  max-width: none;
}

.tile-grid.tile-list .tile-list-meta {
  display: block;
}

.tile-grid.tile-list .tile-line {
  display: none;
}

.tile-line {
  width: 42%;
  height: 0.24rem;
  margin-top: 0.9rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), rgba(0, 95, 201, 0.12));
}

.is-hidden {
  display: none !important;
}

.module-detail {
  margin-top: 2rem;
}

.admin-heading {
  align-items: center;
}

.secondary-button {
  min-height: 2.85rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(18, 37, 64, 0.08);
  cursor: pointer;
  font-weight: 800;
}

.chapter-tabs {
  display: none;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.admin-chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
}

.admin-chapter-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  min-height: 5.9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  color: inherit;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(240, 246, 255, 0.66)),
    radial-gradient(circle at 84% 16%, var(--accent), transparent 6rem);
  box-shadow: var(--tile-shadow);
  cursor: pointer;
  text-align: left;
}

.admin-chapter-card strong {
  display: block;
}

.admin-chapter-card strong {
  font-size: 1rem;
}

.admin-chapter-card em {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.8);
  font-style: normal;
  font-weight: 900;
}

.chapter-back {
  margin-bottom: 1rem;
}

.chapter-tabs button {
  min-height: 2.4rem;
  padding: 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #344054;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-weight: 800;
}

.chapter-tabs button.is-selected {
  color: #fff;
  background: linear-gradient(145deg, var(--blue), var(--blue-deep));
  border-color: transparent;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(16rem, 0.85fr) minmax(22rem, 1.25fr) minmax(18rem, 1fr);
  gap: 1rem;
  align-items: start;
}

.weather-layout,
.fleet-dashboard {
  display: grid;
  gap: 1rem;
}

.weather-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 13rem;
  overflow: hidden;
}

.weather-hero h3 {
  margin: 0;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 0.95;
}

.weather-hero strong,
.weather-hero span {
  display: block;
}

.weather-hero span {
  margin-top: 0.45rem;
  color: var(--muted);
  font-weight: 800;
}

.weather-symbol {
  display: grid;
  width: 7rem;
  height: 7rem;
  place-items: center;
  border-radius: 2rem;
  color: #fff;
  background: linear-gradient(145deg, #0ea5e9, #2563eb 52%, #7c3aed);
  box-shadow: 0 18px 45px rgba(14, 165, 233, 0.26);
  font-size: 4rem;
}

.weather-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.weather-controls label,
.list-toolbar label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.construction-form {
  gap: 1rem;
}

.form-section {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.62);
}

.form-section legend {
  padding: 0 0.4rem;
  color: var(--blue-deep);
  font-weight: 900;
}

.form-section.is-locked {
  opacity: 0.52;
}

.checkbox-card {
  display: flex !important;
  flex-direction: row !important;
  gap: 0.55rem !important;
  align-items: center;
  min-height: 2.9rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--blue-deep);
  font-size: 0.9rem;
  font-weight: 900;
}

.checkbox-card input {
  width: 1rem;
  height: 1rem;
}

.dynamic-blocks {
  display: grid;
  gap: 0.75rem;
}

.construction-dynamic-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px dashed rgba(0, 95, 201, 0.28);
  border-radius: 0.9rem;
  background: rgba(245, 249, 255, 0.78);
}

.traffic-light {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 50%;
  box-shadow: 0 0 0 0.35rem rgba(148, 163, 184, 0.14);
}

.traffic-green {
  background: #16a34a;
  box-shadow: 0 0 0 0.35rem rgba(22, 163, 74, 0.16);
}

.traffic-yellow {
  background: #f59e0b;
  box-shadow: 0 0 0 0.35rem rgba(245, 158, 11, 0.18);
}

.traffic-red {
  background: #dc2626;
  box-shadow: 0 0 0 0.35rem rgba(220, 38, 38, 0.16);
}

.traffic-blue {
  background: #2563eb;
  box-shadow: 0 0 0 0.35rem rgba(37, 99, 235, 0.16);
}

.traffic-gray {
  background: #94a3b8;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.construction-table {
  width: 100%;
  min-width: 58rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.construction-table th,
.construction-table td {
  padding: 0.85rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.construction-table th {
  color: var(--muted);
  background: rgba(245, 249, 255, 0.9);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.construction-table tbody tr {
  cursor: pointer;
}

.construction-table tbody tr:hover {
  background: rgba(0, 95, 201, 0.08);
}

.construction-table tbody tr:last-child td {
  border-bottom: 0;
}

.construction-calendar {
  display: grid;
  gap: 1rem;
}

.construction-workspace {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(19rem, 0.58fr);
  gap: 1rem;
  align-items: start;
}

.progress-workspace {
  grid-template-columns: minmax(0, 1fr);
}

.progress-workspace > * {
  min-width: 0;
}

.employee-workspace {
  grid-template-columns: minmax(20rem, 0.78fr) minmax(26rem, 1.22fr);
}

.employee-workspace > * {
  min-width: 0;
}

.compact-dashboard {
  margin-bottom: 1rem;
}

.construction-dashboard-insights {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.construction-dashboard-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.construction-dashboard-card,
.construction-project-insight {
  border: 1px solid rgba(0, 95, 201, 0.14);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.06);
}

.construction-dashboard-card {
  display: grid;
  gap: 0.7rem;
  padding: 1rem;
}

.construction-dashboard-card h4,
.construction-dashboard-section-title h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.construction-status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.construction-status-strip span {
  display: flex;
  min-width: 0;
  gap: 0.4rem;
  align-items: center;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  background: rgba(248, 250, 252, 0.82);
}

.construction-status-strip b {
  margin-left: auto;
  color: var(--ink);
}

.construction-conversion {
  display: grid;
  gap: 0.45rem;
}

.construction-conversion strong {
  color: var(--blue-deep);
  font-size: 2rem;
  line-height: 1;
}

.construction-conversion span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.construction-conversion i,
.construction-project-bars i {
  display: block;
  overflow: hidden;
  height: 0.58rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.construction-conversion em,
.construction-project-bars em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #2563eb);
}

.construction-dashboard-projects {
  display: grid;
  gap: 0.75rem;
}

.construction-dashboard-section-title {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.construction-project-insight {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
}

.construction-project-insight-head {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.construction-project-insight-head div {
  display: grid;
  min-width: 0;
  gap: 0.16rem;
}

.construction-project-insight-head strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.construction-project-insight-head small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.construction-project-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.construction-project-metrics span {
  display: grid;
  gap: 0.18rem;
  padding: 0.62rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0.75rem;
  background: rgba(248, 250, 252, 0.72);
}

.construction-project-metrics small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.construction-project-metrics b {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.construction-project-bars {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.construction-project-bars label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.construction-project-bars b {
  color: var(--ink);
}

.construction-work-form {
  padding: 1rem;
  border: 1px solid rgba(0, 95, 201, 0.15);
  border-radius: 1rem;
  background:
    linear-gradient(145deg, rgba(245, 249, 255, 0.9), rgba(255, 255, 255, 0.74));
}

.construction-work-form textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.construction-mini-row,
.construction-action-row {
  display: grid;
  gap: 0.55rem;
  align-items: center;
  padding: 0.65rem;
  border: 1px dashed rgba(0, 95, 201, 0.22);
  border-radius: 0.75rem;
  background: rgba(245, 249, 255, 0.78);
}

.construction-mini-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.construction-action-row {
  grid-template-columns: auto minmax(12rem, 1fr) minmax(9rem, 0.38fr) auto;
}

.payment-plan-row {
  grid-template-columns: minmax(10rem, 1fr) minmax(5rem, 0.22fr) minmax(8rem, 0.3fr) minmax(8rem, 0.3fr) minmax(9rem, 0.34fr) minmax(8rem, 0.32fr) auto;
}

.purchase-payment-row {
  grid-template-columns: minmax(10rem, 1fr) minmax(8rem, 0.35fr) minmax(8rem, 0.35fr) minmax(9rem, 0.38fr) minmax(8rem, 0.32fr) auto;
}

.purchase-payment-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid rgba(0, 95, 201, 0.14);
  border-radius: 0.75rem;
  background: rgba(245, 249, 255, 0.82);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.purchase-payment-summary strong {
  color: var(--ink);
}

.progress-period {
  display: grid;
  gap: 0.9rem;
}

.progress-week-card {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid rgba(0, 95, 201, 0.16);
  border-radius: 0.85rem;
  background: rgba(248, 250, 252, 0.86);
}

.progress-week-title {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.progress-week-title strong {
  color: var(--ink);
}

.progress-week-title span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.progress-grid-table {
  display: grid;
  gap: 0.4rem;
  overflow-x: auto;
}

.progress-grid-head,
.progress-grid-row {
  display: grid;
  grid-template-columns: minmax(13rem, 1.1fr) repeat(7, minmax(4.2rem, 0.45fr)) minmax(8.5rem, 0.62fr) auto;
  gap: 0.4rem;
  align-items: center;
  min-width: 58rem;
}

.progress-grid-head {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
}

.progress-grid-head span {
  display: grid;
  gap: 0.1rem;
}

.progress-grid-head small {
  font-size: 0.66rem;
}

.progress-grid-row input,
.progress-grid-row select {
  min-height: 2.35rem;
  padding: 0.45rem;
}

.progress-grid-row .progress-row-total {
  color: var(--blue);
  font-size: 0.78rem;
  white-space: nowrap;
}

.compact-week-add {
  justify-self: start;
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.74rem;
}

.progress-grid-head .is-disabled,
.progress-grid-row .is-disabled {
  opacity: 0.45;
}

.progress-bar {
  position: relative;
  height: 0.7rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.86);
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #005fc9);
}

.checkline {
  display: inline-flex !important;
  flex-direction: row !important;
  gap: 0.45rem !important;
  align-items: center;
  min-height: auto !important;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.checkline input {
  width: 1rem;
  height: 1rem;
}

.construction-preview-panel {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 34px rgba(18, 37, 64, 0.07);
}

.compact-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 0.35fr);
}

.progress-toolbar {
  grid-template-columns: minmax(0, 1fr);
}

.employee-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(10rem, 0.36fr);
}

.construction-record-list {
  max-height: 34rem;
  overflow: auto;
  padding-right: 0.15rem;
}

.construction-record-card {
  display: grid;
  gap: 0.5rem;
  padding: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-left: 0.35rem solid #0f5fc9;
  border-radius: 0.95rem;
  background: rgba(248, 250, 252, 0.88);
}

.construction-record-card div {
  display: grid;
  gap: 0.15rem;
}

.construction-record-card span,
.construction-record-card small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.construction-record-card strong {
  color: var(--ink);
  font-size: 0.98rem;
}

.construction-record-card p {
  margin: 0;
  color: #334155;
  font-size: 0.86rem;
  line-height: 1.45;
}

.construction-record-card em {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.78);
  color: #1e3a8a;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.record-checklist {
  display: grid;
  gap: 0.35rem;
}

.record-checklist label {
  display: flex;
  gap: 0.45rem;
  align-items: flex-start;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
}

.record-checklist input {
  margin-top: 0.1rem;
  accent-color: var(--blue);
}

.record-checklist input:checked + span {
  color: #64748b;
  text-decoration: line-through;
}

.record-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.record-actions .secondary-button,
.record-actions .danger-button {
  min-height: 2rem;
  padding: 0.45rem 0.65rem;
  font-size: 0.72rem;
}

.construction-record-card.record-progress {
  border-left-color: #0284c7;
  background: rgba(240, 249, 255, 0.9);
}

.construction-record-card.record-done {
  border-left-color: #16a34a;
  background: rgba(240, 253, 244, 0.86);
}

.construction-record-card.record-critical {
  border-left-color: #dc2626;
  background: rgba(254, 242, 242, 0.82);
}

.construction-record-card.record-meeting {
  border-left-color: #7c3aed;
  background: rgba(245, 243, 255, 0.86);
}

[data-construction-panel="Baustellenbegehung"] > .empty-state,
[data-construction-panel="Besprechung"] > .empty-state {
  display: none;
}

.cashflow-toolbar {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(8rem, 0.28fr) minmax(10rem, 0.34fr) auto;
  gap: 0.75rem;
  align-items: end;
  margin-bottom: 1rem;
}

.cashflow-toolbar label,
.cashflow-toolbar span {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.cashflow-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.cashflow-layout > * {
  min-width: 0;
}

.compact-title {
  margin-bottom: 0.15rem;
}

.cashflow-months {
  display: grid;
  gap: 0.55rem;
}

.cashflow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.cashflow-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: max-content;
}

.cashflow-legend i {
  display: inline-block;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
}

.cashflow-legend .cashflow-plus i {
  background: linear-gradient(90deg, #38bdf8, #005fc9);
}

.cashflow-legend .cashflow-minus i {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.cashflow-month-row {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) 7.5rem;
  gap: 0.75rem;
  align-items: center;
}

.cashflow-month-row strong {
  color: var(--ink);
  font-size: 0.86rem;
}

.cashflow-track {
  position: relative;
  height: 1.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.78);
}

.cashflow-track::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: rgba(15, 23, 42, 0.18);
  content: "";
}

.cashflow-in,
.cashflow-out {
  position: absolute;
  top: 0;
  height: 100%;
}

.cashflow-in {
  left: 50%;
  background: linear-gradient(90deg, #38bdf8, #005fc9);
}

.cashflow-out {
  right: 50%;
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.cashflow-month-row span {
  font-size: 0.85rem;
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.cashflow-project-months {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.9rem;
}

.cashflow-project-heading {
  display: grid;
  gap: 0.15rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.cashflow-project-heading span {
  color: var(--blue-deep);
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.cashflow-project-heading strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.cashflow-project-card {
  display: grid;
  gap: 0.45rem;
  padding: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 0.85rem;
  background: rgba(248, 250, 252, 0.82);
}

.cashflow-project-card > div:first-child {
  display: grid;
  gap: 0.12rem;
}

.cashflow-project-card > div:first-child strong {
  color: var(--ink);
}

.cashflow-project-card > div:first-child span,
.cashflow-project-row small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 850;
}

.cashflow-project-row {
  display: grid;
  grid-template-columns: minmax(5rem, 0.5fr) minmax(0, 1fr) minmax(7rem, 0.5fr);
  gap: 0.55rem;
  align-items: center;
}

.cashflow-project-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.cashflow-project-row strong {
  text-align: right;
  white-space: nowrap;
}

.is-positive {
  color: #16a34a;
}

.is-negative {
  color: #dc2626;
}

.cashflow-metric.good strong {
  color: #16a34a;
}

.cashflow-metric.bad strong {
  color: #dc2626;
}

.cashflow-card {
  cursor: default;
}

.contact-card,
.contact-card p,
.contact-card small,
.contact-card em {
  overflow-wrap: anywhere;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) auto auto;
  gap: 0.75rem;
  align-items: end;
}

.calendar-toolbar label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.calendar-year-control {
  display: inline-grid;
  grid-template-columns: auto minmax(5rem, auto) auto;
  gap: 0.35rem;
  align-items: center;
}

.calendar-year-control strong {
  display: grid;
  min-height: 2.85rem;
  place-items: center;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--blue-deep);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.calendar-legend span {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.calendar-legend i {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 0.28fr);
  gap: 1rem;
  align-items: start;
}

.year-calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.month-card {
  min-height: 17.75rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 34px rgba(18, 37, 64, 0.07);
}

.month-card.is-current-month {
  border-color: rgba(0, 95, 201, 0.48);
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.92), rgba(255, 255, 255, 0.82));
}

.month-card-title {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.month-card-title strong {
  color: var(--blue-deep);
}

.month-card-title span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.month-load-axis {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  height: 1.55rem;
  padding: 0 0.35rem;
  border-radius: 0.7rem 0.7rem 0 0;
  background: rgba(219, 234, 254, 0.72);
  color: #1e3a8a;
  font-size: 0.68rem;
  font-weight: 950;
}

.month-load-axis span:nth-child(2) {
  text-align: center;
}

.month-load-axis span:nth-child(3) {
  text-align: right;
}

.month-load-axis i {
  position: absolute;
  top: 0.2rem;
  bottom: -8.2rem;
  width: 2px;
  border-radius: 999px;
  background: #0f5fc9;
  box-shadow: 0 0 0 3px rgba(15, 95, 201, 0.14);
}

.month-project-layer {
  position: relative;
  min-height: 8rem;
  border-radius: 0 0 0.75rem 0.75rem;
  background:
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.18) 0 1px, transparent 1px calc(100% / 31)),
    rgba(248, 250, 252, 0.72);
}

.month-project-layer em {
  display: block;
  padding-top: 0.75rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
}

.calendar-project-bar {
  position: absolute;
  overflow: hidden;
  min-width: 3.2rem;
  height: 1.05rem;
  padding: 0 0.4rem;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1.05rem;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-detail-panel {
  position: sticky;
  top: 1rem;
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(18, 37, 64, 0.08);
}

.calendar-detail-panel h3,
.calendar-detail-panel p {
  margin: 0;
}

.calendar-detail-list {
  display: grid;
  gap: 0.55rem;
}

.calendar-detail-list span {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.calendar-detail-list b {
  color: var(--ink);
  text-align: right;
}

.calendar-detail-timeline {
  height: 0.65rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
}

.calendar-detail-timeline i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.calendar-blue-0 { background: #0f5fc9; }
.calendar-blue-1 { background: #1d4ed8; }
.calendar-blue-2 { background: #0284c7; }
.calendar-blue-3 { background: #2563eb; }
.calendar-blue-4 { background: #0369a1; }
.calendar-blue-5 { background: #1e40af; }
.calendar-blue-6 { background: #0891b2; }
.calendar-blue-7 { background: #075985; }

.weather-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.75rem;
}

.weather-detail {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.weather-detail span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.weather-detail strong {
  font-size: 1.25rem;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.75rem;
}

.weather-card {
  display: grid;
  position: relative;
  gap: 0.25rem;
  min-height: 8rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.weather-delete {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  display: grid;
  width: 1.6rem;
  height: 1.6rem;
  place-items: center;
  border-radius: 50%;
  color: #991b1b;
  background: rgba(254, 226, 226, 0.92);
  font-weight: 900;
}

.weather-tone-0 {
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.95), rgba(255, 255, 255, 0.74));
}

.weather-tone-1 {
  background: linear-gradient(145deg, rgba(220, 252, 231, 0.94), rgba(255, 255, 255, 0.74));
}

.weather-tone-2 {
  background: linear-gradient(145deg, rgba(254, 249, 195, 0.94), rgba(255, 255, 255, 0.74));
}

.weather-tone-3 {
  background: linear-gradient(145deg, rgba(255, 237, 213, 0.94), rgba(255, 255, 255, 0.74));
}

.weather-tone-4 {
  background: linear-gradient(145deg, rgba(237, 233, 254, 0.94), rgba(255, 255, 255, 0.74));
}

.weather-card.is-selected {
  border-color: rgba(0, 95, 201, 0.42);
  box-shadow: 0 16px 36px rgba(0, 95, 201, 0.16);
}

.weather-card span,
.weather-card small,
.weather-card em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.weather-card strong {
  font-size: 2rem;
}

.weather-forecast {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.65rem;
}

.weather-forecast article {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.weather-forecast span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.fleet-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.fleet-overview article {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.fleet-overview span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.fleet-overview strong {
  font-size: 2rem;
}

.fleet-dashboard-panel {
  display: grid;
  gap: 1rem;
}

.fleet-analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.75rem;
}

.fleet-analytics-grid article {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.fleet-analytics-grid .dashboard-tone-0 {
  background: linear-gradient(145deg, rgba(219, 234, 254, 0.96), rgba(255, 255, 255, 0.76));
}

.fleet-analytics-grid .dashboard-tone-1 {
  background: linear-gradient(145deg, rgba(220, 252, 231, 0.96), rgba(255, 255, 255, 0.76));
}

.fleet-analytics-grid .dashboard-tone-2 {
  background: linear-gradient(145deg, rgba(254, 249, 195, 0.96), rgba(255, 255, 255, 0.76));
}

.fleet-analytics-grid .dashboard-tone-3 {
  background: linear-gradient(145deg, rgba(255, 237, 213, 0.96), rgba(255, 255, 255, 0.76));
}

.fleet-analytics-grid .dashboard-tone-4 {
  background: linear-gradient(145deg, rgba(237, 233, 254, 0.96), rgba(255, 255, 255, 0.76));
}

.fleet-analytics-grid .dashboard-tone-5 {
  background: linear-gradient(145deg, rgba(207, 250, 254, 0.96), rgba(255, 255, 255, 0.76));
}

:root[data-theme="dark"] .fleet-analytics-grid .dashboard-tone-0 {
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.42), rgba(15, 23, 42, 0.86));
}

:root[data-theme="dark"] .fleet-analytics-grid .dashboard-tone-1 {
  background: linear-gradient(145deg, rgba(22, 101, 52, 0.42), rgba(15, 23, 42, 0.86));
}

:root[data-theme="dark"] .fleet-analytics-grid .dashboard-tone-2 {
  background: linear-gradient(145deg, rgba(161, 98, 7, 0.42), rgba(15, 23, 42, 0.86));
}

:root[data-theme="dark"] .fleet-analytics-grid .dashboard-tone-3 {
  background: linear-gradient(145deg, rgba(194, 65, 12, 0.42), rgba(15, 23, 42, 0.86));
}

:root[data-theme="dark"] .fleet-analytics-grid .dashboard-tone-4 {
  background: linear-gradient(145deg, rgba(109, 40, 217, 0.42), rgba(15, 23, 42, 0.86));
}

:root[data-theme="dark"] .fleet-analytics-grid .dashboard-tone-5 {
  background: linear-gradient(145deg, rgba(8, 145, 178, 0.42), rgba(15, 23, 42, 0.86));
}

.fleet-analytics-grid span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.fleet-analytics-grid strong {
  font-size: 1.35rem;
}

.fleet-dashboard-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.fleet-list {
  display: grid;
  gap: 0.65rem;
}

.list-toolbar {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(10rem, 0.45fr) minmax(10rem, 0.45fr);
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.dynamic-appointments {
  display: grid;
  gap: 0.55rem;
}

.appointment-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 0.6fr) auto;
  gap: 0.55rem;
  align-items: end;
}

.full-span {
  grid-column: 1 / -1;
}

.fleet-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto minmax(10rem, auto);
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.fleet-row.is-selected {
  border-color: rgba(0, 95, 201, 0.42);
  box-shadow: 0 14px 32px rgba(0, 95, 201, 0.14);
}

.fleet-panel.is-hidden {
  display: none;
}

.construction-panel.is-hidden {
  display: none;
}

.damage-actions,
.todo-actions,
.tire-actions,
.image-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.todo-entry.is-done {
  opacity: 0.68;
}

.todo-entry.is-done strong,
.todo-entry.is-done span {
  text-decoration: line-through;
}

.image-chip {
  min-height: 2rem;
  padding: 0 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-weight: 800;
}

.fleet-row small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.fleet-plate {
  padding: 0.45rem 0.65rem;
  border-radius: 0.6rem;
  color: #111827;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 950;
}

.fleet-status {
  padding: 0.42rem 0.65rem;
  border-radius: 999px;
  color: #166534;
  background: rgba(220, 252, 231, 0.9);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 900;
}

.fleet-status.wartung {
  color: #92400e;
  background: rgba(254, 243, 199, 0.9);
}

.fleet-status.schaden {
  color: #991b1b;
  background: rgba(254, 226, 226, 0.9);
}

.admin-panel {
  border-radius: 1.35rem;
  padding: 1rem;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}

.admin-panel.is-focused {
  border-color: rgba(0, 95, 201, 0.32);
  box-shadow: 0 24px 70px rgba(0, 95, 201, 0.16);
}

.admin-panel.chapter-dimmed {
  display: none;
}

.permission-panel {
  grid-column: span 2;
}

.mail-panel {
  grid-column: span 1;
}

.teams-panel,
.locations-panel {
  grid-column: span 1;
}

.quick-actions {
  display: grid;
  gap: 0.65rem;
}

.quick-actions button {
  min-height: 2.85rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  color: #344054;
  background: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font-weight: 800;
  text-align: left;
  padding: 0 0.85rem;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel-title h3 {
  margin: 0;
  font-size: 1.12rem;
}

.icon-button.compact {
  width: 2.35rem;
  height: 2.35rem;
  font-size: 1.3rem;
  font-weight: 800;
}

.draft-pill {
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  color: var(--blue-deep);
  background: var(--blue-soft);
  font-size: 0.78rem;
  font-weight: 800;
}

.search-field,
.admin-form label {
  display: grid;
  gap: 0.35rem;
  color: #344054;
  font-size: 0.78rem;
  font-weight: 800;
}

.search-field input,
.admin-form input,
.admin-form select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  outline: none;
}

.search-panel {
  display: grid;
  gap: 1rem;
}

.search-result {
  display: grid;
  width: 100%;
  gap: 0.25rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  text-align: left;
}

.search-result:hover {
  border-color: rgba(0, 95, 201, 0.32);
  box-shadow: 0 12px 30px rgba(20, 56, 111, 0.12);
}

.search-result span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.password-state {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.password-state span {
  min-height: 2.6rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  color: #344054;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
  font-weight: 800;
}

.employee-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.employee-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: center;
  min-height: 4.2rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  text-align: left;
}

.employee-row.is-active {
  border-color: rgba(0, 95, 201, 0.3);
  background: var(--blue-soft);
}

.employee-row strong,
.employee-row small {
  display: block;
}

.employee-row small {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.employee-row em {
  color: #15803d;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
}

.employee-row em.muted {
  color: var(--muted);
}

.employee-avatar {
  display: grid;
  width: 2.35rem;
  height: 2.35rem;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), #111827);
  font-size: 0.82rem;
  font-weight: 900;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.compact-form {
  grid-template-columns: 1fr;
}

.form-actions {
  display: flex;
  grid-column: 1 / -1;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.2rem;
}

.form-actions .primary-button,
.form-actions .secondary-button,
.form-actions .danger-button {
  flex: 1 1 9rem;
}

.danger-button {
  min-height: 2.85rem;
  padding: 0 1rem;
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 999px;
  color: #b42318;
  background: rgba(254, 242, 242, 0.9);
  box-shadow: 0 10px 24px rgba(127, 29, 29, 0.08);
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.permission-grid {
  display: grid;
  gap: 0.65rem;
}

.permission-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 0.8rem;
}

.permission-tree {
  max-height: 34rem;
  overflow: auto;
  padding-right: 0.25rem;
}

.permission-group {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.62);
  overflow: hidden;
}

.permission-group summary {
  cursor: pointer;
  padding: 0.8rem 0.9rem;
  color: var(--blue-deep);
  font-weight: 900;
}

.permission-chapters {
  display: grid;
  gap: 0.5rem;
  padding: 0 0.7rem 0.75rem;
}

.permission-chapter {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) auto auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.55rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.78);
}

.permission-chapter strong {
  font-size: 0.84rem;
}

.permission-grid label,
.permission-chapter label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 800;
}

.permission-grid input,
.permission-chapter input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--blue);
}

.role-summary {
  display: grid;
  gap: 0.2rem;
  margin-top: 0.9rem;
  padding: 0.85rem;
  border-radius: 1rem;
  color: #344054;
  background: rgba(232, 242, 255, 0.72);
}

.role-summary span {
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.role-summary strong {
  font-size: 0.92rem;
}

.empty-state {
  padding: 1rem;
  border: 1px dashed rgba(18, 37, 64, 0.18);
  border-radius: 1rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.56);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
}

.mail-log {
  display: grid;
  gap: 0.7rem;
  max-height: 24rem;
  overflow: auto;
}

.mail-entry {
  display: grid;
  gap: 0.22rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.mail-entry span,
.mail-entry small,
.mail-entry em {
  color: var(--muted);
  font-size: 0.78rem;
}

.mail-entry code {
  overflow-wrap: anywhere;
  color: var(--blue-deep);
  font-size: 0.74rem;
}

.mail-entry em {
  color: #344054;
  font-style: normal;
  font-weight: 800;
}

.mail-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.2rem;
  margin-top: 0.35rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(0, 95, 201, 0.18);
  border-radius: 999px;
  color: var(--blue-deep);
  background: var(--blue-soft);
  font-size: 0.8rem;
  font-weight: 900;
  text-decoration: none;
}

.summary-list {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.summary-item {
  display: grid;
  gap: 0.2rem;
  padding: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
}

.summary-item span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.location-grid {
  display: grid;
  gap: 0.55rem;
}

.manager-form,
.system-actions {
  margin-bottom: 0.85rem;
}

.system-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

:root[data-theme="dark"] .login-panel img,
:root[data-theme="dark"] .brand,
:root[data-theme="dark"] .nav-icon,
:root[data-theme="dark"] .icon-button,
:root[data-theme="dark"] .segmented-control button.is-selected,
:root[data-theme="dark"] .status-metrics span,
:root[data-theme="dark"] .tile-arrow,
:root[data-theme="dark"] .password-toggle,
:root[data-theme="dark"] .sync-pill,
:root[data-theme="dark"] .secondary-button,
:root[data-theme="dark"] .quick-actions button,
:root[data-theme="dark"] .employee-row,
:root[data-theme="dark"] .permission-group,
:root[data-theme="dark"] .permission-chapter,
:root[data-theme="dark"] .permission-grid label,
:root[data-theme="dark"] .summary-item,
:root[data-theme="dark"] .weather-detail,
:root[data-theme="dark"] .weather-card,
:root[data-theme="dark"] .weather-forecast article,
:root[data-theme="dark"] .fleet-overview article,
:root[data-theme="dark"] .fleet-analytics-grid article,
:root[data-theme="dark"] .fleet-row,
:root[data-theme="dark"] .location-grid label,
:root[data-theme="dark"] .mail-entry,
:root[data-theme="dark"] .empty-state,
:root[data-theme="dark"] .toggle-row,
:root[data-theme="dark"] .theme-switch,
:root[data-theme="dark"] .flag-language {
  background: rgba(15, 23, 42, 0.82);
}

:root[data-theme="dark"] .flag-language button.is-selected {
  background: rgba(2, 6, 23, 0.82);
}

:root[data-theme="dark"] .topbar {
  background:
    linear-gradient(145deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.92)),
    radial-gradient(circle at 12% 12%, rgba(96, 165, 250, 0.2), transparent 15rem);
  border-color: rgba(148, 163, 184, 0.18);
}

:root[data-theme="dark"] .topbar h1 {
  color: #f8fafc;
}

:root[data-theme="dark"] .theme-switch::before,
:root[data-theme="dark"] .theme-switch::after {
  color: rgba(248, 250, 252, 0.82);
}

:root[data-theme="dark"] .tile::before,
:root[data-theme="dark"] .admin-chapter-card {
  background:
    linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(8, 13, 26, 0.9)),
    radial-gradient(circle at 80% 18%, rgba(94, 177, 255, 0.18), transparent 5rem);
}

:root[data-theme="dark"] .tile-active {
  border-color: rgba(96, 165, 250, 0.48);
  box-shadow: 0 22px 58px rgba(37, 99, 235, 0.18);
}

:root[data-theme="dark"] .tile-active-badge {
  color: #dbeafe;
  background: rgba(30, 64, 175, 0.46);
  border-color: rgba(147, 197, 253, 0.22);
}

:root[data-theme="dark"] .favorite-star {
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.86);
  border-color: rgba(148, 163, 184, 0.24);
}

:root[data-theme="dark"] .favorite-star.is-favorite {
  color: #fbbf24;
  background: rgba(120, 53, 15, 0.42);
  border-color: rgba(251, 191, 36, 0.32);
}

:root[data-theme="dark"] .tile-planned-dot {
  background: rgba(100, 116, 139, 0.54);
}

:root[data-theme="dark"] .weather-tone-0,
:root[data-theme="dark"] .weather-tone-1,
:root[data-theme="dark"] .weather-tone-2,
:root[data-theme="dark"] .weather-tone-3,
:root[data-theme="dark"] .weather-tone-4 {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.82));
}

:root[data-theme="dark"] .construction-dashboard-card,
:root[data-theme="dark"] .construction-project-insight {
  background: rgba(15, 23, 42, 0.82);
}

:root[data-theme="dark"] .construction-status-strip span,
:root[data-theme="dark"] .construction-project-metrics span {
  background: rgba(15, 23, 42, 0.54);
}

:root[data-theme="dark"] .login-form label,
:root[data-theme="dark"] .login-settings label,
:root[data-theme="dark"] .settings-grid label,
:root[data-theme="dark"] .top-select,
:root[data-theme="dark"] .nav-item,
:root[data-theme="dark"] .search-field,
:root[data-theme="dark"] .search-result,
:root[data-theme="dark"] .admin-form label,
:root[data-theme="dark"] .quick-actions button,
:root[data-theme="dark"] .password-state span,
:root[data-theme="dark"] .role-summary,
:root[data-theme="dark"] .mail-entry em,
:root[data-theme="dark"] .sync-pill {
  color: var(--ink);
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] .admin-form input,
:root[data-theme="dark"] .admin-form select,
:root[data-theme="dark"] .search-field input,
:root[data-theme="dark"] .login-form input,
:root[data-theme="dark"] .login-settings select,
:root[data-theme="dark"] .settings-grid select,
:root[data-theme="dark"] .top-select select {
  color: var(--ink);
  background: rgba(2, 6, 23, 0.62);
}

:root[data-theme="dark"] .brand-logo,
:root[data-theme="dark"] .tile-mark-logo {
  color: #f8fafc;
}

.location-grid label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.7rem;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  font-weight: 800;
}

.location-grid input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--blue);
}

.toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 20;
  max-width: min(22rem, calc(100vw - 2rem));
  padding: 0.85rem 1rem;
  border: 1px solid rgba(0, 95, 201, 0.2);
  border-radius: 1rem;
  color: var(--blue-deep);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 50px rgba(18, 37, 64, 0.18);
  font-size: 0.9rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
  }

  .brand {
    width: 13rem;
  }

  .nav-stack {
    grid-auto-flow: column;
    margin: 0 auto;
  }

  .nav-item span:last-child,
  .user-card div {
    display: none;
  }

  .construction-dashboard-row,
  .construction-project-metrics,
  .construction-project-bars {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .app-shell {
    padding: 0.75rem;
    gap: 0.75rem;
  }

  .sidebar,
  .topbar,
  .status-band {
    border-radius: 1.15rem;
  }

  .sidebar {
    align-items: stretch;
    overflow-x: auto;
  }

  .brand {
    flex: 0 0 10.5rem;
  }

  .nav-stack {
    margin-left: 0.5rem;
  }

  .topbar,
  .status-band,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions,
  .status-metrics {
    width: 100%;
    justify-content: space-between;
  }

  .primary-button {
    flex: 1;
  }

  .tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .tile-grid.tile-list {
    grid-template-columns: 1fr;
  }

  .tile-grid.tile-list .tile {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .weather-controls,
  .list-toolbar {
    grid-template-columns: 1fr;
  }

  .weather-grid,
  .weather-detail-grid,
  .weather-forecast,
  .fleet-overview,
  .fleet-analytics-grid,
  .fleet-dashboard-lists {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fleet-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .appointment-row {
    grid-template-columns: 1fr;
  }

  .admin-layout,
  .permission-panel,
  .mail-panel,
  .teams-panel,
  .locations-panel,
  .construction-workspace,
  .cashflow-layout,
  .cashflow-toolbar {
    grid-template-columns: 1fr;
    grid-column: auto;
  }

  .cashflow-month-row {
    grid-template-columns: 4.5rem minmax(0, 1fr);
  }

  .cashflow-month-row span {
    grid-column: 2;
    text-align: left;
  }

  .admin-form,
  .permission-grid,
  .password-state {
    grid-template-columns: 1fr;
  }

  .construction-action-row {
    grid-template-columns: 1fr;
  }

  .payment-plan-row {
    grid-template-columns: 1fr;
  }

  .purchase-payment-row {
    grid-template-columns: 1fr;
  }

  .permission-chapter {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-direction: column;
  }

  .tile {
    min-height: 9.75rem;
    border-radius: 1rem;
  }

  .tile-mark-logo {
    width: min(7.5rem, 76%);
  }

  .brand-logo {
    font-size: 0.8rem;
  }

  .tile h3 {
    font-size: 0.95rem;
  }
}

@media (max-width: 430px) {
  .tile-grid,
  .weather-grid,
  .weather-detail-grid,
  .weather-forecast,
  .fleet-overview,
  .fleet-analytics-grid,
  .fleet-dashboard-lists {
    grid-template-columns: 1fr;
  }
}
