:root {
    --bg-admin: #0b0e14;
    --bg-public: #090c12;
    --bg-noise: rgba(255, 255, 255, 0.02);
    --panel: rgba(20, 25, 34, 0.82);
    --panel-strong: rgba(18, 22, 30, 0.94);
    --panel-soft: rgba(29, 35, 46, 0.58);
    --text: #f4f7fb;
    --muted: #a2acba;
    --line: rgba(255, 255, 255, 0.12);
    --line-soft: rgba(255, 255, 255, 0.07);
    --brand: #0a84ff;
    --brand-deep: #0066d6;
    --danger: #ff5f57;
    --success-bg: rgba(48, 209, 88, 0.16);
    --success-text: #8ff0ad;
    --error-bg: rgba(255, 95, 87, 0.14);
    --error-text: #ffaca8;
    --shadow: 0 24px 56px rgba(0, 0, 0, 0.42);
    --radius-panel: 16px;
    --radius-control: 11px;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.admin-body,
body.public-body {
    min-height: 100vh;
    background-color: var(--bg-admin);
}

body.admin-body {
    background-image:
        radial-gradient(circle at 8% -12%, rgba(10, 132, 255, 0.26), transparent 28%),
        radial-gradient(circle at 90% -18%, rgba(95, 120, 155, 0.22), transparent 34%),
        linear-gradient(135deg, #090d14 0%, #0d1219 45%, #0a0f16 100%);
}

body.public-body {
    background-image:
        radial-gradient(circle at 6% -14%, rgba(10, 132, 255, 0.24), transparent 24%),
        radial-gradient(circle at 90% -10%, rgba(69, 170, 242, 0.16), transparent 38%),
        linear-gradient(145deg, #080b12 0%, #0b1018 40%, #090d14 100%);
}

body.editor-body .topbar {
    display: none;
}

body.editor-body .page {
    max-width: none;
    padding: 24px 20px 54px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(16px);
    background: linear-gradient(180deg, rgba(17, 22, 31, 0.82), rgba(17, 22, 31, 0.68));
    border-bottom: 1px solid var(--line-soft);
}

.topbar__inner {
    max-width: 1680px;
    margin: 0 auto;
    padding: 13px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    color: #f6f8fb;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.page {
    max-width: 1680px;
    margin: 0 auto;
    padding: 22px 24px 56px;
}

.auth-wrap {
    min-height: calc(100vh - 68px);
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(480px, 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    background: linear-gradient(180deg, rgba(24, 30, 40, 0.96), rgba(18, 23, 31, 0.92));
    box-shadow: var(--shadow);
    padding: 28px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.editor-page {
    position: relative;
    max-width: 1480px;
    margin: 0 auto;
}

.editor-shell {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 18px;
}

.editor-hero,
.editor-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.editor-hero {
    padding: 22px 24px;
    background:
        radial-gradient(circle at 86% 0%, rgba(10, 132, 255, 0.24), transparent 42%),
        linear-gradient(180deg, rgba(24, 32, 45, 0.96), rgba(17, 24, 34, 0.92));
}

.editor-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.editor-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    color: #8eb7e2;
    font-size: 0.71rem;
    font-weight: 700;
}

.editor-date-pill {
    display: inline-flex;
    border: 1px solid rgba(145, 175, 214, 0.35);
    border-radius: 999px;
    padding: 6px 11px;
    color: #d5e5fb;
    font-size: 0.86rem;
    background: rgba(11, 20, 34, 0.56);
}

.editor-car {
    color: #dce9fb;
    font-size: clamp(2rem, 2vw, 2.9rem);
    font-weight: 600;
    margin: 0 0 10px;
}

.editor-hero-description {
    max-width: 920px;
    color: #9fb0c8;
    font-size: clamp(0.98rem, 0.74vw, 1.05rem);
    line-height: 1.45;
}

.editor-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(2.6rem, 3vw, 4rem);
    line-height: 1.05;
}

.editor-meta-pills {
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.editor-meta-pill {
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid rgba(135, 168, 208, 0.33);
    padding: 5px 10px;
    font-size: 0.93rem;
    color: #cce0fa;
    background: rgba(14, 24, 38, 0.56);
}

.editor-link-label {
    flex: 1 1 720px;
    max-width: none;
}

.editor-link-row {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
}

.editor-open-public-btn {
    white-space: nowrap;
    height: fit-content;
    margin-bottom: 0;
    border-radius: 10px;
    background: #e8e8e8;
    color: #1e2530;
    border-color: rgba(255, 255, 255, 0.3);
    font-weight: 520;
    opacity: 0.92;
}

.editor-top-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.editor-card {
    padding: 18px 22px;
    background:
        radial-gradient(circle at 92% -20%, rgba(10, 132, 255, 0.11), transparent 48%),
        linear-gradient(180deg, rgba(23, 29, 40, 0.94), rgba(17, 23, 33, 0.9));
}

.editor-info-card {
    align-self: stretch;
}

.editor-gallery-card {
    padding-bottom: 18px;
}

.editor-stream-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.panel {
    background: linear-gradient(180deg, rgba(23, 28, 38, 0.92), rgba(18, 23, 31, 0.9));
    border: 1px solid var(--line);
    border-radius: var(--radius-panel);
    box-shadow: var(--shadow);
    padding: 18px;
}

.panel-wide {
    grid-column: 1 / -1;
}

.panel-hero {
    background:
        radial-gradient(circle at 88% 0%, rgba(10, 132, 255, 0.22), transparent 42%),
        linear-gradient(180deg, rgba(26, 34, 47, 0.98), rgba(18, 24, 34, 0.92));
}

.panel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.panel-row.wrap {
    flex-wrap: wrap;
}

h1,
h2 {
    margin: 0 0 11px;
    letter-spacing: -0.015em;
}

h1 {
    font-size: clamp(1.6rem, 2.2vw, 2.25rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.1rem, 1.45vw, 1.42rem);
    font-weight: 650;
}

p {
    margin: 0 0 11px;
}

.muted {
    color: var(--muted);
}

.tiny {
    font-size: 0.81rem;
}

.stack {
    display: grid;
    gap: 10px;
}

.hidden {
    display: none !important;
}

label {
    display: grid;
    gap: 6px;
    font-size: 0.93rem;
    font-weight: 590;
    color: #dce2ed;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-control);
    padding: 10px 11px;
    font: inherit;
    background: rgba(10, 13, 19, 0.74);
    color: #f7f9fd;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #8ea3c2 50%),
        linear-gradient(135deg, #8ea3c2 50%, transparent 50%);
    background-position:
        calc(100% - 17px) calc(50% + 1px),
        calc(100% - 12px) calc(50% + 1px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 30px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(10, 132, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(10, 132, 255, 0.22);
    background: rgba(12, 17, 24, 0.9);
}

input::placeholder,
textarea::placeholder {
    color: #7d899d;
}

textarea {
    resize: vertical;
}

.btn {
    border: 1px solid transparent;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(76, 87, 108, 0.45), rgba(61, 71, 90, 0.38));
    color: #f5f8fd;
    padding: 9px 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 620;
    transition: transform 0.14s ease, filter 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    color: #fff;
}

.btn-ghost {
    background: linear-gradient(180deg, rgba(32, 39, 52, 0.8), rgba(27, 33, 44, 0.76));
    border-color: rgba(255, 255, 255, 0.14);
}

.btn-small {
    padding: 6px 10px;
    font-size: 0.85rem;
}

.btn-danger {
    background: linear-gradient(135deg, #ff5f57, #dc3a33);
    color: #fff;
}

.btn:disabled {
    opacity: 0.56;
    cursor: not-allowed;
    transform: none;
}

.alert {
    border-radius: 10px;
    padding: 10px 12px;
    border: 1px solid transparent;
    margin: 9px 0;
    font-size: 0.92rem;
}

.alert-success {
    background: var(--success-bg);
    border-color: rgba(48, 209, 88, 0.34);
    color: var(--success-text);
}

.alert-error {
    background: var(--error-bg);
    border-color: rgba(255, 95, 87, 0.35);
    color: var(--error-text);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: top;
    text-align: left;
}

th {
    font-size: 0.79rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8fa1ba;
}

.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.report {
    max-width: 1680px;
    margin: 0 auto;
}

.report-v2 {
    max-width: 1460px;
    display: grid;
    gap: 14px;
}

.report-hero {
    border-radius: var(--radius-panel);
    margin-bottom: 15px;
}

.report-hero-v2 {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--shadow);
    background:
        radial-gradient(circle at 86% 0%, rgba(10, 132, 255, 0.25), transparent 44%),
        linear-gradient(180deg, rgba(24, 32, 45, 0.98), rgba(17, 23, 33, 0.92));
}

.report-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hero-date-pill {
    display: inline-flex;
    border: 1px solid rgba(145, 175, 214, 0.35);
    border-radius: 999px;
    padding: 6px 11px;
    color: #d5e5fb;
    font-size: 0.85rem;
    background: rgba(11, 20, 34, 0.56);
}

.report-hero-apple {
    border: 1px solid var(--line);
    background:
        radial-gradient(circle at 82% 5%, rgba(10, 132, 255, 0.28), transparent 40%),
        linear-gradient(180deg, rgba(24, 31, 43, 0.97), rgba(17, 23, 33, 0.92));
    box-shadow: var(--shadow);
    padding: 22px;
}

.hero-tag {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.71rem;
    color: #8eb7e2;
    font-weight: 700;
}

.hero-car {
    font-weight: 610;
}

.hero-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: #aac2df;
    font-size: 0.91rem;
}

.hero-meta-v2 {
    gap: 8px;
}

.hero-meta-pill {
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid rgba(135, 168, 208, 0.33);
    padding: 5px 10px;
    font-size: 0.8rem;
    color: #cce0fa;
    background: rgba(14, 24, 38, 0.56);
}

.hero-description {
    max-width: 950px;
}

.report-section {
    margin-top: 12px;
}

.section-divider {
    margin: 0 0 8px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(25, 33, 45, 0.95), rgba(20, 26, 36, 0.9));
    border-radius: 11px;
    padding: 12px 14px;
}

.section-divider h2 {
    margin: 0 0 4px;
    font-size: 1rem;
}

.section-divider p {
    margin: 0;
    color: #9aabc0;
    font-size: 0.9rem;
}

.report-section-v2 {
    margin-top: 0;
}

.report-section-shell {
    border: 1px solid rgba(154, 180, 214, 0.2);
    border-radius: 16px;
    padding: 14px;
    background:
        radial-gradient(circle at 96% -30%, rgba(10, 132, 255, 0.11), transparent 52%),
        linear-gradient(180deg, rgba(19, 26, 37, 0.95), rgba(14, 20, 30, 0.96));
    box-shadow: var(--shadow);
}

.section-divider-v2 {
    margin-bottom: 10px;
    border-radius: 12px;
    border-color: rgba(137, 165, 198, 0.26);
    background: linear-gradient(180deg, rgba(22, 30, 42, 0.95), rgba(17, 24, 35, 0.9));
}

.section-divider-minimal {
    min-height: 44px;
    display: flex;
    align-items: center;
}

.section-divider-marker {
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid rgba(138, 174, 220, 0.35);
    padding: 4px 10px;
    color: #bcd9fb;
    font-size: 0.8rem;
    background: rgba(14, 26, 41, 0.52);
}

.stream-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
    align-items: start;
}

.stream-grid-v2 {
    gap: 7px;
}

.report-before-after {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.report-compare-column {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(137, 165, 198, 0.22);
    border-radius: 12px;
    background: rgba(8, 15, 25, 0.42);
}

.report-compare-label {
    margin-bottom: 9px;
    color: #d7e4f6;
    font-size: 0.88rem;
    font-weight: 680;
    letter-spacing: 0.035em;
}

.stream-grid.report-compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.report-compare-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 24px 12px;
    border: 1px dashed rgba(137, 165, 198, 0.22);
    border-radius: 8px;
    color: #71839c;
    text-align: center;
    font-size: 0.82rem;
}

.stream-grid-admin {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stream-card {
    margin: 0;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(21, 27, 37, 0.94), rgba(18, 22, 31, 0.95));
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.editor-stream-grid .stream-card {
    border-radius: 9px;
    border-color: rgba(152, 179, 212, 0.22);
    background: linear-gradient(180deg, rgba(20, 27, 38, 0.95), rgba(15, 21, 31, 0.96));
}

.editor-stream-grid .stream-meta {
    background: rgba(10, 15, 24, 0.84);
}

.editor-section-card {
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(17, 24, 35, 0.92), rgba(14, 20, 30, 0.95));
}

.stream-card img,
.stream-card video {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    background: #0c1017;
}

.stream-card video {
    background: #040507;
}

.stream-card-v2 {
    border-radius: 8px;
    border: 1px solid rgba(152, 179, 212, 0.2);
    background: linear-gradient(180deg, rgba(20, 27, 38, 0.95), rgba(15, 21, 31, 0.96));
}

.stream-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 9px;
    background: rgba(12, 16, 23, 0.85);
}

.sortable-item {
    cursor: grab;
    touch-action: none;
    transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 180ms ease, opacity 180ms ease;
}

.sortable-item.is-dragging {
    opacity: 0.35;
    cursor: grabbing;
}

body.drag-no-select {
    user-select: none;
    cursor: grabbing;
}

.drag-active .sortable-item:not(.sortable-placeholder) {
    will-change: transform;
}

.drag-ghost {
    position: fixed;
    z-index: 1000;
    pointer-events: none;
    opacity: 0.92;
    transform-origin: top left;
    border: 1px solid rgba(10, 132, 255, 0.6);
    box-shadow:
        0 24px 40px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.12) inset;
    filter: saturate(1.08);
}

.sortable-placeholder {
    border: 1px dashed rgba(10, 132, 255, 0.75);
    background:
        repeating-linear-gradient(
            45deg,
            rgba(10, 132, 255, 0.16),
            rgba(10, 132, 255, 0.16) 8px,
            rgba(10, 132, 255, 0.08) 8px,
            rgba(10, 132, 255, 0.08) 16px
        );
    box-shadow: inset 0 0 0 1px rgba(10, 132, 255, 0.42);
}

body.editor-body .editor-media-grid > .sortable-placeholder {
    aspect-ratio: 316 / 196;
    min-height: 0;
    border-radius: 8px;
    border: 1px dashed rgba(126, 168, 226, 0.78);
    background:
        repeating-linear-gradient(
            45deg,
            rgba(72, 128, 202, 0.18),
            rgba(72, 128, 202, 0.18) 8px,
            rgba(72, 128, 202, 0.09) 8px,
            rgba(72, 128, 202, 0.09) 16px
        ),
        rgba(17, 31, 54, 0.72);
}

body.editor-body .editor-section-head.sortable-item {
    cursor: default;
    touch-action: auto;
}

body.editor-body .editor-media-tile.sortable-item {
    cursor: grab;
}

body.editor-body .editor-media-tile.sortable-item.is-dragging {
    opacity: 0;
}

.section-card {
    padding: 14px;
}

.sortable-section {
    grid-column: 1 / -1;
}

.section-pill {
    display: inline-flex;
    margin-bottom: 8px;
    background: rgba(10, 132, 255, 0.2);
    color: #a8cffc;
    border: 1px solid rgba(10, 132, 255, 0.45);
    border-radius: 999px;
    font-size: 0.78rem;
    padding: 3px 8px;
    font-weight: 620;
}

.section-edit-form label {
    font-size: 0.84rem;
}

.section-card > form + form {
    margin-top: 10px;
}

.section-add-card {
    grid-column: 1 / -1;
    border-style: dashed;
    border-color: rgba(76, 120, 177, 0.23);
    background: linear-gradient(180deg, rgba(18, 27, 40, 0.78), rgba(17, 28, 41, 0.74));
}

.action-card {
    display: grid;
    gap: 8px;
    padding: 10px;
    border-style: dashed;
    border-color: rgba(140, 176, 219, 0.44);
    background:
        radial-gradient(circle at 88% -20%, rgba(10, 132, 255, 0.2), transparent 50%),
        linear-gradient(180deg, rgba(15, 22, 31, 0.92), rgba(12, 18, 26, 0.9));
}

.action-card-media {
    min-height: 132px;
}

.editor-stream-grid .action-card,
.editor-stream-grid .section-add-card {
    border-radius: 12px;
}

.inline-action-btn {
    width: 100%;
    min-height: 100px;
    border-radius: 8px;
    border: 1px solid rgba(140, 176, 219, 0.44);
    background: linear-gradient(180deg, rgba(26, 37, 52, 0.84), rgba(20, 30, 43, 0.84));
    color: #e9f2ff;
    padding: 10px;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 620;
    letter-spacing: 0.005em;
    cursor: pointer;
    transition: transform 0.14s ease, filter 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    text-align: center;
}

.inline-action-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    border-color: rgba(155, 194, 238, 0.66);
}

