:root {
  --portal-bg: #f4f6f8;
  --portal-surface: #ffffff;
  --portal-surface-soft: #f8fafc;
  --portal-ink: #18212c;
  --portal-muted: #637083;
  --portal-border: #dbe2ea;
  --portal-brand: #b3191f;
  --portal-brand-dark: #7d1116;
  --portal-accent: #0f766e;
  --portal-navy: #111827;
  --portal-shadow: 0 18px 50px rgba(17, 24, 39, .08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--portal-bg);
  color: var(--portal-ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  letter-spacing: 0;
}

a {
  color: var(--portal-brand);
  text-decoration: none;
}

a:hover,
a:focus {
  color: var(--portal-brand-dark);
}

button,
input,
select {
  font: inherit;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(17, 24, 39, .98), rgba(50, 18, 21, .96)),
    url("https://brandenburg-news24.de/uploads/logo.png");
  background-position: center, center bottom 32px;
  background-repeat: no-repeat;
  background-size: cover, 210px auto;
  color: #fff;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 16px;
  position: sticky;
  top: 0;
}

.brand {
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  gap: 14px;
  margin-bottom: 22px;
  min-height: 70px;
  padding-bottom: 18px;
}

.brand-mark {
  background: #fff;
  border-radius: 6px;
  display: grid;
  height: 48px;
  place-items: center;
  width: 78px;
}

.brand-mark img {
  display: block;
  max-height: 38px;
  max-width: 66px;
  object-fit: contain;
}

.brand strong,
.brand span {
  display: block;
  line-height: 1.1;
}

.brand strong {
  color: #fff;
  font-size: 1.05rem;
  letter-spacing: .02em;
}

.brand span {
  color: rgba(255, 255, 255, .7);
  font-size: .78rem;
  margin-top: 4px;
  text-transform: uppercase;
}

.portal-side-nav {
  display: grid;
  gap: 6px;
}

.portal-side-nav .nav-link {
  align-items: center;
  border-radius: 6px;
  color: rgba(255, 255, 255, .82);
  display: flex;
  gap: 10px;
  min-height: 42px;
  padding: 10px 13px;
  transition: background-color .2s ease, color .2s ease;
}

.portal-side-nav .nav-link span {
  color: rgba(255, 255, 255, .66);
  text-align: center;
  width: 22px;
}

.portal-side-nav .nav-link:hover,
.portal-side-nav .nav-link:focus,
.portal-side-nav .nav-link.active {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.sidebar-section {
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .78);
  display: grid;
  font-size: .92rem;
  gap: 11px;
  margin-top: 28px;
  padding-top: 20px;
}

.sidebar-section p {
  color: rgba(255, 255, 255, .56);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  margin: 0 0 4px;
  text-transform: uppercase;
}

.sidebar-section a {
  color: rgba(255, 255, 255, .82);
}

.portal-status {
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  color: rgba(255, 255, 255, .82);
  display: inline-flex;
  font-size: .88rem;
  gap: 8px;
  min-height: 40px;
  padding: 8px 12px;
}

.portal-status.is-online i {
  color: #53d18f;
}

.portal-status.is-locked i {
  color: #f8c55a;
}

.sidebar-toggle {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  margin-top: 28px;
  min-height: 42px;
  padding: 10px 13px;
  width: 100%;
}

.main {
  min-width: 0;
}

.topbar {
  align-items: center;
  background: var(--portal-navy);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  color: #fff;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  min-height: 82px;
  padding: 14px 28px;
}

.search {
  align-items: center;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  box-shadow: var(--portal-shadow);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  max-width: 760px;
  overflow: hidden;
  width: 55vw;
}

.search input {
  background: transparent;
  border: 0;
  color: var(--portal-ink);
  min-height: 44px;
  outline: 0;
  padding: 0 16px;
  width: 100%;
}

.search button,
.primary {
  align-items: center;
  background: var(--portal-brand);
  border: 1px solid var(--portal-brand);
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
}

.search button {
  border-radius: 0;
  min-height: 46px;
  padding-inline: 18px;
}

.search button:hover,
.primary:hover {
  background: var(--portal-brand-dark);
  border-color: var(--portal-brand-dark);
}

.secondary {
  align-items: center;
  background: #fff;
  border: 1px solid var(--portal-border);
  border-radius: 6px;
  color: var(--portal-ink);
  cursor: pointer;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
}

.secondary:hover {
  border-color: rgba(179, 25, 31, .45);
  color: var(--portal-brand);
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 14px;
}

.btn {
  border-radius: 6px;
  font-weight: 700;
  min-height: 42px;
}

