body {
    margin: 0;
    font-family: "Open Sans", system-ui, sans-serif;
    background: #272933;
    color: rgba(236, 236, 241, 0.88);
}

.legacy-body {
    background-color: #272933;
    background-image: var(--legacy-bg, url("../svg/bg.svg"));
    color: rgba(236, 236, 241, 0.72);
}

.legacy-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 900px;
    margin: 0 auto;
}

.legacy-header,
.legacy-panel,
.legacy-footer {
    background-color: #343541;
}

.legacy-header {
    border-bottom: 1px solid rgba(236, 236, 241, 0.2);
}

.legacy-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 32px;
}

.legacy-logo-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: 150px;
    height: 36px;
    text-decoration: none;
}

.legacy-logo-mark {
    position: relative;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
}

.legacy-logo-mark img {
    position: absolute;
    inset: 0;
    display: block;
    width: 18px;
    height: 18px;
    transform-origin: 50% 50%;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.legacy-logo-text {
    position: relative;
    flex: 0 0 110px;
    width: 110px;
    height: 30px;
    overflow: hidden;
}

.legacy-logo-text img {
    position: absolute;
    inset: 0;
    display: block;
    width: 110px;
    height: auto;
    transition: opacity 0.2s ease;
}

.legacy-logo-hover {
    opacity: 0;
}

.legacy-logo-link:hover .legacy-logo-mark img {
    transform: rotate(90deg);
}

.legacy-logo-link:hover .legacy-logo-default {
    opacity: 0;
}

.legacy-logo-link:hover .legacy-logo-hover {
    opacity: 1;
}

.legacy-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.legacy-nav a {
    color: #d9d9d9;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
}

.legacy-nav-label {
    color: rgba(217, 217, 217, 0.72);
    text-transform: uppercase;
    font-size: 14px;
}

.legacy-nav a:hover {
    color: #fff;
}

.legacy-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 32px 14px;
    font-size: 12px;
    color: rgba(236, 236, 241, 0.58);
}

.legacy-toolbar-left {
    display: flex;
    gap: 8px;
    align-items: center;
}

.legacy-toolbar-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.legacy-locale-switcher {
    display: flex;
    gap: 8px;
    align-items: center;
}

.legacy-locale-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    color: rgba(236, 236, 241, 0.72);
    text-decoration: none;
    background: rgba(236, 236, 241, 0.06);
}

.legacy-locale-link:hover,
.legacy-locale-link.is-active {
    color: #fff;
    background: rgba(236, 236, 241, 0.14);
}

.admin-preview-body {
    padding-top: 52px;
}

.admin-preview-topbar {
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 12px 18px;
    background: rgba(17, 19, 26, 0.96);
    border-bottom: 1px solid rgba(236, 236, 241, 0.1);
    color: rgba(236, 236, 241, 0.9);
    backdrop-filter: blur(8px);
}

.admin-preview-topbar-left,
.admin-preview-topbar-right {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 13px;
}

.admin-preview-topbar a {
    color: #c7d2ff;
    text-decoration: none;
}

.admin-preview-shell {
    padding-top: 18px;
}

.admin-preview-editable {
    position: relative;
}

.admin-preview-edit-actions {
    position: absolute;
    z-index: 5;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-preview-edit-link,
.admin-preview-order-link {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17, 19, 26, 0.86);
    color: #fff;
    text-decoration: none;
    font-size: 12px;
}

.admin-preview-edit-link:hover,
.admin-preview-order-link:hover {
    background: rgba(17, 19, 26, 1);
}

.admin-preview-order-link.danger {
    background: rgba(120, 28, 28, 0.86);
}

.admin-preview-order-link.danger:hover {
    background: rgba(150, 35, 35, 1);
}

.admin-preview-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 0 0;
}

.admin-preview-drag-handle {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17, 19, 26, 0.62);
    color: #fff;
    font-size: 12px;
    cursor: grab;
}

.admin-preview-editable.is-dragging {
    opacity: 0.55;
}

.legacy-panel {
    padding-bottom: 18px;
}

.legacy-content {
    padding: 24px 32px;
    text-align: justify;
    line-height: 1.7;
}

.legacy-eyebrow {
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 12px;
    color: rgba(236, 236, 241, 0.55);
}

.legacy-title {
    margin: 0 0 16px;
    font-size: 28px;
    font-weight: 400;
    color: rgba(236, 236, 241, 0.94);
}

.legacy-section-title {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 400;
    color: rgba(236, 236, 241, 0.94);
}

.legacy-lead,
.legacy-copy {
    font-size: 16px;
    line-height: 1.75;
}

.legacy-copy-intro {
    margin-top: 16px;
}

.legacy-content-compact {
    padding-bottom: 8px;
}

.legacy-section-subtitle {
    margin: 0 0 14px;
    color: rgba(236, 236, 241, 0.8);
    line-height: 1.75;
}

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

.legacy-managed-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.legacy-managed-block {
    min-width: 0;
}

.legacy-managed-block-full {
    grid-column: 1 / -1;
}

.legacy-managed-grid > .legacy-managed-block:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.legacy-card {
    position: relative;
    padding: 16px;
    border-radius: 3px;
    background: #3e3f4b;
    text-align: justify;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.legacy-card-full-row {
    grid-column: 1 / -1;
}

.legacy-card:hover {
    background: #444654;
    transform: translateY(-1px);
}

.legacy-card h2 {
    margin: 10px 0 8px;
    text-align: center;
    font-size: 18px;
    font-weight: 400;
    color: rgba(236, 236, 241, 0.94);
}

.legacy-card p {
    margin: 0;
    line-height: 1.65;
}

.legacy-icon-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    min-height: 40px;
}

.legacy-icon {
    width: 32px;
    height: 32px;
}

