/* Gestaltungssystem fuer das videowien Kundenportal (Runde 3)
   Uebernommen aus startseite-stile.css von videowien.at.
   Kopfzeilen zentriert auf gleicher Hoehe, Fliesstext linksbuendig in einer mittigen Spalte. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('assets/inter.woff2') format('woff2');
}

:root {
  --navy: #15304F;
  --blue: #295F9D;
  --blue-bright: #4A8FD6;
  --ink: #0c1f36;
  --line: rgba(255, 255, 255, .12);
  --card: rgba(255, 255, 255, .05);
  --glass: rgba(255, 255, 255, .10);

  --bg-page: var(--navy);
  --bg-surface: var(--card);
  --bg-subtle: rgba(12, 31, 54, .58);
  --text-main: #ffffff;
  --text-body: rgba(255, 255, 255, .82);
  --text-muted: rgba(255, 255, 255, .74);
  --border-color: var(--line);
  --border-strong: rgba(255, 255, 255, .24);

  --accent: #8ec5ff;
  --accent-hover: #3a83d0;
  --accent-soft: rgba(74, 143, 214, .18);

  --status-material: #e2edf8;
  --status-material-bg: #1c314a;
  --status-arbeit: #d6ecff;
  --status-arbeit-bg: #123866;
  --status-freigabe: #ffdfa3;
  --status-freigabe-bg: #4d3208;
  --status-freigegeben: #c6f7df;
  --status-freigegeben-bg: #0f3d28;
  --status-eingeplant: #e3dfff;
  --status-eingeplant-bg: #2a2456;
  --status-aenderung: #ffd6db;
  --status-aenderung-bg: #521820;
  --status-offen: #ffe4b5;
  --status-offen-bg: #4a2c06;
  --status-erledigt: #ccf7e2;
  --status-erledigt-bg: #113b27;

  --radius-sm: 10px;
  --radius-md: 20px;
  --radius-lg: 22px;
  --shadow-sm: 0 14px 34px -18px rgba(0, 0, 0, .55);
  --shadow-md: 0 30px 60px -34px rgba(0, 0, 0, .6);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-sans);
  background: var(--navy);
  color: #ffffff;
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fester Hintergrundverlauf wie in .bg auf videowien.at (ohne Skyline) */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(38deg, #000 0%, var(--blue) 100%);
}

.wrap {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 360px) {
  .wrap {
    padding: 0 20px;
  }
}

/* Ueberschriften: fett (800), engerer Buchstabenabstand, niemals ein einzelnes Wort in der letzten Zeile */
h1, h2, h3, h4 {
  margin: 0 0 0.55rem 0;
  font-weight: 800;
  color: #ffffff;
  text-wrap: balance;
  overflow-wrap: break-word;
}

h1 {
  font-size: clamp(28px, 4.4vw, 46px);
  letter-spacing: -0.03em;
  line-height: 1.08;
}