.section-add-card details {
    padding: 4px 8px;
}

.section-add-card summary {
    cursor: pointer;
    font-weight: 620;
    color: #8cc2ff;
    list-style: none;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.section-add-card summary::-webkit-details-marker {
    display: none;
}

.section-add-inline-form {
    margin-top: 8px;
}

.section-edit-form textarea,
.section-edit-form input[type="text"],
.section-add-inline-form textarea,
.section-add-inline-form input[type="text"] {
    background: rgba(9, 14, 24, 0.62);
    border-color: rgba(120, 152, 192, 0.24);
}

.editor-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid rgba(118, 156, 202, 0.32);
    background: linear-gradient(180deg, rgba(20, 32, 49, 0.82), rgba(16, 26, 40, 0.86));
    color: #d8e7fb;
    font-size: 0.8rem;
    font-weight: 560;
    padding: 7px 11px;
    cursor: pointer;
}

.icon-delete-btn {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 0;
    background: rgba(198, 44, 44, 0.86);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.icon-delete-btn span {
    transform: translateY(-1px);
}

.section-add-global {
    grid-column: 1 / -1;
}

.plus-glyph {
    font-size: 2.2rem;
    line-height: 1;
    color: rgba(203, 215, 236, 0.44);
}

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

.inline-upload-live {
    margin-top: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(18, 25, 35, 0.9), rgba(13, 19, 28, 0.92));
    padding: 9px;
}