.legacy-icon-hover {
    position: absolute;
    opacity: 0;
}

.legacy-card:hover .legacy-icon-default {
    opacity: 0;
}

.legacy-card:hover .legacy-icon-hover {
    opacity: 1;
}

.legacy-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 32px;
    border-top: 1px solid rgba(236, 236, 241, 0.2);
}

.legacy-footer-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.legacy-footer-meta {
    display: flex;
    gap: 14px;
    opacity: 0.35;
}

.legacy-cta-panel .legacy-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.legacy-cta-panel {
    border-top: 1px solid rgba(236, 236, 241, 0.06);
}

.legacy-cta-button {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 3px;
    text-decoration: none;
    background: rgba(236, 236, 241, 0.86);
    color: #343541;
}

.legacy-cta-button:hover {
    background: #fff;
}

.shell {
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid rgba(236, 236, 241, 0.15);
}

.brand {
    font-size: 20px;
    letter-spacing: 0.18em;
}

.nav {
    display: flex;
    gap: 16px;
}

.nav a {
    color: rgba(236, 236, 241, 0.8);
    text-decoration: none;
}

.hero {
    padding: 64px 0;
}

.content-card {
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid rgba(236, 236, 241, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.content-card h2 {
    margin-top: 0;
    font-weight: 400;
}

.richtext {
    line-height: 1.8;
    color: rgba(236, 236, 241, 0.82);
}

.statusbar {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 18px 0 0;
    color: rgba(236, 236, 241, 0.72);
    font-size: 14px;
}

.lang-pill {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(159, 179, 255, 0.12);
    color: #c7d2ff;
}

.eyebrow {
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #9fb3ff;
    font-size: 12px;
}

.hero h1 {
    max-width: 760px;
    margin: 0 0 20px;
    font-size: 44px;
    line-height: 1.1;
    font-weight: 400;
}

.lead {
    max-width: 720px;
    margin: 0;
    line-height: 1.7;
    color: rgba(236, 236, 241, 0.72);
}

.admin-section {
    padding: 40px 0 64px;
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.admin-title {
    margin: 0;
    font-size: 36px;
    font-weight: 400;
}

.button-link,
.form-actions button {
    display: inline-block;
    padding: 10px 16px;
    border: 0;
    border-radius: 6px;
    background: #9fb3ff;
    color: #11131a;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
}

.button-link.secondary {
    background: rgba(236, 236, 241, 0.14);
    color: rgba(236, 236, 241, 0.88);
}

.notice {
    margin-bottom: 20px;
    padding: 12px 14px;
    border-radius: 6px;
}

.notice.success {
    background: rgba(70, 180, 120, 0.14);
    color: #9ef0b8;
}

.notice.error {
    background: rgba(220, 90, 90, 0.14);
    color: #ffb3b3;
}

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

.admin-reorder-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-reorder-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-reorder-hint {
    margin: 0;
    color: rgba(236, 236, 241, 0.68);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.02);
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(236, 236, 241, 0.08);
    text-align: left;
    vertical-align: top;
}

.draggable-row {
    cursor: move;
}

.draggable-row.is-static {
    cursor: default;
}

.draggable-row.is-dragging {
    opacity: 0.45;
}

.drag-handle-cell {
    width: 52px;
}

.drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(236, 236, 241, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(236, 236, 241, 0.88);
    cursor: grab;
    font-size: 18px;
    line-height: 1;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle:disabled {
    opacity: 0.45;
    cursor: default;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

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

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-hint {
    color: rgba(236, 236, 241, 0.56);
    font-size: 12px;
    line-height: 1.5;
}

.form-grid label.full {
    grid-column: 1 / -1;
}

.form-grid input,
.form-grid textarea,
.form-grid select {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid rgba(236, 236, 241, 0.12);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    color: rgba(236, 236, 241, 0.92);
}

.checkbox-row {
    flex-direction: row !important;
    align-items: center;
    gap: 10px !important;
    padding-top: 28px;
}

.checkbox-row input {
    width: auto;
}

.locale-card {
    padding: 20px;
    border: 1px solid rgba(236, 236, 241, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
}

.locale-card h2 {
    margin-top: 0;
    font-weight: 400;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.admin-brief-actions,
.admin-brief-import-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

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

.page-studio-card {
    padding: 18px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(236, 236, 241, 0.08);
}

.page-studio-card h2 {
    margin: 10px 0 8px;
    font-weight: 400;
}

.page-studio-card p {
    margin: 0 0 14px;
    color: rgba(236, 236, 241, 0.62);
}

.page-studio-meta,
.page-studio-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.page-studio-meta {
    font-size: 12px;
    color: rgba(236, 236, 241, 0.58);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.form-grid-link {
    margin-bottom: 12px;
}

.service-grid-editor {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.service-grid-editor-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 18px;
}

.service-grid-editor-toolbar,
.service-grid-item-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.service-grid-item-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.service-grid-editor-note {
    margin: 0;
    color: rgba(236, 236, 241, 0.68);
}

.service-grid-item {
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(236, 236, 241, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.service-grid-item.is-dragging {
    opacity: 0.45;
}

.service-grid-item-head {
    margin-bottom: 12px;
    color: rgba(236, 236, 241, 0.88);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.service-grid-drag-handle {
    width: 28px;
    height: 28px;
    font-size: 16px;
}

@media (max-width: 720px) {
    .legacy-header-inner,
    .legacy-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .legacy-toolbar {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 20px;
        padding-right: 20px;
    }

    .admin-preview-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .legacy-managed-grid {
        grid-template-columns: 1fr;
    }

    .page-studio-grid {
        grid-template-columns: 1fr;
    }

    .legacy-content,
    .legacy-header-inner,
    .legacy-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .legacy-title {
        font-size: 22px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

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