/* ============================================================
   main.css — Prev.Pet Design System
   Consolidated stylesheet: replaces estilo.css + admin-dashboard.css
   Font: Poppins (Google Fonts)
   ============================================================ */

/* ---------- CSS Variables (Design Tokens) ---------- */
:root {
    --primary:        #2563eb;
    --primary-dark:   #1d4ed8;
    --primary-light:  rgba(37, 99, 235, 0.12);
    --brand-green:    #5da793;
    --brand-green-dark: #0f7f5f;
    --secondary:      #64748b;
    --bg:             #f4f7fb;
    --surface:        #ffffff;
    --surface-soft:   #eef6f3;
    --text:           #1f2937;
    --muted:          #6b7280;
    --white:          #ffffff;
    --success:        #119c73;
    --success-dark:   #0f7f5f;
    --warning:        #d99b16;
    --warning-dark:   #b7790f;
    --danger:         #dc2626;
    --danger-dark:    #b91c1c;
    --info:           #0891b2;
    --border-color:   #dbe4ee;
    --shadow-sm:      0 0.125rem 0.5rem rgba(15, 23, 42, 0.07);
    --shadow:         0 1rem 2rem rgba(15, 23, 42, 0.10);
    --shadow-hover:   0 1.25rem 2.4rem rgba(15, 23, 42, 0.14);
    --radius:         0.5rem;
    --radius-sm:      0.375rem;
    --radius-pill:    50rem;
    --font:           'Poppins', sans-serif;
    --sidebar-width:  250px;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--white); }
::-webkit-scrollbar-thumb { background-color: var(--primary); border-radius: 30px; }
::-webkit-scrollbar-thumb:active { background-color: var(--primary-dark); }

/* ---------- Base / Public Pages Body ---------- */
body {
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-content: center;
    align-items: center;
    margin-top: 100px;
    font-family: var(--font);
    color: var(--text);
}