.btn-primary {
  --bs-btn-bg: var(--portal-brand);
  --bs-btn-border-color: var(--portal-brand);
  --bs-btn-hover-bg: var(--portal-brand-dark);
  --bs-btn-hover-border-color: var(--portal-brand-dark);
  --bs-btn-active-bg: var(--portal-brand-dark);
  --bs-btn-active-border-color: var(--portal-brand-dark);
}

.icon-btn,
.language {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, .86);
  cursor: pointer;
  min-height: 38px;
  position: relative;
}

.badge {
  background: var(--portal-brand);
  border-radius: 999px;
  color: #fff;
  display: grid;
  font-size: .72rem;
  font-weight: 800;
  height: 21px;
  min-width: 21px;
  place-items: center;
  position: absolute;
  right: -10px;
  top: -8px;
}

.profile {
  align-items: center;
  display: flex;
  gap: 12px;
}

.profile span {
  color: rgba(255, 255, 255, .7);
  display: block;
  font-size: .78rem;
  margin-top: 2px;
}

.avatar,
.contact-avatar {
  background: #fff;
  border-radius: 999px;
  color: var(--portal-brand);
  display: grid;
  font-weight: 900;
  height: 44px;
  place-items: center;
  width: 44px;
}

.breaking {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--portal-border);
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
}

.breaking strong {
  align-items: center;
  background: var(--portal-brand);
  color: #fff;
  display: flex;
  font-size: .84rem;
  font-weight: 800;
  height: 54px;
  letter-spacing: .06em;
  padding-left: 28px;
  text-transform: uppercase;
}

.ticker {
  overflow: hidden;
  white-space: nowrap;
}

.ticker span {
  color: var(--portal-muted);
  display: inline-block;
  font-size: .9rem;
  padding: 0 28px;
}

.hero {
  align-items: end;
  background:
    linear-gradient(125deg, rgba(17, 24, 39, .98), rgba(50, 18, 21, .96)),
    url("https://brandenburg-news24.de/uploads/logo.png");
  background-position: center, right 8% top 28px;
  background-repeat: no-repeat;
  background-size: cover, 260px auto;
  color: #fff;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  padding: 40px 42px 36px;
}

.eyebrow {
  color: #f2b4b7;
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .08em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 800;
  line-height: 1;
  margin: 0;
}

.hero p:not(.eyebrow) {
  color: rgba(255, 255, 255, .78);
  line-height: 1.6;
  margin: 16px 0 0;
  max-width: 760px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.hero .secondary {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .16);
  color: #fff;
}

.layout {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) 360px;
  padding: 28px 42px 42px;
}

.content,
.panel-card,
.quick-cards article {
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--radius);
  box-shadow: var(--portal-shadow);
}

.content {
  min-width: 0;
  padding: 24px;
}

.portal-content {
  overflow: hidden;
}

.portal-content .container,
.portal-content section.news-list.container {
  max-width: none;
  padding-left: 0;
  padding-right: 0;
}

.portal-notice {
  align-items: flex-start;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #7c2d12;
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  padding: 16px;
}

.portal-notice i {
  color: #c2410c;
  font-size: 1.25rem;
  margin-top: 2px;
}

.portal-notice span {
  display: block;
  margin-top: 2px;
}

.portal-content h4,
.page-header {
  border-bottom: 1px solid var(--portal-border);
  color: var(--portal-ink);
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 18px;
  padding: 0 0 14px;
}

.portal-content .card {
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(17, 24, 39, .05);
  color: var(--portal-ink);
  overflow: hidden;
}

.portal-content .card.m-3 {
  margin: 0 0 16px !important;
}

.portal-content .card-header {
  background: var(--portal-surface-soft);
  border-bottom: 1px solid var(--portal-border);
  color: var(--portal-muted);
  font-size: .86rem;
  font-weight: 600;
}

.portal-content .card-body {
  padding: 18px;
}

.portal-content .card-title a,
.portal-content .h6 {
  color: var(--portal-ink);
  font-size: 1.05rem;
  font-weight: 800;
}

.portal-content .card-title a:hover,
.portal-content .h6:hover {
  color: var(--portal-brand);
}

.portal-content .card-text {
  color: var(--portal-muted);
  line-height: 1.6;
}

.news-container-image,
.news-artikel-image {
  background: var(--portal-surface-soft);
  border: 1px solid var(--portal-border);
  border-radius: 6px;
  height: 150px;
  overflow: hidden;
  width: 100%;
}

.news-container-message img,
.news-artikel img,
.card-img-top-story {
  display: block;
  height: 100%;
  margin: 0;
  object-fit: cover;
  object-position: center;
  width: 100%;
}

