:root {
    --primary: #ff6b35;
    --primary-dark: #e95522;
    --primary-soft: #fff1eb;

    --success: #198754;
    --success-soft: #eaf8f0;

    --danger: #dc3545;
    --danger-soft: #fff0f1;

    --warning: #b7791f;
    --warning-soft: #fff8e6;

    --text: #202124;
    --muted: #6b7280;
    --border: #e5e7eb;
    --surface: #ffffff;
    --background: #f6f7f9;

    --shadow:
        0 16px 35px
        rgba(15, 23, 42, 0.08);

    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family: "Poppins", Arial, sans-serif;

    color: var(--text);
    background: var(--background);
}

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* =========================================================
   PAGE LAYOUT
   ========================================================= */

.onboarding-page {
    display: grid;
    grid-template-columns: 310px minmax(0, 1fr);
    min-height: 100vh;
}

.setup-sidebar {
    position: sticky;
    top: 0;

    display: flex;
    flex-direction: column;

    min-height: 100vh;
    height: 100vh;

    padding: 34px 28px;

    color: #ffffff;

    background:
        linear-gradient(
            160deg,
            #1f2937 0%,
            #111827 70%
        );

    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    flex: 0 0 50px;

    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-image {
    display: block;

    width: 50px;
    height: 50px;

    object-fit: contain;
}

.sidebar-brand h1 {
    margin: 0;

    color: #ffffff;

    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.1;

    white-space: nowrap;
}

.sidebar-brand-copy {
    min-width: 0;
}

.sidebar-brand .brand-food {
    color: #f78021;
}

.sidebar-brand .brand-connect {
    color: #4caf50;
}

.sidebar-brand p {
    margin: 5px 0 0;

    color: #aeb7c6;

    font-size: 0.82rem;
    line-height: 1.2;

    white-space: nowrap;
}

.setup-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;

    margin-top: 38px;
}

.progress-item {
    position: relative;

    display: flex;
    align-items: flex-start;
    gap: 13px;

    padding: 14px;

    border-radius: 14px;

    color: #9ca3af;

    transition:
        color 0.18s ease,
        background 0.18s ease;
}

.progress-item.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.progress-number {
    flex: 0 0 auto;

    display: grid;
    place-items: center;

    width: 30px;
    height: 30px;

    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;

    font-size: 0.82rem;
    font-weight: 700;
}

.progress-item.active .progress-number {
    border-color: var(--primary);
    background: var(--primary);
}

.progress-item.completed {
    color: #d1fae5;
}

.progress-item.completed .progress-number {
    position: relative;

    color: transparent;
    border-color: var(--success);
    background: var(--success);
}

.progress-item.completed .progress-number::after {
    content: "✓";

    position: absolute;
    inset: 0;

    display: grid;
    place-items: center;

    color: #ffffff;

    font-size: 0.83rem;
    font-weight: 900;
}

.progress-item strong,
.progress-item small {
    display: block;
}

.progress-item strong {
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.progress-item small {
    color: inherit;

    font-size: 0.76rem;
    line-height: 1.4;

    opacity: 0.78;
}

.sidebar-note {
    margin-top: auto;
    padding: 18px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 15px;

    background: rgba(255, 255, 255, 0.06);
}

.sidebar-note strong {
    font-size: 0.9rem;
}

.sidebar-note p {
    margin: 8px 0 0;

    color: #c4cad4;

    font-size: 0.8rem;
    line-height: 1.55;
}

.setup-main {
    width: min(100%, 1050px);
    margin: 0 auto;
    padding: 42px 48px 70px;
}

.setup-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 28px;

    margin-bottom: 28px;
}

.eyebrow {
    margin: 0 0 8px;

    color: var(--primary);

    font-size: 0.77rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.setup-header h2 {
    margin: 0;

    font-size: clamp(
        1.85rem,
        3vw,
        2.55rem
    );

    line-height: 1.15;
}

.header-description {
    max-width: 680px;
    margin: 12px 0 0;

    color: var(--muted);

    line-height: 1.65;
}

.logout-button {
    flex: 0 0 auto;

    padding: 10px 16px;

    border: 1px solid var(--border);
    border-radius: 10px;

    color: var(--text);
    background: var(--surface);
}

.logout-button:hover:not(:disabled) {
    border-color: #cbd0d8;
    background: #f9fafb;
}

/* =========================================================
   STATUS AND LOADING
   ========================================================= */

.status-banner {
    margin-bottom: 24px;
    padding: 15px 18px;

    border: 1px solid transparent;
    border-radius: 12px;

    line-height: 1.55;
}

.status-banner.status-draft {
    color: #8a5711;
    border-color: #f4d58b;
    background: var(--warning-soft);
}

.status-banner.status-submitted {
    color: #166534;
    border-color: #b7e5c9;
    background: var(--success-soft);
}

.status-banner.status-rejected {
    color: #9f1d2a;
    border-color: #f0bbc1;
    background: var(--danger-soft);
}

.loading-state {
    display: grid;
    justify-items: center;
    gap: 16px;

    padding: 80px 20px;

    color: var(--muted);
}

.loading-spinner {
    width: 42px;
    height: 42px;

    border: 4px solid #e7e9ed;
    border-top-color: var(--primary);
    border-radius: 50%;

    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================
   WIZARD STATUS
   ========================================================= */

.wizard-status {
    margin-bottom: 24px;
    padding: 16px 18px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: var(--surface);
}

.wizard-status-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 11px;
}

.wizard-status-text strong {
    color: var(--primary);
    font-size: 0.85rem;
}

.wizard-status-text span {
    color: var(--muted);
    font-size: 0.84rem;
}

.wizard-progress-track {
    width: 100%;
    height: 7px;

    overflow: hidden;

    border-radius: 999px;
    background: #e9ebef;
}

.wizard-progress-bar {
    width: 20%;
    height: 100%;

    border-radius: inherit;
    background: var(--primary);

    transition:
        width 0.25s ease;
}

/* =========================================================
   FORM
   ========================================================= */

.restaurant-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;

    animation: wizard-step-in 0.22s ease;
}

