/* Marketing-Cockpit · smartvillage-Design (Design-System v3): Leisten deckend schwarz, Glas nur auf Knöpfen */
@font-face { font-family: 'ATC Arquette'; src: url('/assets/fonts/ATCArquette-Regular.otf') format('opentype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'ATC Arquette'; src: url('/assets/fonts/ATCArquette-Medium.otf') format('opentype'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  --ink: #070708;
  --navy: #000831;
  --coral: #FF5A49;
  --coral-dark: #E84D3D;
  --light-blue: #D1DEFF;
  --sand-1: #F1EBE4;
  --sand-2: #F6F3EF;
  --sand-3: #FBFAF9;
  --on-dark: #F6F3EF;
  --fg-2: rgba(0, 8, 49, 0.72);
  --fg-3: rgba(0, 8, 49, 0.62);
  --line: rgba(0, 8, 49, 0.10);
  --line-2: rgba(0, 8, 49, 0.16);
  --font: 'ATC Arquette', Arial, Helvetica, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--sand-3); color: var(--navy); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Rahmen */
.cr { height: 100vh; display: flex; flex-direction: column; }
.cr-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 20px; background: var(--ink); color: var(--on-dark); position: relative; z-index: 5; }
.cr-brand { display: inline-flex; }
.cr-brand img { height: 22px; width: auto; display: block; }
.cr-crumb { font-size: 14px; color: rgba(246, 243, 239, 0.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cr-crumb b { color: #FFFFFF; font-weight: 500; }
.cr-search { margin-left: auto; flex: 0 1 420px; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.08); color: rgba(246, 243, 239, 0.8); font-size: 14px; text-align: left; }
.cr-search:hover { border-color: rgba(255, 255, 255, 0.5); }
.cr-search kbd { font: inherit; font-size: 12px; border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 6px; padding: 1px 7px; }
.cr-body { flex: 1; min-height: 0; display: flex; }

/* Menü links */
.cr-side { flex: 0 0 250px; width: 250px; background: var(--ink); color: var(--on-dark); padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; transition: flex-basis 220ms var(--ease), width 220ms var(--ease); }
.mini .cr-side { flex-basis: 64px; width: 64px; padding: 16px 10px; }
.nv { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--on-dark); font-size: 15px; text-align: left; text-decoration: none; }
.nv:hover { background: rgba(246, 243, 239, 0.08); }
.nv[aria-current="page"] { background: rgba(246, 243, 239, 0.14); font-weight: 500; }
.nv .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.nv-sub { min-height: 36px; padding-left: 40px; font-size: 13.5px; color: rgba(246, 243, 239, 0.86); }
.nv-sub .sq { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.nv-sub small, .nv small { flex: none; font-size: 11px; color: rgba(246, 243, 239, 0.7); }
.nv[aria-disabled="true"] { opacity: .55; cursor: default; }
.nv[aria-disabled="true"]:hover { background: transparent; }
.nv-sep { height: 1px; margin: 10px 12px; background: rgba(246, 243, 239, 0.16); }
.nv-h { padding: 4px 12px; font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: rgba(246, 243, 239, 0.7); }
.nv-fill { flex: 1; min-height: 16px; }
.nv-small { font-size: 13px; opacity: .85; }
.mini .nv { justify-content: center; padding: 0; }
.mini .nv .lbl, .mini .nv small, .mini .nv-sub, .mini .nv-h, .mini .nv-soon { display: none; }

/* Inhalt */
.cr-main { flex: 1 1 auto; min-width: 0; overflow-y: auto; padding: 28px 32px 48px; }
.cr-main.is-tool { overflow: hidden; padding: 16px 20px; display: flex; flex-direction: column; }
.pg { display: flex; flex-direction: column; gap: 22px; max-width: 1360px; animation: in 220ms var(--ease) backwards; }
@keyframes in { from { opacity: 0; transform: translateY(6px); } }
.eyebrow { font-size: 13px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--coral-dark); }
.pg h1 { margin: 0; font-size: 34px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 500; }
.pg h2 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.01em; }
.lead { margin: 0; font-size: 15px; color: var(--fg-2); max-width: 760px; }
.small { font-size: 13.5px; color: var(--fg-2); }
.chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--sand-1); color: var(--navy); }
.chip.on { background: #DDF0E5; color: #1F5C3E; }
.chip.tab { background: var(--light-blue); }
.chip.lokal { background: #FBEBD3; color: #7A4A06; }
.row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 16px; }
.head { display: flex; flex-direction: column; gap: 6px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; overflow: hidden; border-radius: 20px; border: 1px solid var(--line); background: #FFFFFF; color: var(--navy); text-decoration: none; text-align: left; padding: 0; transition: border-color 160ms, transform 160ms var(--ease); }
button.card, a.card { cursor: pointer; }
button.card:hover, a.card:hover { border-color: rgba(0, 8, 49, 0.4); transform: translateY(-2px); }
.card[aria-disabled="true"] { opacity: .7; cursor: default; }
.card-top { height: 92px; display: flex; align-items: flex-end; padding: 14px 16px; border-bottom: 1px solid rgba(0, 8, 49, 0.08); }
.sq { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 10px; color: var(--navy); font-weight: 500; }
.card-top .sq { width: 44px; height: 44px; font-size: 15px; background: rgba(255, 255, 255, 0.75); }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.card-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-name b { font-weight: 500; font-size: 17px; letter-spacing: -0.01em; }
.statt { font-size: 11.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-3); }
.go { margin-top: auto; padding-top: 6px; font-size: 13.5px; font-weight: 500; color: #C23A2B; }
.go.muted { color: var(--fg-3); font-weight: 400; }
.tile { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: #FFFFFF; color: var(--navy); text-decoration: none; text-align: left; min-height: 72px; }
.tile:hover { border-color: rgba(0, 8, 49, 0.4); }
.tile .sq { width: 38px; height: 38px; font-size: 13px; }
.tile span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile b { font-weight: 500; }
.tile small { font-size: 13px; color: var(--fg-2); }
.note { padding: 18px 20px; border-radius: 20px; background: var(--sand-2); display: flex; flex-direction: column; gap: 6px; max-width: 760px; }

/* Tool im Cockpit */
.tv { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; animation: in 220ms var(--ease) backwards; }
.tv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.tv-bar .sq { width: 42px; height: 42px; font-size: 14px; }
.tv-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tv-name b { font-weight: 500; font-size: 21px; letter-spacing: -0.01em; }
.tv-name .small { display: flex; align-items: center; gap: 6px; }
.tv-fill { flex: 1; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: #FFFFFF; color: var(--navy); font-size: 14px; white-space: nowrap; text-decoration: none; }
.pill:hover { border-color: var(--navy); }
.round { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; border: 1px solid rgba(0, 8, 49, 0.18); background: #FFFFFF; font-size: 18px; }
.round:hover { border-color: var(--navy); }
.tv-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.tv-tab { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: #FFFFFF; font-size: 13.5px; white-space: nowrap; }
.tv-tab .sq { width: 10px; height: 10px; border-radius: 3px; }
.tv-tab[aria-current="page"] { background: var(--navy); border-color: var(--navy); color: #FFFFFF; }
.tv-frames { position: relative; flex: 1; min-height: 420px; border-radius: 20px; overflow: hidden; border: 1px solid rgba(0, 8, 49, 0.14); background: #FFFFFF; box-shadow: 0 1px 2px rgba(0, 8, 49, 0.06), 0 18px 40px -22px rgba(0, 8, 49, 0.4); }
.tv-frames iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #FFFFFF; }
.tv-load { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--sand-2); color: var(--fg-2); font-size: 14px; pointer-events: none; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(0, 8, 49, 0.18); border-top-color: var(--coral); animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Suche ⌘K */
.pal { position: fixed; inset: 0; z-index: 30; display: flex; justify-content: center; align-items: flex-start; padding: 80px 16px 16px; }
.pal-back { position: absolute; inset: 0; border: 0; background: rgba(0, 8, 49, 0.32); cursor: default; }
.pal-box { position: relative; width: min(640px, 100%); background: #FFFFFF; border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 30px 80px -20px rgba(0, 8, 49, 0.5); }
.pal-input { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 14px; border: 1px solid rgba(0, 8, 49, 0.22); font: inherit; color: var(--navy); }
.pal-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--light-blue); }
.pal-list { display: flex; flex-direction: column; max-height: 380px; overflow-y: auto; }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 14px; border: 0; border-radius: 12px; background: transparent; text-align: left; font-size: 15px; }
.pal-item:hover, .pal-item.sel { background: var(--sand-2); }
.pal-item .chip { min-width: 96px; justify-content: center; }
.pal-empty { padding: 12px; font-size: 14px; color: var(--fg-2); }

/* Coral-Knopf mit Glas (nur auf Knöpfen) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; background: linear-gradient(180deg, #FF6E5F, var(--coral)); color: #FFFFFF; font-weight: 500; font-size: 15px; white-space: nowrap; text-decoration: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 8px 18px -10px rgba(255, 90, 73, 0.8); }
.btn:hover { background: var(--coral-dark); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; max-width: min(560px, calc(100% - 32px)); padding: 12px 18px; border-radius: 16px; background: var(--navy); color: #FFFFFF; font-size: 14.5px; box-shadow: 0 16px 40px -16px rgba(0, 8, 49, 0.6); animation: in 220ms var(--ease) backwards; }

@media (max-width: 800px) {
  .cr { height: auto; min-height: 100vh; }
  .cr-body { flex-direction: column; }
  .cr-side, .mini .cr-side { flex: none; width: 100%; padding: 8px 12px; }
  .mini .nv { justify-content: flex-start; padding: 0 12px; }
  .mini .nv .lbl { display: inline; }
  .cr-main { padding: 20px 16px 40px; }
  .cr-main.is-tool { padding: 12px; min-height: 80vh; }
  .cr-search { flex-basis: 100%; }
  .nv-fill, .nv-collapse { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
