:root {
  color-scheme: light;
  --canvas: #f5f6f2;
  --surface: #fff;
  --ink: #182722;
  --muted: #5b6b63;
  --line: #d8ded7;
  --line-soft: #e6eae4;
  --aside: #182e25;
  --dark: #104e38;
  --accent: #286c4d;
  --tint: #e9f3e8;
  --mint: #c5e8b5;
  --warning: #924523;
  --radius: 12px;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --font: "Instrument Sans", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; opacity: .62; }
button, a { touch-action: manipulation; }
a { color: var(--dark); text-underline-offset: 3px; }
svg { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
button svg, a svg, .row-icon svg { width: 18px; height: 18px; }
:focus-visible { outline: 3px solid #24704d; outline-offset: 3px; }
[hidden] { display: none !important; }
::selection { background: #cce8c7; color: #122720; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink); font-weight: 640; line-height: 1.18; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.3vw, 3.3rem); letter-spacing: -.062em; margin-bottom: .4rem; }
h2 { font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: -.035em; margin-bottom: .45rem; }
h3 { font-size: 1.02rem; letter-spacing: -.02em; margin-bottom: .4rem; }
p { margin-bottom: .8rem; }
p:last-child { margin-bottom: 0; }
.muted, .help { color: var(--muted); }
.mono, code, pre { font-family: var(--mono); }
.shell { display: grid; grid-template-columns: 218px minmax(0, 1fr); min-height: 100svh; }
.sidebar { position: sticky; top: 0; min-width: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 12px; padding: 25px 15px 14px; color: #f2f8ef; background: var(--aside); overflow-y: auto; }
.sidebar h1, .sidebar h2, .sidebar h3, .sidebar a { color: inherit; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-size: 1.45rem; font-weight: 680; letter-spacing: -.065em; line-height: 1.1; }
.sidebar .brand { margin: 0 9px 30px; }
.brand-mark { display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; color: var(--aside); background: var(--mint); border-radius: 10px; }
.brand-mark svg { width: 24px; height: 24px; }
.brand small, .brand-sub { display: block; font-weight: 500; font-size: .67rem; letter-spacing: .055em; color: #bfd1c2; margin-top: 4px; }
.navgroup { display: grid; gap: 4px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar :is(.nav-label,.nav-caption,.navgroup-title) { color: #b0c7b8; font-size: .7rem; font-weight: 650; letter-spacing: .08em; margin: 0 12px 8px; }
.navlink { display: flex; gap: 12px; align-items: center; padding: 10px 13px; min-height: 42px; border: 0; border-radius: 8px; background: transparent; color: #d9e5db; font-size: .95rem; font-weight: 540; text-align: left; text-decoration: none; }
.navlink svg { width: 18px; height: 18px; }
.navlink:hover { color: #fff; background: #284235; }
.navlink.active, .navlink[aria-current="page"], .navlink[aria-current="true"] { background: #34503d; color: #e2f9cf; }
.sidebar :focus-visible { outline-color: var(--mint); }
.account { display: flex; align-items: center; gap: 10px; margin-top: auto; padding: 16px 3px 0; border-top: 1px solid #385044; min-width: 0; font-size: .88rem; }
.account > :is(div,span) { min-width: 0; overflow-wrap: anywhere; }
.account small, .account .muted { display: block; color: #bed0c2; font-size: .77rem; }
.account button { flex-shrink: 0; margin-left: auto; border: none; background: transparent; color: #dbe9de; border-radius: 6px; padding: 7px; }
.account button:hover { background: #34503d; }
.avatar { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; display: inline-grid; place-items: center; background: #34503d; color: #e7f8da; font-size: .8rem; font-weight: 680; }
.workspace { min-width: 0; }
.topbar { min-height: 63px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px clamp(20px, 4vw, 64px); border-bottom: 1px solid var(--line); background: #fbfcf8; color: var(--muted); font-size: .87rem; }
.crumb { display: flex; gap: 9px; align-items: center; min-width: 0; flex-wrap: wrap; }
.crumb a { color: var(--muted); }
.workspace-label { display: inline-flex; gap: 7px; align-items: center; color: #54665b; font-size: .8rem; }
.content, .workspace > #view { max-width: 1480px; margin: 0 auto; padding: clamp(24px, 4vw, 56px) clamp(20px, 4vw, 64px) 72px; }
.page-head { display: flex; gap: 18px 28px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 28px; }
.page-head > div { min-width: 0; }
.page-head h1 { overflow-wrap: anywhere; }
.page-head p { margin: 6px 0 0; max-width: 70ch; color: var(--muted); }
.eyebrow { display: block; margin: 0 0 .55rem; color: var(--accent); text-transform: uppercase; font-size: .7rem; font-weight: 720; letter-spacing: .12em; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; margin-bottom: 27px; }
.stat { min-width: 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfcf8; color: var(--muted); }
.stat strong, .stat .stat-value { display: block; font-size: clamp(1.75rem, 3vw, 2.45rem); line-height: 1.1; font-weight: 580; letter-spacing: -.055em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat small, .stat .stat-label { font-size: .84rem; }
.stat svg { width: 18px; height: 18px; }
.panel, .client-card, .target-card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel { margin-bottom: 18px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel-body { padding: 22px; }
.toolbar, .actions, .form-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.toolbar { margin: 0 0 16px; }
.panel > .toolbar { padding: 14px 22px; border-bottom: 1px solid var(--line-soft); margin: 0; }
.form-actions { margin-top: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; min-height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 .9rem/1.28 var(--font); text-decoration: none; text-align: center; }
.btn:hover { background: #f3f6f0; border-color: #a8b8a9; }
.btn.primary { color: #fff; background: var(--dark); border-color: var(--dark); }
.btn.primary:hover { background: #083f2b; }
.btn.secondary { background: var(--surface); }
.btn.secondary:hover { background: #f3f6f0; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--accent); }
.btn.quiet:hover { background: var(--tint); }
.btn.small { font-size: .8rem; min-height: 33px; padding: 6px 10px; }
.table-wrap { width: 100%; overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
.widget-table, .table-wrap table { width: 100%; border-collapse: collapse; text-align: left; }
.widget-table th, .table-wrap th { color: #5c6b61; font-size: .76rem; font-weight: 620; background: #f8f9f5; }
.widget-table :is(th,td), .table-wrap :is(th,td) { padding: 15px 15px; border-bottom: 1px solid var(--line-soft); }
.widget-table :is(th,td):first-child, .table-wrap :is(th,td):first-child { padding-left: 22px; }
.widget-table :is(th,td):last-child, .table-wrap :is(th,td):last-child { padding-right: 22px; }
.table-wrap tr:last-child td, .widget-table tr:last-child td { border-bottom: 0; }
.widget-table td { font-size: .89rem; }
.widget-table tbody tr:hover { background: #fafcf8; }
.rowtitle { display: inline-flex; align-items: center; gap: 11px; max-width: 100%; color: var(--ink); text-decoration: none; text-align: left; }
.rowtitle strong { display: block; font-weight: 640; }
.rowtitle small { display: block; color: var(--muted); margin-top: 2px; font-size: .78rem; }
.row-icon { flex-shrink: 0; display: inline-grid; width: 37px; height: 37px; place-items: center; border-radius: 9px; background: var(--tint); color: var(--accent); }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 3px 8px; max-width: 100%; color: #586357; background: #eef1eb; font: 580 .75rem/1.5 var(--font); white-space: nowrap; }
.pill.on { color: #22593a; background: #e1efdf; }
.pill.off { color: #586357; background: #eef1eb; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 18px; }
.field { display: flex; flex-direction: column; align-items: stretch; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, label.field { font-size: .88rem; font-weight: 590; color: #314539; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { box-sizing: border-box; width: 100%; max-width: 100%; min-height: 42px; padding: 8px 11px; border: 1px solid #b8c5b9; color: var(--ink); background: #fff; border-radius: 7px; font: 440 .94rem/1.4 var(--font); }
input[type="color"] { max-width: 4rem !important; padding: 3px !important; }
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: var(--accent); }
textarea { min-height: 78px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #748178; opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-width: 2px; outline-offset: 1px; }
.help, .field-error { font-size: .81rem; font-weight: 400; }
.field-error { color: #a33328; }
.invalid, [aria-invalid="true"] { border-color: #b03c2a !important; }
.tabs { display: flex; align-items: stretch; gap: 18px; border-bottom: 1px solid var(--line); margin: 2px 0 23px; overflow-x: auto; }
.tab { margin: 0; padding: 9px 2px 12px; background: transparent; color: var(--muted); border: 0; border-bottom: 2px solid transparent; font: 600 .9rem/1.3 var(--font); text-decoration: none; white-space: nowrap; }
.tab[aria-selected="true"], .tab.active { color: var(--dark); border-bottom-color: var(--accent); }
.segments { display: inline-flex; align-items: center; padding: 3px; gap: 2px; background: #eff2ea; border: 1px solid var(--line-soft); border-radius: 8px; }
.seg { display: inline-flex; gap: 5px; align-items: center; padding: 5px 9px; border: 1px solid transparent; color: var(--muted); border-radius: 5px; font-size: .8rem; font-weight: 590; background: transparent; }
.seg[aria-pressed="true"], .seg.active { color: var(--dark); border-color: #d1d9ce; background: white; box-shadow: 0 1px 2px #162c1f0a; }
.section + .section { border-top: 1px solid var(--line-soft); padding-top: 20px; margin-top: 22px; }
.section-title { margin-bottom: 15px; }
.notice { padding: 12px 15px; color: #3b5846; background: #edf4e9; border: 1px solid #d5e2ce; border-radius: 8px; font-size: .88rem; }
.notice.error { color: #81362c; background: #fff3ee; border-color: #e9c6ba; }
.preview-stage { background-color: #edf0e9; background-image: radial-gradient(#becabd 1px, transparent 1px); background-size: 16px 16px; border-radius: 0 0 var(--radius) var(--radius); padding: clamp(10px, 2.5vw, 30px); overflow: auto; }
.frame-shell { background: white; margin: auto; max-width: 100%; width: 100%; border: 1px solid #d0d9d0; border-radius: 9px; overflow: hidden; }
.frame-shell.mobile { width: 375px; }
.frame-shell iframe, .preview-stage > iframe { display: block; width: 100%; height: max(620px,65vh); border: 0; background: white; }
.summary-grid, .client-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,245px),1fr)); gap: 14px; margin: 0 0 18px; }
.client-card, .target-card { padding: 18px 20px; overflow-wrap: anywhere; }
.client-card h2, .target-card h3 { margin-top: 6px; }
.snip, pre { display: block; max-width: 100%; overflow-x: auto; margin: 0; border-radius: 8px; border: 1px solid var(--line-soft); background: #f5f6f2; padding: 13px 14px; font-size: .82rem; line-height: 1.55; }
.search { display: flex; align-items: center; gap: 7px; max-width: 310px; position: relative; }
.search svg { width: 16px; height: 16px; color: var(--muted); }
.dialog { max-width: min(620px,calc(100% - 24px)); width: 100%; max-height: 89dvh; overflow: auto; padding: 0; border: 1px solid #bdc9bd; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 26px 100px #15271d35; }
.dialog::backdrop { background: #14251c78; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 19px 22px; border-bottom: 1px solid var(--line-soft); }
.dialog-head h2 { margin: 0; }
.dialog-body { padding: 22px; }
.toast { position: fixed; z-index: 5; bottom: 20px; right: 20px; max-width: min(450px,calc(100% - 40px)); background: #213e2f; color: #fff; padding: 12px 17px; border-radius: 9px; box-shadow: 0 6px 26px #13281a27; font-size: .9rem; }
.toast.error { background: #803e30; }
.toast:empty { display: none; }
.empty-state { text-align: center; padding: 34px 20px; color: var(--muted); }
.login-shell { min-height: 100svh; display: grid; place-items: center; padding: 30px 18px; background-color: #edf1e9; background-image: radial-gradient(#d0dace 1px, transparent 1px); background-size: 19px 19px; }
.login-card { width: min(100%,430px); padding: clamp(24px,4vw,40px); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 12px 40px #1935220b; }
.login-card h1 { font-size: clamp(1.8rem,4vw,2.3rem); }
.login-card .brand { margin-bottom: 30px; color: var(--ink); }
.login-card .brand small { color: var(--muted); }
.login-card form { display: grid; gap: 16px; margin-top: 22px; }
.login-card .btn { width: 100%; }
.login-card footer { color: var(--muted); margin-top: 18px; font-size: .82rem; }
@media (max-width: 1080px) {
  .shell { grid-template-columns: 185px minmax(0,1fr); }
  .sidebar { padding-inline: 12px; }
  .widget-table :is(th,td), .table-wrap :is(th,td) { padding: 12px; }
}
@media (max-width: 790px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  .sidebar { position: static; height: auto; overflow: visible; display: flex; flex-flow: row wrap; align-items: center; gap: 7px 16px; padding: 11px 16px; }
  .sidebar .brand { margin: 0; }
  .brand { font-size: 1.24rem; }
  .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
  .sidebar nav, .navgroup { display: flex; flex-direction: row; align-items: center; gap: 3px; flex-wrap: wrap; }
  .navlink { padding: 6px 8px; min-height: 35px; font-size: .82rem; gap: 6px; }
  .sidebar :is(.nav-label,.nav-caption,.navgroup-title) { display: none; }
  .account { padding: 0; margin: 0 0 0 auto; border: 0; }
  .account .avatar, .account small { display: none; }
  .topbar { min-height: 44px; padding: 8px 18px; }
  .content, .workspace > #view { padding: 25px 18px 46px; }
}
@media (max-width: 540px) {
  .sidebar { justify-content: space-between; }
  .sidebar nav { flex-basis: 100%; order: 3; }
  .workspace-label { display: none; }
  .stats { gap: 7px; margin-bottom: 17px; }
  .stat { padding: 12px 10px; }
  .stat .stat-label, .stat small { font-size: .76rem; }
  .panel-head, .panel-body, .dialog-head, .dialog-body, .panel > .toolbar { padding: 15px; }
  .fields { grid-template-columns: minmax(0,1fr); }
  .page-head { gap: 13px; margin-bottom: 19px; }
  .tabs { gap: 14px; margin-bottom: 15px; }
  .widget-table :is(th,td), .table-wrap :is(th,td) { padding: 10px; }
  .widget-table :is(th,td):first-child, .table-wrap :is(th,td):first-child { padding-left: 14px; }
  .btn { padding: 8px 12px; }
}
@media print {
  .sidebar, .topbar, .actions, .toolbar, .toast, .btn, .tabs, dialog { display: none !important; }
  .shell { display: block; }
  .content, .workspace > #view { padding: 0; }
}
.skip-link { position: fixed; left: 14px; top: 10px; z-index: 10; padding: 9px 14px; background: #fff; color: var(--dark); border-radius: 6px; transform: translateY(-170%); }
.skip-link:focus { transform: none; }
.brand svg.brand-mark { color: var(--mint); background: transparent; width: 35px; height: 35px; }
.account-avatar { flex: 0 0 auto; width: 33px; height: 33px; display: grid; place-items: center; border-radius: 9px; color: #daf2d3; background: #375242; font-size: .8rem; font-weight: 650; }
.account-label > strong { display: block; font-weight: 600; }
.topbar { justify-content: flex-start; gap: 11px; }
.topbar > [aria-hidden] { color: #849087; }
.crumb { color: #344b3e; font-weight: 550; }
@media (max-width: 540px) {
  .topbar > [aria-hidden], .account-avatar, .account-label { display: none; }
}
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.stat .stat-label { display: flex; align-items: center; gap: 8px; margin-bottom: 13px; font-weight: 550; }
.stat-label svg { color: var(--accent); }
.toolbar .search { flex: 1 1 175px; }
.search svg { position: absolute; left: 11px; pointer-events: none; }
.search input:not([type="checkbox"]):not([type="radio"]):not([type="range"]) { padding-left: 34px; }
.toolbar select { width: auto; max-width: min(280px,100%); }
.row-open { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--line-soft); border-radius: 8px; color: var(--dark); }
.row-open:hover { background: var(--tint); }
.pill.mono { font-family: var(--mono); font-size: .73rem; font-weight: 500; }
.panel.client-card { padding: 0; margin: 0; }
.client-card .form-actions { padding: 0 20px 18px; margin-top: 0; }
.dialog .form-actions { justify-content: flex-end; }
.dialog .notice { margin-block: 14px; }
@media (max-width:540px) { .stat .stat-label { gap: 4px; font-size: .75rem; } .stat-label svg { width: 14px; height: 14px; } }
@media (max-width: 790px) {
  .shell { grid-template-rows: max-content minmax(0,1fr); }
}
@media (max-width: 540px) {
  .toolbar .search { min-width: 145px; flex-basis: 145px; max-width: none; }
  .toolbar #client-filter { flex: 1 1 125px; max-width: none; }
  .widget-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .widget-table tbody { display: block; }
  .widget-table tbody tr { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) 34px; gap: 7px 9px; padding: 15px; border-bottom: 1px solid var(--line-soft); }
  .widget-table tbody tr:last-child { border-bottom: none; }
  .widget-table tbody tr td, .widget-table tbody tr td:first-child, .widget-table tbody tr td:last-child { border: none; padding: 0; }
  .widget-table tbody tr td:nth-child(1) { grid-area: 1 / 1 / 2 / 4; }
  .widget-table tbody tr td:nth-child(2) { grid-area: 2 / 1 / 3 / -1; color: var(--muted); margin: 0 0 4px 48px; }
  .widget-table tbody tr td:nth-child(3) { grid-area: 3 / 1; }
  .widget-table tbody tr td:nth-child(4) { grid-area: 3 / 2; }
  .widget-table tbody tr td:nth-child(5) { grid-area: 3 / 3 / 4 / 5; }
  .widget-table tbody tr td:nth-child(6) { grid-area: 1 / 4; align-self: center; }
  .widget-table tbody tr td:nth-child(3)::before, .widget-table tbody tr td:nth-child(4)::before, .widget-table tbody tr td:nth-child(5)::before { display: block; font-size: .73rem; color: var(--muted); margin-bottom: 2px; }
  .widget-table tbody tr td:nth-child(3)::before { content: "Entwurf" / ""; }
  .widget-table tbody tr td:nth-child(4)::before { content: "Staging" / ""; }
  .widget-table tbody tr td:nth-child(5)::before { content: "Live" / ""; }
}
.backlink { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 12px; font-size: .84rem; color: var(--accent); font-weight: 580; }
.section-title.toolbar { justify-content: space-between; }
.section-title.toolbar h3 { margin: 0; }
#draft-state { font-size: .82rem; }
.panel.target-card { display: flex; flex-direction: column; padding: 0; margin: 0; }
.target-card .form-actions { margin-top: auto; padding: 0 20px 18px; }
.target-card .panel-body p { margin: 4px 0 8px; font-size: .9rem; }
.frame-shell > .notice { margin: 0; border-radius: 0; }
