:root {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #667085;
    --line: #d9e0ea;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #b42318;
    --success: #027a48;
    --radius: 8px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }

.login-page, .public-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card, .public-card { width: 100%; max-width: 460px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 18px 45px rgba(23,32,51,.08); }
.public-shell { width: 100%; max-width: 720px; display: grid; gap: 14px; }
.public-hero { text-align: center; }
.business-logo { width: min(220px, 100%); max-height: 96px; object-fit: contain; border-radius: 6px; }
.topbar-brand { display: flex; align-items: center; gap: 10px; }
.topbar-logo { width: 88px; height: 40px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); background: #fff; padding: 3px; }
.settings-logo-preview { width: min(260px, 100%); height: 130px; object-fit: contain; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 14px; background: #fff; padding: 8px; }
.billing-qr { display: block; width: 150px; max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); margin: 10px 0; }
.billing-qr-preview { width: 120px; margin: 0 0 10px; }
.copy-input { min-width: 260px; max-width: 100%; margin-bottom: 6px; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 250px; flex: 0 0 250px; background: #101828; color: #fff; padding: 20px 14px; }
.brand { font-size: 20px; margin: 0 0 20px; }
.nav { display: grid; gap: 4px; }
.nav a, .public-link { display: block; padding: 10px 12px; border-radius: 6px; color: #d0d5dd; }
.nav a:hover, .nav a.is-active, .public-link:hover { background: #1d2939; color: #fff; }
.public-link { margin-top: 20px; border: 1px solid #344054; }
.main { flex: 1; min-width: 0; }
.topbar { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 24px; background: var(--panel); border-bottom: 1px solid var(--line); }
.content { padding: 24px; }

.page-header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.page-title { margin: 0 0 4px; font-size: 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-grid { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); align-items: start; }
.dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
.metric { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.inline-metric { margin-bottom: 12px; }
.metric span { color: var(--muted); }
.metric strong { display: block; font-size: 28px; }
.metric-text { font-size: 20px !important; }

label { display: block; margin-bottom: 6px; font-weight: 700; }
input, select, textarea { width: 100%; min-height: 42px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 9px 11px; font: inherit; background: #fff; color: var(--text); }
textarea { min-height: 88px; resize: vertical; }
.form-row { margin-bottom: 13px; }
.stack-form { display: grid; gap: 10px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check-row { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 8px 0 14px; }
.check-row input, .check-list input { width: auto; min-height: auto; }
.check-list { display: grid; gap: 8px; }
.access-box { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #f8fafc; }
.access-box input + input { margin-top: 8px; }
.day-box { padding: 10px 0; border-bottom: 1px solid var(--line); }
.time-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; border: 0; border-radius: 6px; padding: 0 14px; background: var(--primary); color: #fff; font-weight: 700; cursor: pointer; }
.button:hover { background: var(--primary-dark); }
.button-light { background: #e7ecf3; color: var(--text); }
.button-light:hover { background: #d9e0ea; }
.button-danger { background: #fee4e2; color: #b42318; }
.button-danger:hover { background: #fecdca; }
.button-small { min-height: 32px; padding: 0 9px; font-size: 13px; }
.button-full { width: 100%; }
.inline-form { display: inline; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }

.alert, .notice { padding: 10px 12px; border-radius: 6px; margin-bottom: 12px; }
.alert { background: #fef3f2; color: var(--danger); }
.notice-success { background: #ecfdf3; color: var(--success); }
.notification { border: 1px solid var(--line); background: #eff6ff; color: #1849a9; }
.notification p { margin: 4px 0 0; }
.notification-warning { background: #fffaeb; color: #93370d; }
.notification-success { background: #ecfdf3; color: var(--success); }
.badge { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; padding: 0 8px; font-size: 12px; font-weight: 700; background: #eef2f6; color: #475467; }
.badge-success, .status-confirmed, .status-completed { background: #dcfae6; color: #067647; }
.badge-muted, .status-canceled, .status-no_show { background: #f2f4f7; color: #475467; }
.status-scheduled { background: #dbeafe; color: #1d4ed8; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
th { font-size: 13px; color: var(--muted); }
.filter-bar { display: flex; gap: 10px; align-items: end; margin-bottom: 16px; }
.filter-bar label { margin: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tabs a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--text); font-weight: 700; }
.tabs a.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.list-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.appointment-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.appointment-card p { margin: 4px 0 8px; }
.confirmation-actions { display: grid; gap: 10px; margin: 18px 0 8px; }
.menu-button { display: none; }

@media (max-width: 900px) {
    .app-shell { display: block; }
    .sidebar { display: none; width: 100%; }
    .sidebar.is-open { display: block; }
    .menu-button { display: inline-flex; }
    .content, .topbar { padding-left: 16px; padding-right: 16px; }
    .grid-3, .admin-grid, .dashboard-grid { grid-template-columns: 1fr; }
    .filter-bar { display: grid; }
    .appointment-card { display: grid; }
    .page-header { display: block; }
    th, td { white-space: normal; }
}





.floating-share-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;

    display: inline-flex;
    align-items: center;
    gap: 10px;

    min-height: 52px;
    padding: 0 18px 0 16px;

    color: #ffffff;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;

    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    letter-spacing: -0.01em;

    box-shadow:
        0 14px 30px rgba(22, 163, 74, 0.35),
        0 4px 10px rgba(0, 0, 0, 0.18);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease;
}

.floating-share-btn:hover {
    color: #ffffff;
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow:
        0 18px 36px rgba(22, 163, 74, 0.42),
        0 6px 14px rgba(0, 0, 0, 0.22);
}

.floating-share-btn:active {
    transform: translateY(0) scale(0.98);
}

.floating-share-btn:focus-visible {
    outline: 3px solid rgba(34, 197, 94, 0.35);
    outline-offset: 4px;
}

.floating-share-btn__icon {
    display: grid;
    place-items: center;

    width: 34px;
    height: 34px;

    color: #16a34a;
    background: #ffffff;
    border-radius: 50%;
    flex: 0 0 auto;
}

.floating-share-btn__icon svg {
    display: block;
}

.floating-share-btn__text {
    white-space: nowrap;
}

/* Mobile: ocupa menos espaço, mas continua claro */
@media (max-width: 480px) {
    .floating-share-btn {
        right: 16px;
        bottom: 16px;
        min-height: 50px;
        padding: 0 15px 0 12px;
        font-size: 14px;
    }

    .floating-share-btn__icon {
        width: 32px;
        height: 32px;
    }
}
.share-toast {
    position: fixed;
    right: 24px;
    bottom: 92px;
    z-index: 10000;

    padding: 12px 16px;
    max-width: calc(100vw - 48px);

    color: #ffffff;
    background: #111827;
    border-radius: 12px;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;

    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.22),
        0 4px 10px rgba(0, 0, 0, 0.16);

    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;

    transition:
        opacity 0.22s ease,
        transform 0.22s ease;
}

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

























/* ================================
   PUBLIC BOOKING — NEUTRO MODERNO
   Cole no FINAL do CSS
================================ */

.public-page {
    --bg: #0b0f17;
    --panel: rgba(255, 255, 255, 0.075);
    --panel-strong: rgba(255, 255, 255, 0.11);
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(255, 255, 255, 0.13);
    --primary: #38bdf8;
    --primary-dark: #0ea5e9;
    --primary-soft: rgba(56, 189, 248, 0.13);
    --danger: #fb7185;
    --success: #22c55e;
    --radius: 22px;

    min-height: 100vh;
    min-height: 100dvh;

    display: block;
    padding: 32px 18px;

    overflow-x: hidden;
    overflow-y: auto;

    background:
        radial-gradient(circle at 20% 0%, rgba(56, 189, 248, 0.14), transparent 34%),
        radial-gradient(circle at 90% 10%, rgba(148, 163, 184, 0.12), transparent 30%),
        linear-gradient(180deg, #0b0f17 0%, #111827 100%);

    color: var(--text);
}

/* Remove a centralização que atrapalhava o scroll */
.login-page.public-page,
.public-page {
    place-items: initial;
}

/* Container da página pública */
.public-shell {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

/* Hero */
.public-hero {
    text-align: center;
    color: var(--text);
    padding-top: 8px;
}

.public-hero h1,
.public-hero h2,
.public-hero h3 {
    margin: 12px 0 8px;
    color: #ffffff;
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.public-hero p {
    max-width: 560px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 15px;
}

/* Logo */
.business-logo {
    width: min(180px, 70%);
    max-height: 96px;
    object-fit: contain;
    border-radius: 18px;
    padding: 10px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
}

/* Card principal */
.public-card {
    width: 100%;
    max-width: 620px;
    margin: 0 auto 40px;
    padding: 30px;

    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.13);

    background:
        linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.055)),
        rgba(15, 23, 42, 0.82);

    box-shadow:
        0 24px 70px rgba(0,0,0,0.34),
        inset 0 1px 0 rgba(255,255,255,0.13);

    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    overflow: visible;
}

/* Form */
.public-card form {
    display: grid;
    gap: 16px;
}

/* Remove margens antigas */
.public-card .form-row {
    margin-bottom: 0;
}

/* Labels */
.public-card label {
    display: block;
    margin-bottom: 8px;

    color: #e5e7eb;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Campos */
.public-card input,
.public-card select,
.public-card textarea {
    width: 100%;
    min-height: 54px;

    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 16px;

    padding: 0 15px;

    color: #f8fafc;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.085), rgba(255,255,255,0.045)),
        rgba(2, 6, 23, 0.42);

    font: inherit;
    font-size: 15px;

    outline: none;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.public-card textarea {
    min-height: 108px;
    padding-top: 14px;
    resize: vertical;
}

/* Placeholder */
.public-card input::placeholder,
.public-card textarea::placeholder {
    color: rgba(226, 232, 240, 0.42);
}

/* Select */
.public-card select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;

    padding-right: 44px;

    background-image:
        linear-gradient(45deg, transparent 50%, #94a3b8 50%),
        linear-gradient(135deg, #94a3b8 50%, transparent 50%),
        linear-gradient(180deg, rgba(255,255,255,0.085), rgba(255,255,255,0.045));

    background-position:
        calc(100% - 24px) 24px,
        calc(100% - 18px) 24px,
        0 0;

    background-size:
        6px 6px,
        6px 6px,
        100% 100%;

    background-repeat: no-repeat;
}

.public-card select option {
    color: #111827;
    background: #ffffff;
}

/* Hover */
.public-card input:hover,
.public-card select:hover,
.public-card textarea:hover {
    border-color: rgba(148, 163, 184, 0.42);
}

/* Focus */
.public-card input:focus,
.public-card select:focus,
.public-card textarea:focus {
    border-color: rgba(56, 189, 248, 0.75);

    background:
        linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.055)),
        rgba(2, 6, 23, 0.58);

    box-shadow:
        0 0 0 4px rgba(56, 189, 248, 0.13),
        inset 0 1px 0 rgba(255,255,255,0.10);

    transform: translateY(-1px);
}

/* Data */
.public-card input[type="date"] {
    color-scheme: dark;
}

/* Botão */
.public-card .button,
.public-card .button-full {
    width: 100%;
    min-height: 56px;

    border: 0;
    border-radius: 17px;

    color: #020617;
    background:
        linear-gradient(135deg, #e0f2fe, #7dd3fc 45%, #38bdf8);

    font-size: 15px;
    font-weight: 900;
    letter-spacing: -0.01em;

    cursor: pointer;

    box-shadow:
        0 16px 34px rgba(14, 165, 233, 0.24),
        inset 0 1px 0 rgba(255,255,255,0.55);

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        filter 0.18s ease;
}

.public-card .button:hover,
.public-card .button-full:hover {
    background:
        linear-gradient(135deg, #f0f9ff, #7dd3fc 45%, #0ea5e9);

    transform: translateY(-2px);

    box-shadow:
        0 20px 42px rgba(14, 165, 233, 0.30),
        inset 0 1px 0 rgba(255,255,255,0.62);
}

.public-card .button:active,
.public-card .button-full:active {
    transform: translateY(0) scale(0.99);
}

/* Alertas */
.public-page .alert,
.public-page .notice,
.public-page .notice-success {
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.12);
    margin-bottom: 16px;
}

.public-page .alert {
    background: rgba(251, 113, 133, 0.12);
    color: #fecdd3;
}

.public-page .notice-success {
    background: rgba(34, 197, 94, 0.12);
    color: #bbf7d0;
}

/* Mobile */
@media (max-width: 640px) {
    .public-page {
        display: block;
        min-height: 100dvh;
        padding: 20px 14px 28px;
        overflow-y: auto;
    }

    .public-shell {
        max-width: 100%;
        gap: 14px;
    }

    .public-card {
        padding: 22px;
        border-radius: 24px;
        margin-bottom: 24px;
    }

    .public-card form {
        gap: 14px;
    }

    .public-card input,
    .public-card select,
    .public-card textarea {
        min-height: 52px;
        font-size: 16px;
        border-radius: 15px;
    }

    .public-card .button,
    .public-card .button-full {
        min-height: 54px;
        border-radius: 16px;
    }
}