@keyframes wizard-step-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    padding: 30px;

    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    background: var(--surface);
    box-shadow: var(--shadow);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    margin-bottom: 24px;
}

.section-number {
    flex: 0 0 auto;

    display: grid;
    place-items: center;

    width: 38px;
    height: 38px;

    border-radius: 12px;

    color: var(--primary-dark);
    background: var(--primary-soft);

    font-weight: 800;
}

.section-heading h3 {
    margin: 1px 0 7px;

    font-size: 1.18rem;
}

.section-heading p {
    margin: 0;

    color: var(--muted);

    line-height: 1.5;
}

.required-note {
    margin-bottom: 22px;
    padding: 11px 13px;

    border: 1px solid #f3d7ca;
    border-radius: 10px;

    color: #8b4a30;
    background: #fff8f4;

    font-size: 0.81rem;
    line-height: 1.5;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 21px;
}

.form-group {
    min-width: 0;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    font-size: 0.88rem;
    font-weight: 700;
}

.required {
    color: var(--danger);
}

.optional-label {
    margin-left: 4px;

    color: var(--muted);

    font-size: 0.76rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;

    border: 1px solid #d7dbe1;
    border-radius: var(--radius-sm);

    outline: none;

    color: var(--text);
    background: #ffffff;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}

.form-group input,
.form-group select {
    height: 47px;
    padding: 0 13px;
}

.form-group textarea {
    min-height: 100px;
    padding: 13px;

    resize: vertical;

    line-height: 1.5;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(255, 107, 53, 0.13);
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid {
    border-color: var(--danger);

    box-shadow:
        0 0 0 3px
        rgba(220, 53, 69, 0.08);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
    color: #6b7280;
    background: #f3f4f6;
}

.form-group > small,
.textarea-meta {
    display: block;

    margin-top: 7px;

    color: var(--muted);

    font-size: 0.77rem;
    line-height: 1.45;
}

.field-error,
.section-error {
    display: block;

    min-height: 18px;
    margin-top: 7px;

    color: var(--danger) !important;

    font-size: 0.78rem;
    line-height: 1.4;
}

.textarea-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

/* =========================================================
   BUSINESS HOURS
   ========================================================= */

.hours-toolbar {
    display: flex;
    justify-content: flex-end;

    margin: -4px 0 14px;
}

.business-hours {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 14px;
}

.business-hours.invalid-section {
    border-color: var(--danger);

    box-shadow:
        0 0 0 3px
        rgba(220, 53, 69, 0.08);
}

.hours-row {
    display: grid;
    grid-template-columns:
        minmax(100px, 1fr)
        minmax(130px, 1fr)
        minmax(130px, 1fr)
        110px;

    align-items: center;
    gap: 16px;

    padding: 15px 17px;

    border-bottom: 1px solid var(--border);
}

.hours-row:last-child {
    border-bottom: none;
}

.hours-row.invalid-row {
    background: var(--danger-soft);
}

.hours-day {
    font-weight: 750;
}

.hours-input {
    height: 42px;
    padding: 0 10px;

    border: 1px solid #d7dbe1;
    border-radius: 9px;

    outline: none;

    background: #ffffff;
}

.hours-input:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(255, 107, 53, 0.1);
}

.hours-input.invalid {
    border-color: var(--danger);
}

.hours-input:disabled {
    color: #9ca3af;
    background: #f3f4f6;
}

.closed-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: var(--muted);

    font-size: 0.84rem;
    font-weight: 600;
}

.closed-label input {
    width: 17px;
    height: 17px;

    accent-color: var(--primary);
}

/* =========================================================
   SERVICE OPTIONS
   ========================================================= */

.service-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.service-options.invalid-section .service-card {
    border-color: #ef9aa3;
}

.service-card {
    position: relative;

    display: flex;
    align-items: flex-start;
    gap: 12px;

    min-height: 128px;
    padding: 18px;

    border: 1px solid var(--border);
    border-radius: 14px;

    cursor: pointer;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease;
}

.service-card:hover {
    transform: translateY(-2px);
    border-color: #f6a385;
}

.service-card:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.service-card input {
    position: absolute;

    opacity: 0;
    pointer-events: none;
}

.service-check {
    flex: 0 0 auto;

    display: grid;
    place-items: center;

    width: 22px;
    height: 22px;

    border: 2px solid #cbd0d8;
    border-radius: 7px;

    background: #ffffff;
}

.service-card input:checked + .service-check {
    border-color: var(--primary);
    background: var(--primary);
}

.service-card input:checked + .service-check::after {
    content: "✓";

    color: #ffffff;

    font-size: 0.78rem;
    font-weight: 900;
}

.service-card input:disabled ~ .service-content,
.service-card input:disabled + .service-check {
    opacity: 0.7;
}

.service-content strong,
.service-content small {
    display: block;
}

.service-content strong {
    margin-bottom: 8px;

    font-size: 0.92rem;
}

.service-content small {
    color: var(--muted);

    line-height: 1.55;
}

.pricing-grid {
    margin-top: 25px;
}

.money-input {
    display: flex;
    align-items: center;

    border: 1px solid #d7dbe1;
    border-radius: 10px;

    background: #ffffff;
}

.money-input:focus-within {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(255, 107, 53, 0.13);
}

.money-input span {
    padding-left: 13px;

    color: var(--muted);

    font-weight: 700;
}

.money-input input {
    border: none;
    box-shadow: none !important;
}

/* =========================================================
   CUSTOMER RESTAURANT PREVIEW
   ========================================================= */

.customer-preview-section {
    margin-bottom: 24px;
}

.customer-preview-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;

    margin-bottom: 14px;
}

