@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,500&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
    --bg-app: #12100e;
    --bg-panel: #1c1916;
    --bg-panel-elevated: #252119;
    --border: rgba(201, 162, 77, 0.25);
    --gold: #c9a24d;
    --gold-soft: #dfc078;
    --gold-dim: #8a7344;
    --text: #f3ece0;
    --text-muted: #a89b88;
    --danger: #e07a7a;
    --radius: 14px;
    --font-ui: "Source Sans 3", system-ui, sans-serif;
    --font-display: "Cormorant Garamond", Georgia, serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-ui);
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(201, 162, 77, 0.12), transparent 55%),
        var(--bg-app);
    color: var(--text);
}

.app-header {
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand__eyebrow {
    margin: 0;
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    color: var(--gold-dim);
    text-transform: uppercase;
}

.brand__title {
    margin: 0.15rem 0 0;
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    color: var(--gold-soft);
    letter-spacing: 0.06em;
}

.brand__subtitle {
    margin: 0.25rem 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.date-control {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-end;
}

.date-control label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.date-control input[type="date"] {
    font-family: var(--font-ui);
    font-size: 1rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-panel);
    color: var(--text);
    color-scheme: dark;
}

.app-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 1.25rem;
    padding: 1.25rem 1.5rem 2rem;
    max-width: 1440px;
    margin: 0 auto;
}

@media (max-width: 1100px) {
    .app-layout {
        grid-template-columns: 1fr;
    }
}

.column {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.section-head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gold-soft);
}

.section-head p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem 1.1rem;
}

.panel + .panel {
    margin-top: 0.75rem;
}

.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--border);
}

.panel__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.panel__meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.dish-table {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.dish-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.45rem 0.35rem;
    border-radius: 8px;
}

.dish-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.dish-row__name {
    font-size: 0.95rem;
}

.dish-row__price {
    font-size: 0.88rem;
    color: var(--gold-soft);
    font-weight: 600;
    white-space: nowrap;
}

.btn-icon {
    border: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

.btn-icon--danger:hover {
    background: rgba(224, 122, 122, 0.2);
    color: var(--danger);
}

.add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed var(--border);
}

.add-form input[type="text"] {
    flex: 1 1 160px;
    min-width: 0;
}

.add-form input[type="number"] {
    width: 7rem;
}

.add-form input {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    padding: 0.55rem 0.65rem;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--bg-panel-elevated);
    color: var(--text);
}

.add-form button {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.55rem 1rem;
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    background: linear-gradient(180deg, #b8944f, #8f6f32);
    color: #fff;
}

.empty-state {
    margin: 0.35rem 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    font-style: italic;
}

.empty-state--compact {
    margin: 0.2rem 0 0.4rem;
}

.select-block {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
}

.select-block + .select-block {
    margin-top: 0.65rem;
}

.select-block__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.select-block__head h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.select-block__count {
    font-size: 0.78rem;
    color: var(--gold-dim);
}

.select-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.select-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.6rem;
    align-items: center;
    padding: 0.4rem 0.35rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.92rem;
}

.select-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.select-item input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--gold);
}

