:root {
    --portal-ink: #111827;
    --portal-muted: #667085;
    --portal-line: #e6eaf0;
    --portal-soft: #f6f8fb;
    --portal-card: #ffffff;
    --portal-blue: #17457a;
    --portal-orange: #f08a00;
    --portal-green: #168a50;
    --portal-red: #b42318;
    --portal-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--portal-ink);
    font-family: "Segoe UI", Tahoma, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(240, 138, 0, 0.16), transparent 30rem),
        linear-gradient(135deg, #f8fafc 0%, #eef3f8 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.restaurant-portal-page,
.restaurant-portal-page button,
.restaurant-portal-page input,
.restaurant-portal-page select,
.restaurant-portal-page textarea {
    font-family: "Segoe UI", Tahoma, sans-serif;
}

.eyebrow {
    margin: 0 0 0.45rem;
    color: var(--portal-blue);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.restaurant-login-page {
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.restaurant-login-shell {
    width: min(100%, 520px);
}

.restaurant-login-card,
.portal-empty-state,
.hero-card,
.metric-card,
.portal-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(230, 234, 240, 0.9);
    border-radius: 28px;
    box-shadow: var(--portal-shadow);
}

.restaurant-login-card {
    padding: clamp(1.5rem, 5vw, 2.5rem);
}

.restaurant-login-card h1,
.portal-topbar h1,
.hero-card h2,
.portal-panel h3 {
    margin: 0;
    letter-spacing: -0.04em;
}

.restaurant-login-card h1 {
    font-size: clamp(2rem, 7vw, 3.1rem);
    line-height: 0.96;
}

.login-copy,
.login-footnote,
.portal-panel p,
.hero-card p,
.portal-empty-state p {
    color: var(--portal-muted);
    line-height: 1.55;
}

.login-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.login-form label {
    display: grid;
    gap: 0.45rem;
    color: var(--portal-muted);
    font-weight: 700;
}

.login-form input,
.restaurant-picker select {
    width: 100%;
    border: 1px solid var(--portal-line);
    border-radius: 18px;
    background: #fff;
    color: var(--portal-ink);
    font: inherit;
    font-weight: 700;
    outline: none;
}

.login-form input {
    padding: 0.95rem 1rem;
}

.login-form input:focus,
.restaurant-picker select:focus {
    border-color: rgba(23, 69, 122, 0.42);
    box-shadow: 0 0 0 4px rgba(23, 69, 122, 0.1);
}

.login-form button,
.quick-links a {
    border: 0;
    border-radius: 999px;
    background: var(--portal-orange);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.login-form button {
    padding: 1rem 1.25rem;
}

.login-alert {
    margin-top: 1.25rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    font-weight: 800;
}

.login-alert.is-error {
    background: #fff1f0;
    color: var(--portal-red);
}

.login-alert.is-success {
    background: #ecfdf3;
    color: var(--portal-green);
}

.restaurant-portal-page {
    display: grid;
    grid-template-columns: var(--operation-sidebar-width, 250px) 1fr;
    height: 100vh;
    overflow: hidden;
    transition: none;
}

.sidebar-preload .restaurant-portal-page,
.sidebar-preload .restaurant-portal-page *,
.sidebar-preload .sidebar,
.sidebar-preload .sidebar * {
    transition: none !important;
}

.restaurant-portal-page.is-sidebar-collapsed,
.sidebar-collapsed-init .restaurant-portal-page {
    grid-template-columns: var(--operation-sidebar-collapsed-width, 88px) 1fr;
}

.sidebar-collapsed-init .restaurant-portal-page #operationSidebar {
    width: var(--operation-sidebar-collapsed-width, 88px) !important;
    min-width: var(--operation-sidebar-collapsed-width, 88px) !important;
    max-width: var(--operation-sidebar-collapsed-width, 88px) !important;
}

.restaurant-portal-page #operationSidebar.portal-sidebar {
    position: relative;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.portal-brand span {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 16px;
    background: var(--portal-orange);
    font-weight: 900;
}

.portal-main {
    width: 100%;
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 0 clamp(1rem, 3vw, 2.5rem) clamp(1rem, 3vw, 2.5rem);
}

.portal-topbar,
.hero-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.portal-topbar {
    margin: 0 calc(-1 * clamp(1rem, 3vw, 2.5rem)) 1.25rem;
    padding: 1rem clamp(1rem, 3vw, 2.5rem) 0;
}

.portal-topbar h1 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.04;
}

.restaurant-picker {
    display: grid;
    min-width: 230px;
    gap: 0.3rem;
}

.restaurant-picker label {
    color: var(--portal-muted);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.restaurant-picker select {
    min-height: 42px;
    border-radius: 16px;
    padding: 0.55rem 0.8rem;
}

.hero-card,
.portal-empty-state {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.hero-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) minmax(320px, auto);
}

.hero-cover {
    overflow: hidden;
    border-radius: 22px;
    background: var(--portal-soft);
}

.hero-cover img {
    display: block;
    width: 100%;
    height: 130px;
    object-fit: cover;
}

.status-pill {
    display: inline-flex;
    margin-left: 0.5rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--portal-blue);
    font-size: 0.8rem;
    font-weight: 900;
}

.module-grid,
.metric-grid,
.portal-panel-grid {
    display: grid;
    gap: 1rem;
}

.module-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
}

.module-badge {
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    border-radius: 18px;
    background: var(--portal-soft);
    color: var(--portal-muted);
    font-size: 0.82rem;
}

.module-badge strong {
    color: var(--portal-ink);
}

.module-badge.is-on {
    background: #ecfdf3;
    color: var(--portal-green);
}

.module-badge.is-off {
    background: #fff1f0;
    color: var(--portal-red);
}

.readiness-panel {
    display: grid;
    grid-template-columns: minmax(180px, 0.26fr) minmax(0, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.readiness-score,
.readiness-list article {
    border: 1px solid rgba(230, 234, 240, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.readiness-score {
    display: grid;
    align-content: center;
    padding: 1.25rem;
}

.readiness-score strong {
    display: block;
    font-size: clamp(2.4rem, 4vw, 3.2rem);
    letter-spacing: -0.06em;
}

.readiness-score span {
    color: var(--portal-muted);
    font-weight: 800;
}

.readiness-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.readiness-list article {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
}

.readiness-list article>span {
    justify-self: start;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.readiness-list article.is-ready>span {
    background: #ecfdf3;
    color: var(--portal-green);
}

.readiness-list article.needs-action>span {
    background: #fff7ed;
    color: #b45309;
}

.readiness-list strong {
    display: block;
}

.readiness-list small {
    display: block;
    margin-top: 0.2rem;
    color: var(--portal-muted);
    font-weight: 700;
    line-height: 1.35;
}

.metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1rem;
}

.metric-card {
    padding: 1.25rem;
}

.metric-card span,
.metric-card small {
    color: var(--portal-muted);
    font-weight: 800;
}

.metric-card strong {
    display: block;
    margin: 0.35rem 0;
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.05em;
}

.portal-panel-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
    margin-top: 1rem;
}

.portal-panel {
    padding: 1.5rem;
}

.performance-panel,
.top-products-panel {
    margin-top: 1rem;
}

.reservation-panel,
.loyalty-panel {
    margin-top: 1rem;
}

.reservation-summary-grid,
.loyalty-summary {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
}

.reservation-summary-grid article,
.loyalty-summary article {
    padding: 0.95rem;
    border: 1px solid var(--portal-line);
    border-radius: 18px;
    background: #fff;
}

.loyalty-summary .loyalty-highlight {
    background: linear-gradient(135deg, rgba(23, 69, 122, 0.96), rgba(15, 23, 42, 0.96));
    color: #fff;
}

.reservation-summary-grid span,
.loyalty-summary span {
    color: var(--portal-muted);
    font-size: 0.86rem;
    font-weight: 900;
}

.loyalty-summary .loyalty-highlight span,
.loyalty-summary .loyalty-highlight small {
    color: rgba(255, 255, 255, 0.72);
}

.reservation-summary-grid strong,
.loyalty-summary strong {
    display: block;
    margin-top: 0.3rem;
    font-size: 1.8rem;
    letter-spacing: -0.05em;
}

.loyalty-summary small {
    display: block;
    margin-top: 0.35rem;
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.35;
}

.upcoming-reservations {
    margin-top: 1.1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--portal-line);
}

.upcoming-reservations-list {
    display: grid;
    gap: 0.65rem;
}

.upcoming-reservations-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--portal-line);
    border-radius: 18px;
    background: #fff;
}

.upcoming-reservations-list strong,
.upcoming-reservations-list small,
.upcoming-reservations-list span {
    display: block;
}

.upcoming-reservations-list small,
.upcoming-reservations-list span {
    color: var(--portal-muted);
    font-weight: 800;
}

.upcoming-reservations-list span {
    text-align: right;
}

.performance-panel {
    overflow: hidden;
    padding: 1.5rem;
    border: 1px solid rgba(230, 234, 240, 0.9);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--portal-shadow);
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.panel-heading h3 {
    margin: 0;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    letter-spacing: -0.04em;
}

.panel-heading p {
    margin: 0.35rem 0 0;
    color: var(--portal-muted);
}

.period-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    white-space: nowrap;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: var(--portal-soft);
    color: var(--portal-ink);
    font-weight: 900;
}

.period-form {
    display: grid;
    min-width: 190px;
    gap: 0.35rem;
}

.performance-actions {
    display: flex;
    align-items: end;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

.period-form label {
    color: var(--portal-muted);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.period-form select {
    width: 100%;
    border: 1px solid var(--portal-line);
    border-radius: 999px;
    background: var(--portal-soft);
    color: var(--portal-ink);
    padding: 0.7rem 0.9rem;
    font: inherit;
    font-weight: 900;
    outline: none;
}

.period-form select:focus {
    border-color: rgba(23, 69, 122, 0.42);
    box-shadow: 0 0 0 4px rgba(23, 69, 122, 0.1);
}

.export-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-weight: 900;
}

.export-link:hover {
    transform: translateY(-1px);
}

.performance-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.performance-summary article {
    min-height: 128px;
    padding: 1.1rem;
    border: 1px solid var(--portal-line);
    border-radius: 22px;
    background: #fff;
}

.performance-summary span,
.performance-summary small {
    color: var(--portal-muted);
    font-weight: 800;
}

.performance-summary strong {
    display: block;
    margin: 0.45rem 0;
    font-size: clamp(1.8rem, 3vw, 2.3rem);
    letter-spacing: -0.05em;
}

.is-up {
    color: var(--portal-green) !important;
}

.is-down {
    color: var(--portal-red) !important;
}

.is-neutral {
    color: var(--portal-muted) !important;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
    color: var(--portal-muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.chart-legend i {
    width: 22px;
    height: 4px;
    border-radius: 999px;
}

.chart-legend i.current {
    background: #2563eb;
}

.chart-legend i.previous {
    background: #8a8f98;
}

.sales-chart {
    display: block;
    width: 100%;
    min-height: 220px;
}

.chart-grid line {
    stroke: #e5e7eb;
    stroke-width: 1;
}

.chart-grid text,
.chart-labels text {
    fill: var(--portal-muted);
    font-size: 12px;
    font-weight: 800;
}

.chart-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
}

.chart-line.current {
    stroke: #2563eb;
}

.chart-line.previous {
    stroke: #737780;
    stroke-dasharray: 2 9;
}

.top-products-list {
    display: grid;
}

.insight-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.panel-heading.compact {
    margin-bottom: 0.85rem;
}

.panel-heading.compact h3 {
    font-size: 1.35rem;
}

.breakdown-list {
    display: grid;
    gap: 0.75rem;
}

.breakdown-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--portal-line);
    border-radius: 18px;
    background: #fff;
}

.breakdown-row span,
.breakdown-row small {
    color: var(--portal-muted);
    font-weight: 800;
}

.state-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.state-cloud span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: 999px;
    background: var(--portal-soft);
    color: var(--portal-muted);
    font-weight: 900;
}

.state-cloud strong {
    display: grid;
    min-width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 999px;
    background: #fff;
    color: var(--portal-ink);
}

.top-product-row {
    display: grid;
    grid-template-columns: 40px 56px minmax(160px, 1fr) minmax(110px, auto) minmax(100px, auto);
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
    border-top: 1px solid var(--portal-line);
}

.top-product-row:first-child {
    border-top: 0;
}

.top-product-row img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    background: var(--portal-soft);
}

.top-product-row small,
.top-product-row span {
    color: var(--portal-muted);
    font-weight: 400;
}

.product-rank {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: var(--portal-soft);
    color: var(--portal-ink) !important;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.quick-links a {
    padding: 0.8rem 1rem;
}

.disabled-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0.72rem 1rem;
    border-radius: 999px;
    background: var(--portal-soft);
    color: var(--portal-muted);
    font-weight: 900;
    cursor: not-allowed;
}

.billing-list {
    display: grid;
    gap: 0.8rem;
}

.billing-list div {
    display: grid;
    gap: 0.25rem;
    padding: 0.9rem;
    border: 1px solid var(--portal-line);
    border-radius: 18px;
}

.billing-list span,
.billing-list small {
    color: var(--portal-muted);
    font-weight: 800;
}

.settings-alert {
    position: relative;
    margin-bottom: 1rem;
    padding: 0.95rem 1.1rem 0.95rem 3rem;
    border: 1px solid transparent;
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
    font-weight: 900;
}

.settings-alert::before {
    position: absolute;
    top: 50%;
    left: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.78rem;
    line-height: 1;
    transform: translateY(-50%);
}

.settings-alert.is-success {
    border-color: rgba(22, 101, 52, 0.18);
    background: #ecfdf3;
    color: var(--portal-green);
}

.settings-alert.is-success::before {
    content: "\2713";
    background: var(--portal-green);
}

.settings-alert.is-error {
    border-color: rgba(190, 18, 60, 0.18);
    background: #fff1f0;
    color: var(--portal-red);
}

.settings-alert.is-error::before {
    content: "!";
    background: var(--portal-red);
}

.settings-form {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.1rem;
    align-items: start;
}

.settings-dirty-note {
    position: sticky;
    top: 0.75rem;
    z-index: 20;
    justify-self: end;
    width: fit-content;
    margin-bottom: -0.35rem;
    border: 1px solid rgba(217, 119, 6, 0.22);
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412;
    padding: 0.55rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 950;
    box-shadow: 0 12px 28px rgba(154, 52, 18, 0.1);
}

.settings-dirty-note[hidden] {
    display: none;
}

.settings-main-panel,
.settings-side-panel,
.partner-links-panel {
    grid-column: auto;
    grid-row: auto;
    position: relative;
    overflow: hidden;
    border-color: rgba(203, 213, 225, 0.74);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.92)),
        radial-gradient(circle at top right, rgba(23, 69, 122, 0.08), transparent 36%);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.07);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.settings-main-panel:hover,
.settings-side-panel:hover,
.partner-links-panel:hover,
.settings-main-panel:focus-within,
.settings-side-panel:focus-within,
.partner-links-panel:focus-within {
    border-color: rgba(23, 69, 122, 0.22);
    box-shadow: 0 20px 52px rgba(15, 23, 42, 0.09);
}

.settings-main-panel::before,
.settings-side-panel::before,
.partner-links-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--portal-blue), rgba(23, 69, 122, 0.08));
}

.settings-main-panel>*,
.settings-side-panel>*,
.partner-links-panel>* {
    position: relative;
}

