:root {
    --bg: #090b09;
    --surface: #101310;
    --surface-2: #151915;
    --surface-3: #1a201a;
    --line: rgba(255, 255, 255, .10);
    --line-strong: rgba(255, 255, 255, .16);
    --text: #f6f8f5;
    --muted: #9ba59a;
    --green: #55d417;
    --green-soft: rgba(85, 212, 23, .14);
    --danger: #ff6670;
    --warning: #f7c45b;
    --topbar-height: 82px;
    --footer-height: 42px;
    --tile-radius: 18px;
    --grid-gap: 12px;
    --grid-padding: 12px;
    --logo-width: 200px;
    --control-height: 40px;
    color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
    min-width: 320px;
    background:
        radial-gradient(circle at 15% 0%, rgba(85,212,23,.08), transparent 26rem),
        linear-gradient(180deg, #070807 0%, #0b0d0b 100%);
    color: var(--text);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
}
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell {
    height: 100vh;
    min-height: 560px;
    display: grid;
    grid-template-rows: var(--topbar-height) minmax(0, 1fr) var(--footer-height);
}

.topbar,
.footerbar {
    background: #020302;
    border-color: rgba(255,255,255,.08);
    position: relative;
    z-index: 20;
}
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 22px;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(0,0,0,.20);
}
.brand-wrap { display: flex; align-items: center; gap: 20px; min-width: 0; }
.brand-logo {
    display: block;
    width: min(var(--logo-width), 34vw);
    max-height: 58px;
    object-fit: contain;
    object-position: left center;
    flex: 0 0 auto;
}
.brand-copy { min-width: 0; }
.eyebrow,
.section-kicker,
.blank-label {
    color: var(--green);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}