.portal-content .nav-tabs {
  border-bottom: 1px solid var(--portal-border);
  gap: 8px;
  margin-bottom: 22px;
}

.portal-content .nav-tabs .nav-link {
  background: transparent;
  border: 0;
  border-radius: 6px 6px 0 0;
  color: var(--portal-muted);
  display: block;
  font-weight: 800;
  min-height: 44px;
  padding: 10px 13px;
}

.portal-content .nav-tabs .nav-link.active {
  background: var(--portal-brand);
  color: #fff;
}

.portal-content .form-control,
.portal-content .form-select {
  background-color: #fff;
  border: 1px solid var(--portal-border);
  border-radius: 6px;
  color: var(--portal-ink);
}

.portal-content .form-control:focus,
.portal-content .form-select:focus {
  border-color: rgba(179, 25, 31, .45);
  box-shadow: 0 0 0 .2rem rgba(179, 25, 31, .14);
}

.portal-content .form-floating > label {
  color: var(--portal-muted);
}

.portal-content .table {
  --bs-table-bg: transparent;
  --bs-table-color: var(--portal-ink);
  --bs-table-border-color: var(--portal-border);
}

.portal-content .page-link {
  border-color: var(--portal-border);
  color: var(--portal-brand);
}

.portal-content .page-item.active .page-link {
  background: var(--portal-brand);
  border-color: var(--portal-brand);
}

.toolbar {
  align-items: end;
  border-bottom: 1px solid var(--portal-border);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 16px;
}

.toolbar h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 4px;
}

.toolbar p,
.muted {
  color: var(--portal-muted);
  margin: 0;
}

.filters {
  display: flex;
  gap: 10px;
}

.filters select {
  background: #fff;
  border: 1px solid var(--portal-border);
  border-radius: 6px;
  color: var(--portal-ink);
  min-height: 42px;
  padding: 9px 12px;
}

.filters select:focus,
.search input:focus {
  box-shadow: 0 0 0 .2rem rgba(179, 25, 31, .14);
}

.news-list {
  display: grid;
  gap: 16px;
}

.news-card {
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(17, 24, 39, .05);
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) auto;
  overflow: hidden;
}

.news-image {
  background:
    linear-gradient(135deg, rgba(17, 24, 39, .1), rgba(50, 18, 21, .38)),
    var(--image);
  background-position: center;
  background-size: cover;
  min-height: 164px;
}

.news-body {
  padding: 18px;
}