.customer-preview-label {
    display: block;

    margin-bottom: 5px;

    color: var(--primary);

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.customer-preview-heading h4 {
    margin: 0;

    font-size: 1.05rem;
}

.customer-preview-heading p {
    margin: 6px 0 0;

    color: var(--muted);

    font-size: 0.84rem;
    line-height: 1.5;
}

.preview-only-badge {
    flex: 0 0 auto;

    padding: 7px 11px;

    border: 1px solid #f5b397;
    border-radius: 999px;

    color: var(--primary-dark);
    background: var(--primary-soft);

    font-size: 0.74rem;
    font-weight: 800;
}

.customer-restaurant-preview {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 18px 36px
        rgba(15, 23, 42, 0.09);
}

.customer-preview-top {
    display: flex;
    align-items: center;
    gap: 20px;

    padding: 24px;

    border-bottom: 1px solid var(--border);

    background:
        linear-gradient(
            135deg,
            #fff8f4 0%,
            #ffffff 62%
        );
}

.customer-preview-logo {
    flex: 0 0 116px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 116px;
    height: 116px;

    overflow: hidden;

    border: 4px solid #ffffff;
    border-radius: 50%;

    background: var(--primary-soft);

    box-shadow:
        0 8px 22px
        rgba(15, 23, 42, 0.13);
}

.customer-preview-logo span {
    color: var(--primary-dark);

    font-size: 28px;
    font-weight: 800;
}

.customer-preview-logo img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.customer-preview-identity {
    flex: 1;
    min-width: 0;
}

.customer-preview-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.customer-preview-title-row h3 {
    margin: 0;

    font-size: clamp(
        1.35rem,
        3vw,
        1.8rem
    );

    line-height: 1.2;
    overflow-wrap: anywhere;
}

.customer-preview-title-row p {
    margin: 7px 0 0;

    color: var(--muted);

    font-size: 0.92rem;
}

.customer-preview-status {
    flex: 0 0 auto;

    padding: 7px 11px;

    border-radius: 999px;

    color: #166534;
    background: var(--success-soft);

    font-size: 0.75rem;
    font-weight: 800;
}

.customer-preview-status.closed {
    color: #9f1d2a;
    background: var(--danger-soft);
}

.customer-preview-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 16px;

    margin-top: 16px;

    color: #4b5563;

    font-size: 0.82rem;
    font-weight: 600;
}

.customer-preview-content {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(230px, 290px);

    gap: 22px;

    padding: 24px;
}

.customer-preview-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.customer-preview-block {
    min-width: 0;
}

.customer-preview-block-label {
    display: block;

    margin-bottom: 7px;

    color: #4b5563;

    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.customer-preview-block p {
    margin: 0;

    color: var(--text);

    font-size: 0.9rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.customer-preview-services {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.customer-preview-services span {
    padding: 8px 11px;

    border: 1px solid #f5b397;
    border-radius: 999px;

    color: var(--primary-dark);
    background: var(--primary-soft);

    font-size: 0.76rem;
    font-weight: 700;
}

.customer-preview-order-card {
    align-self: start;

    padding: 18px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: #fafbfc;
}

.customer-preview-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    padding: 11px 0;

    border-bottom: 1px solid var(--border);

    font-size: 0.84rem;
}

.customer-preview-price-row:first-child {
    padding-top: 0;
}

.customer-preview-price-row span {
    color: var(--muted);
}

.customer-preview-price-row strong {
    text-align: right;
}

.customer-preview-order-button {
    width: 100%;
    min-height: 44px;
    margin-top: 17px;

    border: none;
    border-radius: 10px;

    color: #ffffff;
    background: var(--primary);

    font-weight: 800;
}

.customer-preview-order-button:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.customer-preview-order-card small {
    display: block;

    margin-top: 10px;

    color: var(--muted);

    font-size: 0.73rem;
    line-height: 1.45;
    text-align: center;
}

/* =========================================================
   REVIEW APPLICATION
   ========================================================= */

.application-review {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.review-group {
    padding: 18px;

    border: 1px solid var(--border);
    border-radius: 14px;

    background: #fbfcfd;
}

.review-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    margin-bottom: 14px;
}

.review-group-header h4 {
    margin: 0;

    font-size: 1rem;
}

.review-edit-button {
    min-height: 34px;
    padding: 0 12px;

    border: 1px solid #d7dbe1;
    border-radius: 8px;

    color: var(--text);
    background: #ffffff;

    font-size: 0.78rem;
    font-weight: 700;
}

.review-edit-button:hover:not(:disabled) {
    border-color: var(--primary);

    color: var(--primary-dark);
    background: var(--primary-soft);
}

.review-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;

    margin: 0;
}

.review-list > div {
    padding: 12px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: #ffffff;
}

.review-list-full {
    grid-column: 1 / -1;
}

.review-list dt {
    margin-bottom: 5px;

    color: var(--muted);

    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.review-list dd {
    margin: 0;

    color: var(--text);

    font-size: 0.88rem;
    line-height: 1.45;

    overflow-wrap: anywhere;
}

.review-hours {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.review-hour-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;

    padding: 11px 12px;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: #ffffff;

    font-size: 0.82rem;
}

.review-hour-item strong {
    font-weight: 700;
}

.review-hour-item span {
    color: var(--muted);
    text-align: right;
}

.review-services {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.review-service-tag {
    padding: 8px 11px;

    border: 1px solid #f5b397;
    border-radius: 999px;

    color: var(--primary-dark);
    background: var(--primary-soft);

    font-size: 0.78rem;
    font-weight: 700;
}

/* =========================================================
   SUBMISSION
   ========================================================= */

.review-notice {
    margin-top: 20px;
    padding: 18px;

    border: 1px solid #f2db9c;
    border-radius: 13px;

    color: #785218;
    background: var(--warning-soft);
}

.review-notice strong {
    display: block;

    margin-bottom: 7px;
}

.review-notice p {
    margin: 0;

    line-height: 1.6;
}

.confirmation-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-top: 20px;

    color: var(--text);

    font-size: 0.9rem;
    line-height: 1.55;
}

.confirmation-check.invalid-confirmation {
    padding: 12px;

    border: 1px solid #ef9aa3;
    border-radius: 10px;

    background: var(--danger-soft);
}

.confirmation-check input {
    flex: 0 0 auto;

    width: 18px;
    height: 18px;
    margin-top: 2px;

    accent-color: var(--primary);
}

/* =========================================================
   SUBMITTED APPLICATION STATE
   ========================================================= */

.submitted-state {
    display: flex;
    align-items: flex-start;
    gap: 18px;

    margin-top: 22px;
    padding: 22px;

    border: 1px solid #b7e5c9;
    border-radius: 15px;

    background: var(--success-soft);
}

.submitted-state-icon {
    flex: 0 0 auto;

    display: grid;
    place-items: center;

    width: 48px;
    height: 48px;

    border-radius: 50%;

    color: #ffffff;
    background: var(--success);

    font-size: 1.25rem;
    font-weight: 900;
}

.submitted-state-content {
    flex: 1;
    min-width: 0;
}

.submitted-state-content h4 {
    margin: 0 0 8px;

    color: #166534;

    font-size: 1.08rem;
}

.submitted-state-content > p {
    margin: 0;

    color: #38634b;

    line-height: 1.6;
}

.submitted-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    margin-top: 18px;
    padding: 13px 15px;

    border: 1px solid #b7e5c9;
    border-radius: 11px;

    background: rgba(255, 255, 255, 0.72);
}

.submitted-status-row span {
    color: var(--muted);

    font-size: 0.85rem;
}

.submitted-status-row strong {
    color: var(--success);

    font-size: 0.88rem;
}

.submitted-state-note {
    margin-top: 15px !important;

    font-size: 0.84rem;
}

/* =========================================================
   FORM ACTIONS
   ========================================================= */

.form-actions {
    position: sticky;
    bottom: 16px;
    z-index: 5;

    display: flex;
    justify-content: space-between;
    gap: 12px;

    padding: 16px;

    border: 1px solid var(--border);
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.94);

    box-shadow:
        0 12px 30px
        rgba(15, 23, 42, 0.12);

    backdrop-filter: blur(10px);
}