.settings-main-panel h3,
.settings-side-panel h3 {
    margin-top: 0;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
    line-height: 1.08;
}

.settings-side-panel {
    display: grid;
    grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr);
    gap: 1rem 1.5rem;
    align-items: start;
}

.settings-side-panel>.eyebrow,
.settings-side-panel>h3 {
    grid-column: 1 / -1;
}

.settings-media-column {
    grid-column: 1;
    display: grid;
    gap: 1rem;
    align-self: start;
}

.settings-controls-column {
    grid-column: 2;
    display: grid;
    gap: 0.95rem;
    align-self: start;
}

.settings-side-panel .settings-grid.compact {
    margin-top: 0;
}

.settings-side-panel .settings-note {
    margin-top: 0;
    margin-bottom: 0;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(20, minmax(0, 1fr));
    gap: 1rem 1.1rem;
    margin-top: 1.15rem;
}

.settings-field-name {
    grid-column: span 9;
}

.settings-field-phone {
    grid-column: span 4;
}

.settings-field-email {
    grid-column: span 7;
}

.settings-field-address {
    grid-column: span 10;
}

.settings-field-postal {
    grid-column: span 4;
}

.settings-field-city {
    grid-column: span 6;
}

.settings-field-country {
    grid-column: span 10;
}

.settings-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.settings-grid label,
.file-field {
    display: grid;
    gap: 0.5rem;
    color: var(--portal-muted);
    font-weight: 900;
}

.settings-grid input,
.settings-grid textarea,
.file-field input {
    width: 100%;
    border: 1px solid var(--portal-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--portal-ink);
    padding: 0.9rem 1rem;
    font: inherit;
    font-weight: 700;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.settings-grid textarea {
    resize: vertical;
}

.field-counter {
    justify-self: end;
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 850;
}

.field-hint {
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.35;
}

.settings-grid input:focus,
.settings-grid textarea:focus,
.file-field input:focus {
    border-color: rgba(23, 69, 122, 0.42);
    box-shadow: 0 0 0 4px rgba(23, 69, 122, 0.1);
}

.span-2 {
    grid-column: 1 / -1;
}

.cover-preview {
    position: relative;
    overflow: hidden;
    margin: 0.35rem 0 0;
    border: 1px solid rgba(203, 213, 225, 0.78);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
}

.cover-preview img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 8.4;
    object-fit: cover;
}

.cover-camera-button {
    position: absolute;
    left: 0.8rem;
    bottom: 6.85rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 2px solid #fff;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.26);
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.cover-camera-button:hover,
.cover-camera-button:focus-within {
    background: var(--portal-blue);
    box-shadow: 0 0 0 4px rgba(23, 69, 122, 0.16), 0 12px 26px rgba(15, 23, 42, 0.28);
    transform: translateY(-1px);
}

.cover-camera-button:focus-within {
    outline: 3px solid rgba(245, 158, 11, 0.55);
    outline-offset: 3px;
}

.cover-camera-button input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.cover-preview-meta {
    display: grid;
    gap: 0.25rem;
    position: relative;
    min-height: 6.15rem;
    padding: 1.05rem 8.25rem 1.15rem 1.15rem;
    border-top: 1px solid rgba(226, 232, 240, 0.92);
    background: linear-gradient(180deg, #fff, #f8fafc);
}

.cover-preview-meta strong {
    color: var(--portal-ink);
    font-size: 0.98rem;
    font-weight: 950;
}

.cover-preview-meta small {
    color: var(--portal-muted);
    font-size: 0.86rem;
    font-weight: 750;
    line-height: 1.4;
}

.cover-default-badge {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    width: fit-content;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 900;
}

.cover-preview.has-pending-cover {
    border-color: rgba(22, 101, 52, 0.38);
    box-shadow: 0 18px 42px rgba(22, 101, 52, 0.14);
}

.cover-preview.has-pending-cover .cover-preview-meta {
    background: linear-gradient(180deg, #f0fdf4, #ffffff);
}

.cover-preview.has-pending-cover .cover-preview-meta::after {
    content: "Por gravar";
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.76rem;
    font-weight: 950;
}

.cover-preview.has-pending-cover .cover-default-badge {
    display: none;
}

.cover-preview.has-pending-cover [data-cover-title] {
    color: #166534;
}

.file-field {
    align-self: start;
    margin-top: 0;
    padding: 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.58);
    border-radius: 22px;
    background: rgba(248, 250, 252, 0.78);
}

.file-field input {
    padding: 0.65rem;
    background: #fff;
}

.file-field input::file-selector-button {
    margin-right: 0.75rem;
    border: 0;
    border-radius: 999px;
    background: var(--portal-blue);
    color: #fff;
    padding: 0.65rem 0.9rem;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.toggle-stack {
    display: grid;
    gap: 0.7rem;
    margin: 0;
}

.toggle-stack label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 56px;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--portal-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    font-weight: 900;
}

.service-toggle {
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.service-toggle:hover,
.service-toggle:focus-within {
    border-color: rgba(23, 69, 122, 0.28);
    transform: translateY(-1px);
}

.service-toggle:has(input:checked) {
    border-color: rgba(22, 101, 52, 0.25);
    background: #f0fdf4;
}

.service-toggle span {
    display: grid;
    gap: 0.16rem;
}

.service-toggle small {
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.toggle-stack input {
    width: 18px;
    height: 18px;
    accent-color: var(--portal-orange);
}

.save-button {
    width: 100%;
    border: 0;
    border-radius: 999px;
    background: var(--portal-orange);
    color: #fff;
    padding: 1rem 1.1rem;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    box-shadow: 0 16px 30px rgba(232, 137, 0, 0.24);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.save-button:hover,
.save-button:focus-visible {
    background: #d97706;
    box-shadow: 0 18px 34px rgba(217, 119, 6, 0.28);
    transform: translateY(-1px);
}

.save-button.is-dirty {
    background: linear-gradient(135deg, var(--portal-orange), #f59e0b);
    box-shadow: 0 16px 32px rgba(245, 158, 11, 0.22);
}

.save-button:disabled {
    background: #fbbf24;
    cursor: wait;
    opacity: 0.82;
    transform: none;
}

.settings-note {
    margin: 0 0 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.8);
    color: var(--portal-muted);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.45;
}

.settings-note.is-warning {
    width: fit-content;
    margin-top: 0.8rem;
    padding: 0.65rem 0.85rem;
    border-radius: 14px;
    background: #fff7ed;
    color: #9a3412;
}

.partner-links-panel {
    margin-top: 1rem;
}

.settings-form>.partner-links-panel {
    grid-column: auto;
    grid-row: auto;
    margin-top: 0;
}

.partner-links-panel h3 {
    margin: 0;
}

.copy-feedback {
    min-height: 1.3rem;
    margin: 0.65rem 0 0;
    color: var(--portal-green);
    font-size: 0.86rem;
    font-weight: 850;
    opacity: 0;
    transform: translateY(-2px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.copy-feedback.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.partner-link-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-top: 1.1rem;
}

.settings-form>.partner-links-panel .partner-link-grid {
    grid-template-columns: 1fr;
}

.partner-link-card {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 0.7rem 1rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid var(--portal-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
}

.partner-link-card.is-muted {
    opacity: 0.72;
}

.partner-link-card.is-muted input {
    background: #f8fafc;
    color: #94a3b8;
}

.partner-link-card span {
    width: fit-content;
    border-radius: 999px;
    padding: 0.25rem 0.58rem;
    background: #eef4ff;
    color: var(--portal-blue);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.partner-link-card.is-active span {
    background: #e7f8ef;
    color: var(--portal-green);
}

.partner-link-card strong {
    font-size: 1rem;
    line-height: 1.25;
}

.partner-link-info {
    display: grid;
    gap: 0.45rem;
    align-self: center;
}

.partner-link-card>.partner-link-copy {
    grid-column: 2;
}

.partner-link-copy {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
}

.partner-link-copy-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 14px;
    background: #f1f5f9;
    color: var(--portal-blue);
    font-size: 0.8rem;
    font-weight: 950;
}

.partner-link-copy input {
    min-width: 0;
    border: 1px solid var(--portal-line);
    border-radius: 14px;
    background: #fff;
    padding: 0.7rem 0.85rem;
    color: var(--portal-muted);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 700;
}

.partner-link-copy button {
    min-width: 86px;
    min-height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--portal-blue);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 0 0.9rem;
    transition: transform 0.18s ease, background 0.18s ease;
}

.partner-link-copy button:hover {
    background: #0f365f;
    transform: translateY(-1px);
}

.partner-link-copy button:disabled {
    background: #e2e8f0;
    color: #64748b;
    cursor: not-allowed;
}

.partner-link-copy button:disabled:hover {
    background: #e2e8f0;
    transform: none;
}

.billing-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.billing-hero h3,
.empty-inline h3 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: -0.04em;
}

.billing-table-panel {
    overflow: hidden;
}

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

.billing-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
}

.billing-table th,
.billing-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--portal-line);
    text-align: left;
    vertical-align: middle;
}

.billing-table th {
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.billing-table td strong,
.billing-table td small {
    display: block;
}

.billing-table td small,
.muted {
    color: var(--portal-muted);
    font-weight: 700;
}

.billing-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: var(--portal-soft);
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 900;
}

.state-pago,
.stripe-pago {
    background: #ecfdf3;
    color: var(--portal-green);
}

.state-faturado,
.stripe-enviado {
    background: #eef4ff;
    color: var(--portal-blue);
}

.state-por_cobrar,
.stripe-nao_enviado,
.stripe-rascunho {
    background: #fff7ed;
    color: #b45309;
}

.state-ignorado,
.state-oferecido,
.stripe-cancelado {
    background: #f3f4f6;
    color: #4b5563;
}

.stripe-falhou {
    background: #fff1f0;
    color: var(--portal-red);
}

.empty-inline {
    padding: 1rem 0;
}

.billing-next-panel {
    margin-top: 1rem;
}

.billing-next-panel h3 {
    margin-top: 0;
}

.next-steps-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.next-steps-list span {
    padding: 0.65rem 0.85rem;
    border-radius: 999px;
    background: var(--portal-soft);
    color: var(--portal-muted);
    font-weight: 900;
}

.operation-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.operation-intro h3 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: -0.04em;
}

.operation-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}

.operation-actions a,
.operation-actions .disabled-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.7rem 0.9rem;
    border-radius: 999px;
    font-weight: 900;
}

.operation-actions a {
    background: #0f172a;
    color: #fff;
}

.operation-actions .disabled-link {
    background: var(--portal-soft);
    color: var(--portal-muted);
}

.catalog-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.catalog-hero h3 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    letter-spacing: -0.04em;
}

.catalog-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}

.muted-link {
    background: var(--portal-soft) !important;
    color: var(--portal-muted) !important;
}

.catalog-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.catalog-summary-grid article {
    padding: 1rem;
    border: 1px solid rgba(230, 234, 240, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

.catalog-summary-grid span {
    color: var(--portal-muted);
    font-weight: 900;
}

.catalog-summary-grid strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 2rem;
    letter-spacing: -0.05em;
}

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

.plates-summary-action {
    display: inline-flex;
    min-height: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: 0.8rem;
    border: 1px solid rgba(255, 200, 107, 0.24);
    border-radius: 22px;
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, var(--portal-blue), var(--portal-ink));
    color: #fff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
    cursor: pointer;
    font: inherit;
    text-align: left;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.plates-summary-action:hover,
.plates-summary-action:focus-visible {
    border-color: var(--portal-orange);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18), 0 0 0 3px rgba(242, 140, 0, 0.16);
    outline: 0;
}

.plates-summary-action__icon {
    display: inline-flex;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: var(--portal-orange);
    color: var(--portal-ink);
}

.plates-summary-action__icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.plates-summary-action__copy {
    display: grid;
    gap: 0.12rem;
}

.plates-summary-action__copy small {
    color: var(--portal-amber, #ffc86b);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.catalog-summary-grid .plates-summary-action__copy strong {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: -0.01em;
}

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

.reservations-summary-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.customers-summary-grid {
    grid-template-columns: repeat(3, minmax(150px, 0.72fr)) minmax(240px, 1.35fr);
}

.orders-filter-panel {
    grid-template-columns: repeat(5, minmax(130px, 1fr)) auto auto;
}

.reservations-filter-panel {
    grid-template-columns: repeat(4, minmax(140px, 1fr)) auto auto;
}

.customers-filter-panel {
    grid-template-columns: minmax(280px, 1fr) minmax(170px, 220px) auto;
    align-items: end;
}

.customers-primary-action,
.customers-secondary-action {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: 12px;
    padding: 0.7rem 1rem;
    font: inherit;
    font-weight: 850;
    cursor: pointer;
}

.customers-primary-action {
    border: 1px solid var(--portal-orange);
    background: var(--portal-orange);
    color: #102b4a;
}

.customers-primary-action>span {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1;
}

.customers-secondary-action {
    border: 1px solid var(--portal-line);
    background: #fff;
    color: #475467;
}

.customers-dialog {
    width: min(720px, calc(100vw - 2rem));
    max-height: min(760px, calc(100dvh - 2rem));
    margin: auto;
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: #fff;
    color: var(--portal-ink);
    box-shadow: 0 30px 90px rgba(9, 25, 41, 0.28);
    overflow: hidden;
}

.customers-dialog::backdrop {
    background: rgba(9, 25, 41, 0.68);
}

.customers-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.35rem;
    border-bottom: 1px solid var(--portal-line);
}

.customers-dialog__header h2 {
    margin: 0;
    color: #102b4a;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.035em;
}

.customers-dialog__close {
    display: inline-grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--portal-line);
    border-radius: 12px;
    background: var(--portal-soft);
    color: #475467;
    font: inherit;
    font-size: 1.4rem;
    cursor: pointer;
}

.customers-dialog__intro {
    margin: 0;
    padding: 1rem 1.35rem 0;
    color: var(--portal-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.customers-create-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.2rem 1.35rem 1.35rem;
    overflow-y: auto;
}

.customers-create-form label {
    display: grid;
    gap: 0.4rem;
    min-width: 0;
}

.customers-create-form label>span,
.customers-filter-panel label>span {
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.customers-create-form input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--portal-line);
    border-radius: 12px;
    padding: 0.72rem 0.85rem;
    background: #f8fafc;
    color: var(--portal-ink);
    font: inherit;
}

.customers-dialog__actions {
    display: flex;
    grid-column: 1 / -1;
    justify-content: flex-end;
    gap: 0.65rem;
    padding-top: 0.25rem;
}

.customers-dialog__actions .portal-button {
    width: auto;
    min-height: 44px;
}

.customers-summary-grid article {
    min-width: 0;
}