/* ---------- Portal/App Body Override ---------- */
body.app {
    display: block !important;
    margin-top: 0 !important;
    justify-content: unset !important;
    align-items: unset !important;
    flex-direction: unset !important;
    font-family: var(--font);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
    background:
        linear-gradient(180deg, rgba(238, 246, 243, 0.9) 0, rgba(244, 247, 251, 0.95) 260px),
        var(--bg);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    font-weight: 700;
    color: var(--text);
}
p { line-height: 1.7; }
a { color: var(--primary); transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

/* ============================================================
   PUBLIC SITE STYLES
   ============================================================ */

/* ---------- Public Header / Navbar ---------- */
.header {
    width: 100%;
    display: flex;
    flex-direction: row;
    background-color: var(--white);
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    flex-wrap: nowrap;
    position: fixed;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.meioHeader {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}
.header img { width: 200px; padding: 5px; }
.header ul { display: flex; flex-direction: row; }
.header li { margin-left: 10px; list-style-type: none; }
.linkHeader {
    cursor: pointer;
    margin-left: 20px;
    color: var(--secondary) !important;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
.linkHeader:hover { color: var(--primary) !important; }
.header button {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: 10px 30px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-family: var(--font);
    transition: background-color 0.2s;
}
.header button:hover { background-color: var(--primary-dark); }
.menuHeader { display: none; margin-left: 20px; padding: 15px; }
.iconeAgendamento { display: none; }

@media only screen and (max-width: 800px) {
    .menuHeader { display: block; }
    .linkHeader { display: none; }
    .btnAgendamento { display: none; }
    .iconeAgendamento { display: block; }
}

/* ---------- Login Page ---------- */
.bglogin {
    background-image: url('../img/bg_login2.jpg');
    background-color: #f5f6fe;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 90vh;
}
@media (max-width: 1000px) {
    .bglogin {
        background: linear-gradient(142deg, rgba(0,123,255,0.15) 0%, rgba(0,86,179,0.3) 100%);
    }
}
.login {
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    max-width: 420px;
    width: 92%;
    justify-content: center;
    align-items: center;
    padding: 35px 30px;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 50px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
}
.login img { width: 75%; margin-bottom: 20px; }
.login input {
    width: 92%;
    margin: 8px 0;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg);
    font-size: 0.95rem;
    font-family: var(--font);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.login input:focus {
    border-color: var(--primary);
    outline: none;
    background-color: var(--white);
    box-shadow: 0 0 0 0.2rem var(--primary-light);
}
.login button {
    width: 92%;
    margin: 14px 0 6px;
    padding: 13px;
    border: none;
    background-color: var(--primary);
    text-align: center;
    color: var(--white);
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 700;
    font-family: var(--font);
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background-color 0.2s;
}
.login button:hover { background-color: var(--primary-dark); }
.login div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 92%;
    padding: 12px 0;
}
.login h3 { color: var(--primary-dark); font-size: 15px; }
.login a { color: var(--primary); text-align: center; font-size: 0.875rem; }

/* ---------- Action Buttons (portal rows) ---------- */
.btnBloquear { background-color: var(--warning); color: var(--white); border-radius: 5px; padding: 10px; border: none; margin-left: 5px; }
.btnDesbloquear { background-color: var(--secondary); color: var(--white); border-radius: 5px; padding: 10px; border: none; margin-left: 5px; }
.btnCancela { padding: 10px; background-color: var(--danger); color: var(--white); border: none; margin-left: 10px; border-radius: 10px; }
.btnConfirma { padding: 10px; background-color: var(--success); color: var(--white); border: none; margin-left: 10px; border-radius: 10px; }
.btnAtende { padding: 10px; background-color: var(--primary); color: var(--white); border: none; margin-left: 10px; border-radius: 10px; }
.btnAgenda { background-color: var(--primary); width: 100%; padding: 10px; color: var(--white); border: none; }
.btnAgendado { background-color: #FFEB8F; padding: 10px; color: var(--text); margin-left: 10px; border: none; border-radius: 10px; }

/* ---------- Status Badges (agenda) ---------- */
.Confirmado { border-left: 5px solid #7FB969 !important; background-color: #d9f7ce !important; }
.Agendado   { border-left: 5px solid #FFEB8F !important; background-color: #fdf2c0 !important; }
.Cancelado  { border-left: 5px solid var(--danger) !important; background-color: #f3dedc !important; }
.Bloqueado  { border-left: 5px solid var(--secondary) !important; }
.Realizado  { border-left: 5px solid var(--primary) !important; background-color: #d7e6fa !important; }

/* ---------- Anuncio Status ---------- */
.statusAnuncioPrestadorAtivo    { background-color: var(--success) !important; color: var(--white) !important; padding: 7px; font-size: 10px; border-radius: 10px; }
.statusAnuncioPrestadorInativo  { background-color: var(--warning-dark) !important; color: var(--white) !important; padding: 5px; font-size: 10px; border-radius: 10px; }
.statusAnuncioPrestadorAnalise  { background-color: #7b5ac9 !important; color: var(--white) !important; padding: 5px; font-size: 10px; border-radius: 10px; }

/* ---------- Prestador Containers ---------- */
.containerPrestador {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1000px;
    margin-left: 200px;
    min-height: 450px;
    padding: 10px;
}
@media (max-width: 1200px) {
    .containerPrestador { margin-left: 0; max-width: 90%; }
}
.containerPrestador h1 { font-size: 24px; font-weight: 700; }
.containerPrestador h5 {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-end;
    margin-bottom: -5px;
    font-size: 12px;
    font-weight: 400;
}

.containerPrestadorHome {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 1000px;
    margin-left: 200px;
    min-height: 450px;
    padding: 10px;
    flex-wrap: wrap;
}
@media (max-width: 1200px) {
    .containerPrestadorHome { margin-left: 0; max-width: 90%; }
}

/* ---------- Title Row ---------- */
.tituloPrestador { display: flex; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.tituloPrestador div { display: flex; flex-direction: row; justify-content: space-between; align-items: stretch; padding: 5px; flex-wrap: wrap; }
.tituloPrestador button { margin-left: 5px; }
.tituloPrestador input { margin-left: 5px; margin-right: 5px; border: none; padding: 5px; }
.tituloPrestador select { margin-left: 5px; margin-right: 5px; border: none; padding: 5px; }

/* ---------- Prestador Anuncio sticky bar ---------- */
.prestadorAnuncio {
    display: flex;
    padding: 10px;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 55px;
    z-index: 10;
    flex-wrap: wrap;
    background-color: var(--bg);
}
.prestadorAnuncio h1 { font-size: 20px; font-weight: 700; }

/* ---------- Anuncio Card ---------- */
.anuncioContainerCad {
    background-color: var(--white);
    width: 100% !important;
    position: relative !important;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    padding: 20px;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.anuncioContainerCad h3 { font-size: 18px; }
.anuncioContainerCad div {
    background-color: var(--white);
    width: 100% !important;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 20px;
    justify-content: flex-start;
    align-items: center;
    border-radius: var(--radius);
}
.anuncioContainerCad label { margin: 20px; width: 150px; }

/* ---------- Agenda Table ---------- */
.tableAgendaPrestador { width: 100%; padding: 10px; }
.tableAgendaPrestador .conteudoDivAgendaPrestador {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    background-color: var(--white);
    margin-top: 5px;
    border-left: 3px solid var(--border-color);
    align-items: center;
    padding: 5px 20px;
    flex-wrap: wrap;
    min-height: 80px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: box-shadow 0.2s;
}
.tableAgendaPrestador .conteudoDivAgendaPrestador:hover { box-shadow: var(--shadow-sm); }
.tableAgendaPrestador .conteudoDivAgendaPrestador div {
    padding: 10px;
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    position: relative;
}
.tableAgendaPrestador .conteudoDivAgendaPrestador button { max-width: 100px; }
.tableAgendaPrestador .conteudoDivAgendaPrestador label { color: var(--text); font-weight: 500 !important; font-size: 18px; }
.tableAgendaPrestador .conteudoDivAgendaPrestador span { color: var(--secondary); font-size: 12px; display: flex; align-items: center; margin-top: -10px !important; }
.tableAgendaPrestador .conteudoDivAgendaPrestador h4 {
    background-color: var(--bg) !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    padding: 10px !important;
    position: absolute !important;
    color: var(--text);
    left: -40px;
    top: 15px;
}

/* ---------- Dashboard Cards ---------- */
.cardHome {
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    padding: 22px;
    max-width: 300px;
    width: 100%;
    margin: 10px;
    min-height: 200px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s, transform 0.2s;
}
.cardHome:hover { box-shadow: var(--shadow-hover) !important; transform: translateY(-3px); }
.cardHome div { display: flex; flex-direction: row; align-items: center; }
.cardHome h2 { font-size: 17px; font-weight: 700; padding-left: 14px; color: var(--text); }
.cardHome img { width: 34px; }
.cardHome a {
    padding: 10px 16px;
    background-color: var(--primary);
    color: var(--white);
    width: auto;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background-color 0.2s;
}
.cardHome a:hover { background-color: var(--primary-dark); color: var(--white); }
.cardHome label { padding: 8px 0; color: var(--secondary); font-size: 0.875rem; }

/* ---------- User avatar ---------- */
.imgPrestador { border-radius: 100%; border: 5px solid var(--primary); width: 200px; }
.imgPrestador2 { border-radius: 100%; border: 2px solid var(--primary); width: 38px; height: 38px; object-fit: cover; }

/* ---------- Menu Prestador ---------- */
.menuPrestador { margin-left: 0 !important; font-size: 14px; }
.menuPrestador i { color: var(--primary); font-size: 1.1rem; text-align: center !important; }

/* ============================================================
   PORTAL/APP ADMIN STYLES
   ============================================================ */

/* ---------- Cards ---------- */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    background: var(--surface);
}
.card-body { padding: 1.25rem 1.5rem; }
.card-header {
    background-color: var(--bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
}

/* ---------- Forms ---------- */
.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border: 1px solid #d1d3e2;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-family: var(--font);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem var(--primary-light);
    outline: none;
}
label.form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #5a5c69;
    margin-bottom: 0.35rem;
}

/* ---------- Buttons ---------- */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.45rem 1rem;
    font-family: var(--font);
    transition: all 0.2s ease-in-out;
}
.btn-primary { background-color: var(--primary); border-color: var(--primary); color: var(--white); }
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active { background-color: var(--primary-dark); border-color: var(--primary-dark); color: var(--white); }
.btn-primary:disabled { background-color: var(--primary); border-color: var(--primary); color: var(--white); }
.btn-primary .bi { color: inherit; }
.btn-success { background-color: var(--success); border-color: var(--success); }
.btn-success:hover { background-color: var(--success-dark); border-color: var(--success-dark); }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.8rem; }

/* ---------- Stat Cards ---------- */
.stat-card {
    border-left: 0;
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}
.stat-card::before {
    content: '';
    display: block;
    height: 4px;
    background: var(--primary);
}
.stat-card:hover { box-shadow: var(--shadow-hover) !important; transform: translateY(-2px); }
.stat-card.border-left-primary { border-left-color: var(--primary); }
.stat-card.border-left-success { border-left-color: var(--success); }
.stat-card.border-left-info    { border-left-color: var(--info); }
.stat-card.border-left-warning { border-left-color: var(--warning); }
.stat-card.border-left-danger  { border-left-color: var(--danger); }

.stat-card-primary::before { background: var(--primary); }
.stat-card-success::before { background: var(--success); }
.stat-card-info::before { background: var(--info); }
.stat-card-warning::before { background: var(--warning); }

.stat-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.stat-card .stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.25rem;
    opacity: 1;
}
.stat-card-success .stat-icon { background: rgba(17, 156, 115, 0.12); color: var(--success); }
.stat-card-info .stat-icon { background: rgba(8, 145, 178, 0.12); color: var(--info); }
.stat-card-warning .stat-icon { background: rgba(217, 155, 22, 0.14); color: var(--warning-dark); }
.stat-card .stat-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 0.25rem; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--text); margin: 0.45rem 0 0; }
.stat-card .stat-sub { font-size: 0.82rem; color: var(--muted); }

/* ---------- Dashboard Page Title ---------- */
.dashboard-title { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 1.5rem; }
.dashboard-title span { color: var(--primary); }

/* ---------- Resource List Pages ---------- */
.list-page .container-fluid,
.list-shell {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}
.list-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.35rem;
    border: 1px solid rgba(219, 228, 238, 0.82);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.list-hero h1 {
    margin: 0;
    font-size: 1.65rem;
}
.list-hero p {
    margin: 0.45rem 0 0;
    color: var(--muted);
}
.list-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.list-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.45rem;
    white-space: nowrap;
}
.segmented-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: #f8fafc;
}
.segmented-btn {
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
    padding: 0 0.7rem;
    cursor: pointer;
}
.segmented-btn.is-active,
.segmented-btn:hover {
    background: var(--surface);
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}
.resource-list {
    display: grid;
    gap: 0.75rem;
}
.resource-row {
    display: grid;
    grid-template-columns: 3.15rem minmax(14rem, 1fr) auto auto auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.resource-icon {
    width: 3.15rem;
    height: 3.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 1.35rem;
}
.resource-icon-agenda { background: rgba(8, 145, 178, 0.12); color: var(--info); }
.resource-icon-ad { background: rgba(37, 99, 235, 0.12); color: var(--primary); }
.resource-main {
    min-width: 0;
}
.resource-main strong,
.resource-id {
    display: block;
}
.resource-main strong {
    overflow: hidden;
    color: var(--text);
    font-size: 0.98rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.resource-main small,
.resource-id {
    color: var(--muted);
    font-size: 0.8rem;
}
.resource-stats {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--muted);
    font-size: 0.86rem;
    white-space: nowrap;
}
.resource-stats span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.resource-meta {
    display: flex;
    justify-content: flex-end;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.7rem;
    padding: 0 0.65rem;
    border-radius: 999px;
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}
.status-pill-active { background: var(--success); }
.status-pill-inactive { background: var(--secondary); }
.status-pill-pending { background: var(--warning-dark); }
.status-pill-review { background: #7c3aed; }
.resource-actions {
    display: flex;
    justify-content: flex-end;
}

/* ---------- Clients Page ---------- */
.client-search {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) auto auto;
    gap: 0.65rem;
    align-items: center;
}
.client-search .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
}
.client-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 0.95fr);
    gap: 1rem;
    align-items: flex-start;
}
.client-list-panel {
    display: grid;
    gap: 0.85rem;
}
.client-card,
.client-detail-panel {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.client-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
}
.client-card-header {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
}
.client-avatar,
.client-detail-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: rgba(37, 99, 235, 0.12);
    color: var(--primary);
}
.client-avatar {
    width: 3rem;
    height: 3rem;
    font-size: 1.25rem;
}
.client-card-header strong,
.client-detail-hero h2 {
    color: var(--text);
}
.client-card-header strong,
.client-card-header small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.client-card-header small,
.client-no-pets,
.client-muted-box,
.client-detail-hero p,
.client-owner-box,
.client-mini-row small,
.client-timeline-item small {
    color: var(--muted);
    font-size: 0.84rem;
}
.client-card-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.client-card-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 1.75rem;
    padding: 0 0.55rem;
    border-radius: var(--radius-sm);
    background: #f8fafc;
    color: var(--muted);
    font-size: 0.8rem;
}
.client-card-metrics strong {
    color: var(--text);
}
.client-pets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.client-pet-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 2rem;
    max-width: 100%;
    padding: 0 0.65rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text);
    background: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}