h2 {
  font-size: clamp(21px, 3.1vw, 30px);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

h3 {
  font-size: clamp(17.5px, 2.3vw, 21px);
  letter-spacing: -0.015em;
  line-height: 1.24;
}

h4 {
  font-size: 16px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

p {
  color: var(--text-body);
  font-size: clamp(15.5px, 1.8vw, 17px);
  margin: 0 0 0.85rem 0;
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: clamp(16.5px, 2vw, 19px);
  color: rgba(255, 255, 255, .9);
}

/* Ueberzeilen wie .eyebrow auf videowien.at */
.eyebrow,
.page-hero-kicker {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: none;
  padding: 0;
  margin: 0 0 12px 0;
}

/* Links im Fliesstext: in Textfarbe mit feiner Unterstreichung, nicht blau und nicht fett */
a {
  color: inherit;
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .35);
  text-underline-offset: 3px;
}

a:hover {
  color: #ffffff;
  text-decoration-color: rgba(255, 255, 255, .75);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: 0.95rem;
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: rgba(12, 31, 54, .75);
  color: #e6f0fa;
  border: 1px solid var(--line);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
}

/* Obere Prototyp-Steuerleiste (neutral grau, klar vom Portal abgehoben) */
.proto-bar {
  background: #23262b;
  color: #f0f2f5;
  border-bottom: 1px solid #3c4048;
  position: sticky;
  top: 0;
  z-index: 100;
  font-size: 0.82rem;
}

.proto-bar-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0.45rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.proto-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.proto-group-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.proto-bar-collapsible {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex: 1 1 auto;
}

.proto-bar.is-collapsed .proto-bar-inner {
  padding: 0.32rem 1rem;
}

.proto-bar.is-collapsed .proto-group-head {
  width: 100%;
  justify-content: space-between;
}

.proto-bar.is-collapsed .proto-bar-collapsible {
  display: none !important;
}

.proto-toggle-btn {
  white-space: nowrap;
}

.proto-badge {
  background: #383d47;
  color: #ffffff;
  border: 1px solid #525966;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.proto-segmented {
  display: inline-flex;
  background: #181a1e;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid #3c4048;
}

.proto-seg-btn {
  background: transparent;
  color: #cfd4dc;
  border: none;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}

.proto-seg-btn.active {
  background: #49505c;
  color: #ffffff;
}

.proto-label {
  color: #cfd4dc;
  font-size: 0.8rem;
}

.proto-select {
  background: #181a1e;
  color: #f0f2f5;
  border: 1px solid #49505c;
  border-radius: 8px;
  padding: 0.26rem 0.55rem;
  font-size: 0.8rem;
  max-width: 230px;
}

.proto-btn-subtle {
  background: #2f333b;
  color: #f0f2f5;
  border: 1px solid #49505c;
  border-radius: 999px;
  padding: 0.26rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.proto-btn-subtle:hover {
  background: #3d424d;
}

.proto-toast {
  background: #123866;
  color: #ffffff;
  padding: 0.45rem 1rem;
  border-top: 1px solid var(--blue-bright);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.84rem;
}

.proto-toast[hidden] {
  display: none !important;
}

.proto-toast-close {
  background: rgba(255, 255, 255, .16);
  color: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

/* Optionaler 375 px Handy-Rahmen auf dem Rechner */
.viewport-wrapper {
  min-height: calc(100vh - 46px);
  display: flex;
  flex-direction: column;
}

@media (min-width: 500px) {
  .viewport-wrapper.mobile-frame {
    box-sizing: content-box;
    width: 375px;
    max-width: 375px;
    margin: 1.25rem auto;
    border: 8px solid #181a1e;
    border-radius: 28px;
    background: linear-gradient(38deg, #000 0%, var(--blue) 100%);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    overflow-x: hidden;
    min-height: 760px;
    position: relative;
  }
}

/* Kopfzeile und Hauptmenue wie auf videowien.at (Zeile 1: Webseiten-Menue immer oben, Zeile 2: Kundenportal-Menue darunter) */
header.site-header {
  position: sticky;
  top: var(--proto-bar-height, 0px);
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(15, 30, 51, .86);
  border-bottom: 1px solid var(--line);
}

.viewport-wrapper.mobile-frame header.site-header {
  top: 0;
}

.nav {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
}

.brand-block {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-decoration: none;
}

.logo:hover {
  text-decoration: none;
}

/* Zeile 1 rechts: Das feste Webseiten-Menue von videowien.at */
.site-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.site-menu a {
  font-size: 14.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, .74);
  text-decoration: none;
  transition: color .15s;
  white-space: nowrap;
}

.site-menu a:hover {
  color: #ffffff;
  text-decoration: none;
}

.site-menu a.site-menu-portal,
.site-menu a[aria-current="page"] {
  color: #ffffff;
  font-weight: 700;
  background: rgba(74, 143, 214, .2);
  border: 1px solid rgba(142, 197, 255, .36);
  padding: 5px 13px;
  border-radius: 999px;
  text-decoration: none;
}

/* Zeile 2: Zweites Menue fuer das Kundenportal direkt unter der Hauptleiste */
.portal-subnav {
  border-top: 1px solid rgba(255, 255, 255, .1);
  background: rgba(10, 22, 39, .78);
}

.portal-subnav[hidden] {
  display: none !important;
}

.portal-subnav-inner {
  max-width: 1360px;
  margin: 0 auto;
  padding: 8px 32px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

@media (min-width: 1081px) {
  .viewport-wrapper:not(.mobile-frame) .portal-subnav-brand,
  .viewport-wrapper:not(.mobile-frame) .menu,
  .viewport-wrapper:not(.mobile-frame) .portal-menu-tabs {
    display: contents;
  }
  .viewport-wrapper:not(.mobile-frame) .portal-subnav-title {
    margin-right: 5px;
  }
}

.portal-subnav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.portal-subnav-title {
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}

.portal-subnav-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.portal-subnav-title[aria-current="page"] {
  color: #ffffff;
  border-bottom-color: var(--accent);
}

.menu a.mobile-only-home-link {
  display: none;
}

.brand-sub {
  display: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  border-left: 1px solid var(--line);
  padding-left: 8px;
  line-height: 1.2;
  white-space: nowrap;
}

.brand-sub[hidden] {
  display: none !important;
}

.menu {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.portal-menu-tabs {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 2px;
  min-width: 0;
}

.menu a {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.menu a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, .07);
  text-decoration: none;
}

.menu a[aria-current="page"] {
  color: #ffffff;
  background: rgba(47, 116, 192, .32);
  border-color: rgba(142, 197, 255, .42);
  text-decoration: none;
}

.menu-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  flex-shrink: 0;
}

.header-person-select {
  background: rgba(12, 31, 54, .9);
  color: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  width: 126px;
  min-width: 126px;
  max-width: 126px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.header-person-select.is-small-name {
  font-size: 10.5px;
  letter-spacing: -0.01em;
}

.header-person-select option {
  background: var(--ink);
  color: #ffffff;
  font-size: 13px;
}

/* Paket-Wechsel und Stripe-Abo-Auswahl im Kundenportal */
.paket-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  margin: 0.85rem 0 1rem;
}

@media (max-width: 640px) {
  .paket-grid {
    grid-template-columns: 1fr;
  }
}

.viewport-wrapper.mobile-frame .paket-grid {
  grid-template-columns: 1fr;
}

.paket-card {
  background: rgba(12, 31, 54, .75);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.65rem;
}

.paket-card.active {
  background: rgba(47, 116, 192, .22);
  border-color: var(--accent);
}

.header-user-note {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .82);
  white-space: nowrap;
}

.menu a.menu-gillian-return-link {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(47, 116, 192, .42);
  border: 1px solid rgba(142, 197, 255, .55);
}

.menu a.menu-gillian-return-link:hover {
  background: rgba(58, 131, 208, .62);
  border-color: #ffffff;
}

.menu a.menu-logout-link {
  padding: 4px 9px;
  font-size: 12px;
  color: rgba(255, 255, 255, .74);
  border: 1px solid rgba(255, 255, 255, .14);
}

.menu a.menu-logout-link:hover {
  color: #ffffff;
  border-color: rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .08);
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 -6px 0 auto;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 10px;
  color: rgba(255, 255, 255, .75);
  cursor: pointer;
}

.menu-btn:hover {
  color: #ffffff;
}

.menu-btn svg {
  width: 20px;
  height: 20px;
}

.nav-count {
  background: #1c3b63;
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  line-height: 1.3;
}

@media (max-width: 1080px) {
  .site-menu {
    display: none;
  }
  header.site-header.mobile-nav-open .portal-subnav[hidden] ~ .nav .site-menu,
  header.site-header.mobile-nav-open:not(:has(.portal-subnav:not([hidden]))) .site-menu {
    display: flex;
    position: absolute;
    top: calc(100% + 6px);
    right: 16px;
    left: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    background: rgba(15, 30, 51, .98);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 22px 44px -22px rgba(0, 0, 0, .7);
    z-index: 80;
  }
  header.site-header.mobile-nav-open:not(:has(.portal-subnav:not([hidden]))) .site-menu a {
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 15px;
  }
  .portal-subnav-inner {
    padding: 8px 20px;
    min-height: 48px;
    position: relative;
  }
  .brand-sub:not([hidden]) {
    display: inline-block;
  }
  .menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 16px;
    left: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 10px;
    background: rgba(15, 30, 51, .98);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 22px 44px -22px rgba(0, 0, 0, .7);
    z-index: 80;
  }
  .menu.open {
    display: flex;
  }
  .portal-menu-tabs {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .menu a {
    padding: 11px 14px;
    border-radius: 9px;
    font-size: 15px;
    color: rgba(255, 255, 255, .85);
    justify-content: space-between;
  }
  .menu a.mobile-only-home-link {
    display: inline-flex;
  }
  .menu a:hover {
    background: rgba(255, 255, 255, .06);
  }
  .menu-user {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-left: 0;
    margin-top: 6px;
    padding: 10px 14px 6px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .header-person-select {
    max-width: 100%;
    width: 100%;
    padding: 7px 10px;
    font-size: 14px;
  }
  .menu-btn {
    display: inline-flex;
  }
}

@media (max-width: 600px) {
  .nav {
    padding: 0 20px;
  }
}

@media (max-width: 440px) {
  .logo img {
    height: 24px !important;
  }
}

/* Hauptbereich: Seitenbreite exakt wie .wrap auf videowien.at (1360 px mit 32 px Rand) */
.app-main {
  flex: 1;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 2.25rem 32px 3.5rem;
}

.app-main.narrow-column {
  max-width: 1360px;
}

.page-hero {
  position: static;
  text-align: center;
  max-width: 720px;
  margin: 0 auto 1.5rem;
  padding: 0 0 1.05rem 0;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  margin: 0 auto 0.55rem;
}

.page-hero h1:last-child {
  margin-bottom: 0;
}

.page-hero p {
  color: var(--text-body);
  font-size: clamp(16px, 1.9vw, 18.5px);
  max-width: 640px;
  margin: 0 auto;
}

/* Karten wie .tier oder .pcard auf videowien.at: halbtransparent, feine helle Linie, runde Ecken (20 bis 22 px) */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (min-width: 820px) {
  .viewport-wrapper:not(.mobile-frame) .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.45rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
}

.card-subtle {
  background: rgba(12, 31, 54, .55);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1rem;
}

.card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

/* Status-Phasen-Leiste (Monatsuebersicht) */
.stage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 980px) {
  .viewport-wrapper:not(.mobile-frame) .stage-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.stage-pill {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0.9rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  color: #ffffff;
}

.stage-pill:hover {
  border-color: rgba(74, 143, 214, .5);
  background: rgba(255, 255, 255, .08);
}

.stage-pill.active {
  border-color: rgba(74, 143, 214, .75);
  background: linear-gradient(150deg, rgba(74, 143, 214, .22), rgba(41, 95, 157, .12));
  box-shadow: 0 0 0 1px rgba(74, 143, 214, .35), 0 20px 40px -28px rgba(0, 0, 0, .6);
}

.stage-count {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
  color: #ffffff;
}

.stage-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
}

.stage-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Status-Abzeichen auf dunklem Grund (Kontrast >= 4,5:1) */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.68rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.3;
  border: 1px solid transparent;
}

