:root {
    --ya-bg: #080a0c;
    --ya-panel: rgba(18, 20, 20, 0.94);
    --ya-ink: #f8f5ed;
    --ya-muted: #b8b4aa;
    --ya-line: rgba(255, 255, 255, 0.13);
    --ya-strong-line: rgba(255, 183, 3, 0.34);
    --ya-accent: #ffb703;
    --ya-green: #9ad63b;
    --ya-red: #ff625c;
    --ya-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
}

.yaeats-page {
    min-height: 100vh;
    background-color: var(--ya-bg);
    background-image:
        linear-gradient(180deg, rgba(8, 10, 12, 0.2) 0%, rgba(8, 10, 12, 0.76) 55%, #080a0c 100%),
        url("food-orbit-bg.png");
    background-position: center top;
    background-size: cover;
    background-attachment: fixed;
    color: var(--ya-ink);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.yaeats-shell button,
.yaeats-shell input,
.yaeats-shell textarea,
.edit-dialog button,
.edit-dialog input,
.edit-dialog textarea {
    font: inherit;
}

.yaeats-shell button,
.edit-dialog button {
    border: 0;
    border-radius: 8px;
    min-height: 38px;
    padding: 0 13px;
    background: var(--ya-accent);
    color: #171300;
    font-weight: 800;
    cursor: pointer;
}

.yaeats-shell button:hover,
.edit-dialog button:hover {
    filter: brightness(0.97);
}

.yaeats-shell {
    width: min(1360px, calc(100% - 28px));
    margin: 0 auto;
    padding: 34px 0 64px;
}

.yaeats-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    margin-bottom: 24px;
    padding: 24px 2px 22px;
    border-bottom: 1px solid rgba(255, 183, 3, 0.28);
}

.yaeats-shell .eyebrow {
    margin: 0 0 6px;
    color: var(--ya-accent);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.yaeats-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: 44px;
    line-height: 1.05;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.58);
}

.hero-note {
    margin: 8px 0 0;
    color: #ddd8cd;
    font-weight: 700;
}

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

.yaeats-shell .stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.yaeats-shell .stats span {
    border: 1px solid rgba(255, 183, 3, 0.36);
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(10, 12, 13, 0.78);
    color: #f6e8bd;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
    font-weight: 800;
}

.section-panel,
.notice-panel {
    border: 1px solid var(--ya-line);
    border-radius: 8px;
    background: var(--ya-panel);
    backdrop-filter: blur(14px);
    box-shadow: var(--ya-shadow);
}

.notice-panel {
    padding: 22px;
    border-left: 4px solid var(--ya-accent);
}

.notice-panel h2 {
    margin: 0 0 8px;
}

.notice-panel p {
    margin: 0;
    color: var(--ya-muted);
}

.yaeats-shell label,
.edit-dialog label {
    display: grid;
    gap: 6px;
    color: var(--ya-muted);
    font-size: 12px;
    font-weight: 800;
}

.yaeats-shell input,
.yaeats-shell textarea,
.edit-dialog input,
.edit-dialog textarea {
    width: 100%;
    font-size: 16px;
    border: 1px solid var(--ya-line);
    border-radius: 8px;
    padding: 10px 11px;
    background: #0d1010;
    color: var(--ya-ink);
    outline: 0;
}

.yaeats-shell textarea,
.edit-dialog textarea {
    min-height: 58px;
    resize: vertical;
}

.yaeats-shell input:focus,
.yaeats-shell textarea:focus,
.edit-dialog input:focus,
.edit-dialog textarea:focus {
    border-color: var(--ya-accent);
    box-shadow: 0 0 0 4px rgba(255, 183, 3, 0.18);
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.section-panel {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border-top: 3px solid var(--ya-accent);
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    min-height: 78px;
    border-bottom: 1px solid var(--ya-line);
    padding-bottom: 12px;
    align-items: flex-start;
}

.section-copy {
    display: grid;
    gap: 5px;
    flex: 1;
    min-width: 0;
}

.section-copy h2 {
    margin: 0;
    color: var(--ya-ink);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.12;
    overflow-wrap: anywhere;
}

.section-copy p {
    margin: 0;
    color: #d3cec3;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.section-tools,
.restaurant-tools {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.yaeats-shell .icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-height: 24px;
    max-height: 24px;
    padding: 0;
    background: #f2c14b;
    color: #11130f;
    line-height: 1;
}

.section-tools form,
.restaurant-tools form {
    display: flex;
    margin: 0;
}

.section-drag-handle {
    cursor: grab;
}

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

.section-drag-handle svg,
.section-move-button svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
    display: block;
}

.section-move-button {
    display: none !important;
}

.section-panel.is-dragging {
    opacity: 0.48;
}

.section-panel.is-drag-target {
    outline: 2px solid var(--ya-accent);
    outline-offset: 3px;
}

.sections-grid.is-saving .section-panel {
    cursor: wait;
}

.icon-button.danger {
    color: #11130f;
}

.trash-button {
    margin: 0;
}

.edit-button {
    background: #f2c14b;
    color: #11130f;
}

.trash-button svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
    display: block;
    flex: 0 0 auto;
}