.meta {
  align-items: center;
  color: var(--portal-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: .82rem;
  gap: 10px;
  margin-bottom: 10px;
}

.label {
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  padding: 4px 7px;
  text-transform: uppercase;
}

.label.red { background: var(--portal-brand); }
.label.orange { background: #c2410c; }
.label.blue { background: var(--portal-accent); }

.news-body h3 {
  color: var(--portal-ink);
  font-size: 1.05rem;
  font-weight: 800;
  margin: 0 0 8px;
}

.news-body p {
  color: var(--portal-muted);
  line-height: 1.6;
  margin: 0 0 14px;
}

.media-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.media-tags span {
  background: var(--portal-surface-soft);
  border: 1px solid var(--portal-border);
  border-radius: 999px;
  color: var(--portal-muted);
  font-size: .76rem;
  padding: 5px 9px;
}

.media-tags .license {
  background: rgba(15, 118, 110, .08);
  border-color: rgba(15, 118, 110, .24);
  color: var(--portal-accent);
  font-weight: 700;
}

.news-actions {
  align-content: center;
  border-left: 1px solid var(--portal-border);
  display: grid;
  gap: 10px;
  padding: 18px;
}

.news-actions button {
  min-width: 116px;
}

.quick-cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
}

.quick-cards article {
  box-shadow: 0 8px 28px rgba(17, 24, 39, .05);
  min-width: 0;
  padding: 18px;
}

.quick-cards span {
  color: var(--portal-brand);
  display: block;
  font-size: 1.4rem;
  min-height: 28px;
}

.quick-cards h3 {
  font-size: 1rem;
  margin: 9px 0 6px;
}

.quick-cards p {
  color: var(--portal-muted);
  line-height: 1.5;
  margin: 0 0 12px;
}

.quick-cards a,
.panel-head a {
  color: var(--portal-brand);
  font-size: .82rem;
  font-weight: 800;
}

.right-panel {
  align-content: start;
  display: grid;
  gap: 16px;
}

.panel-card {
  padding: 18px;
}

.panel-head {
  align-items: center;
  border-bottom: 1px solid var(--portal-border);
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.panel-head h3 {
  font-size: 1rem;
  margin: 0;
}

.simple-list,
.alert-list {
  display: grid;
  gap: 14px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.simple-list li,
.alert-list li {
  display: flex;
  font-size: .9rem;
  gap: 12px;
  justify-content: space-between;
}

.simple-list.stacked li {
  display: block;
}

.simple-list small,
.alert-list small {
  color: var(--portal-muted);
  white-space: nowrap;
}

.dot {
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
  height: 10px;
  margin-top: 5px;
  width: 10px;
}

.dot.red { background: var(--portal-brand); }
.dot.blue { background: var(--portal-accent); }
.dot.green { background: #15803d; }

.progress-label {
  display: flex;
  justify-content: space-between;
  margin: 16px 0 8px;
}

.progress {
  background: var(--portal-surface-soft);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress div {
  background: var(--portal-accent);
  border-radius: inherit;
  height: 100%;
}

.contact-row {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.contact-avatar {
  background: var(--portal-surface-soft);
  border: 1px solid var(--portal-border);
}

.contact-row span {
  color: var(--portal-muted);
  display: block;
  font-size: .82rem;
}

.full {
  width: 100%;
}

.modal {
  background: rgba(17, 24, 39, .7);
  display: none;
  inset: 0;
  padding: 24px;
  place-items: center;
  position: fixed;
  z-index: 20;
}

.modal.open {
  display: grid;
}

.modal-content {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
  padding: 28px;
  position: relative;
  width: min(760px, 100%);
}

.modal-close {
  background: #fff;
  border: 1px solid var(--portal-border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 22px;
  height: 36px;
  line-height: 1;
  position: absolute;
  right: 18px;
  top: 18px;
  width: 36px;
}

.modal-content h2 {
  color: var(--portal-ink);
  font-size: 1.7rem;
  margin: 0 0 14px;
}

.modal-content p {
  line-height: 1.7;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.portal-footer {
  background: var(--portal-navy);
  color: rgba(255, 255, 255, .68);
  display: flex;
  font-size: .9rem;
  gap: 16px;
  justify-content: space-between;
  padding: 20px 42px;
}

.sidebar.collapsed {
  width: 88px;
  padding-inline: 12px;
}

.sidebar.collapsed .brand div:not(.brand-mark),
.sidebar.collapsed .portal-side-nav .nav-link,
.sidebar.collapsed .sidebar-section,
.sidebar.collapsed .sidebar-toggle {
  font-size: 0;
}

.sidebar.collapsed .brand {
  justify-content: center;
}

.sidebar.collapsed .brand-mark {
  height: 44px;
  width: 52px;
}

.sidebar.collapsed .brand-mark img {
  max-width: 42px;
}

.sidebar.collapsed .portal-side-nav .nav-link {
  justify-content: center;
}

.sidebar.collapsed .portal-side-nav .nav-link span {
  font-size: 18px;
}

@media (max-width: 1200px) {
  .app {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .sidebar {
    padding-inline: 12px;
  }

  .brand {
    justify-content: center;
  }

  .brand div:not(.brand-mark),
  .portal-side-nav .nav-link,
  .sidebar-section,
  .sidebar-toggle {
    font-size: 0;
  }

  .brand-mark {
    height: 44px;
    width: 52px;
  }

  .brand-mark img {
    max-width: 42px;
  }

  .portal-side-nav .nav-link {
    justify-content: center;
  }

  .portal-side-nav .nav-link span {
    font-size: 18px;
  }

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

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

@media (max-width: 900px) {
  .quick-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .news-card {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .news-actions {
    border-left: 0;
    border-top: 1px solid var(--portal-border);
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app {
    display: block;
  }

  .sidebar {
    background-size: cover, 160px auto;
    height: auto;
    position: static;
  }

  .brand {
    justify-content: flex-start;
  }

  .brand div:not(.brand-mark),
  .portal-side-nav .nav-link,
  .sidebar-section,
  .sidebar-toggle {
    font-size: inherit;
  }

  .portal-side-nav .nav-link {
    justify-content: flex-start;
  }

  .topbar,
  .hero,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search {
    width: 100%;
  }

  .profile {
    display: none;
  }

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

  .layout,
  .hero {
    padding-inline: 18px;
  }

  .content {
    padding: 18px;
  }

  .news-card {
    grid-template-columns: 1fr;
  }

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

  .filters {
    flex-direction: column;
  }

  .quick-cards,
  .right-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .topbar,
  .layout {
    padding-inline: 14px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .topbar-actions,
  .hero-actions,
  .news-actions,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
    display: flex;
  }

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

  .search button {
    border-radius: 0;
  }
}