.client-pet-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.client-pet-chip:hover,
.client-pet-chip.is-active {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-dark);
    text-decoration: none;
}
.client-detail-panel {
    position: sticky;
    top: 5.25rem;
    padding: 1rem;
}
.client-detail-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.client-detail-hero h2 {
    margin: 0.2rem 0 0.25rem;
    font-size: 1.35rem;
}
.client-detail-hero p {
    margin: 0;
}
.client-detail-icon {
    width: 3rem;
    height: 3rem;
    flex: 0 0 3rem;
    font-size: 1.25rem;
}
.client-owner-box {
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border-color);
}
.client-owner-box span,
.client-section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.client-detail-section {
    display: grid;
    gap: 0.65rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}
.client-detail-section:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}
.client-section-title {
    color: var(--text);
}
.client-highlight-row,
.client-mini-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #f8fafc;
}
.client-highlight-row strong,
.client-highlight-row small,
.client-mini-row strong,
.client-mini-row small {
    display: block;
}
.client-mini-list {
    display: grid;
    gap: 0.5rem;
}
.client-mini-row {
    width: 100%;
    margin: 0;
}
.client-mini-row .btn {
    flex: 0 0 auto;
}
.client-muted-box {
    padding: 0.85rem;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    background: #f8fafc;
}
.client-timeline {
    display: grid;
    gap: 0.7rem;
}
.client-timeline-item {
    display: grid;
    grid-template-columns: 0.9rem minmax(0, 1fr);
    gap: 0.6rem;
}
.client-detail-empty {
    box-shadow: none;
    border: 0;
}

.vendas-filters {
    display: grid;
    grid-template-columns: minmax(9rem, 1fr) minmax(10rem, 1fr) minmax(11rem, 1fr) minmax(9rem, 0.8fr) minmax(9rem, 0.8fr) auto auto;
    gap: 0.65rem;
    align-items: center;
}
.vendas-filters .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
}
.venda-row {
    grid-template-columns: 3.15rem minmax(8rem, 0.65fr) minmax(18rem, 1.35fr) minmax(10rem, auto) auto;
}
.venda-icon {
    background: rgba(17, 156, 115, 0.12);
    color: var(--success);
}
.sale-people {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
    color: var(--muted);
    font-size: 0.84rem;
}
.sale-people span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}
.sale-people span,
.sale-people span i {
    overflow: hidden;
}
.sale-people span {
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sale-people .sale-note {
    align-items: flex-start;
    width: 100%;
    margin-top: 0.15rem;
    padding: 0.48rem 0.62rem;
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 8px;
    background: #fffbeb;
    color: #7c4a03;
    line-height: 1.35;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}
.sale-people .sale-note i {
    flex: 0 0 auto;
    margin-top: 0.1rem;
    color: #b7791f;
    overflow: visible;
}
.sale-people .sale-note-scheduled {
    border-color: rgba(37, 99, 235, 0.24);
    background: #eff6ff;
    color: #1e3a8a;
}
.sale-people .sale-note-scheduled i {
    color: var(--primary);
}
.venda-row .resource-meta {
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}
.sale-indicator {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2rem;
    border-radius: 50%;
    color: var(--white);
    font-size: 1rem;
}
.sale-indicator-paid,
.sale-indicator-scheduled {
    background: var(--success);
}
.sale-indicator-pending {
    background: #8b5a2b;
}
.sale-indicator-canceled {
    background: var(--danger);
}
.sale-indicator-muted {
    background: var(--secondary);
}
.sale-money-badge {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.25rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    color: var(--white);
    font-size: 1.08rem;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        inset 0 -0.45rem 0 rgba(0, 0, 0, 0.08),
        0 0.55rem 1rem rgba(15, 23, 42, 0.14);
}
.sale-money-badge.sale-indicator-paid {
    background: linear-gradient(145deg, #18b984, #047857);
}
.sale-money-badge.sale-indicator-pending {
    background: linear-gradient(145deg, #b77935, #7c4a1f);
}
.sale-money-badge.sale-indicator-canceled {
    background: linear-gradient(145deg, #ef4444, #b91c1c);
}
.sale-money-badge.sale-indicator-muted {
    background: linear-gradient(145deg, #7f8da3, #475569);
}
.sale-status-chip {
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.78rem;
    border-radius: 999px;
    border: 1px solid rgba(203, 213, 225, 0.82);
    background: #f8fafc;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}
.sale-action-form {
    margin: 0;
}
.sale-action-form .btn {
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.8rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}
.sale-suggestion-modal .modal-header small {
    display: block;
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.82rem;
}
.sale-suggestion-grid {
    display: grid;
    gap: 0.85rem;
}
.sale-suggestion-grid label {
    display: grid;
    gap: 0.35rem;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 700;
}
.sale-suggestion-empty {
    min-height: 12rem;
    margin: 0;
    box-shadow: none;
}
.sale-suggestion-modal .agenda-row-busy {
    background: #fff1f2;
    color: #9f1239;
}
.sale-suggestion-modal .agenda-row-busy td {
    border-color: #fecdd3;
}
.sale-suggestion-modal .agenda-row-busy td:last-child {
    font-weight: 800;
}
.sale-suggestion-modal .agenda-row-free {
    background: #f0fdf4;
    color: #166534;
}
.sale-suggestion-modal .suggestion-conflict {
    color: #be123c;
    display: none;
    font-size: 0.78rem;
    font-weight: 700;
}
.sale-suggestion-modal label.has-conflict .suggestion-conflict {
    display: block;
}

/* ---------- Chart Cards ---------- */
.chart-card .card-header,
.insight-card .card-header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.chart-card canvas { max-height: 280px; }
.chart-area { position: relative; height: 20rem; width: 100%; }
.chart-pie  { position: relative; height: 15rem; width: 100%; }

/* ---------- Page Header Row ---------- */
.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.page-header-row h1 { font-size: 1.4rem; font-weight: 700; color: var(--text); margin: 0; }

/* ---------- Modern Dashboard ---------- */
.dashboard-page .container-fluid {
    max-width: 1440px;
}
.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(219, 228, 238, 0.75);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.96), rgba(238,246,243,0.92)),
        var(--surface);
    box-shadow: var(--shadow-sm);
}
.dashboard-hero-copy {
    flex: 1 1 23rem;
    min-width: 0;
}
.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.45rem;
    color: var(--success-dark);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.dashboard-hero h1 {
    margin: 0;
    font-size: 1.85rem;
    line-height: 1.15;
}
.dashboard-hero p {
    max-width: 31rem;
    margin: 0.55rem 0 0;
    color: var(--muted);
}
.dashboard-hero-illustration {
    position: relative;
    flex: 0 1 36rem;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24rem;
    min-height: 9.5rem;
    pointer-events: none;
}
.dashboard-hero-illustration img {
    display: block;
    width: min(100%, 36rem);
    max-height: 10.75rem;
    object-fit: contain;
    object-position: center;
    mix-blend-mode: multiply;
    opacity: 0.78;
}
.dashboard-saint-quote {
    position: absolute;
    left: 0.4rem;
    top: 50%;
    z-index: 1;
    width: 13.5rem;
    color: rgba(75, 85, 99, 0.82);
    font-style: italic;
    transform: translateY(-50%);
}
.dashboard-saint-quote span {
    display: block;
    height: 1.25rem;
    color: rgba(75, 85, 99, 0.55);
    font-size: 2.35rem;
    font-weight: 700;
    line-height: 1;
}
.dashboard-saint-quote p {
    max-width: none;
    margin: 0.15rem 0 0.42rem;
    color: inherit;
    font-size: 0.78rem;
    line-height: 1.65;
}
.dashboard-saint-quote strong {
    display: block;
    color: rgba(31, 41, 55, 0.82);
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 700;
}
.dashboard-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    flex: 0 0 auto;
}
.dashboard-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.55rem;
    white-space: nowrap;
}
.chart-chip {
    display: inline-flex;
    align-items: center;
    min-height: 1.6rem;
    padding: 0 0.65rem;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--success-dark);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}
.status-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    font-size: 0.82rem;
    color: var(--muted);
}
.status-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}
.insight-row {
    display: grid;
    grid-template-columns: 2.65rem minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
    padding: 0.9rem 0;
    color: var(--text);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
}
.insight-row:last-child { border-bottom: 0; }
.insight-row:hover { color: var(--primary-dark); }
.insight-row strong {
    display: block;
    font-size: 0.95rem;
}
.insight-row small {
    display: block;
    margin-top: 0.15rem;
    color: var(--muted);
    line-height: 1.45;
}
.insight-icon {
    width: 2.65rem;
    height: 2.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 1.2rem;
}
.insight-danger { background: rgba(220, 38, 38, 0.1); color: var(--danger); }
.insight-info { background: rgba(8, 145, 178, 0.12); color: var(--info); }
.insight-success { background: rgba(17, 156, 115, 0.12); color: var(--success); }