.customers-summary-grid article>strong {
    max-width: 100%;
    overflow: hidden;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.05;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.customers-summary-grid article>small {
    color: var(--portal-muted);
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.35;
}

.customers-balance-card {
    background: linear-gradient(135deg, #102b4a, #091929) !important;
}

.customers-balance-card>span,
.customers-balance-card>small {
    color: rgba(255, 255, 255, 0.68) !important;
}

.customers-balance-card>strong {
    color: #fff !important;
}

.customers-balance-card>strong>small {
    color: var(--portal-orange);
    font-size: 0.42em;
}

.customers-filter-panel label {
    min-width: 0;
}

.customers-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.customers-filter-actions button,
.customers-filter-actions a {
    min-height: 48px;
    white-space: nowrap;
}

.customers-identity {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.customers-identity>span:last-child {
    display: grid;
    min-width: 0;
    gap: 0.18rem;
}

.customers-avatar {
    display: inline-grid;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    background: #fff1dc;
    color: #a75c00;
    font-size: 0.82rem;
    font-weight: 900;
}

.customers-table tbody tr {
    transition: background-color 0.16s ease;
}

.customers-table tbody tr:hover {
    background: #f8fafc;
}

.customers-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
}

.orders-table {
    min-width: 1040px;
}

.reservations-table {
    min-width: 1100px;
}

.customers-table {
    min-width: 1120px;
}

.customers-row-actions {
    width: 1%;
    text-align: right;
    white-space: nowrap;
}

.customers-edit-action {
    min-height: 38px;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--portal-line);
    border-radius: 10px;
    background: #fff;
    color: #102b4a;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 850;
    cursor: pointer;
}

.customers-edit-action:hover,
.customers-edit-action:focus-visible {
    border-color: var(--portal-orange);
    background: #fff7e8;
}

.customers-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-top: 1px solid var(--portal-line);
}

.customers-pagination p {
    margin: 0;
    color: var(--portal-muted);
    font-size: 0.86rem;
}

.customers-pagination p strong {
    color: var(--portal-ink);
}

.customers-pagination__controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.customers-pagination__controls a,
.customers-pagination__controls span {
    display: inline-grid;
    min-width: 42px;
    min-height: 42px;
    padding: 0.55rem 0.72rem;
    place-items: center;
    border: 1px solid var(--portal-line);
    border-radius: 11px;
    background: #fff;
    color: var(--portal-ink);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.customers-pagination__controls a:hover,
.customers-pagination__controls a:focus-visible {
    border-color: var(--portal-orange);
    background: #fff7e8;
}

.customers-pagination__controls .is-current {
    border-color: #102b4a;
    background: #102b4a;
    color: #fff;
}

.customers-pagination__controls .is-disabled {
    color: #98a2b3;
    background: var(--portal-soft);
}

.customers-pagination__controls .customers-pagination__ellipsis {
    min-width: 24px;
    padding-inline: 0.2rem;
    border-color: transparent;
    background: transparent;
    color: var(--portal-muted);
}

.order-state-pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--portal-muted);
    font-size: 0.82rem;
    font-weight: 900;
}

.order-state-pill.state-pendente,
.order-state-pill.state-agendado {
    background: #fff7e6;
    color: #a15c00;
}

.order-state-pill.state-preparar,
.order-state-pill.state-pronto,
.order-state-pill.state-transito {
    background: #eaf2ff;
    color: var(--portal-blue);
}

.order-state-pill.state-concluido {
    background: #ecfdf3;
    color: var(--portal-green);
}

.order-state-pill.state-cancelado {
    background: #fff1f0;
    color: var(--portal-red);
}

.order-state-pill.state-confirmada {
    background: #ecfdf3;
    color: var(--portal-green);
}

.order-state-pill.state-concluida {
    background: #eaf2ff;
    color: var(--portal-blue);
}

.order-state-pill.state-cancelada {
    background: #fff1f0;
    color: var(--portal-red);
}

.order-state-pill.state-active {
    background: #ecfdf3;
    color: var(--portal-green);
}

.order-state-pill.state-inactive {
    background: #eef2f7;
    color: var(--portal-muted);
}

.order-state-pill.state-blocked {
    background: #fff1f0;
    color: var(--portal-red);
}

.order-customer-name {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.verified-customer-badge {
    display: inline-grid;
    min-width: 26px;
    height: 22px;
    padding: 0 0.35rem;
    place-items: center;
    border-radius: 999px;
    background: #ecfdf3;
    color: var(--portal-green);
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1;
}

.mt-4 {
    margin-top: 1rem;
}

.portal-alert {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 18px;
    font-weight: 900;
}

.portal-alert.success {
    background: #ecfdf3;
    color: var(--portal-green);
}

.portal-alert.error {
    background: #fff1f0;
    color: var(--portal-red);
}

.portal-grid {
    display: grid;
    gap: 1rem;
}

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

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

.portal-form-grid label,
.portal-form-grid fieldset {
    display: grid;
    gap: 0.4rem;
    color: var(--portal-muted);
    font-weight: 900;
}

.portal-form-grid .full,
.portal-check-grid.full {
    grid-column: 1 / -1;
}

.portal-form-grid input,
.portal-form-grid select,
.portal-form-grid textarea,
.portal-inline-editor input,
.portal-inline-editor select {
    width: 100%;
    border: 1px solid var(--portal-line);
    border-radius: 16px;
    background: #fff;
    color: var(--portal-ink);
    padding: 0.8rem 0.9rem;
    font: inherit;
    font-weight: 800;
    outline: none;
}

.portal-form-grid textarea {
    min-height: 90px;
    resize: vertical;
}

.portal-modal__header h3 {
    margin: 0;
    color: var(--portal-ink);
    font-size: 1.25rem;
    font-weight: 950;
}

.plates-filter-panel {
    margin-bottom: 1rem;
    padding: 0.95rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    background: #fbfcfe;
}

.plates-filter-panel .portal-form-grid {
    grid-template-columns: minmax(180px, 260px) auto;
    align-items: end;
    justify-content: start;
}

.plates-list {
    display: grid;
    /* border-top: 1px solid var(--portal-line); */
    gap: 10px;
}

.plates-row {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--portal-line);
    box-shadow: 0 1px 1px rgba(15, 23, 42, 0.22);
    border-radius: 14px;
    background: rgba(183, 181, 177, 0.05);
    padding-left: 15px;
    padding-right: 15px;
    transition: opacity 0.18s ease;
}

.plates-row.is-updating {
    opacity: 0.58;
    pointer-events: none;
}

.plates-thumb {
    width: 66px;
    height: 66px;
    border-radius: 14px;
    background: var(--portal-soft);
    object-fit: cover;
}

.plates-main {
    min-width: 0;
}

.plates-title-line {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
}

.plates-title-line h4 {
    margin: 0;
    color: var(--portal-ink);
    font-size: 1rem;
    font-weight: 950;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.plates-main p {
    display: -webkit-box;
    margin: 0.25rem 0 0;
    color: var(--portal-muted);
    line-height: 1.45;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.plates-main small {
    display: block;
    margin-top: 0.35rem;
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.plate-status {
    flex: 0 0 auto;
    padding: 0.24rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 950;
}
.plates-title-line{
    text-shadow: 1px 1px 1px rgb(255, 255, 255);
    color: var(--portal-green);
    padding-bottom: 5px;
    margin-bottom: 5px;
    border-bottom: 1.2px solid whitesmoke;
}
.plate-status.is-active {
    background: #ecfdf3;
    color: var(--portal-green);

}

.plate-status.is-inactive {
    background: #f1f5f9;
    color: var(--portal-muted);
}

.plates-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
}

.plates-actions form {
    margin: 0;
}

.plates-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--portal-line);
    border-radius: 12px;
    background: #fff;
    color: var(--portal-ink);
    cursor: pointer;
}

.plates-icon-button svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.plates-icon-button:hover,
.plates-icon-button:focus-visible {
    border-color: rgba(242, 140, 0, 0.42);
    background: #fff7e8;
    color: var(--portal-orange);
    outline: 0;
}

.plate-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-width: 74px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    padding: 4px;
    background: #e2e8f0;
    color: var(--portal-muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 950;
}

.plate-toggle::before {
    content: "";
    position: absolute;
    top: 5px;
    left: 5px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.16);
    transition: transform 0.18s ease;
}

.plate-toggle span {
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: right;
    padding: 0 8px;
}

.plate-toggle.is-on {
    background: #168452;
    color: #fff;
}

.plate-toggle.is-on::before {
    transform: translateX(32px);
}

.plate-toggle.is-on span {
    text-align: left;
}

.plate-toggle:focus-visible {
    outline: 3px solid rgba(242, 140, 0, 0.28);
    outline-offset: 2px;
}

.plate-toggle:disabled,
.plates-icon-button:disabled {
    cursor: wait;
}

.plates-toast {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1400;
    max-width: min(380px, calc(100vw - 32px));
    padding: 0.9rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: var(--portal-ink);
    color: #fff;
    box-shadow: 0 18px 46px rgba(15, 23, 42, 0.24);
    font-weight: 800;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.plates-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.plates-toast.is-error {
    background: var(--portal-red);
}

.weekly-menu-grid {
    display: grid;
    gap: 0.75rem;
}

.weekly-day-card {
    min-height: 92px;
}

.weekly-day-card.is-empty {
    background: #fbfcfe;
}

.weekly-empty-thumb {
    display: grid;
    place-items: center;
    color: var(--portal-orange);
    font-size: 1.4rem;
    font-weight: 950;
}

.weekly-dish-name {
    display: block;
    margin-top: 0.25rem;
    color: var(--portal-ink);
    font-size: 0.95rem;
    font-weight: 950;
}

.portal-button.secondary {
    background: #fff;
    color: var(--portal-ink);
    border: 1px solid var(--portal-line);
}

.portal-button.ghost-danger {
    background: #fff1f0;
    color: var(--portal-red);
}

.portal-modal-open {
    overflow: hidden;
}

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

.portal-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.portal-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
}

.portal-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    max-height: min(760px, calc(100vh - 2rem));
    overflow-y: auto;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.portal-modal.is-open .portal-modal__dialog {
    opacity: 1;
    transform: translateY(0);
}

.portal-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.15rem;
    border-bottom: 1px solid var(--portal-line);
}

.portal-modal__body {
    padding: 1.15rem;
}

.plate-edit-preview {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--portal-line);
    border-radius: 18px;
    background: #fbfcfe;
    color: var(--portal-muted);
    font-weight: 900;
}

.plate-edit-preview img {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    object-fit: cover;
}

@media (max-width: 760px) {

    .plates-actions {
        align-items: stretch;
        flex-direction: column;
    }

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

    .plates-summary-action {
        min-height: 78px;
    }

    .plates-toast {
        right: 16px;
        bottom: 16px;
    }

    .plates-filter-panel .portal-form-grid {
        grid-template-columns: 1fr;
    }

    .plates-row {
        grid-template-columns: 58px minmax(0, 1fr);
        align-items: start;
    }

    .plates-thumb {
        width: 58px;
        height: 58px;
    }

    .plates-actions {
        grid-column: 1 / -1;
    }

    .weekly-week-nav {
        justify-content: stretch;
        width: 100%;
    }

    .weekly-week-control {
        justify-items: stretch;
        width: 100%;
    }

    .weekly-week-current {
        justify-content: center;
    }

    .weekly-week-link {
        flex: 1;
        min-width: 0;
        padding-inline: 0.7rem;
    }

    .weekly-card-header {
        align-items: flex-start;
        padding: 0.82rem 0.88rem;
    }

    .weekly-card-body {
        grid-template-columns: 58px minmax(0, 1fr) 44px;
        gap: 0.72rem;
        padding: 0.85rem;
    }

    .weekly-card-body .plates-actions {
        grid-column: auto;
        align-items: center;
        flex-direction: row;
    }
}

.portal-check-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    border: 1px solid var(--portal-line);
    border-radius: 18px;
    padding: 0.8rem;
}

.portal-check-grid legend {
    padding: 0 0.35rem;
    color: var(--portal-blue);
}

.portal-check-grid label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.65rem;
    border-radius: 999px;
    background: var(--portal-soft);
    color: var(--portal-ink);
}

.portal-check-grid input {
    width: auto;
}

.portal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 0;
    border-radius: 999px;
    padding: 0.75rem 1.05rem;
    background: var(--portal-blue);
    color: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.portal-button.full {
    width: 100%;
}

.portal-button.danger {
    background: var(--portal-red);
}

.portal-stack {
    display: grid;
    gap: 0.75rem;
}

.portal-inline-editor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.6rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--portal-line);
    border-radius: 18px;
    background: #fff;
}

.portal-inline-editor button {
    min-height: 40px;
    border: 0;
    border-radius: 999px;
    padding: 0.65rem 0.9rem;
    background: var(--portal-soft);
    color: var(--portal-ink);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.portal-inline-editor button.operation-icon-button[name="action"][value*="delete"] {
    background: #fecaca;
    color: #b91c1c;
}

.portal-inline-editor button.operation-icon-button[name="action"][value*="delete"]:hover,
.portal-inline-editor button.operation-icon-button[name="action"][value*="delete"]:focus-visible {
    background: #fca5a5;
    color: #991b1b;
    box-shadow: none;
}

.operation-dialog .operation-special-actions .operation-icon-button.is-danger:hover,
.operation-dialog .operation-special-actions .operation-icon-button.is-danger:focus-visible,
.operation-dialog .portal-inline-editor .operation-special-actions .operation-icon-button.is-danger:hover,
.operation-dialog .portal-inline-editor .operation-special-actions .operation-icon-button.is-danger:focus-visible {
    background: #fca5a5;
    color: #991b1b;
    box-shadow: none;
}

.portal-inline-editor button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.operation-inline-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.8rem;
    font-weight: 950;
    white-space: nowrap;
}

.portal-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.portal-chip-list form {
    margin: 0;
}

.portal-chip-list button {
    border: 0;
    border-radius: 999px;
    padding: 0.55rem 0.8rem;
    background: var(--portal-soft);
    color: var(--portal-ink);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}

.catalog-filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 170px 170px auto auto;
    align-items: end;
    gap: 0.85rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
}

.catalog-filter-shell {
    margin-bottom: 0.20rem;
}

.catalog-filter-panel label {
    display: grid;
    gap: 0.35rem;
    color: var(--portal-muted);
    font-weight: 900;
}

.catalog-filter-panel input,
.catalog-filter-panel select {
    width: 100%;
    border: 1px solid var(--portal-line);
    border-radius: 12px;
    background: #f8fafc;
    color: var(--portal-ink);
    padding: 0.8rem 0.9rem;
    font: inherit;
    font-weight: 800;
    outline: none;
}

.catalog-filter-panel button,
.catalog-filter-panel a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font: inherit;
    font-weight: 900;
}

.catalog-filter-panel button {
    border: 0;
    background: var(--portal-orange);
    color: #fff;
    cursor: pointer;
}

.catalog-filter-panel a {
    background: var(--portal-soft);
    color: var(--portal-muted);
    text-decoration: none;
}

.catalog-filter-panel.compact {
    grid-template-columns: minmax(260px, 0.82fr) 160px 160px auto auto;
    align-items: center;
    margin-bottom: 0;
    padding: 0.7rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
}

.catalog-search-field {
    position: relative;
}

.catalog-search-field i {
    position: absolute;
    left: 1rem;
    top: 50%;
    color: var(--portal-muted);
    font-size: 0.95rem;
    transform: translateY(-50%);
    pointer-events: none;
}

.catalog-filter-panel .catalog-search-field input {
    min-height: 52px;
    padding-left: 2.65rem;
}

.catalog-floating-select {
    position: relative;
}

.catalog-floating-select span {
    position: absolute;
    top: -0.52rem;
    left: 0.85rem;
    z-index: 1;
    padding: 0 0.35rem;
    background: #f8fafc;
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 850;
    line-height: 1;
}

.catalog-filter-panel .catalog-floating-select select {
    min-height: 52px;
    padding-top: 0.95rem;
    padding-bottom: 0.55rem;
}

.catalog-workbench {
    display: grid;
    gap: 1.4rem;
    position: relative;
}

.catalog-toast-stack {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 2600;
    display: grid;
    gap: 0.65rem;
    width: min(380px, calc(100vw - 2rem));
    pointer-events: none;
}