.badge-material_da {
  background: var(--status-material-bg);
  color: var(--status-material);
  border-color: #3b5a7d;
}

.badge-in_arbeit {
  background: var(--status-arbeit-bg);
  color: var(--status-arbeit);
  border-color: #2f74c0;
}

.badge-zur_freigabe {
  background: var(--status-freigabe-bg);
  color: var(--status-freigabe);
  border-color: #946316;
}

.badge-freigegeben {
  background: var(--status-freigegeben-bg);
  color: var(--status-freigegeben);
  border-color: #24754e;
}

.badge-offen {
  background: var(--status-offen-bg);
  color: var(--status-offen);
  border-color: #946316;
}

.badge-erledigt {
  background: var(--status-erledigt-bg);
  color: var(--status-erledigt);
  border-color: #24754e;
}

.badge-eingeplant {
  background: var(--status-eingeplant-bg);
  color: var(--status-eingeplant);
  border-color: #5a4fa3;
}

.badge-aenderung_gewuenscht,
.badge-fehler {
  background: var(--status-aenderung-bg);
  color: var(--status-aenderung);
  border-color: #9e3340;
}

/* Knoepfe als Pille wie .btn-wa und .btn-glass auf videowien.at */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15.5px;
  text-decoration: none;
  border-radius: 999px;
  padding: 12px 22px;
  cursor: pointer;
  transition: .15s;
  border: 1px solid transparent;
  line-height: 1.25;
  color: #ffffff;
}

.btn:hover {
  text-decoration: none;
}

.btn svg {
  width: 18px;
  height: 18px;
}

.btn-primary,
.btn-wa {
  background: #2f74c0;
  color: #ffffff;
  box-shadow: 0 10px 28px -12px rgba(47, 116, 192, .55);
}

.btn-primary:hover,
.btn-wa:hover {
  background: #3a83d0;
  color: #ffffff;
}

.btn-secondary,
.btn-glass {
  background: var(--glass);
  color: #ffffff;
  border: 1px solid var(--line);
}

.btn-secondary:hover,
.btn-glass:hover {
  background: rgba(255, 255, 255, .18);
  color: #ffffff;
}

.btn-success {
  background: #16593a;
  color: #ffffff;
  border-color: rgba(110, 231, 183, .35);
}

.btn-success:hover {
  background: #1d6f49;
  color: #ffffff;
}

.btn-warning {
  background: #7a4b09;
  color: #ffffff;
  border-color: rgba(251, 191, 36, .4);
}

.btn-warning:hover {
  background: #945c0c;
  color: #ffffff;
}

.btn-danger-outline {
  background: #521820;
  color: #ffd6db;
  border-color: #9e3340;
}

.btn-danger-outline:hover {
  background: #691f29;
  color: #ffffff;
}