/* ---------- Attendance Page ---------- */
.attendance-page .container-fluid,
.attendance-shell {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}
.attendance-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.35rem;
    border: 1px solid rgba(219, 228, 238, 0.82);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.attendance-toolbar::before {
    content: '';
    width: 4px;
    align-self: stretch;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--success), var(--primary));
}
.attendance-toolbar h1 {
    margin: 0;
    font-size: 1.65rem;
}
.attendance-toolbar p {
    margin: 0.45rem 0 0;
    color: var(--muted);
}
.attendance-filters {
    display: grid;
    grid-template-columns: minmax(16rem, 1.4fr) minmax(10rem, 0.8fr) auto auto;
    gap: 0.65rem;
    align-items: center;
    min-width: min(100%, 42rem);
}
.attendance-filters .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.4rem;
    white-space: nowrap;
}
.attendance-day-panel {
    display: grid;
    grid-template-columns: minmax(16rem, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(219, 228, 238, 0.86);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.98), rgba(238,246,243,0.78)),
        var(--surface);
    box-shadow: var(--shadow-sm);
}
.day-panel-main {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}
.day-panel-icon {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.75rem;
    border-radius: var(--radius);
    background: rgba(17, 156, 115, 0.12);
    color: var(--success-dark);
    font-size: 1.2rem;
}
.day-panel-main strong {
    display: block;
    color: var(--text);
    font-size: 1rem;
}
.day-metrics {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}
.day-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 2.15rem;
    padding: 0 0.75rem;
    border: 1px solid rgba(219, 228, 238, 0.9);
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.78);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}
.day-metrics strong {
    color: var(--text);
    font-size: 0.95rem;
}
.attendance-statusbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    font-size: 0.82rem;
}
.attendance-statusbar span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.status-dot {
    width: 0.7rem;
    height: 0.7rem;
    display: inline-block;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.16);
}
.status-agendado { background: #f8e58f; }
.status-confirmado { background: #baf2de; }
.status-cancelado { background: #f5b7ae; }
.status-livre { background: #fff; }
.status-realizado { background: #bfc7fb; }
.status-bloqueado { background: #7e7e7e; }
.attendance-list {
    display: grid;
    position: relative;
    gap: 0.72rem;
    padding-left: 0.45rem;
}
.attendance-list::before {
    content: '';
    position: absolute;
    top: 0.65rem;
    bottom: 0.65rem;
    left: 0.82rem;
    width: 2px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(17,156,115,0.18), rgba(37,99,235,0.18));
}
.attendance-slot {
    position: relative;
    display: grid;
    grid-template-columns: 6.5rem minmax(14rem, 1fr) minmax(10rem, 0.68fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.05rem;
    border: 1px solid var(--border-color);
    border-left: 0 !important;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.attendance-slot:hover {
    border-color: rgba(37, 99, 235, 0.22);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}
.slot-rail-dot {
    position: absolute;
    left: -0.02rem;
    top: 50%;
    z-index: 1;
    width: 0.78rem;
    height: 0.78rem;
    border: 2px solid var(--surface);
    border-radius: 999px;
    background: var(--border-color);
    box-shadow: 0 0 0 2px rgba(219, 228, 238, 0.9);
    transform: translate(-50%, -50%);
}
.attendance-slot.Confirmado { border-color: rgba(17, 156, 115, 0.22) !important; background: #f5fffb !important; }
.attendance-slot.Agendado { border-color: rgba(217, 155, 22, 0.28) !important; background: #fffdf3 !important; }
.attendance-slot.Cancelado { border-color: rgba(220, 38, 38, 0.22) !important; background: #fff7f7 !important; }
.attendance-slot.Bloqueado { border-color: rgba(100, 116, 139, 0.28) !important; background: #f8fafc !important; }
.attendance-slot.Realizado { border-color: rgba(37, 99, 235, 0.22) !important; background: #f6f9ff !important; }
.slot-rail-dot.Agendado {
    border-left: 0 !important;
    background: var(--warning) !important;
}
.slot-rail-dot.Confirmado {
    border-left: 0 !important;
    background: var(--success) !important;
}
.slot-rail-dot.Cancelado {
    border-left: 0 !important;
    background: var(--danger) !important;
}
.slot-rail-dot.Bloqueado {
    border-left: 0 !important;
    background: var(--secondary) !important;
}
.slot-rail-dot.Realizado {
    border-left: 0 !important;
    background: var(--primary) !important;
}
.slot-time strong,
.slot-main strong {
    display: block;
    color: var(--text);
}
.slot-time small,
.slot-main small {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--muted);
    margin-top: 0.15rem;
}
.slot-main {
    display: grid;
    grid-template-columns: 2.6rem minmax(0, 1fr);
    gap: 0.8rem;
    align-items: center;
}
.slot-avatar {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--surface-soft);
    color: var(--success-dark);
    font-size: 1.25rem;
}
.attendance-slot.Agendado .slot-avatar { background: rgba(217, 155, 22, 0.10); color: var(--warning-dark); }
.attendance-slot.Confirmado .slot-avatar { background: rgba(17, 156, 115, 0.12); color: var(--success-dark); }
.attendance-slot.Cancelado .slot-avatar { background: rgba(220, 38, 38, 0.10); color: var(--danger-dark); }
.attendance-slot.Realizado .slot-avatar { background: rgba(37, 99, 235, 0.10); color: var(--primary-dark); }
.attendance-slot.Bloqueado .slot-avatar { background: rgba(100, 116, 139, 0.12); color: var(--secondary); }
.slot-contact {
    min-height: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--muted);
    font-size: 0.88rem;
}
.slot-contact a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--success-dark);
    font-weight: 600;
    text-decoration: none;
}
.slot-contact a:hover {
    color: var(--success);
}
.slot-contact .bi-whatsapp { color: var(--success); }
.slot-status-label {
    display: inline-flex;
    align-items: center;
    min-height: 1.9rem;
    padding: 0 0.65rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.74);
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}
.slot-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
}
.slot-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.25rem;
}
.btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.attendance-empty {
    display: flex;
    min-height: 18rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
    color: var(--muted);
    text-align: center;
}
.attendance-empty i {
    color: var(--primary);
    font-size: 2.4rem;
}
.attendance-empty strong {
    color: var(--text);
    font-size: 1rem;
}

/* ---------- Profile / Cadastro ---------- */
.profile-page .container-fluid,
.profile-shell {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}
.profile-card {
    display: grid;
    grid-template-columns: minmax(14rem, 0.34fr) minmax(0, 1fr);
    gap: 1.5rem;
    padding: 1.35rem;
    border: 1px solid rgba(219, 228, 238, 0.82);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.profile-card-aside h3 {
    margin: 0;
    font-size: 1rem;
}
.profile-card-aside p {
    margin: 0.45rem 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}
.profile-card-body {
    min-width: 0;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.form-field {
    min-width: 0;
}
.field-wide {
    grid-column: 1 / -1;
}
.input-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
}
.profile-logo-form {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 1.2rem;
}
.profile-logo-preview {
    width: 8.5rem;
    height: 8.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--surface-soft);
}
.profile-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}
.profile-logo-preview span {
    color: var(--success-dark);
    font-size: 2.2rem;
}
.profile-logo-actions {
    display: grid;
    gap: 0.75rem;
}
.profile-savebar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    padding: 1rem 0;
    background: linear-gradient(180deg, rgba(244,247,251,0), var(--bg) 42%);
}
.profile-savebar .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2.6rem;
}

/* ---------- Status Badges (admin) ---------- */
.badge-ativo   { background-color: var(--success); color: var(--white); }
.badge-inativo { background-color: var(--secondary); color: var(--white); }
.badge-analise { background-color: var(--warning); color: var(--white); }

/* ---------- Tables ---------- */
.table { font-size: 0.875rem; }
.table th {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--secondary);
    border-top: none;
    font-weight: 700;
    background-color: var(--bg);
    padding: 0.75rem 1rem;
}
.table td { vertical-align: middle; padding: 0.65rem 1rem; color: var(--text); }
.table-hover tbody tr:hover { background-color: #eef0f8; }
.table-responsive { border-radius: var(--radius-sm); overflow: hidden; }

/* ---------- Sidebar Nav Icons ---------- */
.app-nav .nav-link .fa,
.app-nav .nav-link .fas,
.app-nav .nav-link .far,
.app-nav .nav-link .fab,
.app-nav .nav-link .bi {
    width: 1.25rem;
    margin-right: 0;
    text-align: center;
    color: var(--brand-green);
    opacity: 0.7;
}
.app-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 3.2rem;
    padding: 0.875rem 1rem !important;
    white-space: nowrap;
}
.app-nav .nav-icon {
    position: static !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.6rem;
    margin-right: 0;
    flex-shrink: 0;
}
.app-nav .nav-icon .bi { margin-right: 0; }