.select-item__price {
    font-size: 0.82rem;
    color: var(--gold-soft);
    font-weight: 600;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.btn {
    font-family: var(--font-ui);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.65rem 1.1rem;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(180deg, #c9a24d, #9a7835);
    color: #1a1408;
}

.btn-secondary {
    background: var(--bg-panel-elevated);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.preview-panel {
    position: sticky;
    top: 1rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.preview-panel__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.preview-panel__head h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--gold-soft);
}

.preview-panel__status {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.preview-viewport {
    overflow: hidden;
    border-radius: 10px;
    background: #0a0908;
    display: flex;
    justify-content: center;
    padding: 0.75rem 0;
    min-height: 200px;
}

.preview-scaler {
    transform: scale(0.38);
    transform-origin: top center;
    width: 1080px;
    margin-bottom: calc(-1350px * 0.62);
}

@media (min-width: 1101px) {
    .preview-scaler {
        transform: scale(0.42);
        margin-bottom: calc(-1350px * 0.58);
    }
}

.preview-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.preview-placeholder p {
    margin: 0;
}

/* ---------- Exported menu board (matches print template) ---------- */

.menu-board {
    position: relative;
    width: 1080px;
    height: 1350px;
    overflow: hidden;
    font-family: var(--font-ui);
    color: var(--text);
    background:
        radial-gradient(ellipse 120% 60% at 50% 0%, rgba(201, 162, 77, 0.14), transparent 60%),
        linear-gradient(180deg, #161310, #0d0b09);
}

.menu-board__frame {
    position: absolute;
    inset: 30px;
    border: 2px solid var(--gold);
    border-radius: 22px;
    padding: 58px 66px 44px;
    display: flex;
    flex-direction: column;
}

.menu-board__frame::before {
    content: "";
    position: absolute;
    inset: 10px;
    z-index: 0;
    border: 1px solid rgba(201, 162, 77, 0.45);
    border-radius: 16px;
    pointer-events: none;
}

.menu-board__corners {
    position: absolute;
    inset: 0;
    z-index: 0;
    color: var(--gold);
    pointer-events: none;
}

.menu-board__corner {
    position: absolute;
    width: 230px;
    height: 230px;
    opacity: 0.45;
}

.menu-board__corner svg {
    width: 100%;
    height: 100%;
}

.menu-board__corner--tl {
    top: -8px;
    left: -8px;
}

.menu-board__corner--tr {
    top: -8px;
    right: -8px;
    transform: scaleX(-1);
}

.menu-board__corner--bl {
    bottom: -8px;
    left: -8px;
    transform: scaleY(-1);
}

.menu-board__corner--br {
    bottom: -8px;
    right: -8px;
    transform: scale(-1, -1);
}

.menu-board__header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 6px;
}

.menu-board__eyebrow {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5em;
    text-indent: 0.5em;
    text-transform: uppercase;
    color: var(--gold-dim);
}

.menu-board__title {
    margin: 8px 0 0;
    font-family: var(--font-display);
    font-size: 88px;
    font-weight: 700;
    letter-spacing: 0.07em;
    background: linear-gradient(180deg, #f2d98f, #b6852f);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.menu-board__tagline {
    margin: 6px 0 0;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 25px;
    color: var(--gold-soft);
}

.menu-board__ribbon {
    position: absolute;
    z-index: 2;
    top: 44px;
    right: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(180deg, #ecc978, #a9822f);
    color: #241b08;
    padding: 14px 20px;
    border-radius: 14px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.menu-board__ribbon-icon svg {
    display: block;
    width: 26px;
    height: 26px;
}

.menu-board__ribbon-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.menu-board__ribbon-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.menu-board__ribbon-date {
    font-size: 19px;
    font-weight: 700;
}

.menu-board__grid {
    position: relative;
    z-index: 1;
    margin-top: 46px;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 34px 40px;
}

.menu-panel {
    position: relative;
}

.menu-panel__head {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(180deg, #ecc978, #a9822f);
    color: #241b08;
    padding: 8px 20px;
    border-radius: 999px;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.35);
}

.menu-panel__icon svg {
    display: block;
    width: 22px;
    height: 22px;
}

.menu-panel__title {
    margin: 0;
    font-size: 17px;
    letter-spacing: 0.05em;
}

.menu-panel__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-item {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    font-size: 19px;
}

.menu-item__name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 68%;
}

.menu-item__dots {
    flex: 1;
    min-width: 12px;
    border-bottom: 2px dotted rgba(201, 162, 77, 0.45);
    margin-bottom: 6px;
}

.menu-item__price {
    color: var(--gold-soft);
    font-weight: 700;
    white-space: nowrap;
}

.menu-panel__empty {
    color: var(--text-muted);
    font-style: italic;
    font-size: 17px;
}

.menu-board__footer {
    position: relative;
    z-index: 1;
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.menu-board__phone {
    order: 2;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    white-space: nowrap;
}

.menu-board__phone svg {
    display: block;
    width: 22px;
    height: 22px;
    color: var(--gold);
}

.menu-board__phone strong {
    color: var(--gold-soft);
}

.menu-board__note {
    margin: 0;
    font-family: var(--font-display);
    font-style: italic;
    font-size: 17px;
    color: var(--gold-soft);
    white-space: nowrap;
}

.menu-board__note--left {
    order: 1;
}

.menu-board__note--left::before {
    content: "♥ ";
}

.menu-board__note--right {
    order: 3;
}

.menu-board__note--right::after {
    content: " ♥";
}