.btn-sm {
  padding: 9px 18px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

/* Video-Liste und Vorschaukarten */
.video-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 1080px) {
  .viewport-wrapper:not(.mobile-frame) .video-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .viewport-wrapper:not(.mobile-frame) .video-list > .video-item:only-child {
    grid-column: 1 / -1;
  }
}

.video-item {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
}

@media (min-width: 640px) {
  .viewport-wrapper:not(.mobile-frame) .video-item {
    grid-template-columns: 112px 1fr;
    align-items: center;
  }
}

.video-thumb {
  width: 100%;
  font-family: inherit;
  background: radial-gradient(120% 120% at 50% 0%, rgba(74, 143, 214, .24), rgba(10, 26, 46, .95) 72%);
  color: #ffffff;
  border-radius: 16px;
  padding: 0.7rem;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  cursor: pointer;
  border: 1px solid var(--line);
  text-align: center;
}

.video-thumb:hover {
  border-color: var(--blue-bright);
}

.video-thumb-ratio {
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 700;
}

.video-thumb-play {
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 700;
  margin-top: 0;
  color: #ffffff;
}

.video-thumb-format {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.video-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  margin: 0.4rem 0 0.75rem;
}

/* Upload-Bereich und Fortschrittsanzeige */
.upload-dropzone {
  border: 2px dashed rgba(74, 143, 214, .45);
  background: rgba(12, 31, 54, .5);
  border-radius: 20px;
  padding: 1.5rem 1.1rem;
  text-align: center;
  margin-bottom: 1.1rem;
}

.progress-track {
  width: 100%;
  height: 12px;
  background: #081526;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 0.55rem 0;
}

.progress-fill {
  height: 100%;
  background: #2f74c0;
  transition: width 0.25s ease;
}

.progress-fill.paused {
  background: #d99326;
}

.progress-fill.done {
  background: #24945e;
}

.progress-fill.error {
  background: #c93b48;
}

/* Formular-Elemente auf dunklem Grund */
.form-group {
  margin-bottom: 0.95rem;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: #ffffff;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.62rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 12px;
  background: var(--ink);
  color: #ffffff;
}

.form-select {
  padding-right: 2rem;
  text-overflow: ellipsis;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #9cb3cc;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--blue-bright);
  outline: 2px solid var(--blue-bright);
  outline-offset: 1px;
}

.form-select option {
  background: var(--ink);
  color: #ffffff;
}

.form-textarea {
  min-height: 82px;
  resize: vertical;
}

/* Video-Pruefung und Zeitmarken-Kommentare */
.review-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

@media (min-width: 760px) {
  .viewport-wrapper:not(.mobile-frame) .review-grid {
    grid-template-columns: 320px 1fr;
    align-items: start;
  }
}

@media (min-width: 1040px) {
  .viewport-wrapper:not(.mobile-frame) .review-grid {
    grid-template-columns: 360px 1fr;
    gap: 1.5rem;
  }
}

.player-frame {
  background: #0a1a2e;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.65rem;
  text-align: center;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
}

.player-video {
  width: 100%;
  max-height: 440px;
  border-radius: 12px;
  background: #000000;
  display: block;
  margin: 0 auto;
}

.timeline-markers {
  min-height: 44px;
  background: #071322;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 0.5rem;
  padding: 0.35rem 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.timeline-marker-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  background: #f5b841;
  color: #0c1f36;
  border: 1px solid #ffffff;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.28rem 0.65rem;
  cursor: pointer;
}

.timeline-marker-btn.resolved {
  background: #155236;
  color: #ffffff;
}

.comment-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.6rem;
  background: rgba(12, 31, 54, .65);
}

.comment-item.resolved {
  background: rgba(15, 61, 40, .42);
  border-color: rgba(36, 117, 78, .55);
}

.timecode-chip {
  background: #17375e;
  color: #cde6ff;
  border: 1px solid var(--blue-bright);
  border-radius: 999px;
  padding: 0.14rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

/* Skript-Schema (S2) und Konkurrenz-Tabellen (S3) */
.schema-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.6rem;
  margin: 0.85rem 0;
}

.schema-row {
  background: rgba(12, 31, 54, .62);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue-bright);
  padding: 0.65rem 0.85rem;
  border-radius: 0 12px 12px 0;
}

.schema-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

/* Kalender-Raster */
.calendar-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.calendar-entry {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem;
  padding: 0.95rem 1.1rem;
  background: rgba(12, 31, 54, .58);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.platform-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  background: #162d4c;
  color: #e6f0fa;
  border: 1px solid var(--line);
}

/* Kennzahlen-Karten (Monatsbericht & Gillian-Uebersicht) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 0.95rem 1rem;
}

button.kpi-card-action {
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}

button.kpi-card-action:hover {
  border-color: var(--accent);
  background: rgba(47, 116, 192, .16);
  transform: translateY(-1px);
}

.kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.kpi-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.kpi-trend {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--status-freigegeben);
  margin-top: 0.25rem;
}

/* Farbfelder und statische Vorschaubilder (mit Klick-Grossansicht) im Markenprofil */
.swatch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.swatch-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(12, 31, 54, .7);
  font-size: 0.82rem;
}

.swatch-color {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .35);
}

.brand-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.85rem;
  margin: 0.75rem 0;
}

.brand-preview-card {
  position: relative;
  background: rgba(12, 31, 54, .62);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.65rem;
}

/* Bilder laufen beim Scrollen nicht mit; per Klick oeffnet sich eine Grossansicht */
.foto-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #0a1a2e;
  cursor: zoom-in;
  overflow: hidden;
  position: static;
}

.foto-zoom img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 13px;
}

.foto-gross {
  margin: auto;
  padding: 0;
  border: 0;
  background: none;
  max-width: none;
  max-height: none;
  overflow: visible;
  color: #ffffff;
}

.foto-gross::backdrop {
  background: rgba(5, 12, 24, .86);
}

.foto-gross-inner {
  background: #0c1f36;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.85rem;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
  max-width: min(92vw, 960px);
}

.foto-gross img {
  display: block;
  width: 100%;
  height: auto;
  max-width: min(88vw, 920px);
  max-height: 78vh;
  border-radius: 12px;
  background: #081526;
}