/* ---------- Provider Sidebar Navigation Theme ---------- */
body.app #app-sidepanel {
    border-right: 1px solid rgba(148, 163, 184, 0.1);
    box-shadow: 12px 0 34px rgba(2, 6, 23, 0.28);
}
body.app #app-sidepanel .sidepanel-inner {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #070d1a 0%, #0a1220 56%, #08101d 100%);
    color: #d8e1ef;
    box-shadow: none;
}
body.app .app-branding {
    height: auto;
    padding: 1.9rem 1.55rem 1.1rem;
    margin-bottom: 0;
}
body.app .app-branding a {
    justify-content: center;
}
body.app .brand-logo-full {
    width: 122px;
    height: auto;
    object-fit: contain;
}
.sidebar-provider-card {
    margin: 0 1.35rem 1.15rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.whatsapp-status-pill {
    display: flex;
    align-items: center;
    gap: 0.48rem;
    justify-content: center;
    min-height: 2.05rem;
    width: 100%;
    padding: 0.38rem 0.72rem;
    border-radius: 0.35rem;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.5);
    color: #bac6d8;
    font-size: 0.67rem;
    font-weight: 500;
    text-decoration: none !important;
}
.whatsapp-status-pill:hover {
    color: #ffffff;
    background: rgba(20, 184, 166, 0.1);
}
.whatsapp-status-pill .status-dot {
    width: 0.52rem;
    height: 0.52rem;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.16);
}
.whatsapp-status-pill.is-connected .status-dot {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}
.whatsapp-status-pill.is-disconnected {
    color: #9ba8bb;
}
.app-nav .nav-section-title {
    margin: 1.38rem 1.08rem 0.55rem;
    color: #6f7d91;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
body.app #app-sidepanel .app-nav-main {
    padding-bottom: 1rem;
    scrollbar-color: rgba(148, 163, 184, 0.28) rgba(15, 23, 42, 0.35);
}
body.app #app-sidepanel .app-menu {
    padding: 0 0.85rem;
}
body.app #app-sidepanel .nav-item {
    background: transparent;
    color: #cbd5e1;
}
body.app #app-sidepanel .app-nav .nav-link {
    min-height: 2.8rem;
    padding: 0.45rem 0.68rem !important;
    border: 0;
    border-radius: 0.32rem;
    color: #b8c3d5;
    font-size: 0.76rem;
    font-weight: 500;
    gap: 0.72rem;
}
body.app #app-sidepanel .app-nav .nav-link:hover {
    color: #ffffff;
    background: rgba(148, 163, 184, 0.08);
}
body.app #app-sidepanel .app-nav .nav-link.active,
body.app #app-sidepanel .app-nav .nav-link.submenu-toggle.active {
    color: #5ee0a1;
    background: rgba(20, 184, 166, 0.09);
    box-shadow: none;
    font-weight: 600;
}
body.app #app-sidepanel .app-nav .nav-link.active {
    box-shadow: inset 0.12rem 0 0 #23d18b;
}
body.app #app-sidepanel .app-nav .nav-link .bi {
    color: currentColor;
    opacity: 1;
}
body.app #app-sidepanel .app-nav .nav-icon {
    width: 1.65rem;
    height: 1.65rem;
    min-width: 1.65rem;
    border-radius: 0.25rem;
    background: transparent;
    color: #8fa1b8;
}
body.app #app-sidepanel .app-nav .nav-link:hover .nav-icon,
body.app #app-sidepanel .app-nav .nav-link.active .nav-icon {
    background: transparent;
    color: currentColor;
}
body.app #app-sidepanel .app-nav .nav-link-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.app #app-sidepanel .nav-link-meta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    color: #7d8ca3;
    font-size: 0.72rem;
    opacity: 0.78;
}
body.app #app-sidepanel .nav-link-meta .bi {
    width: auto;
    color: currentColor;
}
.nav-premium-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 0.9rem;
    padding: 0 0.28rem;
    border: 1px solid rgba(245, 158, 11, 0.34);
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    font-size: 0.48rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    vertical-align: middle;
}
body.sidebar-collapsed #app-sidepanel .nav-premium-badge {
    display: none !important;
}
body.app #app-sidepanel .nav-section-title + .nav-item .nav-link {
    margin-top: 0;
}
body.app #app-sidepanel .nav-section-agenda {
    color: #6f7d91;
}
body.app #app-sidepanel .nav-section-brand {
    color: #6f7d91;
}
body.app #app-sidepanel .nav-item-agenda .nav-icon {
    background: transparent;
    color: #8fa1b8;
}
body.app #app-sidepanel .nav-item-agenda .nav-link:hover {
    color: #ffffff;
    background: rgba(148, 163, 184, 0.08);
}
body.app #app-sidepanel .nav-item-agenda .nav-link:hover .nav-icon,
body.app #app-sidepanel .nav-item-agenda .nav-link.active .nav-icon {
    background: transparent;
    color: currentColor;
}
body.app #app-sidepanel .nav-item-agenda .nav-link.active {
    color: #5ee0a1;
    background: rgba(20, 184, 166, 0.09);
    box-shadow: inset 0.12rem 0 0 #23d18b;
}
body.app #app-sidepanel .nav-item-brand .nav-icon {
    background: transparent;
    color: #8fa1b8;
}
body.app #app-sidepanel .nav-item-brand .nav-link:hover {
    color: #ffffff;
    background: rgba(148, 163, 184, 0.08);
}
body.app #app-sidepanel .nav-item-brand .nav-link:hover .nav-icon,
body.app #app-sidepanel .nav-item-brand .nav-link.active .nav-icon {
    background: transparent;
    color: currentColor;
}
body.app #app-sidepanel .nav-item-brand .nav-link.active {
    color: #5ee0a1;
    background: rgba(20, 184, 166, 0.09);
    box-shadow: inset 0.12rem 0 0 #23d18b;
}
body.app #app-sidepanel .submenu-arrow {
    margin-left: auto;
    color: #7d8ca3;
}
body.app #app-sidepanel .submenu-list {
    padding: 0.18rem 0 0.35rem 2.35rem;
}
body.app #app-sidepanel .submenu-link {
    display: block;
    margin: 0;
    padding: 0.34rem 0.55rem;
    border-radius: 0.34rem;
    background: transparent;
    color: #273348;
    font-size: 0.78rem;
    font-weight: 500;
}
body.app #app-sidepanel .submenu-link:before {
    display: none;
}
body.app #app-sidepanel .submenu-link:hover,
body.app #app-sidepanel .submenu-link.active {
    color: #0f7f5f;
    background: #eef9f3;
}
body.app #app-sidepanel .app-sidepanel-footer {
    display: none;
}

/* ---------- Collapsible Sidebar ---------- */
#app-sidepanel { transition: width 0.3s ease-in-out; overflow: hidden; }
#app-sidepanel .sidepanel-inner {
    transition: width 0.3s ease-in-out;
}
.app-branding a {
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand-logo-compact {
    display: none;
}

.floating-provider-support {
    position: fixed;
    right: 1.35rem;
    bottom: 1.35rem;
    z-index: 1040;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0 1rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #0b1322;
    color: #ffffff !important;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    box-shadow: 0 1rem 2.2rem rgba(2, 6, 23, 0.22);
    transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.floating-provider-support .bi {
    font-size: 1.05rem;
    line-height: 1;
}
.floating-provider-support:hover {
    background: #111d33;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 1.2rem 2.5rem rgba(2, 6, 23, 0.28);
}

/* Desktop collapsed state */
@media (min-width: 1200px) {
    body.sidebar-collapsed #app-sidepanel { width: 70px !important; }
    body.sidebar-collapsed #app-sidepanel .sidepanel-inner {
        width: 70px !important;
    }
    body.sidebar-collapsed .app-header-inner {
        margin-left: 70px !important;
    }
    body.sidebar-collapsed .app-wrapper {
        margin-left: 70px !important;
    }
    body.sidebar-collapsed #app-sidepanel .nav-link-text,
    body.sidebar-collapsed #app-sidepanel .nav-link-meta,
    body.sidebar-collapsed #app-sidepanel .nav-premium-badge,
    body.sidebar-collapsed #app-sidepanel .submenu-arrow,
    body.sidebar-collapsed #app-sidepanel .app-branding span,
    body.sidebar-collapsed #app-sidepanel .sidebar-provider-card,
    body.sidebar-collapsed #app-sidepanel .nav-section-title,
    body.sidebar-collapsed #app-sidepanel .app-sidepanel-footer .nav-link-text { display: none !important; }
    body.sidebar-collapsed #app-sidepanel .nav-link {
        justify-content: center;
        min-height: 3.2rem;
        padding: 0.875rem 0 !important;
    }
    body.sidebar-collapsed #app-sidepanel .nav-icon {
        margin-right: 0 !important;
    }
    body.sidebar-collapsed #app-sidepanel .submenu { display: none !important; }
    body.sidebar-collapsed #app-sidepanel .app-branding {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 1rem !important;
    }
    body.sidebar-collapsed #app-sidepanel .brand-logo-full { display: none !important; }
    body.sidebar-collapsed #app-sidepanel .brand-logo-compact {
        display: block !important;
        width: 34px;
        height: 34px;
        margin: 0 auto;
        object-fit: contain;
        filter: brightness(0) invert(1);
    }
    body.sidebar-collapsed #app-sidepanel .app-menu {
        padding: 0 0.45rem;
    }
    body.sidebar-collapsed #app-sidepanel .app-sidepanel-footer {
        padding: 0.45rem;
    }
}