.catalog-toast {
    position: relative;
    padding: 0.9rem 1rem 0.9rem 2.9rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: #102b4a;
    color: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.2);
    font-size: 0.92rem;
    font-weight: 750;
    line-height: 1.4;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.catalog-toast::before {
    content: "";
    position: absolute;
    left: 1rem;
    top: 50%;
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    background: #fff;
    transform: translateY(-50%);
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.1);
}

.catalog-toast.is-success::before {
    background: #42c985;
}

.catalog-toast.is-error::before {
    background: #ff6b61;
}

.catalog-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.catalog-toast.is-leaving {
    opacity: 0;
    transform: translateY(-6px);
}

.catalog-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    place-items: center;
    background: rgba(248, 250, 252, 0.62);
    backdrop-filter: blur(3px);
}

.catalog-workbench.is-loading .catalog-loading-overlay {
    display: grid;
}

.catalog-loading-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid rgba(203, 213, 225, 0.85);
    border-radius: 999px;
    background: #fff;
    color: var(--portal-ink);
    padding: 0.9rem 1.25rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.catalog-loading-pill strong {
    font-size: 0.98rem;
    font-weight: 900;
}

.catalog-loading-spinner {
    width: 1.2rem;
    height: 1.2rem;
    border: 3px solid rgba(23, 69, 122, 0.16);
    border-top-color: var(--portal-blue);
    border-radius: 999px;
    animation: catalog-spin 0.72s linear infinite;
}

@keyframes catalog-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .catalog-loading-spinner,
    .catalog-toast,
    .catalog-product-card {
        animation: none;
        transition: none;
    }
}

.catalog-sticky-header {
    --catalog-active-color: var(--portal-blue);
    --catalog-active-rgb: 23, 69, 122;
    position: sticky;
    top: 0;
    z-index: 60;
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0.45rem;
    border: 1px solid rgba(203, 213, 225, 0.82);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.catalog-sticky-header[data-section="products"] {
    --catalog-active-color: var(--portal-blue);
    --catalog-active-rgb: 23, 69, 122;
}

.catalog-sticky-header[data-section="categories"] {
    --catalog-active-color: #e88900;
    --catalog-active-rgb: 232, 137, 0;
}

.catalog-sticky-header[data-section="groups"] {
    --catalog-active-color: #b91c1c;
    --catalog-active-rgb: 185, 28, 28;
}

.catalog-title-row {
    margin-bottom: 0.65rem;
}

.catalog-title-row p:not(.eyebrow) {
    margin: 0.25rem 0 0;
    color: var(--portal-muted);
    font-size: 1rem;
    font-weight: 500;
}

.catalog-title-actions {
    display: flex;
    align-items: flex-end;
    gap: 0.85rem;
    margin-left: auto;
}

.catalog-restaurant-picker {
    display: grid;
    min-width: 230px;
    gap: 0.3rem;
}

.catalog-restaurant-picker label {
    color: var(--portal-muted);
    font-size: 0.72rem;
    font-weight: 950;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.catalog-restaurant-picker select {
    min-height: 42px;
    border: 1px solid var(--portal-line);
    border-radius: 16px;
    background: #fff;
    color: var(--portal-ink);
    font: inherit;
    font-weight: 850;
    padding: 0.55rem 0.8rem;
}

.catalog-export-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-bottom: 0;
    border-radius: 999px;
    padding: 0.68rem 1rem;
    background: #fff;
    color: var(--portal-blue);
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    margin-bottom: 0;
}

.portal-topbar .eyebrow,
.catalog-title-row .eyebrow {
    margin-bottom: 0.35rem;
}

.catalog-main-tabs {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    overflow-x: auto;
    padding: 0.3rem;
    border: 0;
    border-radius: 15px;
    background: var(--portal-soft);
    box-shadow: none;
    position: relative;
}

.catalog-add-new-button {
    background: var(--catalog-active-color);
    border: 1px solid var(--catalog-active-color);
    color: #fff;
    min-height: 44px;
    font-weight: 850;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(var(--catalog-active-rgb), 0.18);
}

.catalog-main-tabs button,
.catalog-main-tabs a,
.catalog-category-tabs button,
.catalog-category-tabs a {
    border: 0;
    cursor: pointer;
    font: inherit;
    font-weight: 950;
    color: var(--portal-muted);
    background: transparent;
    text-decoration: none;
}

.catalog-main-tabs button,
.catalog-main-tabs a {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border: 0;
    border-radius: 11px;
    color: var(--portal-muted);
}

.catalog-main-tabs button.active,
.catalog-main-tabs a.active {
    background: #102b4a;
    color: #fff;
    box-shadow: 0 7px 16px rgba(15, 38, 66, 0.16);
}

.catalog-main-tabs a[data-catalog-tab="products"].active {
    background: #102b4a;
    color: #fff;
    border-color: transparent;
}

.catalog-main-tabs a[data-catalog-tab="categories"].active {
    background: #102b4a;
    color: #fff;
    border-color: transparent;
}

.catalog-main-tabs a[data-catalog-tab="groups"].active {
    background: #102b4a;
    color: #fff;
    border-color: transparent;
}

.catalog-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.45rem;
    height: 1.45rem;
    margin-left: 0.45rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #e2e8f0;
    color: inherit;
    font-size: 0.72rem;
    font-weight: 950;
}

.catalog-main-tabs a.active .catalog-tab-badge {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.catalog-main-tabs a:focus-visible,
.catalog-category-tabs a:focus-visible,
.catalog-add-new-button:focus-visible,
.catalog-action-icon:focus-visible {
    outline: 3px solid rgba(240, 138, 0, 0.28);
    outline-offset: 2px;
}

.catalog-tab-panel,
.catalog-products-pane {
    display: none;
}

.catalog-tab-panel.active,
.catalog-products-pane.active {
    display: grid;
    gap: 1rem;
}

.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    padding: 0.65rem 0.3rem 0.15rem;
    border-top: 0;
    background: #fff;

}

.catalog-toolbar-actions {
    justify-content: flex-end;
    padding-bottom: 0.65rem;
}

.catalog-toolbar-actions span {
    margin-right: auto;
    color: var(--portal-muted);
    font-weight: 850;
}

.catalog-category-tabs {
    display: flex;
    flex: 1;
    gap: 0.55rem;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 0;
}

.catalog-category-tabs button,
.catalog-category-tabs a {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0.58rem 0.78rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #3f4651;
}

.catalog-category-tabs button.active,
.catalog-category-tabs a.active {
    background: #fff1dc;
    color: #a75c00;
    border-color: rgba(240, 138, 0, 0.28);
}

.catalog-category-tabs span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    margin-left: 0.35rem;
    border-radius: 999px;
    background: var(--portal-soft);
    font-size: 0.75rem;
}

.catalog-create-panel[hidden] {
    display: none;
}

.catalog-products-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
}

.catalog-category-rail,
.catalog-products-main {
    min-width: 0;
    border: 1px solid rgba(203, 213, 225, 0.86);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.catalog-category-rail {
    position: sticky;
    top: 78px;
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 96px);
    padding: 0.75rem;
    overflow: hidden;
}

.catalog-category-rail__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0.4rem 0.8rem;
}

.catalog-category-rail__header>div {
    display: grid;
    gap: 0.1rem;
}

.catalog-category-rail__header span {
    color: var(--portal-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.catalog-category-rail__header strong {
    color: #102b4a;
    font-size: 1.05rem;
    font-weight: 900;
}

.catalog-category-rail__header a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--portal-line);
    border-radius: 11px;
    color: var(--portal-muted);
}

.catalog-category-rail .catalog-category-tabs {
    display: grid;
    gap: 0.45rem;
    min-height: 0;
    padding-right: 0.15rem;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: #cbd5e1 transparent;
    scrollbar-width: thin;
}

.catalog-category-rail .catalog-category-tabs a {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 12px;
    align-items: center;
    gap: 0.55rem;
    min-height: 52px;
    padding: 0.65rem 0.7rem;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #344054;
}

.catalog-category-rail .catalog-category-tabs a:hover {
    background: #f8fafc;
}

.catalog-category-rail .catalog-category-tabs a.active {
    border-color: rgba(240, 138, 0, 0.3);
    background: #fff1dc;
    color: #102b4a;
}

.catalog-category-name {
    min-width: 0;
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-category-rail .catalog-category-count {
    min-width: 1.7rem;
    height: 1.7rem;
    margin: 0;
    background: #e9eef5;
    color: #475467;
    font-size: 0.72rem;
}

.catalog-category-rail a.active .catalog-category-count {
    background: var(--portal-orange);
    color: #fff;
}

.catalog-category-rail .fa-chevron-right {
    color: #98a2b3;
    font-size: 0.68rem;
}

.catalog-products-main {
    container: catalog-products / inline-size;
    overflow: hidden;
}

.catalog-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--portal-line);
}

