:root {
    --bg: #f7f8f4;
    --surface: #ffffff;
    --surface-soft: #fff8ef;
    --ink: #17211f;
    --muted: #64716d;
    --line: #dde5dd;
    --primary: #087f73;
    --primary-dark: #07534d;
    --primary-soft: #ddf5ed;
    --accent: #ef6f4d;
    --accent-dark: #b9472e;
    --gold: #d69a2d;
    --mint: #69c6a6;
    --whatsapp: #159b7d;
    --danger: #b42318;
    --success: #167448;
    --shadow: 0 18px 50px rgba(16, 32, 29, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, rgba(255, 248, 239, 0.9) 0, rgba(247, 248, 244, 0.98) 320px),
        repeating-linear-gradient(135deg, rgba(8, 127, 115, 0.04) 0 1px, transparent 1px 18px),
        var(--bg);
    color: var(--ink);
    font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

body.public-shell {
    min-height: 100vh;
}

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

.topbar {
    align-items: center;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(8, 83, 77, 0.1);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    box-shadow: 0 12px 35px rgba(16, 32, 29, 0.07);
    backdrop-filter: blur(14px);
    min-height: 68px;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    line-height: 0;
}

.brand img {
    display: block;
    height: 50px;
    width: auto;
}

.topbar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.topbar nav a {
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    padding: 8px 10px;
}

.topbar nav a:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.page {
    margin: 0 auto;
    max-width: 1180px;
    padding: 32px 20px 56px;
}

.hero,
.dashboard-hero {
    align-items: center;
    background:
        linear-gradient(135deg, rgba(12, 63, 58, 0.98) 0%, rgba(8, 127, 115, 0.94) 52%, rgba(239, 111, 77, 0.9) 100%),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 34px);
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 18px;
    box-shadow: var(--shadow);
    color: #fff;
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr 280px;
    margin-bottom: 24px;
    min-height: 260px;
    overflow: hidden;
    padding: 38px;
    position: relative;
}

.hero::after,
.dashboard-hero::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
    content: "";
    height: 100%;
    position: absolute;
    right: 18%;
    top: 0;
    transform: skewX(-18deg);
    width: 86px;
}

.compact-hero {
    min-height: 180px;
}

.hero h1,
.dashboard-hero h1 {
    font-size: 46px;
    font-weight: 900;
    line-height: 1.08;
    margin: 0 0 14px;
    max-width: 760px;
}

.hero p,
.dashboard-hero p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
    margin: 0;
    max-width: 680px;
}

.hero-panel {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    display: grid;
    gap: 10px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.hero-panel span {
    color: #edf7f5;
    display: block;
}

.eyebrow {
    color: #ffe0a7;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.panel {
    background: var(--surface);
    border: 1px solid rgba(8, 83, 77, 0.09);
    border-radius: 16px;
    box-shadow: 0 16px 42px rgba(16, 32, 29, 0.07);
    margin-bottom: 20px;
    padding: 24px;
}

.panel h1,
.panel h2,
.panel h3 {
    color: var(--primary-dark);
    letter-spacing: 0;
    margin-top: 0;
}

.form-grid {
    display: grid;
    gap: 18px;
}

.grid {
    display: grid;
    gap: 16px;
}

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

label {
    color: var(--muted);
    display: grid;
    font-size: 14px;
    font-weight: 700;
    gap: 7px;
    margin-bottom: 14px;
}

input,
select,
textarea {
    background: #fbfdfa;
    border: 1px solid #cfddd5;
    border-radius: 10px;
    color: var(--ink);
    font: inherit;
    min-height: 42px;
    padding: 10px 12px;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(8, 127, 115, 0.12);
    outline: none;
}

textarea {
    resize: vertical;
}

.check {
    align-items: flex-start;
    display: flex;
    gap: 10px;
}

.check input {
    margin-top: 4px;
    min-height: auto;
    width: auto;
}

.button {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.button.primary {
    background: linear-gradient(135deg, var(--primary), var(--mint));
    box-shadow: 0 10px 22px rgba(8, 127, 115, 0.22);
    color: #fff;
}

.button.primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-1px);
}