.foto-gross-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.65rem;
}

.foto-gross-caption {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-body);
}

/* Dialogfenster (Modal) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 12, 24, .86);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem 0.75rem;
  overflow-y: auto;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-card {
  background: #102540;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 22px;
  width: 100%;
  max-width: 860px;
  padding: 1.4rem;
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .8);
  margin: auto 0;
  color: #ffffff;
}

/* Leere Zustaende und Fehlermeldungen (Runde 3) */
.empty-state-box {
  background: linear-gradient(150deg, rgba(74, 143, 214, .14), rgba(12, 31, 54, .65));
  border: 1px solid rgba(74, 143, 214, .35);
  border-radius: 20px;
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.15rem;
}

.error-alert-box {
  background: rgba(82, 24, 32, .72);
  border: 1px solid #b84250;
  border-radius: 20px;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.15rem;
}

.transcoding-box {
  background: rgba(18, 56, 102, .72);
  border: 1px solid var(--blue-bright);
  border-radius: 18px;
  padding: 1.4rem 1.25rem;
  text-align: center;
  margin-bottom: 1rem;
}

/* Fusszeile exakt wie in startseite-stile.css von videowien.at */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 54px;
  background: rgba(8, 18, 32, .5);
  margin-top: auto;
}

.frow {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.fsoc {
  display: flex;
  gap: 14px 20px;
  align-items: center;
  flex-wrap: wrap;
}

.fsoc a {
  color: rgba(255, 255, 255, .75);
  text-decoration: none;
  font-size: 14.5px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.fsoc a:hover {
  color: #ffffff;
  text-decoration: none;
}

.fsoc svg {
  width: 18px;
  height: 18px;
}

.flegal {
  display: flex;
  gap: 10px 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 700px) {
  .flegal {
    justify-content: flex-start;
  }
}

.flegal a {
  color: rgba(255, 255, 255, .68);
  text-decoration: none;
  font-size: 14px;
}

.flegal a:hover {
  color: #ffffff;
  text-decoration: none;
}

.fnote {
  margin-top: 18px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .62);
}

/* Anpassungen fuer schmale Handy-Anzeige (375 px) sowie fuer den 375-px-Rahmen am Rechner */
.viewport-wrapper.mobile-frame .nav {
  padding: 0 20px;
}
.viewport-wrapper.mobile-frame .logo img {
  height: 24px !important;
}
.viewport-wrapper.mobile-frame .site-menu {
  display: none;
}
.viewport-wrapper.mobile-frame header.site-header.mobile-nav-open:not(:has(.portal-subnav:not([hidden]))) .site-menu {
  display: flex;
  position: absolute;
  top: calc(100% + 6px);
  right: 16px;
  left: 16px;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 10px;
  background: rgba(15, 30, 51, .98);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, .7);
  z-index: 80;
}
.viewport-wrapper.mobile-frame header.site-header.mobile-nav-open:not(:has(.portal-subnav:not([hidden]))) .site-menu a {
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 15px;
}
.viewport-wrapper.mobile-frame .portal-subnav-inner {
  padding: 8px 20px;
  min-height: 48px;
  position: relative;
}
.viewport-wrapper.mobile-frame .brand-sub:not([hidden]) {
  display: inline-block;
}
.viewport-wrapper.mobile-frame .menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 16px;
  left: 16px;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  padding: 10px;
  background: rgba(15, 30, 51, .98);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 22px 44px -22px rgba(0, 0, 0, .7);
  z-index: 80;
}
.viewport-wrapper.mobile-frame .menu.open {
  display: flex;
}
.viewport-wrapper.mobile-frame .portal-menu-tabs {
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
}
.viewport-wrapper.mobile-frame .menu a {
  padding: 11px 14px;
  border-radius: 9px;
  font-size: 15px;
  color: rgba(255, 255, 255, .85);
  justify-content: space-between;
}
.viewport-wrapper.mobile-frame .menu a.mobile-only-home-link {
  display: inline-flex;
}
.viewport-wrapper.mobile-frame .menu-user {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin-left: 0;
  margin-top: 6px;
  padding: 10px 14px 6px;
  border-left: 0;
  border-top: 1px solid var(--line);
}
.viewport-wrapper.mobile-frame .header-person-select {
  max-width: 100%;
  width: 100%;
  padding: 7px 10px;
  font-size: 14px;
}
.viewport-wrapper.mobile-frame .menu-btn {
  display: inline-flex;
}
.viewport-wrapper.mobile-frame .app-main {
  padding: 1.5rem 20px 2.5rem;
}
.viewport-wrapper.mobile-frame .wrap {
  padding: 0 20px;
}
.viewport-wrapper.mobile-frame .flegal {
  justify-content: flex-start;
}
.viewport-wrapper.mobile-frame .card {
  padding: 1.15rem 1.05rem;
}
.viewport-wrapper.mobile-frame .stage-grid {
  grid-template-columns: repeat(2, 1fr);
}
.viewport-wrapper.mobile-frame .modal-card {
  padding: 1.05rem;
}
.viewport-wrapper.mobile-frame .btn,
.viewport-wrapper.mobile-frame .btn-sm,
.viewport-wrapper.mobile-frame .menu a,
.viewport-wrapper.mobile-frame .header-person-select,
.viewport-wrapper.mobile-frame .analytics-period-btn,
.viewport-wrapper.mobile-frame .analytics-pill-btn,
.viewport-wrapper.mobile-frame .timeline-marker-btn,
.viewport-wrapper.mobile-frame .kal-nav-btn,
.viewport-wrapper.mobile-frame .kal-switch-btn,
.viewport-wrapper.mobile-frame .kal-filter-pill,
.viewport-wrapper.mobile-frame .kal-entry-btn,
.viewport-wrapper.mobile-frame .kal-more-btn,
.viewport-wrapper.mobile-frame .timecode-chip {
  min-height: 44px;
}