.catalog-list-header h2 {
    margin: 0;
    color: #102b4a;
    font-size: clamp(1.45rem, 2.3vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.035em;
}

.catalog-list-header>div>span {
    color: var(--portal-muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.catalog-list-header .catalog-add-new-button {
    flex: 0 0 auto;
    border-color: var(--portal-orange);
    background: var(--portal-orange);
    color: #102b4a;
    box-shadow: 0 8px 18px rgba(240, 138, 0, 0.18);
}

.catalog-list-header .catalog-add-new-button:hover {
    border-color: #d97d00;
    background: #d97d00;
    color: #091929;
}

.catalog-products-main .catalog-filter-shell {
    margin: 0;
    padding: 0.75rem;
    border-bottom: 1px solid var(--portal-line);
    background: #fbfcfe;
}

.catalog-products-main .catalog-filter-panel.compact {
    grid-template-columns: minmax(170px, 1fr) repeat(2, minmax(118px, 0.52fr)) auto;
    align-items: center;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.catalog-products-main .catalog-filter-panel input,
.catalog-products-main .catalog-filter-panel select {
    min-height: 48px;
}

.catalog-products-main .catalog-filter-panel .catalog-search-field input {
    min-height: 48px;
}

.catalog-filter-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.catalog-filter-actions button,
.catalog-filter-actions a {
    gap: 0.45rem;
    min-height: 48px;
    padding: 0.7rem 0.85rem;
    white-space: nowrap;
}

.catalog-filter-actions a {
    border: 1px solid var(--portal-line);
    background: #fff;
}

@container catalog-products (max-width: 1050px) {
    .catalog-products-main .catalog-filter-panel.compact {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    }

    .catalog-products-main .catalog-search-field {
        grid-column: 1 / -1;
    }
}

@container catalog-products (max-width: 700px) {
    .catalog-products-main .catalog-filter-panel.compact {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .catalog-products-main .catalog-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

@container catalog-products (max-width: 480px) {
    .catalog-products-main .catalog-filter-panel.compact {
        grid-template-columns: 1fr;
    }

    .catalog-products-main .catalog-search-field,
    .catalog-products-main .catalog-filter-actions {
        grid-column: 1;
    }

    .catalog-products-main .catalog-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

.catalog-products-main .catalog-products-pane {
    gap: 0;
}

.catalog-products-main .catalog-product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.catalog-products-main .catalog-product-card {
    display: block;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--portal-line);
    border-radius: 0;
    background: #fff;
    box-shadow: none;
    overflow: visible;
}

.catalog-products-main .catalog-product-card:last-child {
    border-bottom: 0;
}

.catalog-products-main .catalog-product-card:focus-within {
    border-color: var(--portal-line);
    box-shadow: none;
}

.catalog-product-summary {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) minmax(90px, auto) auto 42px;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    min-height: 88px;
    padding: 0.75rem 1rem;
    border: 0;
    background: #fff;
    color: #102b4a;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.catalog-product-summary:hover,
.catalog-product-summary:focus-visible {
    background: #f8fafc;
    outline: 0;
}

.catalog-product-summary__image {
    width: 64px;
    height: 64px;
    border-radius: 11px;
    background: var(--portal-soft);
    object-fit: cover;
}

.catalog-product-summary__copy {
    display: grid;
    min-width: 0;
    gap: 0.2rem;
}

.catalog-product-summary__copy>strong {
    overflow: hidden;
    color: #102b4a;
    font-size: 0.98rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-product-summary__copy>small {
    overflow: hidden;
    color: var(--portal-muted);
    font-size: 0.82rem;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-product-summary__meta {
    color: #7b8493;
    font-size: 0.72rem;
    font-weight: 700;
}

.catalog-product-summary__value {
    display: grid;
    justify-items: end;
    gap: 0.15rem;
    white-space: nowrap;
}

.catalog-product-summary__value strong {
    font-size: 0.92rem;
    font-weight: 850;
}

.catalog-product-summary__value small {
    color: var(--portal-orange);
    font-size: 0.75rem;
    font-weight: 850;
}

.catalog-product-summary__value small.is-promo {
    color: #d92d20;
}

.catalog-product-summary__status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #475467;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
}

.catalog-product-summary__status::before {
    content: "";
    width: 0.62rem;
    height: 0.62rem;
    border-radius: 999px;
    background: #98a2b3;
}

.catalog-product-summary__status.status-ativo::before { background: var(--portal-green); }
.catalog-product-summary__status.status-promo::before { background: #d92d20; }
.catalog-product-summary__status.status-esgotado::before { background: #111827; }

.catalog-product-summary__edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--portal-line);
    border-radius: 11px;
    background: #fff;
    color: #102b4a;
}

.catalog-product-drawer[hidden] {
    display: none;
}

.catalog-product-drawer {
    position: fixed;
    inset: 0;
    z-index: 2400;
}

.catalog-product-drawer__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    background: rgba(9, 25, 41, 0.58);
    opacity: 0;
    transition: opacity 0.22s ease;
}

.catalog-product-editor-panel {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    width: min(600px, 100%);
    height: 100dvh;
    background: #fff;
    box-shadow: -24px 0 70px rgba(15, 23, 42, 0.22);
    transform: translateX(100%);
    transition: transform 0.24s ease;
}

.catalog-product-drawer.is-open .catalog-product-drawer__backdrop {
    opacity: 1;
}

.catalog-product-drawer.is-open .catalog-product-editor-panel {
    transform: translateX(0);
}

.catalog-product-editor-header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 82px;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--portal-line);
}

.catalog-product-editor-header h3 {
    margin: 0;
    color: #102b4a;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.catalog-product-editor-scroll {
    display: grid;
    flex: 1 1 auto;
    gap: 1rem;
    min-height: 0;
    padding: 1.1rem 1.25rem 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.catalog-product-editor-scroll>.catalog-product-thumb {
    width: 100%;
    min-height: 260px;
}

.catalog-product-editor-scroll>.catalog-product-thumb img {
    width: 100%;
    height: 260px;
    border-radius: 16px;
}

.catalog-product-editor-scroll>.catalog-product-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.catalog-product-editor-scroll>.catalog-product-body>* {
    grid-column: 1 / -1;
    margin-left: 0;
}

.catalog-product-editor-scroll>.catalog-product-body>.catalog-product-name-field,
.catalog-product-editor-scroll>.catalog-product-body>.catalog-description-field {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}

.catalog-product-editor-scroll .catalog-product-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.catalog-product-editor-scroll .catalog-product-selects,
.catalog-product-editor-scroll .catalog-product-card .catalog-product-selects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.catalog-product-editor-scroll .catalog-editor-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    display: flex;
    margin: 0 -1.25rem;
    padding: 0.85rem 1.25rem max(0.85rem, env(safe-area-inset-bottom));
    border-top: 1px solid var(--portal-line);
    background: #fff;
    box-shadow: 0 -12px 24px rgba(15, 23, 42, 0.06);
}

.catalog-product-editor-scroll .catalog-action-icon.save {
    flex: 1;
}

body.catalog-drawer-open {
    overflow: hidden;
}

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

.catalog-product-grid:has(> .catalog-product-card:only-child) {
    grid-template-columns: minmax(470px, calc((100% - 1.15rem) / 2));
    justify-content: start;
}

.catalog-product-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    align-items: start;
    gap: 0.8rem 1rem;
    padding: 1rem;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    overflow: visible;
    position: relative;
}

.catalog-product-card.is-saving {
    opacity: 0.68;
    pointer-events: none;
}

.catalog-product-card.is-saved {
    border-color: rgba(22, 138, 80, 0.56);
    box-shadow: 0 0 0 3px rgba(22, 138, 80, 0.1), 0 12px 28px rgba(15, 23, 42, 0.05);
}

.catalog-product-thumb {
    position: relative;
    grid-row: 1 / span 2;
    /* width: 118px;
    min-height: 118px; */
    width: 140px;
    min-height: 140px;
}

.catalog-product-thumb img {
    width: 140px;
    height: 140px;
    border-radius: 14px;
    background: var(--portal-soft);
    object-fit: cover;
}

.catalog-status {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    padding: 0.28rem 0.52rem;
    border-radius: 999px;
    background: var(--portal-blue);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 850;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.catalog-status.status-promo {
    background: #e8344e;
    text-transform: lowercase;
}

.catalog-status.status-ativo {
    background: var(--portal-green);
}

.catalog-status.status-inativo {
    background: #64748b;
}

.catalog-status.status-esgotado {
    background: #111827;
}

.catalog-product-thumb .catalog-camera-button {
    position: absolute;
    left: 0.36rem;
    bottom: 0.36rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border: 2px solid #fff;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    color: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.24);
    cursor: pointer;
    z-index: 3;
}

.catalog-product-thumb .catalog-camera-button span[aria-hidden="true"] {
    font-size: 0;
}

.catalog-product-thumb .catalog-camera-button span[aria-hidden="true"]::before {
    content: "\1F4F7";
    font-size: 0.9rem;
}

.catalog-camera-button input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

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

.catalog-product-body {
    display: contents;
}

.catalog-product-type-field {
    grid-column: 1;
}

.catalog-product-body>.catalog-description-field {
    grid-column: 2;
    margin-left: 0;
}

.catalog-product-body>.catalog-product-name-field {
    grid-column: 2;
    min-width: 0;
    margin-left: 0;
}

.catalog-field-caption {
    display: block;
    margin: 0 0 0.35rem;
    color: #7b8493;
    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.catalog-product-body>label:not(.full):not(.catalog-product-type):not(.catalog-description-field):not(.catalog-product-name-field) {
    display: block;
    padding-right: 136px;
}

.catalog-color-blue {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.catalog-product-body>label:not(.full):not(.catalog-product-type):not(.catalog-description-field):not(.catalog-product-name-field) input,
.catalog-product-body>label:not(.full):not(.catalog-product-type):not(.catalog-description-field):not(.catalog-product-name-field) .catalog-counter,
.catalog-product-name-field input,
.catalog-product-name-field .catalog-counter {
    width: 100%;
}

.catalog-product-body>.catalog-product-type {
    position: absolute;
    top: 0.95rem;
    right: 1rem;
    margin: 0;
    width: 128px;
    z-index: 1;
}

.catalog-product-body>.catalog-product-type select {
    min-height: 38px;
}

.catalog-product-body>.catalog-product-type {
    color: transparent;
    font-size: 0;
}

.catalog-product-body>.catalog-product-type select {
    color: var(--portal-ink);
    font-size: 1rem;
}

.catalog-product-body label,
.catalog-smart-form label,
.catalog-table-row {
    color: var(--portal-muted);
    font-weight: 900;
    line-height: 1.15;
}

.catalog-product-body input,
.catalog-product-body select,
.catalog-product-body textarea,
.catalog-table-row input,
.catalog-table-row select {
    width: 100%;
    border: 1px solid var(--portal-line);
    border-radius: 10px;
    color: var(--portal-ink);
    font: inherit;
    font-size: 0.95rem;
    font-weight: 650;
    outline: none;
    padding: 0.52rem 0.68rem;
}

.catalog-product-body input:focus,
.catalog-product-body select:focus,
.catalog-product-body textarea:focus,
.catalog-filter-panel input:focus,
.catalog-filter-panel select:focus {
    border-color: rgba(240, 138, 0, 0.72);
    box-shadow: 0 0 0 3px rgba(240, 138, 0, 0.12);
}

.catalog-product-name-field .produto-nome {
    min-height: 42px;
    padding: 0.35rem 0.1rem !important;
    border: 0;
    border-bottom: 1px solid var(--portal-line);
    border-radius: 0;
    background: transparent;
    color: #102b4a;
    font-size: 1.08rem !important;
    font-weight: 850;
}

.catalog-description-field textarea {
    border-color: transparent;
    background: #f8fafc;
    color: #475467;
    font-weight: 500;
    line-height: 1.45;
}

.catalog-product-body label.full,
.catalog-yield-info,
.catalog-groups-box,
.catalog-product-metrics {
    grid-column: 1;
}

.catalog-product-selects {
    grid-column: 1;
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 0.65rem;
}

.catalog-product-selects label {
    min-width: 0;
}

.catalog-product-type-field,
.catalog-product-category-field {
    grid-column: auto;
}

.catalog-groups-manager {
    grid-column: 1 / 2;
}

.catalog-editor-actions {
    grid-column: 2 / 3;
}

.catalog-product-body textarea {
    min-height: 70px;
    max-height: 70px;
    resize: vertical;
}

.catalog-counter {
    display: block;
    margin-top: 0.25rem;
    color: var(--portal-muted);
    font-size: 0.72rem;
    text-align: right;
}

.catalog-counter.limit {
    color: var(--portal-red);
    font-weight: 950;
}

.catalog-product-metrics,
.catalog-product-selects {
    display: grid;
    grid-column: 1 / -1;
    gap: 0.5rem;
}

.catalog-product-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.7rem;
    padding: 0.75rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 14px;
    background: #f8fafc;
}

.catalog-product-selects {
    grid-template-columns: minmax(150px, 0.38fr) minmax(220px, 0.62fr);
    padding: 0;
    border: 0;
    background: transparent;
}

.catalog-product-card .catalog-product-selects {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(150px, 0.38fr) minmax(220px, 0.62fr);
    align-items: stretch;
    gap: 0.65rem;
    padding: 0;
    border: 0;
    background: transparent;
}

.catalog-product-card .catalog-product-selects>.catalog-product-type-field,
.catalog-product-card .catalog-product-selects>.catalog-product-category-field,
.catalog-product-card .catalog-product-selects>.catalog-product-status-field {
    position: static;
    display: block;
    grid-column: auto;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.catalog-product-metrics label {
    color: var(--portal-muted);
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
}

.catalog-product-metrics input,
.catalog-product-metrics select {
    min-height: 38px;
    padding: 0.48rem 0.55rem;
    color: var(--portal-ink);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
}

.catalog-percent {
    display: block;
    min-height: 1.05rem;
    margin-top: 0.24rem;
    color: #15803d;
    font-size: 0.78rem;
    font-weight: 900;
    line-height: 1;
}

.catalog-percent.warn {
    color: #b45309;
}

.catalog-percent.risk {
    color: var(--portal-red);
}

.catalog-yield-info {
    padding: 0.72rem 0.82rem;
    border: 1px solid rgba(230, 234, 240, 0.95);
    border-radius: 18px;
    background: var(--portal-soft);
    color: var(--portal-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.catalog-yield-info.compact {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.65rem 0.75rem;
}

.catalog-return-card {
    display: grid;
    align-content: start;
    gap: 0.3rem;
    min-width: 0;
    padding: 0.8rem;
    border: 1px solid #dfe5ec;
    border-radius: 12px;
    background: #fff;
}

.catalog-return-card>span {
    color: #667085;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.catalog-return-card .catalog-percent {
    min-height: 0;
    margin: 0.1rem 0 0;
    font-size: 1.35rem;
    line-height: 1;
}

.catalog-return-card>small {
    color: #667085;
    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1.4;
}

.catalog-return-card.promo {
    border-color: rgba(240, 138, 0, 0.28);
    background: #fffaf2;
}

.catalog-return-card.is-empty {
    border-color: #dfe5ec;
    background: #f8fafc;
}

.catalog-return-note {
    grid-column: 1 / -1;
    padding: 0.35rem 0.2rem 0;
    color: #475467;
    font-size: 0.76rem;
    line-height: 1.45;
}

.catalog-yield-info strong {
    color: var(--portal-ink);
}

.catalog-yield-info .good {
    color: #15803d;
}

.catalog-yield-info .warn {
    color: #b45309;
}

.catalog-yield-info .risk {
    color: var(--portal-red);
}

.catalog-file-input {
    padding: 0.7rem;
    border: 1px dashed var(--portal-line);
    border-radius: 16px;
    background: #fbfcfe;
}

.catalog-upload-preview {
    display: block;
    width: 100%;
    max-height: 140px;
    margin: 0.25rem 0 0.55rem;
    border: 1px solid var(--portal-line);
    border-radius: 16px;
    background: #f8fafc;
    object-fit: cover;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

.catalog-upload-preview.banner {
    aspect-ratio: 16 / 6;
    max-height: 180px;
}

.catalog-upload-preview.has-local-preview {
    border-color: rgba(23, 69, 122, 0.42);
    box-shadow: 0 0 0 4px rgba(23, 69, 122, 0.08);
}

.catalog-create-banner-preview {
    display: grid;
    gap: 0.35rem;
}

.catalog-groups-manager {
    position: relative;
    z-index: 2;
}

.catalog-groups-trigger {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--portal-line);
    border-radius: 10px;
    background: #fff;
    color: #344054;
    cursor: pointer;
    font: inherit;
    font-weight: 850;
    padding: 0.5rem 0.7rem;
    text-align: center;
}

.catalog-groups-trigger span {
    color: var(--portal-orange);
}

.catalog-groups-trigger:focus-visible {
    outline: 3px solid rgba(23, 69, 122, 0.22);
    outline-offset: 2px;
}

.catalog-groups-popover {
    position: absolute;
    left: -1rem;
    bottom: calc(100% + 0.35rem);
    z-index: 50;
    width: min(520px, calc(100vw - 2rem));
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
    overflow: hidden;
}

.catalog-groups-popover[hidden],
.catalog-linked-group[hidden] {
    display: none;
}

.catalog-groups-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--portal-line);
}

.catalog-groups-header strong {
    color: var(--portal-ink);
    font-weight: 950;
}

.catalog-groups-header button {
    width: 2rem;
    height: 2rem;
    border: 0;
    background: transparent;
    color: var(--portal-muted);
    cursor: pointer;
    font: inherit;
    font-size: 1.7rem;
    line-height: 1;
}

.catalog-groups-header button,
.catalog-linked-group button {
    font-size: 0;
}

.catalog-groups-header button::before,
.catalog-linked-group button::before {
    content: "\00D7";
    font-size: 1.85rem;
}

.catalog-linked-group button::before {
    font-size: 1.35rem;
}

.catalog-group-associate {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 0.35rem;
    padding: 0.55rem 0.65rem 0.45rem;
}

.catalog-group-associate select {
    min-height: 40px;
    border: 1px solid var(--portal-line);
    border-radius: 4px;
    background: #fff;
    color: var(--portal-ink);
    font: inherit;
    padding: 0.45rem 0.65rem;
}

.catalog-group-associate button {
    border: 0;
    border-radius: 4px;
    background: var(--portal-blue);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 950;
}

.catalog-linked-groups {
    max-height: 310px;
    overflow-y: auto;
}

.catalog-linked-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    align-items: center;
    min-height: 36px;
    border-top: 1px solid var(--portal-line);
    padding: 0 0.35rem 0 0.7rem;
}

.catalog-linked-group span {
    overflow: hidden;
    color: var(--portal-ink);
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.catalog-linked-group button {
    border: 0;
    background: transparent;
    color: var(--portal-red);
    cursor: pointer;
    font: inherit;
    font-size: 0;
    line-height: 1;
}

.catalog-editor-actions {
    align-items: center;
    justify-content: flex-end;
    margin-top: 0;
}

.catalog-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-height: 40px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 950;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
}

.catalog-action-icon.save {
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    background: #168653;
}

.catalog-action-label {
    font-size: 0.82rem;
    font-weight: 850;
}

.catalog-action-icon.danger {
    background: transparent;
    box-shadow: none;
    color: var(--portal-red);
    width: 40px;
}

.catalog-table {
    display: grid;
    gap: 0.75rem;
}

.catalog-table-row {
    display: grid;
    grid-template-columns: 90px minmax(180px, 1fr) 120px auto auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 9px 22px rgba(15, 23, 42, 0.045);
}

.catalog-table-row:focus-within,
.catalog-product-card:focus-within {
    border-color: rgba(240, 138, 0, 0.48);
    box-shadow: 0 0 0 3px rgba(240, 138, 0, 0.1), 0 12px 28px rgba(15, 23, 42, 0.06);
}

.catalog-table-row.category-row {
    grid-template-columns: 94px 90px minmax(180px, 1fr) 120px auto auto;
}

.catalog-table-row.group-row {
    grid-template-columns: minmax(200px, 1fr) 120px 70px auto auto auto;
}

.catalog-table-row>input,
.catalog-table-row>select,
.catalog-table-row>label input,
.catalog-table-row>label select {
    background: #f8fafc;
    border-color: transparent;
}

/* .catalog-table-row.group-row input{
    width: 200px;
}

.catalog-table-row.group-row select{
    width: 200px;
    margin-left:10px ;
} */

.catalog-category-thumb {
    position: relative;
    display: block;
    width: 100px;
    height: 54px;
    overflow: hidden;
    border: 1px solid var(--portal-line);
    border-radius: 14px;
    background: var(--portal-soft);
    cursor: pointer;
}

.catalog-category-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-category-thumb .catalog-category-camera {
    font-size: 0.4rem;
    width: fit-content;
    border-radius: 50%;
    opacity: 0.9;
}

.catalog-table.groups .catalog-table-row {
    grid-template-columns: minmax(220px, 1fr) 170px 94px 190px auto;
}

.catalog-table.groups .group-row {
    align-items: stretch;
}

.catalog-group-extra-editor {
    display: grid;
    grid-column: 1 / -1;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 14px;
    background: #f8fafc;
}

.catalog-group-extra-editor strong {
    color: var(--portal-ink);
    font-size: 0.9rem;
    font-weight: 900;
}

.catalog-group-extra-add {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 0.55rem;
}

.catalog-group-extra-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.catalog-group-extra-list>span {
    color: var(--portal-muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.catalog-group-extra-list button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    background: #eef2f7;
    color: var(--portal-ink);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 850;
    cursor: pointer;
}

.catalog-group-extra-list button span {
    display: inline-flex;
    color: var(--portal-red);
    line-height: 1;
}

.catalog-group-order {
    display: grid;
    align-content: center;
    gap: 0.15rem;
    margin: 0;
}

.catalog-group-order span {
    color: var(--portal-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.catalog-group-usage {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 44px;
    border: 1px solid #dbe6f2;
    border-radius: 14px;
    padding: 0.55rem 0.75rem;
    background: #f8fafc;
    color: var(--portal-muted);
    font: inherit;
    cursor: pointer;
}

.catalog-group-usage strong {
    color: var(--portal-blue);
    font-size: 1rem;
    font-weight: 950;
}

.catalog-group-usage span {
    font-size: 0.82rem;
    font-weight: 800;
}

.catalog-group-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
}

.catalog-table-row .catalog-icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-height: 42px;
    border-radius: 13px;
    padding: 0;
    background: var(--portal-blue);
    color: #fff;
}

.catalog-table-row .catalog-icon-action.danger {
    background: #fff1f0;
    color: var(--portal-red);
}

.catalog-table-row .catalog-icon-action.save {
    background: #ecfdf3;
    color: var(--portal-green);
}

.catalog-usage-modal .modal-content {
    border: 0;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.catalog-form-modal .modal-content {
    border: 0;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
    overflow: hidden;
}

.catalog-form-modal .modal-header {
    align-items: flex-start;
    border-bottom: 1px solid var(--portal-line);
    padding: 1.15rem 1.25rem;
}

.catalog-form-modal .modal-title {
    margin: 0;
    color: var(--portal-ink);
    font-size: 1.15rem;
    font-weight: 950;
}

.catalog-form-modal .modal-body {
    padding: 1.25rem;
}

.catalog-form-modal .portal-form-grid {
    margin: 0;
}

.catalog-product-modal .modal-dialog {
    max-width: 1000px;
}

.catalog-product-modal .modal-header {
    align-items: center;
    background: var(--portal-blue);
    color: #fff;
    padding: 1.25rem 1.55rem;
}

.catalog-product-modal .modal-title {
    color: #fff;
    font-size: 1.55rem;
}

.catalog-product-modal .modal-body {
    background: #f7f7f8;
    padding: 1.8rem 2.5rem 0;
}

.catalog-new-product-form {
    display: grid;
    gap: 1rem;
}

.catalog-form-row {
    display: grid;
    gap: 1.1rem;
}

.catalog-form-row-top {
    grid-template-columns: minmax(0, 1fr) 292px;
    position: relative;
}

.catalog-form-row-values {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.catalog-form-row-bottom {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.catalog-floating-field {
    position: relative;
    display: grid;
    margin: 0;
}

.catalog-floating-field>span,
.catalog-product-type-field legend {
    position: absolute;
    top: -0.78rem;
    left: 0.75rem;
    z-index: 2;
    width: auto;
    padding: 0 0.45rem;
    border-radius: 999px;
    background: #f7f7f8;
    color: #3f3f46;
    font-size: 1.02rem;
    font-weight: 500;
    line-height: 1.15;
}

.catalog-floating-field.promo>span {
    color: #ef334e;
}

.catalog-floating-field input,
.catalog-floating-field select,
.catalog-floating-field textarea {
    width: 100%;
    border: 1px solid #cfd7e3;
    border-radius: 18px;
    background: #fff;
    color: var(--portal-ink);
    font: inherit;
    font-size: 1.08rem;
    font-weight: 500;
    outline: none;
    padding: 0.82rem 1rem;
}

.catalog-floating-field input,
.catalog-floating-field select {
    min-height: 70px;
}

.catalog-floating-field textarea {
    min-height: 100px;
    resize: vertical;
}

.catalog-field-description,
.catalog-product-type-field,
.catalog-modal-yield,
.catalog-form-footer {
    grid-column: 1 / -1;
}

.catalog-field-description .catalog-counter,
.catalog-form-row-top .catalog-counter {
    justify-self: end;
    margin-top: 0.35rem;
    padding-right: 0.2rem;
    font-size: 0.95rem;
}

.catalog-input-addon>div {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid #cfd7e3;
    border-radius: 18px;
    background: #fff;
}

.catalog-input-addon>div input {
    min-height: 68px;
    border: 0;
    border-radius: 0;
}

.catalog-input-addon>div strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #dbe2eb;
    color: var(--portal-ink);
    font-size: 1.15rem;
    font-weight: 600;
}

.catalog-input-addon>div strong:last-child {
    border-right: 0;
    border-left: 1px solid #dbe2eb;
}

.catalog-input-addon:not(:first-child)>div {
    grid-template-columns: minmax(0, 1fr) 64px;
}

.catalog-product-type-field {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    margin: 0;
    border: 1px solid #cfd7e3;
    border-radius: 10px;
    background: #fff;
    padding: 1.35rem 1.2rem 0.9rem;
}

.catalog-product-type-field label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--portal-ink);
    font-size: 1.08rem;
    font-weight: 500;
}

.catalog-product-type-field input {
    width: 1rem;
    height: 1rem;
    accent-color: #2563eb;
}

.catalog-modal-yield {
    display: grid;
    gap: 0.75rem;
    border: 1px solid #dbe2eb;
    border-radius: 8px;
    background: #f8fafc;
    padding: 1rem 1.2rem;
}

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

.catalog-return-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.catalog-return-row+.catalog-return-row {
    border-top: 1px solid #cfd7e3;
    padding-top: 0.75rem;
}

.catalog-return-row strong {
    color: var(--portal-ink);
    font-size: 1rem;
}

.catalog-return-row small {
    display: block;
    color: var(--portal-muted);
    text-align: right;
}

.catalog-return-value {
    color: var(--portal-green);
    font-size: 1.15rem;
    font-weight: 950;
    text-align: right;
}

.catalog-return-badge {
    display: inline-flex;
    margin-left: 0.35rem;
    border-radius: 8px;
    background: #ef334e;
    color: #fff;
    padding: 0.18rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 900;
}

.catalog-return-note {
    color: var(--portal-green);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: right;
}

.catalog-form-footer {
    display: flex;
    justify-content: flex-end;
    margin: 0 -2.5rem;
    border-top: 1px solid #dbe2eb;
    background: #f3f4f6;
    padding: 1.15rem 1.25rem;
}

.catalog-form-footer .portal-button {
    min-width: 174px;
    background: #2563eb;
    border-radius: 10px;
    font-size: 1.05rem;
}

.catalog-usage-modal .modal-header {
    border-bottom: 1px solid var(--portal-line);
    padding: 1rem 1.15rem;
}

.catalog-usage-modal .modal-title {
    color: var(--portal-ink);
    font-size: 1rem;
    font-weight: 950;
}

.catalog-modal-close {
    /* display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem; */
    border: 0;
    border-radius: 999px;
    background: #eff4f9;
    color: var(--portal-muted);
    cursor: pointer;
    font: inherit;
    line-height: 1;
}

.catalog-modal-close span {
    /* display: block;
    color: var(--portal-ink);
    font-size: 1.55rem;
    font-weight: 500;
    line-height: 1;
    transform: translateY(-1px); */
}

.catalog-modal-close:hover,
.catalog-modal-close:focus-visible {
    background: #d4d4d4;
    outline: none;
}

.catalog-usage-list {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding-left: 1.25rem;
}

.catalog-usage-list li,
.catalog-modal-empty {
    color: var(--portal-muted);
    font-weight: 800;
}

.catalog-table-row button {
    min-height: 40px;
    border: 0;
    border-radius: 999px;
    padding: 0.6rem 0.85rem;
    font: inherit;
    font-weight: 950;
    color: #fff;
    background: var(--portal-blue);
    cursor: pointer;
}

.catalog-table-row button[name="action"] {
    background: var(--portal-red);
}

.catalog-table-row .catalog-group-usage {
    min-height: 44px;
    border: 1px solid #dbe6f2;
    border-radius: 14px;
    padding: 0.55rem 0.75rem;
    background: #f8fafc;
    color: var(--portal-muted);
}

.catalog-table-row .catalog-group-extra-add button {
    border-radius: 14px;
    background: var(--portal-blue);
    color: #fff;
}

.catalog-table-row .catalog-group-extra-list button {
    min-height: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    background: #eef2f7;
    color: var(--portal-ink);
    box-shadow: none;
}

.catalog-table-row .catalog-icon-action,
.catalog-table-row .catalog-icon-action[name="action"] {
    width: 42px;
    min-height: 42px;
    border-radius: 13px;
    padding: 0;
}

.catalog-table-row .catalog-icon-action.save,
.catalog-table-row .catalog-icon-action.save[name="action"] {
    background: #ecfdf3;
    color: var(--portal-green);
}

.catalog-table-row .catalog-icon-action.danger,
.catalog-table-row .catalog-icon-action.danger[name="action"] {
    background: #fff1f0;
    color: var(--portal-red);
}

.catalog-chip-list {
    color: var(--portal-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.catalog-category-stack {
    display: grid;
    gap: 1rem;
}

.catalog-product-list {
    display: grid;
}

.catalog-product-list.editable {
    gap: 1rem;
}

.catalog-product-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--portal-line);
}

.catalog-product-row:first-child {
    border-top: 0;
}

.catalog-product-row img {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: var(--portal-soft);
    object-fit: cover;
}

.catalog-product-row small,
.catalog-product-row span {
    color: var(--portal-muted);
    font-weight: 300;
}

.catalog-product-editor {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--portal-line);
}

.catalog-product-editor:first-child {
    border-top: 0;
}

.catalog-product-editor>img {
    width: 96px;
    height: 96px;
    border-radius: 22px;
    background: var(--portal-soft);
    object-fit: cover;
}

.catalog-editor-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.weekly-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.weekly-week-bar {
    position: relative;
    display: grid;
    grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.weekly-week-context h3,
.weekly-week-context p {
    margin: 0;
}

.weekly-week-context h3 {
    color: var(--portal-ink);
    font-size: 1.05rem;
    font-weight: 900;
}

.weekly-week-context p,
.weekly-week-range {
    color: var(--portal-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.weekly-week-context p {
    margin-top: 0.18rem;
}

.weekly-week-period {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}

.weekly-week-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.38rem 0.78rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: #fff;
    color: var(--portal-ink);
    font-size: 0.8rem;
    font-weight: 850;
}

.weekly-week-badge.is-past {
    border-color: rgba(242, 140, 0, 0.24);
    background: #fff4e5;
}

.weekly-week-badge.is-future {
    border-color: rgba(23, 69, 122, 0.2);
    background: #eaf3ff;
}

.weekly-week-nav {
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
}

.weekly-week-link {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid var(--portal-line);
    border-radius: 10px;
    padding: 0.58rem 0.78rem;
    background: #fff;
    color: var(--portal-ink);
    font-size: 0.86rem;
    font-weight: 850;
    text-decoration: none;
}

.weekly-week-link.is-icon {
    width: 40px;
    padding: 0;
}

.weekly-week-link svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

.weekly-week-link.is-current {
    border-color: var(--portal-orange);
    background: var(--portal-orange);
    color: var(--portal-ink);
}

.weekly-week-link:hover,
.weekly-week-link:focus-visible {
    border-color: var(--portal-orange);
    background: #fff4e5;
    color: var(--portal-ink);
    outline: 0;
}

.weekly-week-link.is-current:hover,
.weekly-week-link.is-current:focus-visible {
    background: #ff9f1a;
}

.weekly-day-card {
    --weekly-strong: var(--portal-green);
    --weekly-strong-2: #0d6b40;
    --weekly-soft: #aee4c4;
    --weekly-soft-2: #dff5e9;
    --weekly-border: #6cc58f;
    --weekly-text: #0d4f31;
    display: grid;
    overflow: hidden;
    border: 1px solid var(--weekly-border);
    border-radius: 16px;
    background: linear-gradient(145deg, var(--weekly-soft) 0%, var(--weekly-soft-2) 74%, #ffffff 100%);
}

.weekly-day-card.tone-past {
    --weekly-strong: #b42318;
    --weekly-strong-2: #8f1b12;
    --weekly-soft: #ffaaa2;
    --weekly-soft-2: #ffe2df;
    --weekly-border: #f7776c;
    --weekly-text: #7a1d14;
}

.weekly-day-card.tone-future {
    --weekly-strong: #17457a;
    --weekly-strong-2: #091929;
    --weekly-soft: #9fc8f2;
    --weekly-soft-2: #ddecfb;
    --weekly-border: #6da8df;
    --weekly-text: #123b66;
}

.weekly-day-card.is-filled {
    /* border-color: transparent; */
    /* background: linear-gradient(145deg, var(--weekly-strong) 0%, var(--weekly-strong-2) 100%); */
    /* background:
        linear-gradient(145deg, color-mix(in srgb, var(--weekly-strong) 80%, #ffffff 14%) 10%, var(--weekly-strong-2) 100%, #f7f7f7 100%); */
       background: linear-gradient(
  145deg,
  color-mix(in srgb, var(--weekly-strong) 50%, var(--weekly-soft) 50%), /* Sem 0% */
  var(--weekly-strong-2) 100%, /* Aumentado de 18% para 40% para espalhar a cor */
  var(--weekly-soft-2) 100%
);

}

.weekly-day-card.is-empty {
    background:
        linear-gradient(145deg, color-mix(in srgb, var(--weekly-soft) 86%, #ffffff 14%) 0%, var(--weekly-soft-2) 68%, #ffffff 100%);
}

.weekly-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.26);
    border-bottom: 1px solid rgba(255, 255, 255, 0.48);
}

.weekly-day-card.is-filled .weekly-card-header {
    background: rgba(255, 255, 255, 0.14);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.weekly-day-name {
    display: block;
    color: var(--weekly-text);
    font-size: 1.02rem;
    font-weight: 950;
    line-height: 1.15;
}

.weekly-day-date {
    display: block;
    margin-top: 0.16rem;
    color: rgba(15, 23, 42, 0.62);
    font-size: 0.82rem;
    font-weight: 800;
}

.weekly-state-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 999px;
    background: #fee4e2;
    color: #b42318;
    box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.18);
}

.weekly-state-label svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.weekly-day-card.is-filled .weekly-state-label {
    background: #dcfae6;
    color: #168452;
    box-shadow: inset 0 0 0 1px rgba(22, 132, 82, 0.18);
}

.weekly-card-body {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.weekly-day-card.is-filled .weekly-day-name,
.weekly-day-card.is-filled .weekly-day-date,
.weekly-day-card.is-filled .weekly-dish-name,
.weekly-day-card.is-filled .plates-main p,
.weekly-day-card.is-filled .plates-main small {
    color: #ffffff;
}

.weekly-day-card.is-filled .plates-icon-button {
    border-color: rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.weekly-day-form {
    margin-top: 0.9rem;
}

@media (max-width: 760px) {
    .weekly-week-bar {
        grid-template-columns: 1fr;
        gap: 0.85rem;
        padding: 0.9rem;
    }

    .weekly-week-context {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .weekly-week-context p {
        margin: 0;
        text-align: right;
    }

    .weekly-week-period {
        justify-content: flex-start;
    }

    .weekly-week-nav {
        justify-content: stretch;
        width: 100%;
    }

    .weekly-week-link {
        min-width: 0;
        padding-inline: 0.7rem;
    }

    .weekly-week-link.is-icon {
        flex: 0 0 40px;
        padding: 0;
    }

    .weekly-week-link.is-current {
        flex: 1;
    }

    .weekly-card-header {
        align-items: flex-start;
        padding: 0.82rem 0.88rem;
    }

    .weekly-card-body {
        grid-template-columns: 58px minmax(0, 1fr) 44px;
        gap: 0.72rem;
        padding: 0.85rem;
    }

    .weekly-card-body .plates-actions {
        grid-column: auto;
        align-items: center;
        flex-direction: row;
    }
}

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

.span-wide {
    grid-column: span 2;
}

.operation-list,
.prep-grid,
.dual-list,
.dual-table {
    display: grid;
    gap: 0.75rem;
}

.operation-list span,
.prep-grid span,
.dual-list>div,
.dual-table>div {
    padding: 0.85rem;
    border: 1px solid var(--portal-line);
    border-radius: 18px;
    background: #fff;
    color: var(--portal-muted);
    font-weight: 400;
}

.operation-list strong,
.prep-grid strong,
.dual-list strong,
.dual-table strong {
    color: var(--portal-ink);
}

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

.dual-list,
.dual-table {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dual-list p {
    margin: 0.35rem 0 0;
}

.dual-table span {
    display: block;
    margin-top: 0.5rem;
    color: var(--portal-muted);
    font-weight: 400;
}

.operation-vacation-form {
    border-top: 1px dashed rgba(148, 163, 184, 0.55);
    padding-top: 1rem;
}

.operation-vacation-form::before {
    content: "Ferias / pausa longa";
    grid-column: 1 / -1;
    color: var(--portal-muted);
    font-size: 0.75rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.operation-workspace {
    display: grid;
    gap: 0;
    margin-bottom: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 30px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.operation-tab-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.operation-tabs {
    display: flex;
    gap: 0.7rem;
    padding: 1rem 1rem 0;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.operation-tab-label {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 220px;
    min-height: 64px;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: rgba(255, 255, 255, 0.68);
    color: var(--portal-muted);
    cursor: pointer;
}

.operation-tab-label span {
    color: var(--portal-ink);
    font-size: 1.05rem;
    font-weight: 950;
}

.operation-tab-label small {
    font-size: 0.78rem;
    font-weight: 800;
}

#operation-tab-gfood:checked~.operation-tabs .operation-tab-label.gfood,
#operation-tab-gbook:checked~.operation-tabs .operation-tab-label.gbook {
    background: #fff;
    box-shadow: 0 -10px 34px rgba(15, 23, 42, 0.07);
}

#operation-tab-gfood:checked~.operation-tabs .operation-tab-label.gfood {
    border-top: 4px solid var(--portal-green);
}

#operation-tab-gbook:checked~.operation-tabs .operation-tab-label.gbook {
    border-top: 4px solid var(--portal-blue);
}

.operation-tab-panel {
    display: none;
    padding: 1rem;
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    background:
        radial-gradient(circle at top right, rgba(23, 69, 122, 0.08), transparent 34%),
        #fff;
}

#operation-tab-gfood:checked~.operation-tab-panel-gfood,
#operation-tab-gbook:checked~.operation-tab-panel-gbook {
    display: block;
}

.operation-card-deck {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
}

.operation-tool-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.9rem;
    min-height: 250px;
    padding: 1.15rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
    cursor: pointer;
    outline: none;
    transition:
        transform 180ms ease,
        box-shadow 180ms ease,
        border-color 180ms ease,
        background 180ms ease;
}

.operation-tool-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid transparent;
    pointer-events: none;
}

.operation-tool-card.is-disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.operation-tool-card:not(.is-disabled):hover,
.operation-tool-card:not(.is-disabled):focus-visible {
    transform: translateY(-4px);
    border-color: rgba(23, 69, 122, 0.28);
    background:
        radial-gradient(circle at top right, rgba(240, 138, 0, 0.12), transparent 38%),
        #ffffff;
    box-shadow: 0 22px 52px rgba(15, 23, 42, 0.13);
}

.operation-tool-card:not(.is-disabled):focus-visible::after {
    border-color: rgba(23, 69, 122, 0.72);
}

.operation-tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 17px;
    font-size: 1.25rem;
    font-weight: 950;
}

.operation-tool-icon {
    font-size: 0;
}

.operation-tool-icon::before {
    font-size: 1.02rem;
    letter-spacing: 0.04em;
}

.operation-tool-icon.green::before,
.operation-tool-icon.blue::before {
    content: "H";
}

.operation-tool-icon.amber::before {
    content: "D";
}

.operation-tool-icon.red::before {
    content: "F";
}

.operation-tool-card[data-operation-panel="preparation"] .operation-tool-icon::before {
    content: "T";
}

.operation-tool-icon.green {
    background: #e8f7ef;
    color: var(--portal-green);
}

.operation-tool-icon.amber {
    background: #fff7e6;
    color: #b45309;
}

.operation-tool-icon.red {
    background: #fff1f0;
    color: var(--portal-red);
}

.operation-tool-icon.blue {
    background: #eef4ff;
    color: var(--portal-blue);
}

.operation-tool-card h3 {
    margin: 0;
    font-size: 1.15rem;
}

.operation-tool-card p {
    margin: 0.35rem 0 0;
    color: var(--portal-muted);
    line-height: 1.45;
}

.operation-tool-card strong {
    align-self: end;
    color: var(--portal-blue);
    font-size: 0.9rem;
}

.operation-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 42px;
    width: 100%;
    margin-top: 0.2rem;
    border-radius: 16px;
    color: var(--portal-ink);
    font-weight: 950;
}

.operation-card-cta span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--portal-soft);
    transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.operation-tool-card:not(.is-disabled):hover .operation-card-cta span,
.operation-tool-card:not(.is-disabled):focus-visible .operation-card-cta span {
    transform: translateX(3px);
    background: var(--portal-blue);
    color: #fff;
}

.operation-dialog {
    width: min(980px, calc(100vw - 2rem));
    max-height: min(86vh, 820px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 28px;
    background: transparent;
    box-shadow: 0 34px 120px rgba(15, 23, 42, 0.38);
}

.operation-dialog::backdrop {
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(4px);
}

.operation-dialog-panel {
    position: relative;
    width: 100%;
    display: grid;
    max-height: min(86vh, 820px);
    overflow: hidden;
    background:
        linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
}

.operation-dialog-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    background:
        radial-gradient(circle at top left, rgba(23, 69, 122, 0.1), transparent 32%),
        #ffffff;
    color: var(--portal-ink);
}

.operation-dialog-header .eyebrow,
.operation-dialog-header h3 {
    color: var(--portal-ink);
}

.operation-dialog-header h3 {
    margin: 0.2rem 0 0;
    font-size: clamp(1.35rem, 2.6vw, 2rem);
    line-height: 1.08;
}

.operation-dialog-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #b9b9b9;
    cursor: pointer;
    font-size: 1.45rem;
    font-weight: 900;
    line-height: 1;
}

.operation-dialog-close:hover {
    background: #f9f9f9;
}

.operation-dialog-body {
    display: grid;
    gap: 1rem;
    max-height: calc(min(86vh, 820px) - 88px);
    padding: 1.1rem;
    overflow: auto;
}

.operation-dialog-section {
    display: grid;
    gap: 1rem;
    padding: clamp(1rem, 2.4vw, 1.45rem);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.06);
}

.operation-dialog-section h3 {
    margin: 0.15rem 0 0;
    font-size: 1.25rem;
}

.operation-dialog-section>p:not(.eyebrow) {
    margin: 0;
    padding: 0.9rem 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.48);
    border-radius: 18px;
    background: #f8fafc;
    color: var(--portal-muted);
}

.operation-dialog .operation-list {
    gap: 0.65rem;
}

.operation-dialog .portal-inline-editor {
    grid-template-columns: minmax(160px, 1.2fr) repeat(3, minmax(105px, 0.75fr)) auto auto;
    padding: 0.8rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    background: #fbfcfe;
}

.operation-dialog .portal-inline-editor button {
    min-height: 42px;
    border-radius: 14px;
}

.operation-dialog .portal-form-grid {
    align-items: end;
    padding: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

.operation-dialog .portal-form-grid label {
    font-size: 0.88rem;
}

.operation-dialog .portal-chip-list {
    padding: 0.75rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    background: #fbfcfe;
}

.operation-block-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.95fr) minmax(300px, 1fr);
    gap: 1.8rem;
}

.operation-block-form-card {
    display: grid;
    align-content: start;
    gap: 1rem;
    padding-right: 1.8rem;
    border-right: 1px solid rgba(226, 232, 240, 0.95);
}

.operation-block-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.operation-block-title-row h3,
.operation-block-list-card h3 {
    margin: 0;
    color: var(--portal-ink);
    font-size: clamp(1.45rem, 2.7vw, 2.15rem);
    line-height: 1.12;
}

.operation-secondary-button {
    min-width: 142px;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(100, 116, 139, 0.6);
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-weight: 800;
    line-height: 1.35;
}

.operation-secondary-button:hover,
.operation-secondary-button:focus-visible {
    border-color: var(--portal-blue);
    color: var(--portal-blue);
    box-shadow: 0 0 0 4px rgba(30, 75, 133, 0.12);
}

.operation-block-form {
    display: grid;
    gap: 0.85rem;
}

.operation-block-form input,
.operation-block-form select {
    width: 100%;
    min-height: 54px;
    padding: 0.75rem 0.95rem;
    border: 1px solid rgba(100, 116, 139, 0.65);
    border-radius: 0;
    background: #fff;
    color: var(--portal-ink);
    font: inherit;
}

.operation-block-form button,
.operation-block-item button:not(.operation-icon-button) {
    min-height: 54px;
    border: 0;
    border-radius: 0;
    font-weight: 900;
}

.operation-block-form button {
    background: #f3f4f6;
    color: var(--portal-ink);
    box-shadow: inset 0 0 0 2px #2f343b;
}

.operation-block-form button:hover,
.operation-block-form button:focus-visible {
    background: var(--portal-blue);
    color: #fff;
    box-shadow: inset 0 0 0 2px var(--portal-blue);
}

.operation-block-list-card {
    display: grid;
    align-content: start;
    gap: 1.2rem;
}

.operation-block-list {
    display: grid;
    gap: 0;
}

.operation-block-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.95rem 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.operation-block-item:last-child {
    border-bottom: 0;
}

.operation-block-item div {
    display: grid;
    gap: 0.22rem;
}

.operation-block-item strong {
    color: var(--portal-ink);
    font-size: 1rem;
}

.operation-block-item span {
    color: #475569;
    line-height: 1.35;
}

.operation-block-item button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0 0.9rem;
    border-radius: 999px;
    background: #fecaca;
    color: #b91c1c;
}