.form-actions-left,
.form-actions-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-actions-left {
    margin-right: auto;
}

.form-actions-right {
    justify-content: flex-end;
}

.primary-button,
.secondary-button {
    min-height: 44px;
    padding: 0 20px;

    border-radius: 10px;

    font-weight: 750;

    transition:
        transform 0.16s ease,
        opacity 0.16s ease,
        background 0.16s ease,
        border-color 0.16s ease;
}

.primary-button {
    border: 1px solid var(--primary);

    color: #ffffff;
    background: var(--primary);
}

.primary-button:hover:not(:disabled) {
    transform: translateY(-1px);

    background: var(--primary-dark);
}

.secondary-button {
    border: 1px solid #d7dbe1;

    color: var(--text);
    background: #ffffff;
}

.secondary-button:hover:not(:disabled) {
    background: #f8f9fb;
}

.small-button {
    min-height: 38px;
    padding: 0 14px;

    font-size: 0.8rem;
}

.primary-button:disabled,
.secondary-button:disabled,
.logout-button:disabled,
.review-edit-button:disabled {
    cursor: not-allowed;

    opacity: 0.55;
}

.primary-button:disabled {
    border-color: #f4b49d;

    background: #f4b49d;
}

/* =========================================================
   TOAST
   ========================================================= */

.toast-container {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 50;

    display: flex;
    flex-direction: column;
    gap: 10px;

    width: min(360px, calc(100vw - 44px));
}

.toast {
    padding: 15px 17px;

    border: 1px solid var(--border);
    border-radius: 12px;

    background: #ffffff;

    box-shadow:
        0 14px 32px
        rgba(15, 23, 42, 0.17);

    animation: toast-in 0.25s ease;
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast strong {
    display: block;

    margin-bottom: 4px;
}

.toast p {
    margin: 0;

    color: var(--muted);

    line-height: 1.45;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   MODAL
   ========================================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;

    display: grid;
    place-items: center;

    padding: 20px;

    background: rgba(17, 24, 39, 0.58);

    backdrop-filter: blur(5px);
}

.modal-card {
    width: min(430px, 100%);

    padding: 34px;

    border-radius: 20px;

    text-align: center;

    background: #ffffff;

    box-shadow:
        0 28px 65px
        rgba(15, 23, 42, 0.24);
}

.modal-icon {
    display: grid;
    place-items: center;

    width: 64px;
    height: 64px;
    margin: 0 auto 18px;

    border-radius: 50%;

    color: #ffffff;
    background: var(--success);

    font-size: 1.8rem;
    font-weight: 900;
}

.modal-card h3 {
    margin: 0;

    font-size: 1.35rem;
}

.modal-card p {
    margin: 12px 0 24px;

    color: var(--muted);

    line-height: 1.6;
}

/* =========================================================
   RESTAURANT LOGO
   ========================================================= */

.logo-upload-field {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border: 1px solid #e3e7ee;
    border-radius: 14px;
    background: #f8fafc;
}

.logo-preview {
    width: 110px;
    height: 110px;
    flex: 0 0 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #d9dee8;
    border-radius: 50%;
    background: #ffffff;
}

.logo-preview-placeholder {
    font-size: 28px;
    font-weight: 700;
    color: #667085;
}

.logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-upload-controls {
    display: flex;
    flex: 1;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
}

.logo-upload-controls input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.logo-select-button,
.logo-remove-button {
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.logo-select-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #111827;
    color: #ffffff;
}

.logo-select-button:hover {
    background: #1f2937;
}

.logo-remove-button {
    border: 1px solid #d0d5dd;
    background: #ffffff;
    color: #b42318;
}

.logo-remove-button:hover {
    border-color: #f04438;
    background: #fff5f5;
}

.logo-select-button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.review-logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.review-logo {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e1e5ec;
    border-radius: 50%;
    background: #f8fafc;
}

.review-logo span {
    font-size: 24px;
    font-weight: 700;
    color: #667085;
}

.review-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 980px) {
    .onboarding-page {
        grid-template-columns: 1fr;
    }

    .setup-sidebar {
        position: static;

        min-height: auto;
        height: auto;

        padding: 22px;
    }

    .setup-progress,
    .sidebar-note {
        display: none;
    }

    .setup-main {
        padding: 32px 24px 60px;
    }
}