@media (max-width: 768px) {
  .btn,
  .btn-sm,
  .menu a,
  .header-person-select,
  .analytics-period-btn,
  .analytics-pill-btn,
  .timeline-marker-btn,
  .kal-nav-btn,
  .kal-switch-btn,
  .kal-filter-pill,
  .kal-entry-btn,
  .kal-more-btn,
  .timecode-chip,
  .proto-btn,
  .proto-btn-subtle,
  .proto-seg-btn,
  .proto-select,
  .proto-bar-toggle {
    min-height: 44px;
  }
  .modal-card {
    padding: 1.05rem;
  }
}

@media (max-width: 600px) {
  .app-main {
    padding: 1.5rem 20px 2.5rem;
  }
  .wrap {
    padding: 0 20px;
  }
  .card {
    padding: 1.15rem 1.05rem;
  }
  .stage-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Barrierefreiheit: Sprunglink, Screenreader-Hilfsklasse, Fokusrahmen und reduzierte Bewegung */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 300;
  background: #2f74c0;
  color: #ffffff;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid #ffffff;
}

.skip-link:focus,
.skip-link:focus-visible {
  left: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
video:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #8ec5ff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Profil-Seite: Kopf mit Profilbild/Initialen, Social-Media-Karten, Marke
   ========================================================================== */

.profil-hero-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.15rem;
  align-items: center;
  background: radial-gradient(120% 140% at 15% 0%, rgba(74, 143, 214, .22), rgba(15, 34, 59, .86) 72%);
  border: 1px solid rgba(74, 143, 214, .38);
  border-radius: 22px;
  padding: 1.45rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
}

@media (min-width: 680px) {
  .viewport-wrapper:not(.mobile-frame) .profil-hero-card {
    grid-template-columns: 96px 1fr;
    gap: 1.35rem;
  }
}

.profil-avatar {
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: #0c1f36;
  border: 2px solid var(--blue-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .4);
  flex-shrink: 0;
}

.profil-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profil-avatar-initials {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.profil-hero-title {
  font-size: clamp(1.3rem, 2.2vw, 1.65rem);
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.35rem;
  letter-spacing: -0.02em;
}

.profil-hero-desc {
  color: var(--text-body);
  font-size: 1rem;
  line-height: 1.55;
  margin: 0 0 0.7rem;
}

.profil-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  align-items: center;
}

/* Social-Media-Konten als Karten (Instagram, TikTok, YouTube, Facebook, LinkedIn) */
.social-accounts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem;
}

@media (min-width: 720px) {
  .viewport-wrapper:not(.mobile-frame) .social-accounts-grid {
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  }
}

.social-account-card {
  background: rgba(12, 31, 54, .68);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
}

.social-account-card.status-expired {
  border-color: #c94653;
  background: rgba(68, 20, 29, .45);
}

.social-account-card.status-expiring {
  border-color: #d99326;
  background: rgba(66, 42, 12, .38);
}

.social-account-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.social-platform-ident {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.social-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #142d4c;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.social-icon-box img {
  width: 22px;
  height: 22px;
  display: block;
}

.social-platform-name {
  font-weight: 800;
  font-size: 1rem;
  color: #ffffff;
  line-height: 1.25;
}

.social-account-handle {
  font-size: 0.86rem;
  color: var(--text-body);
  font-weight: 600;
  overflow-wrap: break-word;
}

.social-account-link {
  font-size: 0.82rem;
  color: #8ec5ff;
  word-break: break-all;
  display: inline-block;
}

.social-account-rule {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

.social-account-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
}

/* Markenfarben mit Farbfeld, Hex-Wert und Kopieren-Knopf */
.swatch-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .viewport-wrapper:not(.mobile-frame) .swatch-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.swatch-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(12, 31, 54, .72);
}

.swatch-card-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.swatch-preview {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .38);
  flex-shrink: 0;
}

.swatch-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.swatch-hex {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Hinweis-Banner bei abgelaufener Verbindung */
.expired-banner {
  background: linear-gradient(145deg, rgba(96, 24, 34, .78), rgba(44, 15, 22, .85));
  border: 1px solid rgba(212, 80, 96, .75);
  border-radius: 18px;
  padding: 0.8rem 1.05rem;
  margin-bottom: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.expired-banner-text h2 {
  font-size: 1.05rem;
  margin: 0 0 0.25rem;
  color: #ffffff;
}

.expired-banner-text p {
  margin: 0;
  font-size: 0.9rem;
  color: #ffd9df;
}

/* ==========================================================================
   Analytics-Reiter: Zeitraum, Plattformen, Kennzahlen samt Stand, Gillian-Blick
   ========================================================================== */

.analytics-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: rgba(12, 31, 54, .68);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.analytics-period-group {
  display: inline-flex;
  flex-wrap: wrap;
  background: #091728;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  gap: 2px;
}

.analytics-period-btn {
  background: transparent;
  color: var(--text-body);
  border: 0;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.analytics-period-btn.active {
  background: #2f74c0;
  color: #ffffff;
}

.analytics-platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.analytics-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(12, 31, 54, .75);
  color: var(--text-body);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.analytics-pill-btn img {
  width: 16px;
  height: 16px;
  display: block;
}

.analytics-pill-btn.active {
  background: #1c4b82;
  color: #ffffff;
  border-color: var(--blue-bright);
}

.analytics-platform-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.3rem;
  box-shadow: var(--shadow-md);
}

.viewport-wrapper.mobile-frame .analytics-platform-section {
  padding: 1.1rem 1rem;
}

@media (max-width: 600px) {
  .analytics-platform-section {
    padding: 1.1rem 1rem;
  }
}

.analytics-platform-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.9rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.analytics-stand-badge {
  font-size: 0.78rem;
  color: #d6e6f7;
  background: rgba(20, 48, 82, .85);
  border: 1px solid rgba(142, 197, 255, .32);
  border-radius: 999px;
  padding: 0.22rem 0.68rem;
  font-weight: 600;
}

.kpi-source {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  padding-top: 0.32rem;
  border-top: 1px solid rgba(255, 255, 255, .1);
  line-height: 1.35;
}

.analytics-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  margin-top: 0.85rem;
}

@media (min-width: 740px) {
  .viewport-wrapper:not(.mobile-frame) .analytics-detail-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.analytics-detail-box {
  background: rgba(10, 25, 44, .68);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.95rem 1.05rem;
}

.analytics-detail-box h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.55rem;
}

.analytics-kv-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.42rem;
}