.inline-upload-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.muted-action {
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.14s ease, filter 0.2s ease, border-color 0.2s ease;
}

.section-plus-summary {
    justify-content: center;
    text-align: center;
}

.muted-action:hover,
.muted-action:focus-visible {
    opacity: 1;
}

body.editor-body .btn {
    background: linear-gradient(180deg, rgba(24, 36, 54, 0.82), rgba(18, 28, 42, 0.86));
    border-color: rgba(118, 156, 202, 0.32);
}

.focus-pulse {
    animation: panelPulse 0.62s ease;
}

@keyframes panelPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(10, 132, 255, 0);
    }
    35% {
        box-shadow:
            0 0 0 3px rgba(10, 132, 255, 0.25),
            0 0 0 9px rgba(10, 132, 255, 0.12);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(10, 132, 255, 0);
    }
}

.drag-handle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: #9eb0c6;
    border: 1px dashed rgba(180, 197, 220, 0.32);
    border-radius: 999px;
    padding: 2px 7px;
    margin-bottom: 5px;
    user-select: none;
    cursor: grab;
}

.drag-dots {
    letter-spacing: -1px;
    font-size: 0.86rem;
    line-height: 1;
    opacity: 0.82;
}

.upload-live {
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(22, 28, 39, 0.9), rgba(16, 22, 31, 0.9));
    padding: 10px;
}