@media (max-width: 575.98px) {
    .floating-provider-support {
        right: 1rem;
        bottom: 1rem;
        width: 3.05rem;
        min-height: 3.05rem;
        padding: 0;
    }
    .floating-provider-support span {
        display: none;
    }
}

/* Sidebar toggle */
.sidepanel-toggler {
    width: 2.35rem;
    height: 2.35rem;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--surface-soft);
    color: var(--brand-green-dark);
    cursor: pointer;
    text-decoration: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.sidepanel-toggler:hover {
    background: rgba(93, 167, 147, 0.14);
    color: var(--brand-green-dark);
    transform: translateY(-1px);
}
.sidepanel-toggler i { font-size: 1.35rem; line-height: 1; }
.sidepanel-toggler svg { width: 24px; height: 24px; color: var(--secondary); }
.sidepanel-toggler:hover svg { color: var(--brand-green-dark); }

/* ---------- App Wrapper / Content ---------- */
.app-wrapper { padding-top: 70px; transition: margin-left 0.3s ease-in-out; }
.app-content { padding-top: 1.5rem; }

/* ---------- Notification Bell ---------- */
.btn-notif-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-green-dark);
    font-size: 1.2rem;
    padding: 0.3rem 0.5rem;
    text-decoration: none !important;
    transition: opacity 0.2s ease;
}
.app-utility-item > .btn-notif-bell,
.btn-notif-bell .bi {
    color: var(--brand-green-dark);
}
.btn-notif-bell:hover { opacity: 0.7; }
.btn-notif-bell .fas.fa-bell,
.btn-notif-bell .bi.bi-bell { font-size: 1.3rem; }
.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--white);
}

/* ---------- App Utilities ---------- */
.app-utilities { display: flex; align-items: center; gap: 0.75rem; }
.app-utilities .imgPrestador2 { width: 38px; height: 38px; object-fit: cover; border-radius: 50%; border: 2px solid var(--primary); }
.user-avatar-toggle { text-decoration: none !important; }
.app-nav .nav-link .badge { font-size: 0.65rem; vertical-align: middle; margin-left: 0.35rem; }

/* ---------- Sidebar badge in nav ---------- */
.app-nav .nav-link .badge-pill { font-size: 0.65rem; vertical-align: middle; }

/* ---------- Headerless Prestador Layout ---------- */
body.app {
    padding-top: 0 !important;
}
body.app .app-header {
    height: 0 !important;
    min-height: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}
body.app .app-header-inner {
    margin-left: 0 !important;
}
body.app .app-header .container-fluid,
body.app .app-header-content,
body.app .app-header .row {
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
body.app .app-wrapper {
    padding-top: 0 !important;
}
body.app .app-content {
    padding-top: 5px !important;
}

@media (max-width: 1199.98px) {
    body.app .sidepanel-toggler {
        position: fixed;
        z-index: 1042;
        top: 0.75rem;
        left: 0.75rem;
        width: 2.45rem;
        height: 2.45rem;
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 50%;
        background: #ffffff;
        color: var(--brand-green-dark);
        box-shadow: 0 0.6rem 1.3rem rgba(15, 23, 42, 0.14);
    }
}

/* ---------- Provider Sidebar Header ---------- */
body.app #app-sidepanel .sidepanel-inner {
    display: flex;
    flex-direction: column;
}
body.app .app-branding {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    min-height: 5.45rem;
    padding: 1.35rem 1.45rem 1.05rem;
}
.provider-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 0.75rem;
    color: #ffffff !important;
    text-decoration: none !important;
}
.provider-avatar-wrap {
    position: relative;
    display: inline-flex;
    width: 2.85rem;
    height: 2.85rem;
    flex: 0 0 2.85rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}
.provider-avatar {
    width: 2.65rem;
    height: 2.65rem;
    border: 2px solid rgba(255, 255, 255, 0.88);
    border-radius: 50%;
    object-fit: cover;
}
.provider-brand-text {
    min-width: 0;
}
.provider-name {
    display: inline-flex;
    max-width: 8.9rem;
    align-items: center;
    gap: 0.4rem;
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.provider-whatsapp-dot {
    width: 0.42rem;
    height: 0.42rem;
    flex: 0 0 0.42rem;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.15);
}
.provider-whatsapp-dot.is-connected {
    background: #20d67b;
    box-shadow: 0 0 0 3px rgba(32, 214, 123, 0.16);
}
.provider-whatsapp-dot.is-disconnected {
    background: #94a3b8;
}
.sidebar-prevpet-brand {
    margin: auto 1.4rem 1.25rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    color: #8290a5;
    font-size: 0.64rem;
}
.sidebar-prevpet-brand img {
    display: block;
    width: 6.5rem;
    height: auto;
    margin-bottom: 0.65rem;
}
.sidebar-prevpet-brand span {
    display: block;
}

body.app #app-sidepanel .app-nav-main {
    flex: 1 1 auto;
}
body.app #app-sidepanel .nav-link-logout {
    color: #fca5a5;
}
body.app #app-sidepanel .nav-link-logout:hover {
    color: #ffffff;
    background: rgba(248, 113, 113, 0.12);
}

/* ---------- Sidebar Notification Bell ---------- */
.app-branding .btn-notif-bell {
    width: 2.25rem;
    height: 2.25rem;
    flex: 0 0 2.25rem;
    padding: 0;
    border-radius: 50%;
    color: #c7d2e3 !important;
    background: transparent;
    font-size: 1.18rem;
}
.app-branding .btn-notif-bell:hover {
    opacity: 1;
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
}
.app-branding .btn-notif-bell.has-unread {
    color: #ffffff !important;
    animation: notifBellNudge 4.8s ease-in-out infinite;
}
.app-branding .btn-notif-bell.has-unread .notif-badge {
    top: 0.06rem;
    right: -0.16rem;
    min-width: 1.05rem;
    height: 1.05rem;
    padding: 0 0.24rem;
    border: 2px solid #07101d;
    background: #18c878;
    color: #ffffff;
    font-size: 0.6rem;
    box-shadow: none;
}
@keyframes notifBellNudge {
    0%, 82%, 100% { transform: rotate(0deg); }
    86% { transform: rotate(-7deg); }
    90% { transform: rotate(6deg); }
    94% { transform: rotate(-3deg); }
}

@media (prefers-reduced-motion: reduce) {
    .app-branding .btn-notif-bell.has-unread {
        animation: none;
    }
}

/* Desktop collapsed state refinements */
@media (min-width: 1200px) {
    .sidepanel-toggler {
        position: fixed;
        z-index: 1042;
        top: 13.7rem;
        left: calc(var(--sidebar-width) - 1.15rem);
        width: 2.65rem;
        height: 2.65rem;
        border: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 50%;
        background: #1f2b3f;
        color: #ffffff;
        box-shadow: 0 0.75rem 1.35rem rgba(2, 6, 23, 0.26);
    }
    .sidepanel-toggler:hover {
        background: #26354f;
        color: #ffffff;
        transform: translateX(-1px);
    }
    .sidepanel-toggler i {
        font-size: 1.2rem;
    }
    body.sidebar-collapsed .sidepanel-toggler {
        left: calc(70px - 1.15rem);
    }
    body.sidebar-collapsed .sidepanel-toggler i {
        transform: rotate(180deg);
    }
    body.sidebar-collapsed #app-sidepanel .provider-brand-text,
    body.sidebar-collapsed #app-sidepanel .btn-notif-bell,
    body.sidebar-collapsed #app-sidepanel .sidebar-prevpet-brand {
        display: none !important;
    }
    body.sidebar-collapsed #app-sidepanel .app-branding {
        justify-content: center;
        min-height: 4.6rem;
        padding: 1.2rem 0.35rem 0.9rem !important;
    }
    body.sidebar-collapsed #app-sidepanel .provider-brand {
        justify-content: center;
        width: 100%;
        gap: 0;
    }
    body.sidebar-collapsed #app-sidepanel .app-branding .provider-avatar-wrap {
        display: inline-flex !important;
        width: 2.55rem;
        height: 2.55rem;
        flex: 0 0 2.55rem;
        overflow: hidden;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
    }
    body.sidebar-collapsed #app-sidepanel .app-branding .provider-avatar {
        display: block !important;
        width: 2.35rem;
        height: 2.35rem;
        border-radius: 50% !important;
        object-fit: cover;
    }
}