.button.whatsapp {
    background: linear-gradient(135deg, var(--whatsapp), #36c795);
    box-shadow: 0 10px 22px rgba(21, 155, 125, 0.2);
    color: #fff;
    margin-right: 8px;
}

.button.ghost {
    background: #fff;
    border-color: rgba(8, 83, 77, 0.16);
    color: var(--primary-dark);
}

.button.ghost:hover {
    background: var(--primary-soft);
}

.button.danger {
    background: #fff;
    border-color: rgba(180, 35, 24, 0.24);
    color: var(--danger);
}

.button.danger:hover {
    background: #fff0ee;
}

.alert {
    border-radius: 12px;
    font-weight: 700;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.alert.success {
    background: #dcfce7;
    color: var(--success);
}

.alert.error {
    background: #fee2e2;
    color: var(--danger);
}

.centered,
.auth-card {
    margin-left: auto;
    margin-right: auto;
    max-width: 520px;
}

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

table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
}

td small {
    color: var(--muted);
    display: block;
}

.badge {
    background: var(--primary-soft);
    border-radius: 999px;
    color: var(--primary-dark);
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    padding: 5px 9px;
}

.metric-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.metric {
    background: linear-gradient(180deg, #fff, #fbfdfa);
    border: 1px solid rgba(8, 83, 77, 0.1);
    border-radius: 16px;
    box-shadow: 0 14px 32px rgba(16, 32, 29, 0.06);
    padding: 18px;
}

.restaurant-choice {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.restaurant-showcase {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(238, 251, 245, 0.84)),
        repeating-linear-gradient(135deg, rgba(8, 127, 115, 0.04) 0 1px, transparent 1px 18px);
}

.restaurant-showcase-grid {
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 0;
}

.restaurant-option {
    align-items: center;
    background: linear-gradient(180deg, #fff, #fffaf5);
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 14px;
    cursor: pointer;
    display: grid;
    gap: 12px;
    grid-template-columns: auto 52px 1fr;
    margin: 0;
    padding: 14px;
}

.restaurant-showcase-card {
    align-items: stretch;
    background: #fff;
    border-radius: 20px;
    gap: 16px;
    grid-template-columns: 1fr;
    min-height: 100%;
    overflow: hidden;
    padding: 18px;
    position: relative;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.restaurant-showcase-card:hover {
    border-color: rgba(8, 127, 115, 0.45);
    box-shadow: 0 16px 34px rgba(16, 32, 29, 0.1);
}

.restaurant-showcase-card input {
    opacity: 0;
    position: absolute;
    right: 14px;
    top: 14px;
}

.restaurant-option input {
    min-height: auto;
    width: auto;
}

.restaurant-option:has(input:checked) {
    background: linear-gradient(180deg, #ffffff, #eefbf5);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(8, 127, 115, 0.12), 0 16px 36px rgba(8, 83, 77, 0.1);
}

.restaurant-showcase-card.selected,
.restaurant-showcase-card:has(input:checked) {
    background: linear-gradient(180deg, #ffffff, #f0fbf7);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(8, 127, 115, 0.14), 0 22px 48px rgba(8, 83, 77, 0.18);
    transform: translateY(-2px);
}

.restaurant-showcase-card.selected::after,
.restaurant-showcase-card:has(input:checked)::after {
    align-items: center;
    background: var(--primary);
    border-radius: 999px;
    color: #fff;
    content: "Selecionado";
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    padding: 7px 10px;
    position: absolute;
    right: 14px;
    top: 14px;
}

.restaurant-option strong,
.restaurant-card h2 {
    color: var(--ink);
}

.restaurant-showcase-content {
    display: grid;
    gap: 8px;
}

.restaurant-showcase-content strong {
    color: var(--primary-dark);
    font-size: 21px;
    line-height: 1.12;
}

.restaurant-showcase-content small {
    color: var(--muted);
    font-weight: 700;
}

.restaurant-option em {
    color: var(--muted);
    display: block;
    font-style: normal;
    font-weight: 500;
}

.restaurant-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.restaurant-meta span,
.restaurant-message,
.restaurant-select-label,
.selected-restaurant-pill {
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    padding: 7px 10px;
}

.restaurant-meta span {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.restaurant-message {
    background: #fff3dc;
    color: var(--accent-dark);
    line-height: 1.25;
}

.restaurant-select-label {
    background: #fff;
    border: 1px solid rgba(8, 83, 77, 0.18);
    color: var(--primary-dark);
    display: inline-flex;
    justify-content: center;
    margin-top: 4px;
}

.restaurant-showcase-card.selected .restaurant-select-label,
.restaurant-showcase-card:has(input:checked) .restaurant-select-label {
    background: var(--primary-dark);
    color: #fff;
}

.selected-restaurant-pill {
    background: var(--primary-dark);
    color: var(--primary-dark);
    color: #fff;
}

.selected-restaurant-summary {
    align-items: center;
    background: linear-gradient(135deg, var(--primary-soft), #fff8ef);
    border: 1px solid rgba(8, 83, 77, 0.14);
    border-radius: 18px;
    display: grid;
    gap: 14px;
    grid-template-columns: 76px 1fr;
    margin-bottom: 18px;
    padding: 14px;
}

.no-restaurant-selected .reservation-details-panel {
    border-color: rgba(214, 154, 45, 0.36);
    box-shadow: 0 0 0 4px rgba(214, 154, 45, 0.12), 0 16px 42px rgba(16, 32, 29, 0.07);
}

.required-mark,
.optional-mark {
    border-radius: 999px;
    display: inline-flex;
    font-size: 10px;
    font-weight: 900;
    margin-left: 6px;
    padding: 3px 7px;
    text-transform: uppercase;
    width: fit-content;
}

.required-mark {
    background: #fff3dc;
    color: var(--accent-dark);
}

.optional-mark {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.selected-restaurant-summary strong {
    color: var(--primary-dark);
    display: block;
    font-size: 18px;
}

.selected-restaurant-summary p,
.selected-restaurant-summary small {
    color: var(--muted);
    display: block;
    margin: 2px 0;
}

.selected-restaurant-logo {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 16px;
    display: flex;
    height: 76px;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 76px;
}

.selected-restaurant-logo img {
    height: 100%;
    object-fit: contain;
    padding: 6px;
    width: 100%;
}

.selected-restaurant-logo strong {
    font-size: 26px;
    font-weight: 900;
}

.restaurant-stack {
    display: grid;
    gap: 14px;
}

.restaurant-card {
    align-items: center;
    background: linear-gradient(180deg, #fff, #fffaf5);
    border: 1px solid rgba(8, 83, 77, 0.1);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(16, 32, 29, 0.06);
    display: grid;
    gap: 16px;
    grid-template-columns: 72px 1fr auto;
    padding: 16px;
}

.restaurant-card h2 {
    font-size: 18px;
    margin: 0 0 4px;
}

.restaurant-card p {
    color: var(--muted);
    margin: 2px 0;
}

.restaurant-logo {
    align-items: center;
    background: linear-gradient(135deg, var(--primary-soft), #fff3dc);
    border: 1px solid #c8e5df;
    border-radius: 16px;
    color: var(--primary-dark);
    display: flex;
    font-size: 26px;
    font-weight: 900;
    height: 64px;
    justify-content: center;
    overflow: hidden;
    position: relative;
    width: 64px;
}

.restaurant-logo.small {
    font-size: 18px;
    height: 48px;
    width: 48px;
}

.restaurant-logo.featured {
    border-radius: 22px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 12px 26px rgba(16, 32, 29, 0.08);
    font-size: 40px;
    height: 150px;
    width: 100%;
}

.restaurant-logo img {
    background: #fff;
    height: 100%;
    object-fit: contain;
    position: absolute;
    inset: 0;
    width: 100%;
}

.restaurant-logo.featured img {
    padding: 8px;
}

.restaurant-logo strong {
    display: block;
}

.logo-preview-row {
    align-items: center;
    background: var(--primary-soft);
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 14px;
    color: var(--primary-dark);
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
}

.logo-preview-row p {
    font-weight: 800;
    margin: 0;
}

.smtp-box {
    background: linear-gradient(180deg, #fff, #fbfdfa);
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 16px;
    display: grid;
    gap: 12px;
    margin: 18px 0;
    padding: 16px;
}

.smtp-box .section-title {
    margin-bottom: 0;
}

.email-test-form {
    border-top: 1px solid rgba(8, 83, 77, 0.12);
    margin-top: 14px;
    padding-top: 14px;
}

.maintenance-list {
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 16px;
    display: grid;
    margin-bottom: 14px;
    max-height: 520px;
    overflow: auto;
}

.maintenance-row {
    align-items: center;
    border-bottom: 1px solid rgba(8, 83, 77, 0.08);
    display: grid;
    gap: 10px;
    grid-template-columns: auto 1fr;
    margin: 0;
    padding: 12px;
}

.maintenance-row:last-child {
    border-bottom: 0;
}

.maintenance-row strong,
.maintenance-row em {
    display: block;
}

.maintenance-row em {
    color: var(--muted);
    font-style: normal;
    font-weight: 600;
}

.metric span {
    color: var(--muted);
    display: block;
    font-weight: 700;
}

.metric strong {
    display: block;
    font-size: 34px;
    margin-top: 6px;
}

.agenda-panel {
    overflow: hidden;
}

.agenda-title {
    align-items: flex-start;
}

.agenda-toolbar {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.segmented-control {
    background: rgba(8, 83, 77, 0.07);
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 999px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
}

.segmented-control a {
    border-radius: 999px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 900;
    padding: 8px 12px;
}

.segmented-control a.active {
    background: var(--primary-dark);
    color: #fff;
    box-shadow: 0 8px 18px rgba(7, 83, 77, 0.18);
}

.week-agenda {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(7, minmax(138px, 1fr));
    overflow-x: auto;
    padding-bottom: 6px;
}

.agenda-range-fortnight,
.agenda-range-month {
    grid-template-columns: repeat(7, minmax(128px, 1fr));
}

.agenda-day {
    background: linear-gradient(180deg, #fff, #fbfdfa);
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 16px;
    min-height: 250px;
    padding: 12px;
}

.agenda-day.today {
    border-color: rgba(214, 154, 45, 0.7);
    box-shadow: inset 0 0 0 2px rgba(214, 154, 45, 0.18);
}

.agenda-day-header {
    align-items: center;
    border-bottom: 1px solid rgba(8, 83, 77, 0.1);
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 8px;
}

.agenda-day-header strong {
    color: var(--primary-dark);
    font-size: 14px;
}

.agenda-day-header span,
.empty-day {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.agenda-items {
    display: grid;
    gap: 8px;
}

.agenda-reservation {
    background: #fff;
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-left: 5px solid var(--primary);
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(16, 32, 29, 0.07);
    display: grid;
    gap: 2px;
    padding: 9px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.agenda-reservation-main {
    display: grid;
    gap: 2px;
}

.agenda-reservation:hover {
    box-shadow: 0 14px 26px rgba(16, 32, 29, 0.11);
    transform: translateY(-1px);
}

.agenda-reservation.status-pending {
    border-left-color: var(--gold);
}

.agenda-reservation.status-cancelled,
.agenda-reservation.status-no_show {
    border-left-color: var(--danger);
}

.agenda-reservation.status-confirmed,
.agenda-reservation.status-approved,
.agenda-reservation.status-completed {
    border-left-color: var(--success);
}

.agenda-reservation.status-no_show {
    border-left-color: var(--accent);
}

.agenda-time {
    color: var(--gold);
    font-size: 12px;
    font-weight: 900;
}

.agenda-reservation strong {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.2;
}

.agenda-reservation em,
.agenda-reservation small {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.agenda-actions {
    align-items: center;
    border-top: 1px solid rgba(8, 83, 77, 0.1);
    display: grid;
    gap: 5px;
    grid-template-columns: 1fr;
    margin-top: 7px;
    padding-top: 7px;
}

.agenda-actions form {
    margin: 0;
}

.agenda-actions button,
.agenda-actions a {
    background: var(--primary-soft);
    border: 0;
    border-radius: 999px;
    color: var(--primary-dark);
    cursor: pointer;
    display: block;
    font-family: inherit;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    padding: 8px 6px;
    text-align: center;
    width: 100%;
}

.agenda-actions a {
    background: rgba(21, 155, 125, 0.12);
    color: var(--whatsapp);
}

.occupancy-hero {
    grid-template-columns: 1fr auto;
}

.print-button {
    position: relative;
    z-index: 1;
}

.occupancy-filters {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 18px;
}

.month-calendar {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.month-calendar > strong {
    color: var(--primary-dark);
    font-size: 12px;
    text-align: center;
    text-transform: uppercase;
}

.calendar-day {
    background: linear-gradient(180deg, #fff, #fbfdfa);
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 14px;
    display: grid;
    gap: 6px;
    min-height: 76px;
    padding: 10px;
}

.calendar-day span {
    color: var(--ink);
    font-weight: 900;
}

.calendar-day em {
    background: var(--primary-soft);
    border-radius: 999px;
    color: var(--primary-dark);
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
    padding: 4px 7px;
    width: fit-content;
}

.calendar-day.muted {
    opacity: 0.45;
}

.calendar-day.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(8, 127, 115, 0.12);
}

.calendar-day.has-reservations {
    background: linear-gradient(180deg, #fff, #fff8ef);
}

.occupancy-workspace {
    align-items: start;
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(320px, 390px) 1fr;
}

.occupancy-sidebar {
    position: sticky;
    top: 86px;
}

.occupancy-reservations {
    max-height: calc(100vh - 180px);
    overflow: auto;
    padding-right: 4px;
}

.occupancy-reservation-card {
    background: linear-gradient(180deg, #fff, #fbfdfa);
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(16, 32, 29, 0.06);
    display: grid;
    gap: 12px;
    padding: 14px;
}

.extra-table-drawer {
    background: #fff;
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 16px;
    margin-bottom: 14px;
    overflow: hidden;
}

.extra-table-drawer summary {
    color: var(--primary-dark);
    cursor: pointer;
    font-weight: 800;
    list-style-position: inside;
    padding: 12px 14px;
}

.extra-table-drawer[open] summary {
    border-bottom: 1px solid rgba(8, 83, 77, 0.1);
}

.clear-layout-form {
    margin-bottom: 12px;
}

.clear-layout-form .button {
    width: 100%;
}

.extra-table-form {
    background: linear-gradient(180deg, #fffaf5, #eefbf5);
    border: 0;
    border-radius: 0;
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 14px;
}

.extra-table-form h3 {
    color: var(--primary-dark);
    margin: 0;
}

.daily-table-tools {
    background: #fff;
    border-top: 1px solid rgba(8, 83, 77, 0.1);
    display: grid;
    gap: 10px;
    padding: 14px;
}

.daily-table-tools h3 {
    color: var(--primary-dark);
    margin: 0;
}

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

.daily-table-list form {
    align-items: center;
    background: #fbfdfa;
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 12px;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr auto;
    padding: 9px;
}

.daily-table-list form.is-hidden {
    background: #fff3dc;
}

.daily-table-list span {
    display: grid;
    gap: 2px;
}

.daily-table-list em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.occupancy-reservation-card strong {
    color: var(--primary-dark);
}

.capacity-meter {
    align-items: center;
    border-radius: 14px;
    display: grid;
    gap: 4px;
    grid-template-columns: 1fr auto;
    padding: 12px;
}

.capacity-meter span,
.capacity-meter em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.capacity-meter strong {
    font-size: 24px;
    grid-row: span 2;
}

.capacity-meter.ok {
    background: #dcfce7;
}

.capacity-meter.attention {
    background: #fff3dc;
}

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

.table-picker label {
    background: #fff;
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 12px;
    cursor: pointer;
    display: grid;
    gap: 3px;
    grid-template-columns: auto 1fr;
    margin: 0;
    padding: 9px;
}

.table-picker label:has(input:checked) {
    background: var(--primary-soft);
    border-color: var(--primary);
}

.table-picker input {
    grid-row: span 3;
    margin-top: 2px;
    min-height: auto;
    width: auto;
}

.table-picker span {
    color: var(--ink);
    font-weight: 900;
}

.table-picker em,
.table-picker small {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.table-picker .taken:not(:has(input:checked)) {
    border-color: rgba(180, 35, 24, 0.2);
}

.occupancy-map-panel {
    overflow: auto;
}

.occupancy-map {
    min-width: 720px;
}

.occupancy-table.assigned .table-surface {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 248, 239, 0.98)),
        linear-gradient(135deg, rgba(214, 154, 45, 0.22), rgba(239, 111, 77, 0.16));
    border-color: var(--gold);
}

.occupancy-table.extra-table .table-surface {
    border-color: var(--accent);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 243, 220, 0.96)),
        linear-gradient(135deg, rgba(239, 111, 77, 0.16), rgba(214, 154, 45, 0.16));
}

.extra-table-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.table-reservation-name,
.table-reservation-size {
    display: block;
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-reservation-name {
    color: var(--primary-dark);
    font-size: 11px;
    font-weight: 900;
}

.table-reservation-size {
    color: var(--accent-dark);
    font-size: 10px;
    font-weight: 800;
}

.section-title {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.filters,
.inline-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.config-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.config-tabs a,
.config-tabs button {
    background: #fff;
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 999px;
    color: var(--primary-dark);
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
    padding: 10px 14px;
}

.config-tabs button.active {
    background: var(--primary-dark);
    color: #fff;
}

.config-section {
    display: none;
}

.config-section.active {
    display: block;
}

.settings-grid.config-section.active {
    display: grid;
}

html[data-config-tab="ocasioes"] #questionario > .panel:first-child {
    display: none;
}

.layout-console {
    overflow: hidden;
}

.muted-line {
    color: var(--muted);
    margin: 4px 0 0;
}

.environment-switcher label {
    margin: 0;
    min-width: 320px;
}

.layout-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 18px;
}

.layout-summary div {
    background: linear-gradient(180deg, #fff, #fff8ef);
    border: 1px solid rgba(8, 83, 77, 0.1);
    border-radius: 16px;
    padding: 14px;
}

.layout-summary span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.layout-summary strong {
    color: var(--primary-dark);
    display: block;
    font-size: 18px;
    margin-top: 4px;
}

.layout-actions {
    align-items: start;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.config-card {
    background: linear-gradient(180deg, #fff, #fbfdfa);
    border: 1px solid rgba(8, 83, 77, 0.1);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(16, 32, 29, 0.05);
    padding: 18px;
}

.accent-card {
    background: linear-gradient(180deg, #fffaf5, #eefbf5);
}

.card-heading {
    align-items: center;
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.card-heading span {
    align-items: center;
    background: var(--primary-soft);
    border-radius: 12px;
    color: var(--primary-dark);
    display: inline-flex;
    font-size: 12px;
    font-weight: 900;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.card-heading h3,
.map-heading h3 {
    margin: 0;
}

.map-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-top: 22px;
}

.filters a {
    background: #fff;
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    padding: 7px 10px;
}

.reservation-list {
    display: grid;
    gap: 14px;
}

.reservation-card {
    align-items: start;
    background: linear-gradient(180deg, #fff, #fbfdfa);
    border: 1px solid rgba(8, 83, 77, 0.1);
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(16, 32, 29, 0.06);
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 220px;
    padding: 16px;
}

.reservation-card h2 {
    margin-bottom: 4px;
}

.reservation-card p {
    color: var(--muted);
    margin: 4px 0;
}

.customer-reservation-card {
    grid-template-columns: 1fr;
}

.reservation-card-title {
    align-items: start;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.feedback-box,
.feedback-summary,
.empty-state {
    background: linear-gradient(180deg, #fffaf5, #eefbf5);
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 16px;
    display: grid;
    gap: 12px;
    margin-top: 14px;
    padding: 16px;
}

.feedback-box h3 {
    margin-bottom: 4px;
}

.feedback-box p,
.feedback-summary p,
.feedback-sent,
.empty-state p {
    color: var(--muted);
    margin: 0;
}

.feedback-summary strong,
.feedback-summary span,
.feedback-summary small {
    display: block;
}

.feedback-summary span {
    color: var(--primary-dark);
    font-weight: 900;
}

.feedback-summary small,
.feedback-sent {
    font-size: 13px;
    font-weight: 700;
}

.status-form {
    display: grid;
    gap: 10px;
}

.table-editor-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 18px;
}

.table-editor-card {
    background: linear-gradient(180deg, #fff, #fbfdfa);
    border: 1px solid rgba(8, 83, 77, 0.1);
    border-radius: 16px;
    padding: 16px;
}

.table-editor-card h3 {
    margin-top: 0;
}

.table-editor-title {
    margin-top: 24px;
}

.table-card-title {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 12px;
}

.table-card-title h3 {
    margin: 0;
}

.table-title-group {
    align-items: center;
    display: flex;
    gap: 10px;
}

.table-shape-preview {
    background: linear-gradient(135deg, #fff, var(--primary-soft));
    border: 2px solid var(--primary);
    box-shadow: 0 8px 18px rgba(16, 32, 29, 0.08);
    display: inline-block;
    height: 34px;
    width: 34px;
}

.table-shape-preview.square {
    border-radius: 9px;
}

.table-shape-preview.rectangle {
    border-radius: 10px;
    width: 46px;
}

.table-shape-preview.round {
    border-radius: 999px;
}

.table-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.pill-list span {
    background: var(--primary-soft);
    border-radius: 999px;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
    padding: 8px 10px;
}

.editable-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.editable-card {
    background: linear-gradient(180deg, #fff, #fbfdfa);
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 16px;
    display: grid;
    gap: 12px;
    padding: 14px;
}

.hours-grid {
    display: grid;
    gap: 14px;
}

.hours-day {
    background: linear-gradient(180deg, #fff, #fbfdfa);
    border: 1px solid rgba(8, 83, 77, 0.12);
    border-radius: 16px;
    display: grid;
    gap: 12px;
    padding: 16px;
}

.hours-day h3 {
    margin: 0;
}

.hours-period {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: 90px repeat(3, minmax(0, 1fr));
}

.hours-period strong {
    color: var(--primary-dark);
    padding-bottom: 11px;
}

.compact-list {
    color: var(--muted);
    margin: 16px 0 0;
    padding-left: 18px;
}

.floor-map {
    background-color: #f2f6f1;
    background-image:
        linear-gradient(#dbe2e7 1px, transparent 1px),
        linear-gradient(90deg, #dbe2e7 1px, transparent 1px);
    background-size: 32px 32px;
    border: 1px solid rgba(8, 83, 77, 0.16);
    border-radius: 16px;
    margin-top: 18px;
    max-width: 100%;
    overflow: hidden;
    position: relative;
}

.map-table {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--ink);
    cursor: move;
    display: flex;
    justify-items: center;
    justify-content: center;
    padding: 0;
    position: absolute;
    touch-action: none;
}

.map-table.layout-square {
    height: 96px;
    width: 118px;
}

.map-table.layout-rectangle {
    height: 112px;
    width: 154px;
}

.map-table.layout-round {
    height: 126px;
    width: 126px;
}

.table-surface {
    align-items: center;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(221, 245, 237, 0.94)),
        linear-gradient(135deg, rgba(239, 111, 77, 0.18), rgba(8, 127, 115, 0.12));
    border: 2px solid var(--primary);
    box-shadow: 0 12px 24px rgba(16, 32, 29, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
    left: 50%;
    min-width: 0;
    position: absolute;
    text-align: center;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.layout-square .table-surface {
    border-radius: 16px;
    height: 66px;
    width: 66px;
}

.layout-rectangle .table-surface {
    border-radius: 18px;
    height: 64px;
    width: 102px;
}

.layout-round .table-surface {
    border-radius: 999px;
    height: 76px;
    width: 76px;
}

.table-surface strong {
    font-size: 14px;
    line-height: 1;
}

.table-surface em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.1;
}

.chair {
    background:
        radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.8), transparent 30%),
        linear-gradient(145deg, var(--accent), var(--gold));
    border: 2px solid #fff;
    border-radius: 9px;
    box-shadow: 0 7px 14px rgba(16, 32, 29, 0.16);
    height: 18px;
    position: absolute;
    width: 18px;
    z-index: 1;
}

.layout-square .chair-1,
.layout-square .chair-3,
.layout-square .chair-5,
.layout-square .chair-7 {
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.layout-square .chair-2,
.layout-square .chair-4,
.layout-square .chair-6,
.layout-square .chair-8 {
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.layout-rectangle .chair-1,
.layout-rectangle .chair-5 {
    left: 46px;
    top: 6px;
}

.layout-rectangle .chair-2,
.layout-rectangle .chair-6 {
    right: 46px;
    top: 6px;
}

.layout-rectangle .chair-3,
.layout-rectangle .chair-7 {
    bottom: 6px;
    left: 46px;
}

.layout-rectangle .chair-4,
.layout-rectangle .chair-8 {
    bottom: 6px;
    right: 46px;
}

.layout-round .chair-1 {
    left: 54px;
    top: 2px;
}

.layout-round .chair-2 {
    right: 14px;
    top: 20px;
}

.layout-round .chair-3 {
    right: 14px;
    bottom: 20px;
}

.layout-round .chair-4 {
    bottom: 2px;
    left: 54px;
}

.layout-round .chair-5 {
    bottom: 20px;
    left: 14px;
}

.layout-round .chair-6 {
    left: 14px;
    top: 20px;
}

.layout-round .chair-7 {
    left: 54px;
    top: 2px;
}

.layout-round .chair-8 {
    bottom: 2px;
    left: 54px;
}

.map-table.dragging {
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    z-index: 5;
}

.map-table.inactive {
    opacity: 0.46;
}

.birthday-fields {
    display: none;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 820px) {
    body {
        background:
            linear-gradient(180deg, rgba(8, 83, 77, 0.12) 0, rgba(247, 248, 244, 0.98) 210px),
            var(--bg);
    }

    .topbar {
        align-items: center;
        border-bottom: 0;
        border-radius: 0 0 22px 22px;
        flex-direction: row;
        min-height: 62px;
        padding: 12px 18px;
    }

    .brand {
        max-width: 190px;
    }

    .brand img {
        height: auto;
        max-width: 190px;
    }

    .topbar nav {
        align-items: center;
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid rgba(8, 83, 77, 0.12);
        border-radius: 22px 22px 0 0;
        bottom: 0;
        box-shadow: 0 -14px 34px rgba(16, 32, 29, 0.14);
        display: grid;
        gap: 4px;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        left: 0;
        padding: 8px 10px max(8px, env(safe-area-inset-bottom));
        position: fixed;
        right: 0;
        z-index: 30;
    }

    .topbar nav a {
        align-items: center;
        border-radius: 16px;
        display: flex;
        font-size: 12px;
        justify-content: center;
        line-height: 1.15;
        min-height: 42px;
        overflow-wrap: anywhere;
        padding: 8px 6px;
        text-align: center;
        word-break: normal;
    }

    .topbar nav a:hover {
        background: var(--primary-soft);
    }

    .public-shell .topbar {
        align-items: center;
        gap: 10px;
    }

    .public-shell .topbar nav {
        background: transparent;
        border: 0;
        border-radius: 0;
        bottom: auto;
        box-shadow: none;
        display: flex;
        gap: 6px;
        left: auto;
        padding: 0;
        position: static;
        right: auto;
    }

    .public-shell .topbar nav a {
        background: var(--primary-soft);
        color: var(--primary-dark);
        font-size: 12px;
        min-height: 36px;
        padding: 8px 10px;
        width: auto;
    }

    .page {
        max-width: 520px;
        padding: 18px 14px 132px;
    }

    .public-shell .page {
        padding-bottom: 104px;
    }

    .hero,
    .dashboard-hero,
    .grid.two,
    .settings-grid,
    .layout-actions,
    .layout-summary,
    .occupancy-hero,
    .occupancy-filters,
    .occupancy-workspace,
    .reservation-card,
    .metric-grid,
    .restaurant-choice,
    .restaurant-showcase-grid,
    .restaurant-card,
    .table-editor-grid {
        grid-template-columns: 1fr;
    }

    .hero,
    .dashboard-hero {
        border-radius: 24px;
        gap: 18px;
        margin-bottom: 16px;
        min-height: 0;
        padding: 24px 20px;
    }

    .hero h1,
    .dashboard-hero h1 {
        font-size: 28px;
        line-height: 1.12;
        margin-bottom: 10px;
    }

    .hero p,
    .dashboard-hero p {
        font-size: 15px;
    }

    .hero-panel {
        border-radius: 18px;
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .panel {
        border-radius: 22px;
        box-shadow: 0 14px 32px rgba(16, 32, 29, 0.08);
        margin-bottom: 14px;
        padding: 18px;
    }

    .panel h1,
    .panel h2 {
        font-size: 22px;
    }

    label {
        font-size: 13px;
        margin-bottom: 12px;
    }

    input,
    select,
    textarea {
        border-radius: 14px;
        font-size: 16px;
        min-height: 50px;
        padding: 13px 14px;
    }

    .button {
        min-height: 52px;
        width: 100%;
    }

    .button.whatsapp {
        margin-bottom: 10px;
        margin-right: 0;
    }

    .restaurant-option {
        border-radius: 18px;
        grid-template-columns: auto 48px 1fr;
        padding: 14px;
    }

    .restaurant-showcase-card {
        grid-template-columns: 118px 1fr;
        padding: 14px;
    }

    .restaurant-showcase-card input {
        right: 10px;
        top: 10px;
    }

    .restaurant-logo.featured {
        border-radius: 18px;
        height: 118px;
        width: 118px;
    }

    .restaurant-showcase-content strong {
        font-size: 18px;
    }

    .restaurant-card {
        align-items: start;
        border-radius: 20px;
    }

    .restaurant-card .button {
        width: 100%;
    }

    .metric-grid {
        gap: 10px;
    }

    .metric {
        border-radius: 18px;
        padding: 16px;
    }

    .metric strong {
        font-size: 28px;
    }

    .reservation-card {
        border-radius: 20px;
        padding: 16px;
    }

    .reservation-card-title {
        flex-direction: column;
    }

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

    .table-wrap {
        border: 1px solid rgba(8, 83, 77, 0.1);
        border-radius: 16px;
    }

    table {
        min-width: 640px;
    }

    .section-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .environment-switcher,
    .environment-switcher label {
        width: 100%;
        min-width: 0;
    }

    .hours-period {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .hours-period strong {
        padding-bottom: 0;
    }

    .floor-map {
        min-height: 360px;
    }

    .month-calendar {
        gap: 6px;
    }

    .calendar-day {
        border-radius: 12px;
        min-height: 58px;
        padding: 7px;
    }

    .calendar-day em {
        font-size: 10px;
        padding: 3px 5px;
    }

    .occupancy-sidebar {
        position: static;
    }

    .occupancy-reservations {
        max-height: none;
    }

    .table-picker {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .topbar nav a {
        font-size: 11px;
    }

    .restaurant-showcase-card {
        grid-template-columns: 96px 1fr;
    }

    .restaurant-logo.featured {
        height: 96px;
        width: 96px;
    }

    .restaurant-meta,
    .restaurant-message {
        display: none;
    }

    .hero::after,
    .dashboard-hero::after {
        display: none;
    }
}

@media print {
    body {
        background: #fff;
    }

    .no-print,
    .topbar,
    .alert,
    .occupancy-hero,
    .occupancy-sidebar {
        display: none !important;
    }

    .page {
        max-width: none;
        padding: 0;
    }

    .occupancy-workspace,
    .occupancy-map-panel {
        display: block;
    }

    .panel {
        border: 0;
        box-shadow: none;
        padding: 0;
    }

    .print-title {
        display: block;
        margin-bottom: 12px;
    }

    .floor-map {
        break-inside: avoid;
        max-width: 100%;
        transform: scale(0.9);
        transform-origin: top left;
    }
}