.upload-progress-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.upload-progress-track {
    margin-top: 6px;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.upload-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #4ca5ff, #0a84ff);
    transition: width 0.2s ease;
}

.upload-preview-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

.upload-preview-card {
    border: 1px solid var(--line);
    border-radius: 9px;
    background: rgba(21, 28, 39, 0.92);
    overflow: hidden;
}

.upload-preview-media {
    background: rgba(9, 13, 20, 0.82);
}

.upload-preview-media img,
.upload-preview-media video {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.upload-preview-media img.upload-video-thumb {
    object-fit: cover;
    background: linear-gradient(135deg, #121926, #0d121b);
}

.upload-preview-meta {
    padding: 8px;
    display: grid;
    gap: 3px;
}

.upload-file-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 2px 7px;
    font-size: 0.75rem;
    font-weight: 620;
}

.upload-file-status.pending {
    background: rgba(143, 167, 197, 0.18);
    color: #b5cae6;
}

.upload-file-status.processing {
    background: rgba(255, 214, 102, 0.2);
    color: #ffd37b;
}

.upload-file-status.ready {
    background: rgba(48, 209, 88, 0.2);
    color: #a7f2bd;
}

.upload-file-status.uploading {
    background: rgba(10, 132, 255, 0.2);
    color: #a8d3ff;
}

.upload-file-status.uploaded {
    background: rgba(48, 209, 88, 0.25);
    color: #b3f5c6;
}

.upload-file-status.error {
    background: rgba(255, 95, 87, 0.2);
    color: #ffb3ae;
}

@media (max-width: 1280px) {
    .stream-grid,
    .stream-grid-admin {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .upload-preview-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .page {
        padding: 18px 16px 44px;
    }

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

    .editor-hero {
        padding: 18px;
    }

    .editor-card {
        padding: 14px;
    }

    .report-hero-v2 {
        padding: 18px;
    }

    .report-section-shell {
        padding: 10px;
    }

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

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

@media (max-width: 720px) {
    .topbar__inner {
        padding: 11px 12px;
    }

    .page {
        padding: 14px 12px 30px;
    }

    .editor-link-row {
        align-items: stretch;
    }

    .editor-open-public-btn {
        width: 100%;
    }

    .report-v2 {
        gap: 10px;
    }

    .report-hero-top {
        flex-wrap: wrap;
    }

    .hero-date-pill {
        font-size: 0.78rem;
    }

    .report-hero-v2 {
        border-radius: 14px;
        padding: 14px;
    }

    .report-section-shell {
        border-radius: 12px;
        padding: 8px;
    }

    .stream-grid,
    .stream-grid-admin {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .report-before-after {
        grid-template-columns: 1fr;
    }

    .stream-grid.report-compare-grid {
        grid-template-columns: 1fr;
    }

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

/* Editor Redraw: pixel-close to Report Edit PDF */
body.editor-body {
    background-color: #020914;
    background-image:
        radial-gradient(ellipse 900px 620px at 96% -8%, rgba(39, 112, 190, 0.16), transparent 72%),
        radial-gradient(ellipse 760px 580px at -12% 48%, rgba(15, 70, 126, 0.09), transparent 74%),
        linear-gradient(180deg, #030b17 0%, #010711 58%, #020913 100%);
    background-attachment: fixed;
}

body.editor-body .page {
    padding: 24px 16px 40px;
}

body.editor-body .editor-page {
    max-width: 1468px;
}

body.editor-body .editor-shell {
    gap: 16px;
}

body.editor-body .editor-hero,
body.editor-body .editor-card,
body.editor-body .editor-section-block {
    border: 1px solid rgba(64, 98, 144, 0.42);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(13, 24, 46, 0.92), rgba(8, 18, 37, 0.92));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38);
}

body.editor-body .editor-hero {
    padding: 22px 24px;
}

body.editor-body .editor-hero h1 {
    margin: 2px 0 8px;
    font-size: clamp(2.9rem, 3vw, 4rem);
    line-height: 1.06;
}

body.editor-body .editor-car {
    margin: 0 0 12px;
    font-size: clamp(2.25rem, 2.1vw, 3.1rem);
    color: #dbe5f5;
}

body.editor-body .editor-hero-description {
    margin-bottom: 12px;
    max-width: 900px;
    color: #9eafc8;
    font-size: 1.03rem;
    line-height: 1.46;
}

body.editor-body .editor-meta-pill,
body.editor-body .editor-date-pill {
    border-color: rgba(72, 108, 156, 0.58);
    background: rgba(7, 18, 38, 0.82);
}

body.editor-body .editor-link-row {
    margin-top: 2px;
    gap: 10px;
}

body.editor-body .editor-link-label {
    max-width: 840px;
}

body.editor-body .editor-open-public-btn {
    background: #e6e7ea;
    color: #1d2430;
    border-color: rgba(255, 255, 255, 0.36);
}

body.editor-body .editor-gallery-card {
    padding: 12px;
}

body.editor-body .editor-sections {
    display: grid;
    gap: 14px;
}

body.editor-body .editor-section-block {
    padding: 12px;
}

body.editor-body .editor-section-head {
    margin-bottom: 10px;
    padding: 4px 2px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    border: 0;
    box-shadow: none;
    background: transparent;
}

body.editor-body .editor-section-title {
    margin: 0 0 6px;
    font-size: 2rem;
    line-height: 1.14;
    letter-spacing: -0.01em;
    color: #d8e2f2;
}

body.editor-body .editor-section-description {
    margin: 0;
    color: #8ea2bf;
    font-size: 1.01rem;
}

body.editor-body .editor-section-title[contenteditable],
body.editor-body .editor-section-description[contenteditable] {
    position: relative;
    z-index: 5;
    cursor: text !important;
    outline: none;
    user-select: text;
    -webkit-user-select: text;
}

body.editor-body .editor-section-title[contenteditable]:focus,
body.editor-body .editor-section-description[contenteditable]:focus {
    border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(121, 161, 215, 0.52) inset;
    background: rgba(15, 27, 48, 0.45);
}

body.editor-body .editor-section-description[contenteditable] {
    min-height: 22px;
}

body.editor-body [contenteditable][data-placeholder]:empty::before {
    content: attr(data-placeholder);
    color: rgba(140, 163, 196, 0.68);
}

body.editor-body .editor-media-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

body.editor-body .editor-before-after {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

body.editor-body .editor-compare-column {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(72, 107, 152, 0.38);
    border-radius: 11px;
    background: rgba(5, 15, 31, 0.48);
}

body.editor-body .editor-compare-label {
    margin-bottom: 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #d9e4f4;
    font-size: 0.92rem;
    font-weight: 650;
    letter-spacing: 0.02em;
}

body.editor-body .editor-compare-label small {
    min-width: 24px;
    padding: 2px 7px;
    border: 1px solid rgba(92, 127, 173, 0.42);
    border-radius: 999px;
    color: #8fa5c4;
    text-align: center;
    font-size: 0.72rem;
}

body.editor-body .editor-compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    min-height: 150px;
}

body.editor-body .editor-media-tile {
    position: relative;
    aspect-ratio: 316 / 196;
    min-height: 0;
    border-radius: 8px;
    border: 1px solid rgba(62, 90, 128, 0.46);
    overflow: hidden;
    background: linear-gradient(180deg, rgba(23, 36, 61, 0.88), rgba(19, 31, 53, 0.9));
}

body.editor-body .editor-media-tile img,
body.editor-body .editor-media-tile video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

body.editor-body .video-drag-handle {
    position: absolute;
    z-index: 5;
    top: 8px;
    left: 8px;
    width: 34px;
    height: 28px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(6, 14, 25, 0.68);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(8px);
    cursor: grab;
    touch-action: none;
    opacity: 0.58;
    transition: opacity 150ms ease, background 150ms ease, border-color 150ms ease;
}

body.editor-body .video-drag-handle::before {
    content: "";
    position: absolute;
    inset: 7px 8px;
    background-image: radial-gradient(circle, rgba(235, 243, 255, 0.92) 1.5px, transparent 1.7px);
    background-size: 6px 6px;
}

body.editor-body .editor-media-tile:hover .video-drag-handle,
body.editor-body .video-drag-handle:focus-visible {
    opacity: 1;
    border-color: rgba(140, 180, 232, 0.58);
    background: rgba(17, 37, 63, 0.88);
    outline: none;
}

body.editor-body .video-drag-handle:active {
    cursor: grabbing;
}

body.editor-body .drag-ghost .video-drag-handle {
    opacity: 0;
}

body.editor-body .editor-media-plus {
    display: grid;
    place-items: center;
}

body.editor-body .editor-media-plus .inline-action-btn {
    min-height: 100%;
    border: 0;
    border-radius: 0;
    background: transparent;
}

body.editor-body .editor-media-plus .plus-glyph {
    font-size: 3rem;
    color: rgba(176, 191, 216, 0.42);
}

body.editor-body .inline-upload-form.has-upload-session {
    grid-column: 1 / -1;
    display: block;
    min-height: 0;
    padding: 12px;
    aspect-ratio: auto;
    border-color: rgba(82, 125, 181, 0.62);
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0%, rgba(54, 124, 207, 0.13), transparent 38%),
        linear-gradient(180deg, rgba(16, 29, 50, 0.97), rgba(10, 21, 39, 0.97));
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.24);
    animation: upload-panel-in 180ms ease-out both;
}

body.editor-body .inline-upload-form.has-upload-session > .inline-action-btn {
    position: absolute;
    z-index: 4;
    top: 10px;
    right: 10px;
    width: 30px;
    min-height: 30px;
    border: 1px solid rgba(112, 148, 197, 0.38);
    border-radius: 8px;
    background: rgba(24, 42, 68, 0.82);
}

body.editor-body .inline-upload-form.has-upload-session > .inline-action-btn .plus-glyph {
    font-size: 1.45rem;
}

body.editor-body .inline-upload-form.has-upload-session .inline-upload-live {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

body.editor-body .inline-upload-form.has-upload-session .upload-progress-row {
    min-height: 30px;
    padding-right: 42px;
}

body.editor-body .inline-upload-form.has-upload-session .inline-upload-preview {
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 9px;
}

body.editor-body .inline-upload-form.has-upload-session .upload-preview-card {
    min-width: 0;
    border-color: rgba(91, 125, 171, 0.34);
    background: rgba(13, 25, 43, 0.9);
}

body.editor-body .inline-upload-form.has-upload-session .upload-preview-media {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

body.editor-body .inline-upload-form.has-upload-session .upload-preview-media img,
body.editor-body .inline-upload-form.has-upload-session .upload-preview-media video {
    height: 100%;
}

body.editor-body .inline-upload-form.has-upload-session .upload-preview-meta strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: #dbe6f5;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.editor-body .inline-upload-form.has-upload-session .upload-file-status {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@keyframes upload-panel-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.editor-body .tile-delete-form {
    position: absolute;
    right: 8px;
    top: 8px;
    z-index: 4;
}

body.editor-body .icon-delete-btn {
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 999px;
    background: rgba(174, 41, 44, 0.92);
    color: #fff;
    font-size: 16px;
}

body.editor-body .editor-section-head .icon-delete-btn {
    margin-top: 2px;
}

body.editor-body .editor-section-actions {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

body.editor-body .section-add-bar {
    width: 100%;
    min-height: 26px;
    border: 1px solid rgba(72, 107, 152, 0.42);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(24, 40, 64, 0.82), rgba(20, 35, 57, 0.84));
    color: rgba(184, 200, 223, 0.52);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

body.editor-body .section-add-bar .plus-glyph {
    font-size: 1.45rem;
    line-height: 1;
}

body.editor-body .compare-add-icon {
    display: inline-grid;
    grid-template-columns: repeat(2, 7px);
    gap: 3px;
}

body.editor-body .compare-add-icon i {
    display: block;
    width: 7px;
    height: 12px;
    border: 1px solid currentColor;
    border-radius: 2px;
}

body.editor-body .section-add-bar-global {
    min-height: 44px;
}

body.editor-body .new-section-plus {
    width: 320px;
    max-width: 100%;
    min-height: 280px;
    border: 1px solid rgba(62, 90, 128, 0.46);
    border-radius: 10px;
    background: rgba(19, 31, 53, 0.82);
    color: rgba(176, 191, 216, 0.42);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.editor-body .new-section-plus .plus-glyph {
    font-size: 3rem;
}

body.editor-body .muted-action {
    opacity: 0.5;
}

body.editor-body .muted-action:hover,
body.editor-body .muted-action:focus-visible {
    opacity: 1;
}

@media (max-width: 1180px) {
    body.editor-body .editor-media-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.editor-body .editor-compare-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    body.editor-body .editor-media-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.editor-body .editor-before-after {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    body.editor-body .editor-media-grid {
        grid-template-columns: 1fr;
    }

    body.editor-body .editor-section-actions {
        grid-template-columns: 1fr;
    }

    body.editor-body .new-section-plus {
        width: 100%;
    }
}

@media (max-width: 720px) {
    body.editor-body .inline-upload-form.has-upload-session .inline-upload-preview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 340px) {
    body.editor-body .inline-upload-form.has-upload-session .inline-upload-preview {
        grid-template-columns: 1fr;
    }
}