/* ---------- Mobile sidebar ---------- */
@media (max-width: 1199px) {
    body.sidebar-mobile-open .app-wrapper { margin-left: 0; }
    body.sidebar-mobile-open::after {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 1020;
    }
    #app-sidepanel.sidepanel-visible { z-index: 1035; }
}

/* ---------- Utility Colors ---------- */
.text-gray-300 { color: #dddfeb !important; }
.text-gray-800 { color: #5a5c69 !important; }
.shadow { box-shadow: var(--shadow) !important; }

/* ---------- New Create / Empty State ---------- */
.newCreate { display: flex; flex-direction: column; width: 100%; justify-content: center; align-items: center; }
.newCreate img { width: 100%; max-width: 500px; }
.newCreate label {
    font-size: 24px;
    font-weight: 200;
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 5px;
    border-radius: 10px;
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 576px) {
    .stat-card .stat-value { font-size: 1.4rem; }
    .page-header-row h1 { font-size: 1.1rem; }
    .chart-area { height: 14rem; }
    .chart-pie  { height: 12rem; }
    .app-utilities { gap: 0.4rem; }
    .btn-notif-bell { padding: 0.2rem 0.35rem; }
    .dashboard-hero { padding: 1rem; }
    .dashboard-hero h1 { font-size: 1.35rem; }
    .dashboard-actions { width: 100%; }
    .dashboard-actions .btn { flex: 1 1 9rem; justify-content: center; }
    .status-legend { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .dashboard-hero {
        align-items: flex-start;
        flex-direction: column;
    }
    .dashboard-hero-illustration {
        display: none;
    }
    .list-hero {
        align-items: flex-start;
        flex-direction: column;
    }
    .list-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .segmented-actions {
        width: 100%;
    }
    .segmented-btn {
        flex: 1 1 0;
        justify-content: center;
    }
    .resource-row {
        grid-template-columns: 3rem minmax(0, 1fr);
        align-items: flex-start;
    }
    .sale-people,
    .resource-stats,
    .resource-meta,
    .resource-actions {
        grid-column: 2;
        justify-content: flex-start;
    }
    .attendance-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
    .attendance-filters {
        width: 100%;
        grid-template-columns: 1fr;
    }
    .attendance-day-panel {
        grid-template-columns: 1fr;
    }
    .day-metrics {
        justify-content: flex-start;
    }
    .day-metrics span {
        flex: 1 1 8rem;
        justify-content: center;
    }
    .vendas-filters {
        grid-template-columns: 1fr;
    }
    .client-search {
        grid-template-columns: 1fr;
    }
    .client-search .btn {
        width: 100%;
    }
    .client-layout {
        grid-template-columns: 1fr;
    }
    .client-detail-panel {
        position: static;
    }
    .client-highlight-row,
    .client-mini-row {
        align-items: flex-start;
        flex-direction: column;
    }
    .vendas-filters .btn {
        width: 100%;
    }
    .attendance-slot {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }
    .attendance-list {
        padding-left: 0.25rem;
    }
    .attendance-list::before {
        left: 0.55rem;
    }
    .slot-rail-dot {
        left: 0.05rem;
    }
    .slot-contact {
        width: 100%;
    }
    .slot-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .slot-actions .btn:not(.btn-icon) {
        flex: 1 1 10rem;
    }
    .profile-card {
        grid-template-columns: 1fr;
    }
    .form-grid,
    .profile-logo-form {
        grid-template-columns: 1fr;
    }
    .profile-savebar {
        justify-content: stretch;
    }
    .profile-savebar .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ---------- Conteudo Atendimento Detalhe ---------- */
.conteudoAtendimentoDetalhe {
    background-color: var(--white);
    display: flex;
    padding: 20px;
    justify-content: center;
    flex-direction: column;
    margin-bottom: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.conteudoAtendimentoDetalhe input { padding: 5px; border: none; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.conteudoAtendimentoDetalhe select { padding: 5px; border: none; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.conteudoAtendimentoDetalhe div { display: flex; padding: 20px; flex-direction: row; }
.conteudoAtendimentoDetalhe label { font-weight: 700; font-size: 15px; }
.conteudoAtendimentoDetalhe span { display: flex; margin-top: -10px; padding: 5px; }

/* ---------- Atendimento Detalhe ---------- */
.attendance-detail-page,
.attendance-detail-shell {
    width: 100%;
}
.attendance-detail-shell {
    max-width: 1180px;
    margin: 0 auto;
}
.detail-hero {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 1.35rem;
    overflow: hidden;
    border: 1px solid rgba(219, 228, 238, 0.88);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.96), rgba(238,246,243,0.92)),
        linear-gradient(90deg, rgba(17,156,115,0.12), rgba(37,99,235,0.10));
    box-shadow: var(--shadow-sm);
}
.detail-hero::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--success), var(--primary), var(--warning));
}
.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 2.45rem;
    padding: 0 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.78);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}
.detail-back:hover {
    color: var(--primary);
    border-color: rgba(37, 99, 235, 0.28);
    background: var(--white);
}
.detail-title {
    min-width: 0;
    text-align: center;
}
.detail-title h1 {
    margin: 0.05rem 0;
    font-size: clamp(1.35rem, 2vw, 1.9rem);
}
.detail-title p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}
.detail-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.45rem;
    padding: 0 0.95rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-pill);
    background: var(--surface-soft);
    color: var(--text);
    font-weight: 700;
    white-space: nowrap;
}
.detail-status-pill.Agendado,
.detail-status-orb.Agendado,
.timeline-dot.Agendado {
    border-left: 0 !important;
    background: #fff6cf !important;
    color: #9a6508;
}
.detail-status-pill.Confirmado,
.detail-status-orb.Confirmado,
.timeline-dot.Confirmado {
    border-left: 0 !important;
    background: #dff8ed !important;
    color: var(--success-dark);
}
.detail-status-pill.Cancelado,
.detail-status-orb.Cancelado,
.timeline-dot.Cancelado {
    border-left: 0 !important;
    background: #fee2e2 !important;
    color: var(--danger-dark);
}
.detail-status-pill.Realizado,
.detail-status-orb.Realizado,
.timeline-dot.Realizado {
    border-left: 0 !important;
    background: #dfe8ff !important;
    color: var(--primary-dark);
}
.detail-status-pill.Bloqueado,
.detail-status-orb.Bloqueado,
.timeline-dot.Bloqueado {
    border-left: 0 !important;
    background: #e2e8f0 !important;
    color: #334155;
}
.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(20rem, 0.92fr);
    gap: 1rem;
}
.detail-grid.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.detail-card {
    min-width: 0;
    padding: 1.25rem;
    border: 1px solid rgba(219, 228, 238, 0.9);
    border-radius: var(--radius);
    background: rgba(255,255,255,0.92);
    box-shadow: var(--shadow-sm);
}
.detail-status-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.detail-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}
.detail-card-kicker {
    display: block;
    color: var(--success-dark);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.detail-card h2 {
    margin: 0.15rem 0 0;
    font-size: 1.05rem;
}
.detail-card-icon,
.detail-status-orb {
    width: 2.65rem;
    height: 2.65rem;
    display: inline-flex;
    flex: 0 0 2.65rem;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--surface-soft);
    color: var(--success-dark);
    font-size: 1.2rem;
}
.status-timeline {
    display: grid;
    gap: 0.75rem;
}
.timeline-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
}
.timeline-dot {
    width: 0.78rem;
    height: 0.78rem;
    display: inline-block;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.04);
}
.timeline-item strong,
.timeline-item small {
    display: block;
}
.timeline-item small {
    color: var(--muted);
    font-size: 0.78rem;
}
.timeline-empty {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    color: var(--muted);
    background: rgba(244, 247, 251, 0.6);
}
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: auto;
}
.detail-actions .btn,
.detail-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.45rem;
    font-weight: 700;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.info-grid.compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