.analytics-kv-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
  font-size: 0.85rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.analytics-kv-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.analytics-kv-key {
  color: var(--text-body);
}

.analytics-kv-val {
  font-weight: 700;
  color: #ffffff;
  text-align: right;
}

.analytics-kv-stand {
  display: block;
  width: 100%;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Beste Beitraege mit Sprung zum Video */
.best-posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.95rem;
}

@media (min-width: 980px) {
  .viewport-wrapper:not(.mobile-frame) .best-posts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.best-post-card {
  background: rgba(12, 31, 54, .68);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.best-post-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
  font-size: 0.83rem;
  color: var(--text-body);
}

.best-post-metric strong {
  color: #ffffff;
}

/* Gillians Analytics-Uebersicht aller Kunden */
.gillian-overview-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.gillian-overview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.gillian-overview-table th,
.gillian-overview-table td {
  padding: 0.75rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.gillian-overview-table th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 800;
}

.conn-summary-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* ==========================================================================
   Monatsbericht zum Teilen & Druckansicht (@media print)
   ========================================================================== */

.monatsbericht-sheet {
  background: rgba(14, 32, 56, .92);
  border: 1px solid rgba(142, 197, 255, .35);
  border-radius: 24px;
  padding: 1.75rem 1.85rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-md);
}

.viewport-wrapper.mobile-frame .monatsbericht-sheet {
  padding: 1.15rem 1rem;
}

@media (max-width: 600px) {
  .monatsbericht-sheet {
    padding: 1.15rem 1rem;
  }
}

.monatsbericht-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.15rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.monatsbericht-platform-block {
  background: rgba(9, 23, 40, .65);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.05rem 1.15rem;
  margin-bottom: 0.95rem;
  break-inside: avoid;
}

.monatsbericht-takeaway {
  background: rgba(24, 62, 108, .48);
  border: 1px solid rgba(142, 197, 255, .38);
  border-radius: 18px;
  padding: 1.1rem 1.2rem;
  margin-top: 1.15rem;
  break-inside: avoid;
}

/* ==========================================================================
   Aufklappbare Detail-Bereiche (Apple-inspiriertes reduziertes Layout)
   ========================================================================== */

.clean-details {
  border: 1px solid rgba(173, 211, 255, 0.22);
  border-radius: 14px;
  background: rgba(8, 22, 40, 0.42);
  margin-top: 0.65rem;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.clean-details[open] {
  border-color: rgba(173, 211, 255, 0.42);
  background: rgba(10, 26, 47, 0.62);
}

.clean-details > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
  border-radius: 14px;
}

.clean-details > summary::-webkit-details-marker {
  display: none;
}

.clean-details > summary::after {
  content: "+";
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  font-weight: 700;
  color: var(--text-body);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  flex-shrink: 0;
}

.clean-details[open] > summary::after {
  content: "\2212";
  background: rgba(142, 197, 255, 0.16);
  border-color: rgba(142, 197, 255, 0.4);
  color: #ffffff;
}

.clean-details > summary:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.clean-details > summary:focus-visible {
  outline: 2px solid #8ec5ff;
  outline-offset: 2px;
}

.clean-details-body {
  padding: 0.65rem 0.95rem 0.85rem;
  border-top: 1px solid rgba(173, 211, 255, 0.16);
}

.clean-details-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  margin-bottom: 1.15rem;
  box-shadow: var(--shadow-md);
}

.clean-details-card > summary {
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  border-radius: 22px;
}

.clean-details-card > .clean-details-body {
  padding: 1rem 1.25rem 1.25rem;
}

.app-main p,
.app-main li,
.page-hero p,
.profil-hero-card p,
.social-account-card p,
.analytics-platform-section p,
.gillian-overview-table-wrap p,
.monatsbericht-sheet p,
.monatsbericht-sheet li {
  text-wrap: pretty;
}