.operation-block-item button:hover,
.operation-block-item button:focus-visible {
    background: #fca5a5;
    color: #991b1b;
    box-shadow: none;
}

.operation-rest-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(300px, 1.1fr);
    gap: clamp(1.2rem, 3vw, 2rem);
    align-items: start;
}

.operation-rest-form,
.operation-rest-list-card {
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.operation-rest-form {
    display: grid;
    gap: 0.95rem;
    padding: 1.15rem;
}

.operation-rest-form label {
    display: grid;
    gap: 0.45rem;
    color: #64748b;
    font-size: 0.86rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.operation-rest-form select {
    min-height: 54px;
    width: 100%;
    padding: 0.75rem 0.95rem;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 16px;
    background: #fff;
    color: var(--portal-ink);
    font-size: 1rem;
    font-weight: 800;
}

.operation-rest-form input {
    min-height: 54px;
    width: 100%;
    padding: 0.75rem 0.95rem;
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 16px;
    background: #fff;
    color: var(--portal-ink);
    font-size: 1rem;
    font-weight: 800;
}

.operation-rest-form p {
    margin: 0;
    color: #64748b;
    line-height: 1.45;
}

.operation-rest-form .portal-button {
    width: 100%;
}

.operation-rest-list-card {
    padding: 1.15rem;
}

.operation-rest-list-card h4 {
    margin: 0 0 0.9rem;
    color: var(--portal-ink);
    font-size: 1.08rem;
}

.operation-rest-list {
    display: grid;
    gap: 0.65rem;
}

.operation-holiday-list {
    display: grid;
    gap: 0.65rem;
    min-width: 0;
}

.operation-rest-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: center;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 16px;
    background: #fff;
}

.operation-rest-item strong {
    color: var(--portal-ink);
    font-size: 1rem;
}

.operation-rest-item button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #fecaca;
    color: #b91c1c;
    font-weight: 900;
}