.info-item {
    min-width: 0;
    padding: 0.85rem;
    border: 1px solid rgba(219, 228, 238, 0.72);
    border-radius: var(--radius);
    background: #f8fbfd;
}
.info-item span {
    display: block;
    margin-bottom: 0.18rem;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
}
.info-item strong {
    display: block;
    min-height: 1.45rem;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 0.92rem;
}
.linked-sales-list {
    display: grid;
    gap: 0.85rem;
}
.linked-sale-item {
    display: grid;
    grid-template-columns: minmax(8rem, 0.42fr) minmax(13rem, 1fr) auto;
    gap: 0.9rem;
    align-items: center;
    padding: 0.95rem;
    border: 1px solid rgba(219, 228, 238, 0.84);
    border-radius: var(--radius);
    background: #f8fbfd;
}
.linked-sale-main {
    min-width: 0;
}
.linked-sale-main .resource-id,
.linked-sale-main strong,
.linked-sale-main small {
    display: block;
}
.linked-sale-main .resource-id {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
}
.linked-sale-main strong {
    color: var(--text);
    font-size: 1.05rem;
}
.linked-sale-main small {
    color: var(--muted);
    font-size: 0.78rem;
}
.linked-sale-info {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 0.8rem;
    min-width: 0;
}
.linked-sale-info span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    color: var(--muted);
    font-size: 0.84rem;
    overflow-wrap: anywhere;
}
.linked-sale-info i {
    color: var(--primary);
}
.linked-sale-status {
    display: flex;
    justify-content: flex-end;
}
.linked-sale-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-height: 2.15rem;
    padding: 0 0.7rem;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}
.linked-sale-badge.paid,
.timeline-dot.paid {
    background: #dff8ed;
    color: var(--success-dark);
}
.linked-sale-badge.pending,
.timeline-dot.pending {
    background: #fff6cf;
    color: #9a6508;
}
.linked-sale-badge.canceled,
.timeline-dot.canceled {
    background: #fee2e2;
    color: var(--danger-dark);
}
.linked-sale-badge.muted,
.timeline-dot.muted {
    background: #e2e8f0;
    color: #334155;
}
.sale-history-timeline {
    grid-column: 1 / -1;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(219, 228, 238, 0.8);
}
.detail-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}
.detail-form-grid label {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.35rem;
    margin: 0;
    color: var(--text);
    font-weight: 700;
}
.detail-form-grid label > span {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}
.detail-form-grid label:only-child {
    grid-column: 1 / -1;
}
.detail-form-grid input,
.detail-form-grid select,
.detail-form-grid textarea {
    width: 100%;
    min-height: 2.65rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--text);
    font-family: var(--font);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.detail-form-grid textarea {
    resize: vertical;
}
.detail-form-grid input:focus,
.detail-form-grid select:focus,
.detail-form-grid textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px var(--primary-light);
}
.detail-submit {
    width: 100%;
    margin-bottom: 1rem;
}

@media (max-width: 900px) {
    .detail-hero,
    .detail-grid,
    .detail-grid.two-columns {
        grid-template-columns: 1fr;
    }
    .detail-title {
        text-align: left;
    }
    .detail-status-pill {
        width: 100%;
    }
    .info-grid,
    .info-grid.compact,
    .detail-form-grid,
    .linked-sale-item,
    .linked-sale-info {
        grid-template-columns: 1fr;
    }
    .linked-sale-status {
        justify-content: flex-start;
    }
    .detail-actions .btn {
        width: 100%;
    }
}
/* WhatsApp portal */
.whatsapp-page .app-page-title {
    font-size: 1.55rem;
    font-weight: 700;
}

.whatsapp-instance-card,
.whatsapp-panel-card {
    border: 0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

.whatsapp-empty-instance {
    display: flex;
    min-height: 300px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: #667085;
}

.whatsapp-empty-instance i {
    color: #25d366;
    font-size: 3rem;
    margin-bottom: .75rem;
}

.whatsapp-empty-instance h5 {
    color: #1f2937;
    font-weight: 700;
}

.whatsapp-empty-instance p {
    max-width: 440px;
}

.whatsapp-steps {
    display: grid;
    gap: .85rem;
}

.whatsapp-steps div {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #344054;
}

.whatsapp-steps span {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    border-radius: 50%;
    background: #e8f7ee;
    color: #128c4a;
    font-weight: 700;
}

.whatsapp-instance-meta {
    display: grid;
    gap: .75rem;
}

.whatsapp-instance-meta div {
    padding: .85rem 1rem;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    background: #fbfcfe;
}

.whatsapp-instance-meta span {
    display: block;
    color: #667085;
    font-size: .78rem;
    margin-bottom: .15rem;
}

.whatsapp-instance-meta strong {
    display: block;
    color: #1f2937;
    font-size: .9rem;
    word-break: break-word;
}

.whatsapp-qr-img {
    width: min(280px, 100%);
    border: 8px solid #fff;
    border-radius: 8px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .16);
}

.whatsapp-chat-shell {
    display: grid;
    grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
    height: calc(100vh - 185px);
    min-height: 560px;
    overflow: hidden;
    border: 1px solid #e6ebf2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .08);
}

.whatsapp-chat-sidebar {
    display: flex;
    min-width: 0;
    flex-direction: column;
    border-right: 1px solid #e6ebf2;
    background: #f8fafc;
}

.whatsapp-chat-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem;
    border-bottom: 1px solid #e6ebf2;
    background: #fff;
}

.whatsapp-chat-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #1f2937;
}

.whatsapp-chat-list {
    overflow-y: auto;
}

.whatsapp-new-chat {
    display: flex;
    gap: .45rem;
    padding: .65rem;
    border-bottom: 1px solid #e6ebf2;
    background: #fff;
}

.whatsapp-new-chat input {
    width: 100%;
    min-width: 0;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: .55rem .65rem;
    outline: 0;
}

.whatsapp-new-chat .btn {
    flex: 0 0 auto;
}

.whatsapp-chat-item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: .75rem;
    padding: .85rem .9rem;
    border: 0;
    border-bottom: 1px solid #e6ebf2;
    background: transparent;
    text-align: left;
}

.whatsapp-chat-item:hover,
.whatsapp-chat-item.active {
    background: #e9f7ef;
}

.whatsapp-chat-item > i {
    color: #128c4a;
    font-size: 1.35rem;
    flex: 0 0 auto;
}

.whatsapp-chat-item span {
    display: grid;
    min-width: 0;
    gap: .1rem;
}

.whatsapp-chat-item strong,
.whatsapp-chat-item small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.whatsapp-chat-item strong {
    color: #1f2937;
    font-size: .92rem;
}

.whatsapp-chat-item small {
    color: #667085;
    font-size: .76rem;
}

.whatsapp-chat-empty,
.whatsapp-chat-error {
    padding: 1rem;
    color: #667085;
    text-align: center;
}

.whatsapp-chat-empty small {
    display: block;
    margin-top: .35rem;
    color: #98a2b3;
}

.whatsapp-chat-error {
    color: #b42318;
}

.whatsapp-conversation {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.whatsapp-conversation-header {
    display: flex;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid #e6ebf2;
    background: #fff;
}

.whatsapp-conversation-header small {
    display: block;
    color: #667085;
    font-size: .76rem;
}

.whatsapp-header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.whatsapp-conversation-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 1rem;
    background: #eef1ed;
}

.whatsapp-empty-chat {
    display: flex;
    height: 100%;
    min-height: 240px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #667085;
    gap: .5rem;
    text-align: center;
}

.whatsapp-empty-chat i {
    font-size: 2.5rem;
    color: #98a2b3;
}

.whatsapp-msg-row {
    display: flex;
    margin-bottom: .45rem;
}

.whatsapp-msg-row.from-me {
    justify-content: flex-end;
}

.whatsapp-msg-row.from-them {
    justify-content: flex-start;
}

.whatsapp-msg-bubble {
    max-width: min(72%, 720px);
    padding: .5rem .65rem;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
    color: #1f2937;
    white-space: pre-wrap;
    word-break: break-word;
}

.whatsapp-msg-row.from-me .whatsapp-msg-bubble {
    background: #d9fdd3;
}

.whatsapp-msg-bubble time {
    display: block;
    margin-top: .2rem;
    color: #667085;
    font-size: .68rem;
    text-align: right;
}

.whatsapp-msg-image,
.whatsapp-msg-video {
    display: block;
    max-width: 320px;
    width: 100%;
    border-radius: 8px;
    margin-bottom: .35rem;
}

.whatsapp-msg-audio {
    display: block;
    max-width: 320px;
    width: 100%;
}

.whatsapp-msg-media {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .55rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, .55);
}

.whatsapp-composer {
    border-top: 1px solid #e6ebf2;
    background: #f8fafc;
    padding: .75rem;
}

.whatsapp-composer form {
    display: flex;
    gap: .5rem;
}

.whatsapp-composer .btn {
    flex: 0 0 auto;
}

.whatsapp-composer input {
    width: 100%;
    min-width: 0;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: .65rem .75rem;
    outline: 0;
}

@media (max-width: 767.98px) {
    .whatsapp-chat-shell {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }

    .whatsapp-chat-sidebar {
        max-height: 320px;
        border-right: 0;
        border-bottom: 1px solid #e6ebf2;
    }

    .whatsapp-conversation-body {
        min-height: 420px;
    }

    .whatsapp-msg-bubble {
        max-width: 88%;
    }
}