@media print {
  @page {
    margin: 12mm;
  }
  body {
    background: #ffffff !important;
    color: #0b1829 !important;
    font-size: 11pt;
  }
  .bg,
  .proto-bar,
  header.site-header,
  footer,
  .no-print,
  .skip-link,
  #app-modal-backdrop,
  #image-lightbox {
    display: none !important;
  }
  .viewport-wrapper,
  .viewport-wrapper.mobile-frame {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    background: #ffffff !important;
    min-height: 0 !important;
  }
  .app-main {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #ffffff !important;
    color: #0b1829 !important;
  }
  .app-main *,
  .monatsbericht-sheet * {
    color: #0b1829 !important;
    text-shadow: none !important;
    transition: none !important;
  }
  .app-main p,
  .app-main li,
  .app-main td,
  .app-main .text-muted,
  .app-main .text-small,
  .app-main .kpi-label,
  .app-main .kpi-source,
  .monatsbericht-sheet p,
  .monatsbericht-sheet span,
  .monatsbericht-sheet div,
  .monatsbericht-sheet .kpi-label,
  .monatsbericht-sheet .kpi-source {
    color: #1f334d !important;
  }
  .app-main .card,
  .app-main .card-subtle,
  .app-main .kpi-card,
  .app-main .stage-pill,
  .app-main .video-item,
  .app-main .video-thumb,
  .app-main .best-post-card,
  .app-main .analytics-platform-section,
  .app-main .analytics-detail-box,
  .app-main .profil-hero-card,
  .app-main .social-account-card,
  .app-main .kal-month-card,
  .app-main .kal-week-card,
  .app-main .kal-mobile-day-card,
  .app-main .kal-bereit-card,
  .app-main .kal-bereit-item,
  .app-main .kal-post-chip,
  .app-main .kal-toolbar,
  .app-main .kal-filter-bar,
  .app-main .kal-legend,
  .app-main .kal-day-cell,
  .app-main .kal-day-cell.kal-day-outside,
  .app-main .kal-day-cell.kal-day-past,
  .app-main .kal-day-cell.kal-day-today,
  .app-main .kal-week-day-head,
  .app-main .kal-week-slot,
  .app-main .kal-entry-btn,
  .app-main .kal-entry-btn.kal-entry-online,
  .app-main .kal-entry-btn.kal-entry-eingeplant,
  .app-main .kal-entry-btn.kal-entry-vorgemerkt,
  .app-main .kal-alert-box,
  .app-main .kal-info-box,
  .app-main .kal-online-notice,
  .app-main .kal-anfrage-card,
  .app-main .kal-anfrage-item,
  .app-main .kal-anfrage-notice,
  .app-main .kal-selfpost-banner,
  .app-main .kal-empfehlung-vorbei-box,
  .app-main .clean-details,
  .app-main .clean-details-card,
  .app-main .schema-row,
  .app-main .comment-item,
  .app-main .expired-banner,
  .app-main .error-alert-box,
  .app-main .empty-state-box,
  .app-main .transcoding-box,
  .monatsbericht-platform-block,
  .monatsbericht-takeaway,
  .monatsbericht-sheet .kpi-card,
  .monatsbericht-sheet .best-post-card {
    background: #f6f9fc !important;
    border: 1px solid #c5d3e3 !important;
    box-shadow: none !important;
    opacity: 1 !important;
    break-inside: avoid;
  }
  .app-main .badge,
  .app-main .kal-badge,
  .app-main .kal-chip-status,
  .app-main .kal-entry-plat,
  .app-main .kal-plat-pill,
  .app-main .kal-today-tag,
  .app-main .kal-view-switch,
  .app-main .kal-switch-btn,
  .app-main .kal-switch-btn.kal-active,
  .app-main .kal-nav-btn,
  .app-main .kal-filter-pill,
  .app-main .kal-filter-pill.kal-active,
  .app-main .kal-day-num-btn,
  .app-main .kal-more-btn,
  .app-main .stage-count,
  .app-main .version-pill,
  .app-main .btn,
  .monatsbericht-sheet .badge,
  .monatsbericht-sheet .best-post-metric {
    background: #f1f5f9 !important;
    color: #0b1829 !important;
    border: 1px solid #94a3b8 !important;
    box-shadow: none !important;
  }
  .monatsbericht-sheet {
    background: #ffffff !important;
    color: #0b1829 !important;
    border: 1px solid #b8c7d9 !important;
    box-shadow: none !important;
    padding: 12pt !important;
    margin: 0 !important;
  }
  .monatsbericht-header {
    border-bottom: 1px solid #b8c7d9 !important;
  }
  .monatsbericht-header img {
    filter: invert(1) hue-rotate(180deg);
  }
  /* Kennwerte im Monatsbericht ohne Rahmen, sonst wirkt der Druck unruhig */
  .monatsbericht-sheet .badge,
  .monatsbericht-sheet .best-post-metric {
    background: transparent !important;
    border: 0 !important;
  }
}

/* Kein einzelnes Wort allein in der letzten Zeile bei aufklappbaren Ueberschriften, Listen und Tabellenkoepfen */
.clean-details summary,
.feature-lock-bullets li,
th {
  text-wrap: pretty;
}

/* Verschwommene Funktions-Vorschau fuer gesperrte Abo-Stufen (Probeschnitt & Schnitt-Abo) */
.feature-lock-container {
  display: grid;
  grid-template-areas: "stack";
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(142, 197, 255, 0.16);
  background: rgba(8, 20, 38, 0.42);
}

.feature-lock-preview {
  grid-area: stack;
  filter: blur(4.2px);
  opacity: 0.68;
  pointer-events: none;
  user-select: none;
  max-height: 640px;
  overflow: hidden;
  padding: 0.35rem;
  transform: scale(1.006);
  -webkit-mask-image: linear-gradient(180deg, #000 74%, rgba(0, 0, 0, 0.18) 100%);
  mask-image: linear-gradient(180deg, #000 74%, rgba(0, 0, 0, 0.18) 100%);
}

.feature-lock-compact .feature-lock-preview {
  max-height: 380px;
  padding: 0;
}

.feature-lock-overlay {
  grid-area: stack;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: radial-gradient(circle at center, rgba(6, 16, 31, 0.56) 0%, rgba(6, 16, 31, 0.18) 100%);
}

.feature-lock-card {
  width: 100%;
  max-width: 470px;
  background: linear-gradient(155deg, rgba(13, 30, 56, 0.96), rgba(8, 19, 36, 0.97));
  border: 1px solid rgba(142, 197, 255, 0.45);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.45rem;
  box-shadow: 0 26px 54px -20px rgba(0, 0, 0, 0.82);
  text-align: center;
}

.feature-lock-card h2,
.feature-lock-card h3 {
  color: #ffffff;
  font-size: clamp(1.12rem, 3.8vw, 1.35rem);
  margin: 0.55rem 0 0.45rem;
  line-height: 1.28;
}

.feature-lock-card p {
  color: #d3e1f2;
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0 0 0.95rem;
}

.feature-lock-bullets {
  list-style: none;
  padding: 0;
  margin: 0 auto 1.05rem;
  text-align: left;
  display: inline-flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: #e4eefb;
}

.feature-lock-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.feature-lock-bullets li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 800;
  flex-shrink: 0;
}

/* Abo-Stufen-Umschalter im Paket-Dialog (Schnitt-Abo vs. Rundum-Abo) */
.abo-tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.abo-tier-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.25rem;
  padding: 0.8rem 0.95rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(11, 26, 47, 0.72);
  color: #ffffff;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.abo-tier-btn:hover {
  border-color: rgba(142, 197, 255, 0.55);
}

.abo-tier-btn.active {
  border-color: var(--accent);
  background: rgba(34, 88, 152, 0.28);
  box-shadow: 0 0 0 1px rgba(142, 197, 255, 0.35);
}

.abo-tier-btn-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.abo-tier-btn-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.42;
}