.edit-button svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
    display: block;
    flex: 0 0 auto;
}

.restaurant-form {
    display: grid;
    gap: 9px;
    border: 1px dashed var(--ya-strong-line);
    border-radius: 8px;
    padding: 10px;
    background: #0d1010;
}

.add-restaurant-button {
    width: 100%;
    min-height: 38px;
    border: 1px solid #eaa800;
    background: var(--ya-accent);
    color: #171300;
    box-shadow: 0 7px 18px rgba(255, 183, 3, 0.16);
}

.restaurants-list {
    display: grid;
    gap: 8px;
}

.restaurant-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 53px;
    gap: 8px;
    align-items: start;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 8px;
    padding: 8px;
    background: rgba(8, 11, 11, 0.78);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.yaeats-shell .add-section-card {
    display: grid;
    place-items: center;
    align-self: stretch;
    min-height: 0;
    padding: 14px;
    border: 3px solid var(--ya-accent);
    border-radius: 28px;
    background: rgba(10, 12, 13, 0.58);
    color: var(--ya-accent);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 0 32px rgba(255, 183, 3, 0.04), var(--ya-shadow);
}

.yaeats-shell .add-section-card span {
    position: relative;
    display: block;
    width: 100px;
    height: 100px;
    font-size: 0;
}

.yaeats-shell .add-section-card span::before,
.yaeats-shell .add-section-card span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 2px;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.yaeats-shell .add-section-card span::before {
    width: 100px;
    height: 2px;
}

.yaeats-shell .add-section-card span::after {
    width: 2px;
    height: 100px;
}

.yaeats-shell .add-section-card:hover {
    border-color: #ffd166;
    background: rgba(21, 24, 22, 0.86);
    color: #ffd166;
    box-shadow: inset 0 0 54px rgba(255, 183, 3, 0.1), 0 20px 48px rgba(0, 0, 0, 0.4);
}

.restaurant-mark {
    display: grid;
    place-items: center;
    width: 42px;
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: var(--mark-bg, #e9ede2);
    color: var(--mark-color, var(--ya-green));
    text-decoration: none;
    font-size: 20px;
    font-weight: 900;
}

.restaurant-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.restaurant-copy h3 {
    margin: 0;
    color: var(--ya-ink);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.restaurant-copy p {
    margin: 0;
    color: #bdb8ae;
    font-size: 12px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
}

.card-actions button {
    min-height: 28px;
    padding: 0 9px;
    font-size: 12px;
}

.text-link {
    color: var(--ya-green);
    font-size: 12px;
    font-weight: 900;
    text-decoration: none;
}

.text-link:hover {
    text-decoration: underline;
}

.edit-modal[hidden] {
    display: none;
}

.edit-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 18px;
}

.edit-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 4, 5, 0.78);
    backdrop-filter: blur(8px);
}

.edit-dialog {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 12px;
    width: min(460px, 100%);
    border: 1px solid rgba(255, 183, 3, 0.36);
    border-top: 3px solid var(--ya-accent);
    border-radius: 8px;
    padding: 20px;
    background: #111414;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
}

.edit-dialog h2 {
    margin: 0;
    color: var(--ya-ink);
    font-size: 24px;
    font-weight: 900;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    min-height: 32px;
    padding: 0;
    background: #282d29;
    color: #ffffff;
    font-size: 22px;
}

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

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

@media (max-width: 680px) {
    .yaeats-hero {
        display: grid;
        align-items: start;
    }

    .hero-actions,
    .stats {
        justify-content: flex-start;
    }

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

    .section-drag-handle {
        display: none !important;
    }

    .section-move-button {
        display: inline-flex !important;
    }

    .section-move-button:disabled {
        cursor: default;
        opacity: 0.3;
    }

    .yaeats-shell .add-section-card {
        min-height: 0;
        border-radius: 36px;
    }
}
