::root {
    --page-bg: #f6f7fb;
    --card-bg: #ffffff;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --text-primary: #111827;
    --text-muted: #6b7280;
    --shadow: 0 10px 30px rgba(17, 24, 39, 0.07);
    --radius: 14px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
    background: var(--page-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1,
h2,
p {
    margin: 0;
}

.page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3.5rem 1.5rem 4.5rem;
    position: relative;
}
.page--ice { background: #f3f4f6; border-radius: 12px; padding: 5rem 1.25rem 7.5rem; box-shadow: inset 0 1px 0 rgba(255,255,255,0.6); }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.cart-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e5e7eb; padding: 6px 10px; border-radius: 10px; background: #fff; box-shadow: var(--shadow); cursor: pointer; }
.cart-badge { background: #2563eb; color: white; border-radius: 999px; padding: 2px 8px; font-weight: 700; font-size: 0.85rem; }

.page-header {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.6rem;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--accent);
}

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

.status-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.4rem 1.6rem;
    color: var(--text-primary);
}
.status-card--cart { background: #fff; border: 1px solid #e5e7eb; }

.status-card--empty {
    border: 1px dashed #d1d5db;
    background: #f9fafb;
}

.produto-lista__imagem {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.produto-lista__imagem img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
    background: #f3f4f6;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.product-row--disabled td {
    text-decoration: line-through;
    color: var(--text-muted);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 38px rgba(17, 24, 39, 0.09);
}

.product-card__image {
    position: relative;
    background: linear-gradient(135deg, #eef2ff, #f8fafc);
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-card__placeholder {
    font-size: 2.4rem;
    opacity: 0.75;
}

.product-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.05rem 1.15rem;
}

.product-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.product-card__header h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: #eef2ff;
    color: #3730a3;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.product-card__description {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
    min-height: 2.4rem;
}

.product-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.product-card__price span {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.product-card__price strong {
    font-size: 1.15rem;
    color: var(--text-primary);
}

.page-footer { margin-top: 1.5rem; display: flex; justify-content: flex-end; }
.page-footer .primary-btn { min-width: 160px; }
.floating-bar { position: fixed; top: 20px; right: 20px; display: flex; gap: 12px; align-items: center; z-index: 1200; flex-wrap: wrap; }
.floating-bar.top { top: 20px; right: 20px; left: auto; }
.floating-btn { position: relative; box-shadow: 0 0 0 3px #fff, var(--shadow); background: #16a34a; color: #fff; border: 1px solid #fff; }
.total-badge { background: #2563eb; color: #fff; padding: 8px 12px; border-radius: 12px; box-shadow: 0 0 0 3px #fff, var(--shadow); font-weight: 700; }
.floating-conclude { position: fixed; bottom: 20px; right: 20px; z-index: 1100; }
.top-panel { position: fixed; top: 0; left: 0; right: 0; z-index: 1100; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,0.08); padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top-panel__left { display: flex; align-items: center; gap: 12px; }
.bottom-bar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1100; background: #fff; box-shadow: 0 -4px 18px rgba(0,0,0,0.08); padding: 16px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bottom-bar .total-badge { box-shadow: none; }

.modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 900;
}
.modal-backdrop.nested { z-index: 950; }
.modal {
    position: fixed; inset: 10% 5% auto 5%; max-width: 720px; margin: 0 auto;
    background: #fff; border-radius: 12px; padding: 16px; z-index: 1300;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.modal--nested { inset: 15% 10% auto 10%; max-width: 520px; z-index: 1050; }
.modal__header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.modal__header--qty { align-items: center; gap: 12px; }
.modal__section { margin-top: 12px; }
.modal__footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.icon-btn { background: none; border: none; font-size: 18px; cursor: pointer; }
.primary-btn { background: #2563eb; color: white; border: none; padding: 10px 18px; border-radius: 8px; cursor: pointer; }
.secondary-btn { background: #eef2ff; color: #1e1b4b; border: 1px solid #c7d2fe; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.link-btn { background: none; border: none; color: #2563eb; cursor: pointer; margin-top: 8px; }
.product-card { cursor: pointer; }
.price-row { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tag { background: #f3f4f6; border-radius: 999px; padding: 6px 10px; display: inline-flex; align-items: center; gap: 6px; }
.tag__close { background: none; border: none; cursor: pointer; font-size: 12px; }
.tag--muted { background: #fef2f2; color: #9f1239; }
.tag--choice { border: 1px solid #e5e7eb; }
.tag--active { background: #2563eb; color: #fff; }
.tag--additive { background: #ecfeff; color: #0f172a; border: 1px solid #06b6d4; }
.tag__pill { background: rgba(0,0,0,0.07); padding: 2px 6px; border-radius: 999px; font-size: 12px; }
.cart-item { border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; background: #fff; box-shadow: var(--shadow); margin-bottom: 12px; }
.cart-item:last-child { margin-bottom: 0; }
.cart-item__header { display: flex; justify-content: space-between; align-items: center; }
.cart-item__total { font-weight: 700; }
.cart-item__line { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.cart-item__actions { display: flex; gap: 8px; }
.cart-item__details { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.solid-btn { border: none; border-radius: 8px; padding: 8px 12px; cursor: pointer; color: #fff; font-weight: 600; }
.edit-btn { background: #2563eb; }
.remove-btn { background: #dc2626; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.section-header { display: flex; justify-content: space-between; align-items: center; }
.radio-list { display: flex; flex-direction: column; gap: 8px; }
.radio-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; }
.price { font-weight: 600; }
.field textarea { width: 100%; height: 40px; min-height: 40px; max-height: 40px; padding: 8px; border: 1px solid #e5e7eb; border-radius: 8px; resize: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.card-btn { border: 1px solid #e5e7eb; border-radius: 10px; padding: 10px; text-align: left; cursor: pointer; background: #fff; width: 100%; }
.card-btn__title { font-weight: 600; }
.card-btn__price { color: #4b5563; font-size: 14px; }
.qty-control { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e5e7eb; border-radius: 10px; padding: 6px 8px; background: #f8fafc; }
.qty-btn { background: none; border: none; font-size: 16px; width: 28px; height: 28px; border-radius: 8px; cursor: pointer; }
.qty-btn:hover { background: #e5e7eb; }
.qty-value { min-width: 24px; text-align: center; font-weight: 600; }

@media (max-width: 640px) {
    .modal { inset: 5% 2% auto 2%; padding: 12px; }
    .modal__footer { flex-direction: row; }
}

#blazor-error-ui {
    background: #fef2f2;
    color: #991b1b;
    padding: 0.75rem 1rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.12);
    font-size: 0.95rem;
}

#blazor-error-ui a {
    color: var(--accent-strong);
    font-weight: 600;
}

#blazor-error-ui .dismiss {
    margin-left: auto;
    cursor: pointer;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCki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IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--text-muted);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Hierarquia 2 */
.hierarquia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.hier-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.hier-card h4 {
    margin: 0;
}
.hier-card small {
    color: var(--text-muted);
}
.hier-card .chip-list {
    flex-wrap: wrap;
}
.hier-card__new {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
}

@media (max-width: 640px) {
    .page {
        padding: 1.75rem 1rem 2.25rem;
    }

    .product-card__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .pill {
        margin-top: 0.15rem;
    }
}

.sandwich { position: relative; }
.sandwich__btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: var(--shadow);
    font-size: 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sandwich__menu {
    position: absolute;
    top: 48px;
    left: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: var(--shadow);
    border-radius: 10px;
    min-width: 160px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1500;
}
.sandwich__item {
    border: none;
    background: transparent;
    text-align: left;
    padding: 10px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}
.sandwich__item:hover {
    background: #f3f4f6;
}

/* Cards de novo/renomear na Classe */
.hier-rename-card,
.hier-new-card {
    background: #e0e7f1;
    color: #0f172a;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 10px 20px rgba(15,23,42,0.08);
    margin-top: 12px;
    border: 1px solid #e5e7eb;
}
.hier-rename-card label,
.hier-new-card label { color: #1f2937; }
.hier-rename-card input,
.hier-new-card input { background: #fff; color: #111827; border-color: #d1d5db; }
.hier-rename-card__header,
.hier-new-card__header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}
.hier-rename-card__header small,
.hier-new-card__header small { color: #4b5563; }
.card-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:10px; flex-wrap:wrap; }
.inline-field { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.chip-btn { border:1px solid #cbd5e1; background:#fff; border-radius:8px; padding:6px 10px; cursor:pointer; }
.chip-btn:hover { background:#e2e8f0; }

.class-row--disabled td {
    text-decoration: line-through;
    color: var(--text-muted);
}

/* Tabelas responsivas */
.table-card {
    overflow-x: auto;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f3f4f6;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.user-info__name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