@media (max-width: 760px) {

    .customer-preview-content {
    grid-template-columns: 1fr;
}

.customer-preview-order-card {
    width: 100%;
}

    .setup-header {
        flex-direction: column;
    }

    .form-section {
        padding: 22px;
    }

    .form-grid,
    .service-options,
    .review-list,
    .review-hours {
        grid-template-columns: 1fr;
    }

    .review-list-full {
        grid-column: auto;
    }

    .hours-row {
        grid-template-columns: 1fr 1fr;
        gap: 11px;
    }

    .hours-day {
        grid-column: 1 / -1;
    }

    .closed-label {
        justify-self: end;
    }
}

@media (max-width: 520px) {
    .setup-main {
        padding: 24px 14px 55px;
    }

    .customer-preview-heading {
    flex-direction: column;
}

.customer-preview-top {
    align-items: flex-start;
    flex-direction: column;

    padding: 19px 16px;
}

.customer-preview-logo {
    width: 96px;
    height: 96px;
    flex-basis: 96px;
}

.customer-preview-title-row {
    flex-direction: column;
}

.customer-preview-content {
    padding: 19px 16px;
}

    .setup-header h2 {
        font-size: 1.75rem;
    }

    .wizard-status-text {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .form-section {
        padding: 19px 16px;

        border-radius: 15px;
    }

    .section-heading {
        gap: 10px;
    }

    .required-note {
        font-size: 0.78rem;
    }

    .textarea-meta {
        flex-direction: column;
        gap: 5px;
    }

    .hours-row {
        grid-template-columns: 1fr;
    }

    .hours-day,
    .closed-label {
        grid-column: auto;
    }

    .closed-label {
        justify-self: start;
    }

    .review-group-header {
        align-items: flex-start;
    }

    .review-hour-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .review-hour-item span {
        text-align: left;
    }

    .submitted-state {
        flex-direction: column;
    }

    .submitted-status-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .form-actions {
        bottom: 8px;

        flex-direction: column;
    }

    .form-actions-left,
    .form-actions-right {
        width: 100%;

        flex-direction: column;
    }

    .form-actions-left {
        order: 2;
    }

    .form-actions-right {
        order: 1;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }
}

.real-customer-preview-action {
    margin-bottom: 22px;
    padding: 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    border: 1px solid #f5b397;
    border-radius: 14px;

    background: var(--primary-soft);
}

.real-customer-preview-action strong {
    display: block;

    color: var(--primary-dark);
}

.real-customer-preview-action p {
    margin: 6px 0 0;

    color: var(--muted);

    font-size: 0.84rem;
    line-height: 1.5;
}

@media (max-width: 620px) {
    .real-customer-preview-action {
        align-items: stretch;
        flex-direction: column;
    }

    .real-customer-preview-action button {
        width: 100%;
    }
}

/* VAT / NON-VAT ONBOARDING */
.form-group select {
    width: 100%;
    border: 1px solid #d7dbe1;
    border-radius: var(--radius-sm);
    outline: none;
    color: var(--text);
    background: #ffffff;
}


/* =========================================================
   RESTAURANT VERIFICATION DOCUMENTS
========================================================= */
.verification-documents-card { margin-top: 24px; padding: 22px; border: 1px solid #e5e7eb; border-radius: 16px; background: #fff; }
.verification-documents-heading { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; margin-bottom:14px; }
.verification-documents-heading h4 { margin:4px 0 6px; font-size:1.05rem; }
.verification-documents-heading p, .verification-privacy-note { margin:0; color:#667085; line-height:1.55; }
.verification-kicker { font-size:.76rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:#667085; }
.verification-required-badge { flex:0 0 auto; padding:7px 10px; border-radius:999px; background:#fff7ed; border:1px solid #fed7aa; font-size:.76rem; font-weight:700; }
.verification-source-note { padding:12px 14px; margin-bottom:16px; border-radius:12px; background:#f8fafc; color:#475467; line-height:1.5; font-size:.9rem; }
.verification-document-grid { display:grid; gap:12px; }
.verification-document-item { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 16px; align-items:center; padding:14px; border:1px solid #eaecf0; border-radius:12px; }
.verification-document-copy { display:flex; flex-direction:column; gap:3px; }
.verification-document-copy span, .verification-file-status { color:#667085; font-size:.85rem; }
.verification-file-status { grid-column:1 / -1; }
.verification-file-status.uploaded { color:#027a48; font-weight:600; }
.verification-file-status.error { color:#b42318; }
.verification-privacy-note { margin-top:12px; font-size:.82rem; }
@media (max-width:700px) { .verification-documents-heading { flex-direction:column; } .verification-document-item { grid-template-columns:1fr; } .verification-upload-button { width:100%; } }


/* =========================================================
   RESTAURANT ONBOARDING THEME
   Scoped to this page so dark mode never leaks into other UI.
   ========================================================= */

html[data-theme="light"] body[data-fc-page="restaurant-setup"] {
    color-scheme: light;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] {
    color-scheme: dark;

    --text: #f5f7fa;
    --muted: #a4acb9;
    --border: #30343b;
    --surface: #181b20;
    --background: #0f1115;

    --primary-soft: #2b1c12;
    --success-soft: rgba(25, 135, 84, 0.16);
    --danger-soft: rgba(220, 53, 69, 0.14);
    --warning-soft: rgba(183, 121, 31, 0.16);

    --shadow: 0 16px 35px rgba(0, 0, 0, 0.28);

    background: var(--background);
    color: var(--text);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .setup-sidebar {
    background: linear-gradient(160deg, #17202d 0%, #0f1724 72%);
    border-right: 1px solid #252b34;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] :is(
    .setup-header h2,
    .section-heading h3,
    .form-group label,
    .hours-day,
    .service-content strong,
    .customer-preview-heading h4,
    .customer-preview-title-row h3,
    .customer-preview-block p,
    .review-group-header h4,
    .review-list dd,
    .review-hour-item strong,
    .modal-card h3,
    .verification-documents-heading h4,
    .delivery-tier-heading strong,
    .delivery-tier-row label
) {
    color: var(--text);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] :is(
    .header-description,
    .section-heading p,
    .form-group > small,
    .textarea-meta,
    .closed-label,
    .service-content small,
    .customer-preview-heading p,
    .customer-preview-title-row p,
    .customer-preview-block-label,
    .customer-preview-order-card small,
    .review-list dt,
    .review-hour-item span,
    .modal-card p,
    .verification-documents-heading p,
    .verification-privacy-note,
    .verification-kicker,
    .verification-document-copy span,
    .verification-file-status,
    .delivery-tier-heading small,
    .unit-input span
) {
    color: var(--muted);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] :is(
    .wizard-status,
    .form-section,
    .review-group,
    .customer-restaurant-preview,
    .customer-preview-order-card,
    .modal-card,
    .verification-documents-card,
    .logo-preview,
    .review-logo
) {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] :is(
    .form-group input,
    .form-group select,
    .form-group textarea,
    .hours-input,
    .money-input,
    .delivery-pricing-panel select,
    .unit-input,
    .delivery-tier-row
) {
    background: #20242a;
    color: var(--text);
    border-color: #343942;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] :is(
    .form-group input,
    .form-group textarea,
    .hours-input
)::placeholder {
    color: #7f8998;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] :is(
    .form-group input:disabled,
    .form-group select:disabled,
    .form-group textarea:disabled,
    .hours-input:disabled
) {
    background: #24282e;
    color: #8f98a6;
    border-color: #343942;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .wizard-progress-track {
    background: #30343b;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .wizard-status-text strong {
    color: #ff974c;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .wizard-status-text span {
    color: var(--muted);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .required-note {
    color: #f7b69c;
    background: rgba(247, 128, 33, 0.09);
    border-color: rgba(247, 128, 33, 0.28);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .status-banner.status-draft {
    color: #f5c56b;
    background: rgba(183, 121, 31, 0.15);
    border-color: rgba(245, 197, 107, 0.32);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .status-banner.status-submitted {
    color: #8ee0ad;
    background: rgba(25, 135, 84, 0.15);
    border-color: rgba(142, 224, 173, 0.28);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .status-banner.status-rejected {
    color: #ff9da5;
    background: rgba(220, 53, 69, 0.14);
    border-color: rgba(255, 157, 165, 0.28);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .status-banner :is(strong, span, p) {
    color: inherit;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .business-hours {
    background: #181b20;
    border-color: var(--border);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .hours-row {
    border-color: var(--border);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .service-card {
    background: #1b1f25;
    color: var(--text);
    border-color: var(--border);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .service-card:hover {
    border-color: rgba(247, 128, 33, 0.50);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .service-card:has(input:checked) {
    background: rgba(247, 128, 33, 0.10);
    border-color: var(--primary);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .service-check {
    background: #20242a;
    border-color: #59616d;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .service-card input:checked + .service-check {
    background: var(--primary);
    border-color: var(--primary);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] :is(
    .logo-upload-field,
    .verification-source-note,
    .delivery-pricing-panel,
    .customer-preview-content,
    .review-list > div
) {
    background: #171a1f;
    color: var(--text);
    border-color: var(--border);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] :is(
    .verification-document-item,
    .customer-preview-top,
    .review-hour-item
) {
    background: #1d2127;
    color: var(--text);
    border-color: var(--border);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .verification-required-badge {
    color: #ffb06d;
    background: rgba(247, 128, 33, 0.10);
    border-color: rgba(247, 128, 33, 0.28);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .verification-source-note {
    color: #c7ced8;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .verification-file-status.uploaded {
    color: #70d99a;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .verification-file-status.error {
    color: #ff9da5;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .form-actions {
    background: rgba(24, 27, 32, 0.96);
    border-color: var(--border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.34);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .secondary-button {
    background: #22262c;
    color: var(--text);
    border-color: #3a4048;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .secondary-button:hover:not(:disabled) {
    background: #2a2f36;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .logo-upload-field {
    background: #171a1f;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .logo-preview {
    background: #20242a;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .logo-preview-placeholder,
html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .review-logo span {
    color: #9ca6b4;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .logo-remove-button {
    background: rgba(220, 38, 38, 0.12);
    color: #ff9da5;
    border-color: rgba(248, 113, 113, 0.28);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .review-delivery-pricing,
html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .real-customer-preview-action {
    background: rgba(247, 128, 33, 0.10);
    color: var(--muted);
    border-color: rgba(247, 128, 33, 0.28);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .real-customer-preview-action strong {
    color: #ff974c;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .modal-overlay {
    background: rgba(0, 0, 0, 0.68);
}

/* Keep the FoodConnect brand identical in both modes. */
body[data-fc-page="restaurant-setup"] .brand-logo-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

body[data-fc-page="restaurant-setup"] .sidebar-brand .brand-food {
    color: #f78021;
}

body[data-fc-page="restaurant-setup"] .sidebar-brand .brand-connect {
    color: #4caf50;
}

/* FoodConnect official brand logo standard */
img[src*="logofoodconnect-Photoroom.png"] {
    width: 50px;
    height: 50px;
    object-fit: contain;
    display: block;
}

/* Keep the logo balanced in smaller navigation areas */
.sidebar img[src*="logofoodconnect-Photoroom.png"],
.admin-sidebar img[src*="logofoodconnect-Photoroom.png"] {
    width: 42px;
    height: 42px;
}

.footer img[src*="logofoodconnect-Photoroom.png"] {
    width: 45px;
    height: 45px;
}

/* =========================================================
   FLEXIBLE DELIVERY PRICING
   ========================================================= */

.delivery-pricing-panel {
    margin-top: 24px;
    padding: 22px;

    border: 1px solid #e3e6eb;
    border-radius: 16px;

    background: #fbfcfd;
}

.delivery-pricing-panel > .form-group {
    margin-bottom: 18px;
}

.delivery-pricing-fields {
    margin-top: 14px;
}

.delivery-pricing-fields.hidden,
.delivery-pricing-panel.hidden {
    display: none !important;
}

.delivery-pricing-panel select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;

    border: 1px solid #d7dbe1;
    border-radius: 10px;

    background: #ffffff;
    color: var(--text);

    font: inherit;
}

.delivery-pricing-panel select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.13);
}

.unit-input {
    min-height: 46px;

    display: flex;
    align-items: center;

    overflow: hidden;

    border: 1px solid #d7dbe1;
    border-radius: 10px;

    background: #ffffff;
}

.unit-input:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.13);
}

.unit-input input {
    flex: 1;
    min-width: 0;
    border: 0 !important;
    box-shadow: none !important;
}

.unit-input span {
    padding: 0 13px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.delivery-tier-heading {
    margin-bottom: 13px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.delivery-tier-heading strong,
.delivery-tier-heading small {
    display: block;
}

.delivery-tier-heading small {
    margin-top: 4px;
    color: var(--muted);
    line-height: 1.45;
}

.delivery-tiers {
    display: grid;
    gap: 10px;
}

.delivery-tier-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;

    padding: 13px;

    border: 1px solid #e3e6eb;
    border-radius: 12px;
    background: #ffffff;
}

.delivery-tier-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.76rem;
    font-weight: 700;
}

.delivery-tier-remove {
    width: 42px;
    height: 42px;

    border: 1px solid #f0c8c8;
    border-radius: 10px;

    background: #fff5f5;
    color: #c83f49;

    cursor: pointer;
}

.delivery-tier-remove:hover,
.delivery-tier-remove:focus-visible {
    background: #ffe8e8;
}

.review-delivery-pricing {
    margin-top: 12px;
    padding: 10px 12px;

    border-radius: 10px;
    background: #fff7ef;
    color: var(--muted);

    font-size: 0.82rem;
    line-height: 1.5;
}

@media (max-width: 650px) {
    .delivery-pricing-panel {
        padding: 16px;
    }

    .delivery-tier-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .delivery-tier-row {
        grid-template-columns: 1fr;
    }

    .delivery-tier-remove {
        width: 100%;
    }
}

html[data-theme="dark"] .delivery-pricing-panel {
    background: #171a1f;
    border-color: #343942;
}

html[data-theme="dark"] .delivery-pricing-panel select,
html[data-theme="dark"] .unit-input,
html[data-theme="dark"] .delivery-tier-row {
    background: #20242a;
    color: #f5f7fa;
    border-color: #343942;
}

html[data-theme="dark"] .review-delivery-pricing {
    background: rgba(247, 128, 33, 0.12);
    color: #c8ced8;
}

html[data-theme="dark"] .delivery-tier-remove {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.32);
    color: #ff9a9f;
}

/* =========================================================
   RESTAURANT SETUP DARK MODE - FINAL CONTRAST GUARD
   Page-specific rules intentionally use higher specificity so
   shared semantic button rules cannot turn controls white.
   ========================================================= */

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .form-actions {
    background: rgba(24, 27, 32, 0.97) !important;
    border-color: #343941 !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38) !important;
    color: #f5f7fa !important;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .form-actions .secondary-button,
html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .verification-upload-button.secondary-button {
    background: #24282e !important;
    border-color: #3a4048 !important;
    color: #f5f7fa !important;
    box-shadow: none !important;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .form-actions .secondary-button:hover:not(:disabled),
html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .verification-upload-button.secondary-button:hover:not(:disabled) {
    background: #2c3138 !important;
    border-color: #4a515b !important;
    color: #ffffff !important;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .form-actions .secondary-button:disabled,
html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .verification-upload-button.secondary-button:disabled {
    background: #20242a !important;
    border-color: #343941 !important;
    color: #7f8998 !important;
    opacity: 1 !important;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .form-actions .primary-button {
    background: #f47c1e !important;
    border-color: #f47c1e !important;
    color: #ffffff !important;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .form-actions .primary-button:hover:not(:disabled) {
    background: #df6810 !important;
    border-color: #df6810 !important;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .form-actions .primary-button:disabled {
    background: rgba(244, 124, 30, 0.22) !important;
    border-color: rgba(244, 124, 30, 0.30) !important;
    color: #d8b49a !important;
    opacity: 1 !important;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .verification-document-item {
    background: #1d2127 !important;
    border-color: #343941 !important;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .verification-document-copy strong {
    color: #f5f7fa !important;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .verification-document-copy span,
html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .verification-file-status {
    color: #a4acb9 !important;
}

/* Keep the sidebar wordmark consistent in both themes. */
body[data-fc-page="restaurant-setup"] .sidebar-brand .brand-logo-image {
    width: 50px !important;
    height: 50px !important;
    object-fit: contain !important;
}

body[data-fc-page="restaurant-setup"] .sidebar-brand h1 {
    font-family: "Poppins", Arial, sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.35px;
}

body[data-fc-page="restaurant-setup"] .sidebar-brand .brand-food {
    color: #f78021 !important;
}

body[data-fc-page="restaurant-setup"] .sidebar-brand .brand-connect {
    color: #4caf50 !important;
}


/* =========================================================
   RESTAURANT SETUP LOGOUT BUTTON - CONTRAST GUARD
   Prevent shared/light hover styles from turning the logout
   control white and making its label unreadable.
   ========================================================= */
body[data-fc-page="restaurant-setup"] .logout-button,
html[data-theme="light"] body[data-fc-page="restaurant-setup"] .logout-button,
html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .logout-button {
    background: var(--fc-danger, #dc2626) !important;
    background-image: none !important;
    border-color: var(--fc-danger, #dc2626) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

body[data-fc-page="restaurant-setup"] .logout-button:hover:not(:disabled),
body[data-fc-page="restaurant-setup"] .logout-button:focus-visible:not(:disabled),
html[data-theme="light"] body[data-fc-page="restaurant-setup"] .logout-button:hover:not(:disabled),
html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .logout-button:hover:not(:disabled) {
    background: var(--fc-danger-hover, #b91c1c) !important;
    background-image: none !important;
    border-color: var(--fc-danger-hover, #b91c1c) !important;
    color: #ffffff !important;
}

body[data-fc-page="restaurant-setup"] .logout-button:focus-visible {
    outline: 3px solid rgba(220, 38, 38, 0.24) !important;
    outline-offset: 2px;
}

body[data-fc-page="restaurant-setup"] .logout-button:disabled {
    background: rgba(220, 38, 38, 0.38) !important;
    border-color: rgba(220, 38, 38, 0.42) !important;
    color: rgba(255, 255, 255, 0.78) !important;
}

/* =========================================================
   PARTNER EMAIL VERIFICATION RECOVERY
   ========================================================= */

.partner-email-verification {
    margin-bottom: 24px;
    padding: 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    border: 1px solid #f3d38a;
    border-radius: 16px;

    background: #fffaf0;
    box-shadow: 0 8px 24px rgba(117, 80, 20, 0.06);
}

.partner-email-verification.hidden {
    display: none;
}

.partner-email-verification-main {
    min-width: 0;

    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.partner-email-verification-icon {
    width: 44px;
    height: 44px;

    display: grid;
    place-items: center;
    flex: 0 0 auto;

    border-radius: 13px;

    background: #fff0c9;
    color: #9a5d00;

    font-size: 1.15rem;
    font-weight: 800;
}

.partner-email-verification-copy {
    min-width: 0;
}

.partner-email-verification-badge {
    display: inline-flex;
    align-items: center;

    margin-bottom: 6px;
    padding: 4px 9px;

    border-radius: 999px;

    background: rgba(154, 93, 0, 0.09);
    color: #855000;

    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.partner-email-verification h3 {
    margin: 0;

    color: #4b350d;
    font-size: 1rem;
    line-height: 1.35;
}

.partner-email-verification p {
    margin: 6px 0 0;

    color: #705727;
    font-size: 0.88rem;
    line-height: 1.6;
}

.partner-email-verification small {
    display: block;
    margin-top: 7px;

    color: #8a6d36;
    font-size: 0.77rem;
    line-height: 1.45;
}

.partner-email-verification-action {
    flex: 0 0 auto;

    min-height: 42px;
    padding: 10px 15px;

    border: 1px solid #f58220;
    border-radius: 11px;

    background: #f58220;
    color: #ffffff;

    font-size: 0.79rem;
    font-weight: 800;
    line-height: 1.35;

    cursor: pointer;

    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease,
        opacity 0.18s ease;
}

.partner-email-verification-action:hover:not(:disabled) {
    background: #dc6810;
    border-color: #dc6810;
    transform: translateY(-1px);
}

.partner-email-verification-action:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none;
}

.partner-email-verification.is-waiting {
    border-color: #bfdbfe;
    background: #f4f8ff;
}

.partner-email-verification.is-waiting .partner-email-verification-icon {
    background: #dbeafe;
    color: #1d4ed8;
}

.partner-email-verification.is-waiting .partner-email-verification-badge {
    background: #dbeafe;
    color: #1e40af;
}

.partner-email-verification.is-waiting h3,
.partner-email-verification.is-waiting p {
    color: #1e3a5f;
}

.partner-email-verification.is-sent {
    border-color: #b7e5c9;
    background: #f2fbf5;
}

.partner-email-verification.is-sent .partner-email-verification-icon {
    background: #dcfce7;
    color: #15803d;
}

.partner-email-verification.is-sent .partner-email-verification-badge {
    background: #dcfce7;
    color: #166534;
}

.partner-email-verification.is-sent h3,
.partner-email-verification.is-sent p {
    color: #14532d;
}

.partner-email-verification.is-danger {
    border-color: #f0bbc1;
    background: #fff5f6;
}

.partner-email-verification.is-danger .partner-email-verification-icon {
    background: #fee2e2;
    color: #b42318;
}

.partner-email-verification.is-danger .partner-email-verification-badge {
    background: #fee2e2;
    color: #991b1b;
}

.partner-email-verification.is-danger h3,
.partner-email-verification.is-danger p {
    color: #7f1d1d;
}

@media (max-width: 760px) {
    .partner-email-verification {
        align-items: stretch;
        flex-direction: column;
    }

    .partner-email-verification-action {
        width: 100%;
    }
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification {
    border-color: #6b5526;
    background: #272318;
    box-shadow: none;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification-icon {
    background: #4a3a19;
    color: #f9c75b;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification-badge {
    background: #4a3a19;
    color: #f9c75b;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification :is(h3, p, small) {
    color: #f4e8c7;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification.is-waiting {
    border-color: #294b78;
    background: #172438;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification.is-waiting .partner-email-verification-icon,
html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification.is-waiting .partner-email-verification-badge {
    background: #1f3554;
    color: #93c5fd;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification.is-waiting :is(h3, p, small) {
    color: #dbeafe;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification.is-sent {
    border-color: #245c3b;
    background: #15281d;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification.is-sent .partner-email-verification-icon,
html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification.is-sent .partner-email-verification-badge {
    background: #1c3f2a;
    color: #86efac;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification.is-sent :is(h3, p, small) {
    color: #dcfce7;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification.is-danger {
    border-color: #71383e;
    background: #321a1d;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification.is-danger .partner-email-verification-icon,
html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification.is-danger .partner-email-verification-badge {
    background: #4d2327;
    color: #fda4af;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .partner-email-verification.is-danger :is(h3, p, small) {
    color: #ffe4e6;
}

/* FOODCONNECT REVIEW EDIT BUTTON DARK MODE FIX START */
html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .review-edit-button {
    background: #24282e;
    color: #f5f7fa;
    border-color: #3a4048;
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .review-edit-button:hover:not(:disabled) {
    background: #2c3138;
    color: #ff974c;
    border-color: rgba(247, 128, 33, 0.50);
}

html[data-theme="dark"] body[data-fc-page="restaurant-setup"] .review-edit-button:disabled {
    background: #20242a;
    color: #7f8998;
    border-color: #343941;
    opacity: 1;
}
/* FOODCONNECT REVIEW EDIT BUTTON DARK MODE FIX END */