.operation-rest-item button:hover,
.operation-rest-item button:focus-visible {
    background: #fca5a5;
    color: #991b1b;
    box-shadow: none;
}

.operation-special-tabs {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.3rem;
    margin: 0.75rem 0 1.15rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 999px;
    background: #f8fafc;
}

.operation-special-tabs button {
    min-height: 42px;
    padding: 0 1rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #64748b;
    font-weight: 900;
}

.operation-special-tabs button:hover,
.operation-special-tabs button:focus-visible {
    color: var(--portal-blue);
}

.operation-special-tabs button.is-active {
    background: var(--portal-blue);
    color: #fff;
    box-shadow: 0 12px 28px rgba(30, 75, 133, 0.18);
}

.operation-special-panel {
    display: none;
}

.operation-special-panel.is-active {
    display: block;
}

.operation-vacation-form {
    border-top: 0;
    padding-top: 1.15rem;
}

.operation-vacation-form::before {
    content: none;
}

.operation-dialog .operation-special-item {
    grid-template-columns: minmax(150px, 0.95fr) minmax(120px, 1fr) max-content;
    gap: 0.55rem;
    padding: 0.75rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 16px;
    background: #fff;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.operation-dialog .operation-special-item input {
    min-height: 44px;
    min-width: 0;
    width: 100%;
    border-radius: 12px;
}

.operation-special-actions {
    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.5rem;
    min-width: max-content;
    justify-self: end;
}

.operation-dialog .operation-special-item .operation-icon-button {
    width: 42px;
    min-width: 42px;
    height: 42px;
    min-height: 44px;
    padding: 0;
    border-radius: 999px;
}

.operation-icon-button {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    font-size: 0;
    line-height: 1;
    cursor: pointer;
    vertical-align: middle;
    box-shadow: none;
}

.operation-icon-button i {
    display: block;
    font-size: 1.05rem;
    line-height: 1;
    pointer-events: none;
}

.operation-icon-button.is-save {
    background: #dcfce7;
    color: #166534;
}

.operation-icon-button.is-save:hover,
.operation-icon-button.is-save:focus-visible {
    background: #bbf7d0;
    color: #14532d;
    box-shadow: none;
}

.operation-icon-button.is-danger {
    background: #fecaca;
    color: #b91c1c;
}

.operation-icon-button.is-danger:hover,
.operation-icon-button.is-danger:focus-visible {
    color: #991b1b;
    background: #fca5a5;
    box-shadow: none;
}

.operation-icon-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    box-shadow: none;
}

.portal-button.operation-icon-button,
.portal-button.operation-icon-button.full {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    justify-self: end;
    border-radius: 999px;
    padding: 0;
}

.operation-period-manager-dialog {
    width: min(1200px, calc(100vw - 2rem));
}

.operation-swal-container {
    z-index: 2147483000 !important;
}

.operation-dialog-panel .operation-swal-container {
    position: absolute !important;
    inset: 0 !important;
}

.operation-swal-confirm {
    background: var(--portal-blue) !important;
    border-radius: 999px !important;
    font-weight: 900 !important;
}

.operation-swal-cancel {
    border-radius: 999px !important;
    font-weight: 900 !important;
}

.operation-toast {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1200;
    max-width: min(420px, calc(100vw - 2rem));
    padding: 0.95rem 1.1rem;
    border-radius: 18px;
    background: #10233f;
    color: #fff;
    font-weight: 900;
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.2);
    transition: opacity 180ms ease, transform 180ms ease;
}