.brand-copy h1 {
    margin: 4px 0 0;
    font-size: clamp(16px, 1.45vw, 24px);
    line-height: 1.08;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.view-mode-switch {
    height: var(--control-height);
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255,255,255,.025);
}
.view-mode-switch button {
    height: 30px;
    min-width: 46px;
    padding: 0 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8e988c;
    cursor: pointer;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .04em;
    transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.view-mode-switch button:hover { color: #e8eee6; background: rgba(255,255,255,.045); }
.view-mode-switch button.is-active {
    color: #071006;
    background: var(--green);
    box-shadow: 0 5px 18px rgba(85,212,23,.16);
}
.live-pill,
.clock {
    height: var(--control-height);
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.035);
    border-radius: 12px;
}
.live-pill {
    padding: 0 12px;
    gap: 8px;
    color: #dfffd1;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
}
.live-dot,
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 5px rgba(85,212,23,.09), 0 0 16px rgba(85,212,23,.55);
}
.live-dot { animation: pulse 1.9s ease-in-out infinite; }
.clock {
    min-width: 86px;
    justify-content: center;
    color: #c7cec5;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    font-weight: 700;
}
.icon-button,
.mini-icon-button {
    appearance: none;
    border: 1px solid var(--line);
    background: rgba(255,255,255,.035);
    color: #d7ddd5;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.icon-button { width: var(--control-height); height: var(--control-height); border-radius: 12px; }
.top-control { min-height: var(--control-height); }
.icon-button.accent { background: var(--green); color: #071006; border-color: var(--green); }
.icon-button:hover,
.mini-icon-button:hover { transform: translateY(-1px); border-color: rgba(85,212,23,.55); color: #fff; background: rgba(85,212,23,.10); }
.icon-button.accent:hover { background: #66e72a; color: #061005; }
.icon-button.is-paused { border-color: rgba(247,196,91,.55); color: var(--warning); background: rgba(247,196,91,.08); }
.live-pill.is-paused { color: #ffe6a8; border-color: rgba(247,196,91,.28); background: rgba(247,196,91,.07); }
.live-pill.is-paused .live-dot { background: var(--warning); box-shadow: 0 0 0 5px rgba(247,196,91,.08), 0 0 16px rgba(247,196,91,.42); animation: none; }
.icon-button svg,
.mini-icon-button svg,
.primary-button svg,
.info-box svg,
.blank-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.dashboard-grid {
    min-height: 0;
    padding: var(--grid-padding);
    display: grid;
    gap: var(--grid-gap);
}
.dashboard-grid.mode-grid2x2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
}
.dashboard-grid.mode-grid2x1 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
}
.dashboard-grid.mode-grid1x1 {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
}
.result-tile {
    min-width: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--tile-radius);
    overflow: hidden;
    box-shadow: 0 16px 44px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.025);
}
.result-tile.header-hidden { grid-template-rows: minmax(0,1fr); }
.result-tile.header-hidden .tile-header { display: none; }
.tile-header {
    min-height: 52px;
    padding: 8px 10px 8px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,.01));
}
.tile-title-group { min-width: 0; display: flex; align-items: center; gap: 10px; }
.tile-title {
    margin: 0;
    font-size: 14px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tile-meta { margin-top: 4px; display: flex; align-items: center; color: var(--muted); font-size: 10px; }
.tile-controls { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.tile-status {
    min-width: 58px;
    height: 30px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 9px;
    background: rgba(255,255,255,.025);
    color: #8c978a;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .06em;
    line-height: 1;
    white-space: nowrap;
}
.tile-status .status-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #748074;
}
.tile-status.is-live {
    color: #b8f2a0;
    border-color: rgba(85,212,23,.22);
    background: rgba(85,212,23,.055);
}
.tile-status.is-live .status-dot {
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(85,212,23,.5), 0 0 10px rgba(85,212,23,.4);
    animation: tile-live-pulse 1.6s ease-out infinite;
}
.tile-status.is-loading { color: #f2cf80; border-color: rgba(247,196,91,.22); }
.tile-status.is-loading .status-dot { background: var(--warning); animation: tile-loading-pulse 1s ease-in-out infinite; }
.tile-status.is-paused { color: #f2cf80; border-color: rgba(247,196,91,.22); }
.tile-status.is-paused .status-dot { background: var(--warning); box-shadow: 0 0 10px rgba(247,196,91,.35); }
.tile-status.is-off { color: #8c978a; }
.tile-status.is-off .status-dot { background: #6b726b; }
@keyframes tile-live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(85,212,23,.52), 0 0 10px rgba(85,212,23,.42); }
    70% { box-shadow: 0 0 0 7px rgba(85,212,23,0), 0 0 13px rgba(85,212,23,.28); }
    100% { box-shadow: 0 0 0 0 rgba(85,212,23,0), 0 0 10px rgba(85,212,23,.22); }
}
@keyframes tile-loading-pulse {
    0%, 100% { opacity: .45; }
    50% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .tile-status.is-live .status-dot,
    .tile-status.is-loading .status-dot { animation: none; }
}
.refresh-countdown { min-width: 34px; color: #7f8b7d; font-size: 10px; font-variant-numeric: tabular-nums; text-align: right; }
.update-time-badge {
    height: 30px;
    min-width: 112px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 9px;
    background: rgba(255,255,255,.025);
    color: #a8b0a6;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .035em;
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.update-time-label { color: #727d70; font-size: 8px; letter-spacing: .08em; }
.update-time-value { color: #c7cec5; }
.tile-stage { position: relative; min-height: 0; overflow: hidden; background: #fff; }
.frame-viewport { position: absolute; inset: 0; overflow: hidden; background: #fff; }
.result-frame {
    position: absolute;
    top: 0;
    left: 0;
    border: 0;
    width: calc(100% / var(--frame-scale, 1));
    height: calc(100% / var(--frame-scale, 1));
    transform: scale(var(--frame-scale, 1));
    transform-origin: 0 0;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1;
}
.result-frame.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}
.blank-state {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 34px;
    color: var(--text);
    background:
        radial-gradient(circle at 50% 30%, rgba(85,212,23,.10), transparent 18rem),
        linear-gradient(145deg, #111511, #0d100d 62%, #0a0c0a);
}
.blank-state::after {
    content: "";
    position: absolute;
    inset: 14px;
    border: 1px dashed rgba(255,255,255,.08);
    border-radius: 14px;
    pointer-events: none;
}
.blank-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(85,212,23,.32);
    border-radius: 17px;
    color: var(--green);
    background: var(--green-soft);
    box-shadow: 0 18px 50px rgba(0,0,0,.22);
    margin-bottom: 16px;
}
.blank-icon svg { width: 25px; height: 25px; }
.blank-state h3 { margin: 8px 0 5px; font-size: clamp(16px,1.5vw,22px); }
.blank-state p { max-width: 460px; margin: 0 0 17px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.frame-loader[hidden] { display: none !important; }
.frame-loader {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-content: center;
    grid-auto-flow: column;
    gap: 7px;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(2px);
}
.frame-loader span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 14px rgba(85,212,23,.28);
    animation: loader 1s infinite ease-in-out;
}
.frame-loader span:nth-child(2) { animation-delay: .12s; }
.frame-loader span:nth-child(3) { animation-delay: .24s; }

.footerbar {
    min-height: var(--footer-height);
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #8e978c;
    border-top: 1px solid var(--line);
    font-size: 11px;
    letter-spacing: .01em;
}
.footer-brand strong { color: #d9dfd7; font-weight: 750; }
.footer-separator { color: var(--green); margin: 0 4px; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(0,0,0,.68);
    backdrop-filter: blur(14px) saturate(.9);
}
.modal-backdrop[hidden] { display: none; }
.settings-modal {
    width: min(1120px, 100%);
    max-height: min(900px, calc(100vh - 44px));
    display: grid;
    grid-template-rows: auto minmax(0,1fr) auto;
    overflow: hidden;
    background: #0d100d;
    border: 1px solid var(--line-strong);
    border-radius: 24px;
    box-shadow: 0 36px 120px rgba(0,0,0,.58), inset 0 1px 0 rgba(255,255,255,.035);
}
.modal-header,
.modal-footer { background: #0a0c0a; }
.modal-header {
    padding: 22px 24px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    border-bottom: 1px solid var(--line);
}
.modal-header h2 { margin: 5px 0 5px; font-size: 25px; }
.modal-header p { margin: 0; color: var(--muted); font-size: 13px; }
.modal-body { overflow: auto; padding: 22px 24px 26px; scrollbar-color: #344132 transparent; }
.settings-section + .settings-section { margin-top: 26px; }
.section-heading { margin-bottom: 12px; }
.section-heading h3 { margin: 4px 0 0; font-size: 16px; }
.inline-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; }
.heading-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.global-grid { grid-template-columns: 1.5fr 1fr 1fr; }
.field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.018);
}
.field > span { color: #b7c0b5; font-size: 11px; font-weight: 700; }
.field output { float: right; color: var(--green); font-weight: 800; }
.field input[type="text"],
.field input[type="url"],
.field input[type="number"],
.field input[type="password"],
.field select {
    width: 100%;
    min-width: 0;
    height: 39px;
    padding: 0 11px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 10px;
    outline: none;
    background: #080a08;
    color: #f2f5f1;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.field input:focus,
.field select:focus { border-color: rgba(85,212,23,.7); box-shadow: 0 0 0 3px rgba(85,212,23,.08); }
.field select { appearance: none; cursor: pointer; }
.field input[type="range"] { width: 100%; accent-color: var(--green); }
.field-wide { grid-column: span 1; }
.checkbox-field { justify-content: center; }
.switch-row { display: flex; align-items: center; gap: 10px; color: #c5ccc3; font-size: 12px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
    width: 38px;
    height: 22px;
    flex: 0 0 38px;
    position: relative;
    border-radius: 99px;
    background: #343a34;
    transition: background .16s ease;
}
.switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform .16s ease;
}
.switch-row input:checked + .switch { background: var(--green); }
.switch-row input:checked + .switch::after { transform: translateX(16px); background: #071006; }
.tile-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.tile-settings-card {
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,.022), rgba(255,255,255,.01));
}
.tile-settings-card:target,
.tile-settings-card.is-focused { border-color: rgba(85,212,23,.55); box-shadow: 0 0 0 3px rgba(85,212,23,.07); }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-heading-left { display: flex; align-items: center; gap: 10px; }
.card-heading-actions { display: flex; align-items: center; gap: 9px; }
.card-heading h4 { margin: 0; font-size: 13px; }
.card-heading small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.card-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.card-fields .url-field,
.card-fields .source-text-field { grid-column: 1 / -1; }
.card-fields .field { padding: 10px; border-radius: 12px; }
.card-fields .field > span { font-size: 10px; }
.active-toggle { border: 0; padding: 0; background: transparent; }
.remove-source-button {
    height: 28px;
    padding: 0 9px;
    border: 1px solid rgba(255,102,112,.22);
    border-radius: 8px;
    background: rgba(255,102,112,.055);
    color: #d99a9e;
    cursor: pointer;
    font-size: 9px;
    font-weight: 800;
}
.remove-source-button:hover { border-color: rgba(255,102,112,.45); color: #ffadb2; }
.remove-source-button:disabled { opacity: .35; cursor: not-allowed; }
button:disabled { cursor: not-allowed; opacity: .48; transform: none !important; }
.info-box {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    padding: 14px 15px;
    border: 1px solid rgba(85,212,23,.19);
    border-radius: 14px;
    background: rgba(85,212,23,.055);
    color: #cad3c8;
}
.info-box svg { flex: 0 0 20px; color: var(--green); margin-top: 2px; }
.info-box strong { font-size: 12px; }
.info-box p { margin: 4px 0 0; color: #98a396; font-size: 11px; line-height: 1.5; }
.modal-footer {
    min-height: 70px;
    padding: 13px 24px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.modal-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.primary-button,
.secondary-button {
    height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}
.primary-button { border: 1px solid var(--green); background: var(--green); color: #061005; }
.primary-button:hover { background: #69ea2c; transform: translateY(-1px); }
.primary-button svg { width: 16px; height: 16px; }
.secondary-button { border: 1px solid var(--line); background: rgba(255,255,255,.035); color: #d7ddd5; }
.secondary-button:hover { border-color: rgba(85,212,23,.42); background: rgba(85,212,23,.07); }
.save-status { min-height: 18px; color: #96a093; font-size: 11px; }
.save-status.is-success { color: #8ded62; }
.save-status.is-error { color: #ff8c93; }
.save-status.is-warning { color: #f5c86b; }

@keyframes pulse { 0%,100% { opacity: .65; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes loader { 0%,80%,100% { transform: scale(.75); opacity: .45; } 40% { transform: scale(1); opacity: 1; } }

@media (max-width: 900px) {
    body { overflow: auto; }
    .app-shell { height: auto; min-height: 100vh; grid-template-rows: auto 1fr auto; }
    .topbar { min-height: var(--topbar-height); flex-wrap: wrap; padding-block: 12px; }
    .brand-copy { display: none; }
    .live-pill { display: none; }
    .view-mode-switch button { min-width: 40px; padding-inline: 7px; }
    .dashboard-grid.mode-grid2x2, .dashboard-grid.mode-grid2x1 { grid-template-columns: 1fr; grid-template-rows: none; }
    .dashboard-grid.mode-grid1x1 { grid-template-columns: 1fr; grid-template-rows: none; }
    .result-tile { min-height: 62vh; }
    .footerbar { min-height: var(--footer-height); flex-wrap: wrap; padding-block: 10px; }
    .global-grid,
    .tile-settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
    .topbar { gap: 10px; padding-inline: 12px; }
    .brand-logo { width: min(var(--logo-width), 44vw); }
    .clock { display: none; }
    .icon-button { width: 38px; height: 38px; }
    .dashboard-grid { padding: var(--grid-padding); gap: var(--grid-gap); }
    .modal-backdrop { padding: 8px; }
    .settings-modal { max-height: calc(100vh - 16px); border-radius: 18px; }
    .modal-header, .modal-body, .modal-footer { padding-left: 15px; padding-right: 15px; }
    .form-grid, .card-fields { grid-template-columns: 1fr; }
    .url-field { grid-column: auto !important; }
    .inline-heading { align-items: flex-start; flex-direction: column; }
    .modal-footer { align-items: stretch; flex-direction: column; }
    .modal-actions { width: 100%; margin: 0; }
    .modal-actions button { flex: 1; }
}

@media (max-width: 1280px) {
    .topbar { padding-inline: 14px; gap: 14px; }
    .brand-wrap { gap: 13px; }
    .topbar-actions { gap: 6px; }
    .view-mode-switch button { min-width: 42px; padding-inline: 7px; }
}


/* v1.3.0 – einheitliche Controls, Stand-Badge, Security und Login */
.topbar-actions > * { flex: 0 0 auto; }
.view-mode-switch { padding: 3px; }
.view-mode-switch button { height: calc(var(--control-height) - 8px); }
.tile-subtitle { display: block; max-width: min(50vw, 520px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-description { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.security-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.security-actions { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.security-note { color: #8f998d; font-size: 10px; line-height: 1.5; }
.security-note strong { color: #d8dfd5; }
.secondary-button.danger-soft { border-color: rgba(255,102,112,.24); color: #ffadb2; background: rgba(255,102,112,.05); }
.secondary-button.danger-soft:hover { border-color: rgba(255,102,112,.48); background: rgba(255,102,112,.10); }

.login-page {
    min-height: 100vh;
    overflow: auto;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 50% 18%, rgba(85,212,23,.13), transparent 23rem),
        radial-gradient(circle at 15% 90%, rgba(85,212,23,.05), transparent 28rem),
        linear-gradient(145deg, #050605 0%, #0a0d0a 60%, #060706 100%);
}
.login-shell {
    width: 100%;
    min-height: 100vh;
    padding: 28px;
    display: grid;
    place-items: center;
}
.login-card {
    width: min(460px, 100%);
    padding: 30px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(17,21,17,.97), rgba(9,11,9,.98));
    box-shadow: 0 36px 120px rgba(0,0,0,.58), inset 0 1px 0 rgba(255,255,255,.035);
    backdrop-filter: blur(18px);
}
.login-brand { text-align: center; }
.login-logo { width: min(230px, 72%); height: auto; display: block; margin: 0 auto 24px; }
.login-kicker { color: var(--green); font-size: 10px; font-weight: 900; letter-spacing: .20em; }
.login-brand h1 { margin: 8px 0 7px; font-size: 27px; letter-spacing: -.025em; }
.login-brand p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.login-alert {
    margin-top: 20px;
    padding: 11px 13px;
    border: 1px solid rgba(255,102,112,.28);
    border-radius: 11px;
    background: rgba(255,102,112,.07);
    color: #ffadb2;
    font-size: 11px;
    line-height: 1.45;
}
.login-form { margin-top: 24px; display: grid; gap: 12px; }
.login-field { display: grid; gap: 7px; }
.login-field > span { color: #b8c1b6; font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.login-field > span strong { float: right; color: var(--green); font-size: 12px; letter-spacing: .02em; }
.login-field input {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 12px;
    outline: none;
    background: #070907;
    color: #f5f8f4;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.login-field input:focus { border-color: rgba(85,212,23,.72); box-shadow: 0 0 0 4px rgba(85,212,23,.08); background: #090c09; }
.login-submit {
    width: 100%;
    height: 48px;
    margin-top: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--green);
    border-radius: 12px;
    background: var(--green);
    color: #061005;
    cursor: pointer;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: .02em;
    box-shadow: 0 12px 34px rgba(85,212,23,.14);
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.login-submit:hover { transform: translateY(-1px); background: #68e72c; box-shadow: 0 15px 40px rgba(85,212,23,.2); }
.login-submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.login-footer {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.08);
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: #737d71;
    font-size: 9px;
}
.login-footer strong { color: #aeb7ac; }

@media (max-width: 900px) {
    .security-grid { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
    .login-shell { padding: 14px; }
    .login-card { padding: 22px 18px; border-radius: 18px; }
    .login-footer { flex-direction: column; text-align: center; }
    .security-actions { align-items: flex-start; flex-direction: column; }
    .update-time-badge { min-width: 92px; padding-inline: 7px; }
    .update-time-label { display: none; }
}

/* v1.4.0 – Timer-Badge, Login-Design, Logout und URL-Rotation */
.refresh-countdown {
    height: 30px;
    min-width: 46px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 9px;
    background: rgba(255,255,255,.025);
    color: #a8b0a6;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .035em;
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.logout-top-button { color: #cbd2c9; }
.logout-top-button:hover {
    border-color: rgba(255,102,112,.48);
    color: #ffadb2;
    background: rgba(255,102,112,.08);
}

.login-design-block {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}
.subsection-heading { margin-bottom: 11px; }
.subsection-heading h4 { margin: 4px 0 0; font-size: 13px; color: #e5ebe3; }
.login-design-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.additional-urls {
    grid-column: 1 / -1;
    padding: 0;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    background: rgba(255,255,255,.012);
    overflow: hidden;
}
.additional-urls summary {
    min-height: 42px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    list-style: none;
    color: #c3cbc0;
    font-size: 10px;
    font-weight: 800;
    user-select: none;
}
.additional-urls summary::-webkit-details-marker { display: none; }
.additional-urls summary::after {
    content: "+";
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    flex: 0 0 22px;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 7px;
    color: var(--green);
    background: rgba(85,212,23,.045);
    font-size: 15px;
    line-height: 1;
}
.additional-urls[open] summary::after { content: "−"; }
.additional-urls summary span {
    margin-left: auto;
    color: #6f796d;
    font-size: 9px;
    font-weight: 700;
}
.additional-urls-grid {
    padding: 0 10px 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.additional-urls .additional-url-field { padding: 9px; }
.additional-urls > p {
    margin: 0;
    padding: 0 11px 11px;
    color: #778175;
    font-size: 9px;
    line-height: 1.45;
}

.login-card { border-radius: var(--login-card-radius, 24px); }
.login-logo { width: min(var(--login-logo-width, 230px), 84%); }
.login-field input,
.login-submit,
.login-alert { border-radius: var(--login-control-radius, 12px); }

@media (max-width: 900px) {
    .login-design-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 580px) {
    .login-design-grid,
    .additional-urls-grid { grid-template-columns: 1fr; }
    .refresh-countdown { min-width: 42px; padding-inline: 7px; }
}

/* v1.5.0 – Icon-Auswahl, Topbar-Dekor und Farbsteuerung */
:root {
    --topbar-bg: #020302;
    --footer-bg: #020302;
}

.topbar,
.footerbar {
    background: var(--topbar-bg);
}
.footerbar {
    background: var(--footer-bg);
}
.topbar {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.topbar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .9;
    background:
        radial-gradient(circle at 12% 50%, rgba(85,212,23,.14), transparent 22%),
        radial-gradient(circle at 78% -10%, rgba(85,212,23,.10), transparent 25%),
        linear-gradient(90deg, rgba(255,255,255,.015) 0, rgba(255,255,255,.015) 1px, transparent 1px, transparent 74px),
        linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0));
    background-size: auto, auto, 74px 100%, auto;
}
body.topbar-decor-disabled .topbar::before {
    display: none;
}
.brand-wrap,
.topbar-actions {
    position: relative;
    z-index: 1;
}

.tile-icon-wrap {
    --tile-icon-size: 22px;
    width: calc(var(--tile-icon-size) + 14px);
    height: calc(var(--tile-icon-size) + 14px);
    display: inline-grid;
    place-items: center;
    border-radius: 11px;
    border: 1px solid rgba(85,212,23,.18);
    background: linear-gradient(180deg, rgba(85,212,23,.10), rgba(85,212,23,.04));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
    flex: 0 0 auto;
}
.tile-icon {
    display: inline-grid;
    place-items: center;
    color: #98ee6b;
}
.tile-icon svg {
    width: var(--tile-icon-size);
    height: var(--tile-icon-size);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tile-title-group {
    gap: 12px;
}

.refresh-countdown-badge {
    height: 30px;
    min-width: 72px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 9px;
    background: rgba(255,255,255,.025);
    color: #a8b0a6;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .035em;
    line-height: 1;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.refresh-countdown-label {
    color: #727d70;
    font-size: 8px;
    letter-spacing: .08em;
}
.refresh-countdown-value {
    color: #c7cec5;
}

.field input[type="color"] {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.11);
    background: #070907;
    padding: 5px;
    cursor: pointer;
}
.field input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}
.field input[type="color"]::-webkit-color-swatch,
.field input[type="color"]::-moz-color-swatch {
    border: 0;
    border-radius: 9px;
}

@media (max-width: 580px) {
    .refresh-countdown-badge { min-width: 56px; padding-inline: 7px; }
    .refresh-countdown-label { display: none; }
    .tile-icon-wrap { width: calc(var(--tile-icon-size) + 10px); height: calc(var(--tile-icon-size) + 10px); }
}

/* v1.5.1 – einheitliche Header-Controls und automatische Topbar */
:root {
    --tile-header-control-height: 32px;
    --tile-header-control-radius: 10px;
}

.tile-icon-wrap,
.refresh-countdown-badge,
.update-time-badge,
.tile-status {
    height: var(--tile-header-control-height);
    min-height: var(--tile-header-control-height);
    border-radius: var(--tile-header-control-radius);
}

.tile-icon-wrap {
    width: 42px;
    min-width: 42px;
    padding: 0 7px;
}

.refresh-countdown-badge {
    min-width: 72px;
}

.update-time-badge {
    min-width: 112px;
}

.tile-status {
    min-width: 64px;
}

.auto-hide-button.is-active {
    color: #dfffd1;
    border-color: rgba(85,212,23,.34);
    background: rgba(85,212,23,.09);
    box-shadow: inset 0 0 0 1px rgba(85,212,23,.035);
}
.auto-hide-button.is-active:hover {
    color: #fff;
    border-color: rgba(85,212,23,.58);
    background: rgba(85,212,23,.14);
}

.topbar-reveal-zone {
    position: fixed;
    z-index: 90;
    top: 0;
    left: 0;
    right: 0;
    height: 14px;
    pointer-events: none;
    background: transparent;
}

.topbar,
.app-shell {
    transition: grid-template-rows .26s ease, transform .26s ease, opacity .20s ease;
}

body.topbar-is-hidden .app-shell {
    grid-template-rows: 0 minmax(0, 1fr) var(--footer-height);
}

body.topbar-is-hidden .topbar {
    transform: translateY(-105%);
    opacity: 0;
    pointer-events: none;
    border-bottom-color: transparent;
}

body.topbar-auto-hide-enabled.topbar-is-hidden .topbar-reveal-zone {
    pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
    .topbar,
    .app-shell {
        transition: none;
    }
}

@media (max-width: 580px) {
    .tile-icon-wrap,
    .refresh-countdown-badge,
    .update-time-badge,
    .tile-status {
        height: 30px;
        min-height: 30px;
        border-radius: 9px;
    }
    .tile-icon-wrap { width: 38px; min-width: 38px; }
}

/* v1.5.2 – getrennte Hintergrund-/Anzeigeintervalle */
.field-hint {
    display: block;
    margin-top: 6px;
    color: #788275;
    font-size: 9px;
    line-height: 1.45;
}

/* v1.5.4 – sichtbar animierbare Topbar mit konfigurierbaren Farbverläufen */
:root {
    --topbar-animation-duration: 8s;
    --topbar-grad-1-soft: rgba(85, 212, 23, .11);
    --topbar-grad-1-strong: rgba(85, 212, 23, .32);
    --topbar-grad-2-soft: rgba(139, 234, 82, .10);
    --topbar-grad-2-strong: rgba(139, 234, 82, .28);
    --topbar-grad-3-soft: rgba(38, 166, 91, .08);
    --topbar-grad-3-strong: rgba(38, 166, 91, .24);
}

.topbar::before {
    background:
        radial-gradient(circle at 12% 50%, var(--topbar-grad-1-soft) 0%, transparent 30%),
        radial-gradient(circle at 72% 15%, var(--topbar-grad-2-soft) 0%, transparent 28%),
        radial-gradient(circle at 95% 80%, var(--topbar-grad-3-soft) 0%, transparent 26%),
        linear-gradient(90deg, rgba(255,255,255,.018) 0, rgba(255,255,255,.018) 1px, transparent 1px, transparent 74px),
        linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,0));
    background-size: auto, auto, auto, 74px 100%, auto;
    background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
    opacity: 1;
    transition: opacity .28s ease;
}

.topbar::after {
    content: "";
    position: absolute;
    z-index: 0;
    top: -35%;
    bottom: -35%;
    left: 0;
    width: 52%;
    pointer-events: none;
    opacity: 0;
    transform: translate3d(-145%, 0, 0) skewX(-10deg);
    filter: blur(9px);
    background:
        linear-gradient(
            102deg,
            transparent 0%,
            transparent 10%,
            var(--topbar-grad-1-soft) 24%,
            var(--topbar-grad-1-strong) 38%,
            var(--topbar-grad-2-strong) 51%,
            var(--topbar-grad-3-strong) 64%,
            var(--topbar-grad-3-soft) 76%,
            transparent 91%,
            transparent 100%
        );
    box-shadow: 0 0 32px var(--topbar-grad-1-soft);
    will-change: transform, opacity;
}

body.topbar-decor-disabled .topbar::before,
body.topbar-decor-disabled .topbar::after {
    display: none;
}

body.topbar-decor-animated.topbar-animation-running:not(.topbar-decor-disabled) .topbar::after {
    animation: topbar-gradient-sweep var(--topbar-animation-duration) cubic-bezier(.22,.62,.32,1) 1 both;
}

@keyframes topbar-gradient-sweep {
    0% {
        transform: translate3d(-145%, 0, 0) skewX(-10deg);
        opacity: 0;
    }
    10% { opacity: .72; }
    42% { opacity: 1; }
    82% { opacity: .78; }
    100% {
        transform: translate3d(285%, 0, 0) skewX(-10deg);
        opacity: 0;
    }
}



/* v1.5.5 – robuste, sichtbar animierte DOM-Ebene in der Topbar */
.topbar::after {
    display: none !important;
}

.topbar-ambient-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    opacity: 1;
}

.topbar-ambient-core {
    position: absolute;
    top: -55%;
    bottom: -55%;
    left: -58%;
    width: 58%;
    opacity: 0;
    transform: translate3d(0, 0, 0) skewX(-12deg);
    filter: blur(13px) saturate(1.18);
    will-change: transform, opacity;
    background:
        radial-gradient(ellipse at 50% 50%, var(--topbar-grad-2-strong) 0%, var(--topbar-grad-2-soft) 28%, transparent 62%),
        linear-gradient(
            104deg,
            transparent 0%,
            var(--topbar-grad-3-soft) 14%,
            var(--topbar-grad-1-strong) 34%,
            var(--topbar-grad-2-strong) 50%,
            var(--topbar-grad-3-strong) 67%,
            var(--topbar-grad-1-soft) 82%,
            transparent 100%
        );
    box-shadow:
        0 0 38px var(--topbar-grad-1-soft),
        0 0 70px var(--topbar-grad-2-soft);
}

body.topbar-decor-disabled .topbar-ambient-layer {
    display: none;
}

body.topbar-decor-animated:not(.topbar-decor-disabled) .topbar-ambient-layer.is-running .topbar-ambient-core {
    animation: topbar-dom-gradient-sweep var(--topbar-animation-duration) cubic-bezier(.20,.62,.30,1) 1 both;
}

@keyframes topbar-dom-gradient-sweep {
    0% {
        transform: translate3d(0, 0, 0) skewX(-12deg);
        opacity: 0;
    }
    7% { opacity: .70; }
    28% { opacity: .94; }
    52% { opacity: 1; }
    78% { opacity: .88; }
    94% { opacity: .55; }
    100% {
        transform: translate3d(335%, 0, 0) skewX(-12deg);
        opacity: 0;
    }
}

/* v1.5.6 – JS-gesteuerte Topbar-Ambientbewegung, sichtbar und browserrobust */
.topbar-ambient-layer {
    z-index: 1;
    mix-blend-mode: normal;
}
.brand-wrap,
.topbar-actions {
    z-index: 2;
}
.topbar-ambient-core {
    left: -60%;
    width: 58%;
    top: -85%;
    bottom: -85%;
    opacity: 0;
    filter: blur(18px) saturate(1.35);
    background:
        radial-gradient(ellipse at 48% 50%, var(--topbar-grad-2-strong) 0%, var(--topbar-grad-2-strong) 12%, var(--topbar-grad-2-soft) 35%, transparent 70%),
        linear-gradient(102deg,
            transparent 0%,
            var(--topbar-grad-3-soft) 12%,
            var(--topbar-grad-1-strong) 31%,
            var(--topbar-grad-2-strong) 50%,
            var(--topbar-grad-3-strong) 68%,
            var(--topbar-grad-1-soft) 86%,
            transparent 100%);
    box-shadow:
        0 0 45px var(--topbar-grad-1-strong),
        0 0 90px var(--topbar-grad-2-soft);
    animation: none !important;
}
body.topbar-decor-animated:not(.topbar-decor-disabled) .topbar-ambient-layer.is-running .topbar-ambient-core {
    animation: none !important;
}

/* v1.5.7 – echte Canvas-Ambientanimation für Topbar und Login */
.ambient-canvas {
    display: block;
    pointer-events: none;
}

.topbar-ambient-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 1;
}

.brand-wrap,
.topbar-actions {
    position: relative;
    z-index: 2;
}

/* Die statische Topbar-Dekoration und die Animation sind bewusst getrennt.
   Dadurch kann die Animation auch ohne statischen Hintergrund sichtbar laufen. */
body.topbar-decor-disabled .topbar::before {
    display: none;
}

.login-page {
    position: relative;
    isolation: isolate;
}

.login-ambient-canvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    opacity: 1;
}

.login-shell {
    position: relative;
    z-index: 1;
}

/* Alte DOM-/Pseudo-Animationsflächen aus früheren Releases sicher deaktivieren. */
.topbar-ambient-layer,
.topbar-ambient-core,
.topbar::after {
    display: none !important;
}

/* v1.5.8 – Fensterkopf als transparenter Overlay über der eingebetteten Webseite */
.result-tile {
    --tile-header-opacity: .85;
    --tile-header-height: 52px;
    position: relative;
    display: block;
}

.result-tile.header-hidden .tile-header {
    display: none;
}

.tile-stage {
    position: absolute;
    inset: 0;
    z-index: 1;
    min-height: 0;
    overflow: hidden;
    background: #fff;
}

.tile-header {
    position: absolute;
    z-index: 10;
    top: 0;
    left: 0;
    right: 0;
    height: var(--tile-header-height);
    min-height: var(--tile-header-height);
    padding: max(4px, calc((var(--tile-header-height) - var(--tile-header-control-height)) / 2)) 10px;
    overflow: hidden;
    background: rgba(7, 11, 7, var(--tile-header-opacity));
    border-bottom: 1px solid rgba(255,255,255,.10);
    box-shadow: 0 6px 18px rgba(0,0,0,.10);
    pointer-events: none;
}

.tile-header .tile-title-group,
.tile-header .tile-controls {
    pointer-events: none;
}

.tile-title-group {
    min-height: var(--tile-header-control-height);
}

.tile-title-group > div:last-child {
    min-width: 0;
    overflow: hidden;
}

.tile-title,
.tile-subtitle {
    text-shadow: 0 1px 8px rgba(0,0,0,.72);
}

.frame-viewport,
.blank-state,
.frame-loader {
    z-index: 2;
}

@media (max-width: 580px) {
    .tile-header {
        padding-left: 8px;
        padding-right: 8px;
    }
}