.operation-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.operation-toast.is-error {
    background: var(--portal-red);
}

.operation-period-section {
    gap: 1.2rem;
}

.operation-period-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.operation-period-heading span {
    flex: 0 0 auto;
    margin-top: 0.2rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--portal-blue);
    font-size: 0.8rem;
    font-weight: 950;
}

.operation-period-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.64fr) minmax(0, 1.36fr);
    gap: clamp(1.1rem, 2.5vw, 1.8rem);
    align-items: start;
    width: 100%;
    min-width: 0;
}

.operation-period-config {
    display: grid;
    gap: 0.9rem;
    min-width: 0;
    padding: 1.15rem;
    border: 1px solid rgba(203, 213, 225, 0.9);
    border-radius: 18px;
    background: #f8fafc;
}

.operation-period-config>p {
    margin: 0;
    color: var(--portal-muted);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.operation-period-config>p strong {
    color: #4b5563;
}

.operation-dialog .operation-period-create {
    display: grid;
    gap: 0.95rem;
    padding: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.05);
}

.operation-period-create .full {
    grid-column: 1 / -1;
}

.operation-period-create .operation-icon-button {
    justify-self: end;
}

.operation-period-list {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
}

.operation-period-list-card {
    display: grid;
    gap: 0.95rem;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 1.15rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
}

.operation-period-list-card h4 {
    margin: 0;
    color: var(--portal-ink);
    font-size: 1.1rem;
}

.operation-empty-copy {
    margin: 0;
    padding: 1rem;
    border: 1px dashed rgba(148, 163, 184, 0.5);
    border-radius: 16px;
    background: #fff;
    color: var(--portal-muted);
}

.operation-dialog .operation-period-row {
    grid-template-columns: minmax(135px, 1.25fr) minmax(78px, 0.64fr) minmax(78px, 0.64fr) minmax(68px, 0.52fr) max-content;
    gap: 0.55rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 16px;
    background: #fff;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.operation-dialog .operation-period-row input {
    min-height: 46px;
    min-width: 0;
    width: 100%;
    border-radius: 14px;
    padding-inline: 0.75rem;
    font-size: 0.92rem;
}

.operation-dialog .operation-period-row>* {
    min-width: 0;
}

.operation-dialog .operation-period-row:last-child {
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.operation-period-row-summary {
    display: grid;
    gap: 0.22rem;
    grid-column: 1 / -1;
}

.operation-period-row-summary strong {
    color: var(--portal-ink);
    font-size: 1.02rem;
}

.operation-period-row-summary span,
.operation-period-row-summary small {
    color: var(--portal-muted);
    font-size: 0.9rem;
}

.operation-period-actions {
    display: inline-flex;
    justify-content: flex-end;
    gap: 0.4rem;
    min-width: max-content;
    justify-self: end;
    align-self: center;
}

.operation-period-actions .operation-icon-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 999px;
}

.operation-dialog .portal-inline-editor .operation-period-actions .operation-icon-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 999px;
}

.operation-period-actions .operation-icon-button.is-danger,
.operation-dialog .portal-inline-editor .operation-period-actions .operation-icon-button.is-danger {
    background: #fecaca;
    color: #b91c1c;
}

.operation-period-actions .operation-icon-button.is-danger:hover,
.operation-period-actions .operation-icon-button.is-danger:focus-visible,
.operation-dialog .portal-inline-editor .operation-period-actions .operation-icon-button.is-danger:hover,
.operation-dialog .portal-inline-editor .operation-period-actions .operation-icon-button.is-danger:focus-visible {
    background: #fca5a5;
    color: #991b1b;
    box-shadow: none;
}

.operation-dialog .portal-inline-editor .operation-period-actions .operation-icon-button.is-save {
    background: #dcfce7;
    color: #166534;
}

.operation-dialog .portal-inline-editor .operation-period-actions .operation-icon-button.is-save:hover,
.operation-dialog .portal-inline-editor .operation-period-actions .operation-icon-button.is-save:focus-visible {
    background: #bbf7d0;
    color: #14532d;
    box-shadow: none;
}

.operation-period-actions button:disabled {
    cursor: not-allowed;
}

.operation-dialog-section[hidden] {
    display: none !important;
}

.legacy-operation-grid[hidden] {
    display: none !important;
}

@media (max-width: 900px) {
    .restaurant-portal-page {
        display: block;
        height: auto;
        overflow: visible;
    }

    .portal-main {
        height: auto;
        overflow: visible;
        padding: 0 1rem 1rem;
    }

    .portal-topbar,
    .hero-card,
    .billing-hero,
    .operation-intro,
    .catalog-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .operation-actions {
        justify-content: stretch;
    }

    .operation-actions a,
    .catalog-actions a {
        justify-content: center;
    }

    .catalog-actions {
        justify-content: stretch;
    }

    .hero-card {
        display: flex;
    }

    .hero-cover img {
        height: 180px;
    }

    .module-grid,
    .operation-card-deck,
    .reservation-summary-grid,
    .loyalty-summary,
    .orders-summary-grid,
    .reservations-summary-grid,
    .customers-summary-grid,
    .catalog-summary-grid,
    .catalog-filter-panel,
    .catalog-filter-panel.compact,
    .orders-filter-panel,
    .reservations-filter-panel,
    .customers-filter-panel,
    .settings-form,
    .settings-grid,
    .insight-grid,
    .operation-grid,
    .prep-grid,
    .dual-list,
    .dual-table,
    .readiness-panel,
    .readiness-list,
    .metric-grid,
    .portal-panel-grid,
    .portal-grid.two,
    .portal-form-grid,
    .portal-inline-editor,
    .catalog-product-editor,
    .catalog-product-metrics,
    .catalog-product-selects,
    .catalog-table-row,
    .catalog-table-row.category-row,
    .catalog-table.groups .catalog-table-row,
    .weekly-menu-grid,
    .partner-link-grid,
    .performance-summary {
        grid-template-columns: 1fr;
    }

    .operation-dialog {
        width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
        border-radius: 24px;
    }

    .operation-dialog-panel {
        max-height: calc(100vh - 1rem);
    }

    .operation-dialog-body {
        max-height: calc(100vh - 96px);
    }

    .operation-block-layout {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .settings-main-panel,
    .settings-side-panel,
    .settings-form>.partner-links-panel {
        grid-column: auto;
        grid-row: auto;
    }

    .partner-link-card,
    .settings-side-panel,
    .settings-side-panel>.eyebrow,
    .settings-side-panel>h3,
    .settings-side-panel .cover-preview,
    .settings-media-column,
    .settings-controls-column,
    .settings-side-panel .settings-grid.compact,
    .settings-side-panel .toggle-stack,
    .settings-side-panel .settings-note,
    .settings-side-panel .save-button,
    .settings-field-name,
    .settings-field-phone,
    .settings-field-email,
    .settings-field-address,
    .settings-field-postal,
    .settings-field-city,
    .settings-field-country {
        grid-template-columns: 1fr;
        grid-column: auto;
        grid-row: auto;
    }

    .partner-link-card>.partner-link-copy,
    .partner-link-copy {
        grid-template-columns: 1fr;
        grid-column: auto;
    }

    .partner-link-copy-label {
        justify-content: flex-start;
        min-height: auto;
        padding: 0.45rem 0.65rem;
    }

    .operation-rest-layout {
        grid-template-columns: 1fr;
    }

    .operation-period-layout {
        grid-template-columns: 1fr;
    }

    .operation-block-form-card {
        padding-right: 0;
        padding-bottom: 1.2rem;
        border-right: 0;
        border-bottom: 1px solid rgba(226, 232, 240, 0.95);
    }

    .operation-block-title-row,
    .operation-block-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .operation-block-title-row {
        flex-direction: column;
    }

    .operation-secondary-button,
    .operation-block-item button:not(.operation-icon-button),
    .operation-rest-item button:not(.operation-icon-button) {
        width: 100%;
    }

    .operation-rest-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .operation-special-tabs {
        display: flex;
        width: 100%;
    }

    .operation-special-tabs button {
        flex: 1;
    }

    .operation-dialog .operation-special-item {
        grid-template-columns: 1fr;
    }

    .operation-block-item .operation-icon-button,
    .operation-rest-item .operation-icon-button,
    .operation-dialog .operation-special-item .operation-icon-button,
    .operation-period-actions .operation-icon-button {
        width: 44px;
        min-width: 44px;
        height: 44px;
        justify-self: end;
    }

    .operation-dialog .operation-period-create,
    .operation-dialog .operation-period-row {
        grid-template-columns: 1fr;
    }

    .operation-period-actions {
        justify-content: stretch;
    }

    .operation-period-actions button {
        flex: 1;
    }

    .catalog-main-tabs,
    .catalog-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .catalog-sticky-header {
        margin: 0;
        padding: 0.35rem;
        border-radius: 16px;
    }

    .catalog-title-row {
        align-items: stretch;
        flex-direction: column;
    }

    .catalog-title-actions {
        align-items: stretch;
        flex-direction: column;
        margin-left: 0;
    }

    .catalog-restaurant-picker {
        min-width: 0;
    }

    .catalog-main-tabs,
    .catalog-category-tabs {
        flex-direction: row;
        overflow-x: auto;
    }

    .catalog-toolbar {
        align-items: center;
        flex-direction: row;
    }

    .catalog-toolbar-actions {
        align-items: center;
    }

    .catalog-toolbar-actions span {
        display: none;
    }

    .catalog-filter-shell {
        margin-top: 0.9rem;
    }

    .catalog-filter-panel.compact {
        grid-template-columns: 1fr;
        padding: 0.75rem;
    }

    .catalog-add-new-button {
        padding-inline: 0.85rem;
    }

    .catalog-product-grid {
        grid-template-columns: 1fr;
    }

    .catalog-product-modal .modal-body {
        padding: 1.4rem 1rem 0;
    }

    .catalog-form-row-top,
    .catalog-form-row-values,
    .catalog-form-row-bottom {
        grid-template-columns: 1fr;
    }

    .catalog-form-row-top .catalog-counter {
        grid-row: 2;
    }

    .catalog-product-type-field {
        gap: 0.75rem;
    }

    .catalog-form-footer {
        margin: 0 -1rem;
    }

    .catalog-product-card {
        grid-template-columns: 1fr;
        padding: 0.85rem;
        border-radius: 18px;
    }

    .catalog-product-body {
        grid-template-columns: 1fr;
    }

    .catalog-product-body>label:not(.full):not(.catalog-product-type),
    .catalog-product-body>.catalog-product-type,
    .catalog-product-body>.catalog-description-field,
    .catalog-product-body>.catalog-product-name-field {
        grid-column: 1;
    }

    .catalog-product-body>label:not(.full):not(.catalog-product-type):not(.catalog-description-field) {
        padding-right: 0;
    }

    .catalog-product-selects {
        grid-template-columns: 1fr;
    }

    .catalog-product-card .catalog-product-selects {
        grid-template-columns: 1fr;
    }

    .catalog-product-body>.catalog-product-type {
        position: static;
        width: 100%;
    }

    .catalog-product-thumb {
        grid-row: auto;
        width: 100%;
    }

    .catalog-product-thumb img {
        width: 100%;
        height: 190px;
    }

    .catalog-editor-actions {
        grid-column: 1;
    }

    .catalog-action-icon.save {
        flex: 1;
    }

    .catalog-groups-popover {
        left: 0;
        width: 100%;
    }

    .catalog-yield-info.compact {
        grid-template-columns: 1fr;
    }

    .panel-heading,
    .catalog-product-row,
    .top-product-row {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .performance-actions {
        justify-content: stretch;
    }

    .performance-actions>* {
        width: 100%;
    }

    .export-link {
        justify-content: center;
    }

    .top-product-row {
        gap: 0.55rem;
    }

    .span-2 {
        grid-column: auto;
    }

    .span-wide {
        grid-column: auto;
    }
}

@media (max-width: 900px) {
    .catalog-products-layout {
        grid-template-columns: 1fr;
    }

    .catalog-category-rail {
        position: static;
        display: block;
        max-height: none;
        padding: 0.6rem;
        overflow: hidden;
    }

    .catalog-category-rail__header {
        padding-bottom: 0.55rem;
    }

    .catalog-category-rail .catalog-category-tabs {
        display: flex;
        gap: 0.45rem;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
    }

    .catalog-category-rail .catalog-category-tabs::-webkit-scrollbar {
        display: none;
    }

    .catalog-category-rail .catalog-category-tabs a {
        flex: 0 0 auto;
        grid-template-columns: auto auto 10px;
        min-height: 44px;
        padding: 0.55rem 0.7rem;
    }

    .catalog-list-header {
        align-items: flex-end;
        padding: 0.9rem;
    }

    .catalog-products-main .catalog-filter-panel.compact {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .catalog-products-main .catalog-search-field {
        grid-column: 1 / -1;
    }

    .catalog-products-main .catalog-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }

    .catalog-product-summary {
        grid-template-columns: 56px minmax(0, 1fr) auto 40px;
        gap: 0.65rem;
        min-height: 78px;
        padding: 0.65rem 0.75rem;
    }

    .catalog-product-summary__image {
        width: 56px;
        height: 56px;
    }

    .catalog-product-summary__copy>small,
    .catalog-product-summary__meta,
    .catalog-product-summary__status {
        display: none;
    }

    .catalog-product-editor-panel {
        width: 100%;
    }

    .catalog-product-editor-scroll>.catalog-product-thumb,
    .catalog-product-editor-scroll>.catalog-product-thumb img {
        min-height: 210px;
        height: 210px;
    }
}

@media (max-width: 560px) {
    .catalog-products-main .catalog-filter-panel.compact {
        grid-template-columns: 1fr;
    }

    .catalog-products-main .catalog-search-field,
    .catalog-products-main .catalog-filter-actions {
        grid-column: 1;
    }

    .catalog-products-main .catalog-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .catalog-list-header {
        align-items: stretch;
        flex-direction: column;
    }

    .catalog-list-header .catalog-add-new-button {
        width: 100%;
    }

    .catalog-product-summary {
        grid-template-columns: 54px minmax(0, 1fr) 38px;
    }

    .catalog-product-summary__value {
        grid-column: 2;
        justify-items: start;
    }

    .catalog-product-summary__edit {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .catalog-product-editor-header {
        min-height: 72px;
        padding: 0.8rem 1rem;
    }

    .catalog-product-editor-scroll {
        padding-inline: 1rem;
    }

    .catalog-product-editor-scroll .catalog-product-metrics,
    .catalog-product-editor-scroll .catalog-product-selects {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .catalog-product-drawer__backdrop,
    .catalog-product-editor-panel {
        transition: none;
    }
}

.customers-dialog[open] {
    display: flex;
    flex-direction: column;
}

.customers-dialog[open] .customers-create-form {
    flex: 1 1 auto;
    min-height: 0;
}

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

    .customers-filter-panel {
        grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
    }

    .customers-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

@media (max-width: 720px) {
    .customers-summary-grid,
    .customers-filter-panel,
    .customers-create-form {
        grid-template-columns: 1fr;
    }

    .customers-filter-actions,
    .customers-dialog__actions {
        grid-column: 1;
    }

    .customers-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .customers-dialog {
        width: calc(100vw - 1rem);
        max-height: calc(100dvh - 1rem);
        border-radius: 18px;
    }

    .customers-dialog__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .customers-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .customers-pagination__controls {
        overflow-x: auto;
        padding-bottom: 0.2rem;
    }
}
