/* ============================================
   AUTH & DASHBOARD STYLES
   Mesmo design system da landing page
   ============================================ */

/* ---------- LOGIN PAGE ---------- */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--clr-text-light);
    font-size: 14px;
    font-weight: 400;
    transition: var(--transition);
}

.auth-back:hover {
    color: var(--clr-primary);
}

.auth-card {
    padding: 40px 32px;
    border-radius: var(--radius-md);
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    width: 56px;
    height: auto;
    margin-bottom: 16px;
}

.auth-title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 600;
    font-style: italic;
    color: var(--clr-text);
    margin-bottom: 4px;
}

.auth-subtitle {
    font-size: 14px;
    color: var(--clr-text-light);
}

/* ---------- MENSAGENS ---------- */
.auth-message {
    display: none;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 20px;
    text-align: center;
}

.auth-message.error {
    background: rgba(220, 53, 69, 0.1);
    color: #c0392b;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.auth-message.success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border: 1px solid rgba(39, 174, 96, 0.2);
}

.auth-message.info {
    background: rgba(155, 89, 182, 0.1);
    color: var(--clr-primary);
    border: 1px solid rgba(155, 89, 182, 0.2);
}

/* ---------- FORMULÁRIO ---------- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--clr-text);
    margin-bottom: 6px;
}

.auth-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--clr-glass-border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    transition: var(--transition);
}

.auth-input-wrapper:focus-within {
    border-color: var(--clr-primary-light);
    box-shadow: 0 0 0 3px rgba(155, 89, 182, 0.1);
}

.auth-input-wrapper svg {
    flex-shrink: 0;
    color: var(--clr-text-muted);
}

.auth-input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 14px 0;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--clr-text);
    outline: none;
}

.auth-input-wrapper input::placeholder {
    color: var(--clr-text-muted);
}

.auth-toggle-pass {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--clr-text-muted);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.auth-toggle-pass:hover {
    color: var(--clr-primary);
}

/* ---------- BOTÃO AUTH ---------- */
.btn--auth {
    width: 100%;
    justify-content: center;
    padding: 16px;
    font-size: 15px;
    margin-top: 4px;
    position: relative;
}

.btn--auth.loading span {
    opacity: 0;
}

.btn--auth.loading .auth-spinner {
    display: block;
}

.auth-spinner {
    display: none;
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ---------- FOOTER AUTH ---------- */
.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-link {
    background: none;
    border: none;
    color: var(--clr-primary);
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.auth-link:hover {
    color: var(--clr-primary-dark);
    text-decoration: underline;
}

.auth-forgot-hint {
    color: var(--clr-text-muted);
    font-size: 13px;
    font-family: var(--font-body);
    line-height: 1.5;
}

/* ============================================
   DASHBOARD
   ============================================ */
.dash-body {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--clr-bg-start) 0%, var(--clr-bg-mid) 50%, var(--clr-bg-end) 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

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

/* ---------- SIDEBAR ---------- */
.sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1100;
    background: rgba(243, 232, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--clr-glass-border);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1050;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar__logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.sidebar__brand {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sidebar__name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    font-style: italic;
    color: var(--clr-text);
    line-height: 1.2;
}

.sidebar__subtitle {
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--clr-primary);
}

.sidebar__close {
    background: none;
    border: none;
    color: var(--clr-text-muted);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
    flex-shrink: 0;
}

.sidebar__close:hover {
    color: var(--clr-primary);
}

.sidebar__nav {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.sidebar__section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--clr-text-muted);
    margin-bottom: 16px;
    display: block;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--clr-text-light);
    font-size: 14px;
    font-weight: 400;
    transition: var(--transition);
    margin-bottom: 4px;
}

.sidebar__link:hover {
    background: rgba(155, 89, 182, 0.08);
    color: var(--clr-primary);
}

.sidebar__link.active {
    background: rgba(155, 89, 182, 0.12);
    color: var(--clr-primary);
    font-weight: 500;
}

.sidebar__footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(155, 89, 182, 0.1);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar__user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sidebar__user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar__user-details {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.sidebar__user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--clr-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__user-email {
    font-size: 11px;
    color: var(--clr-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar__logout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: var(--radius-sm);
    color: #c0392b;
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar__logout:hover {
    background: rgba(220, 53, 69, 0.08);
    border-color: rgba(220, 53, 69, 0.3);
}

/* ---------- MAIN CONTENT ---------- */
.dash-main {
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dash-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: rgba(243, 232, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--clr-glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.dash-topbar__menu {
    background: none;
    border: none;
    color: var(--clr-text);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.dash-topbar__menu:hover {
    color: var(--clr-primary);
}

.dash-topbar__title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    font-style: italic;
    color: var(--clr-text);
    flex: 1;
}

.dash-topbar__user {
    display: flex;
    align-items: center;
}

.dash-topbar__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.dash-content {
    flex: 1;
    padding: 32px 24px;
    display: none;
    flex-direction: column;
    align-items: center;
}

.dash-page.active {
    display: flex;
}

.dash-welcome {
    max-width: 480px;
    width: 100%;
    padding: 48px 32px;
    border-radius: var(--radius-md);
    text-align: center;
    margin-top: 40px;
}

.dash-welcome__icon {
    margin-bottom: 20px;
}

.dash-welcome__title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    font-style: italic;
    color: var(--clr-text);
    margin-bottom: 8px;
}

.dash-welcome__text {
    font-size: 14px;
    color: var(--clr-text-light);
    line-height: 1.6;
}

/* ---------- BOTÕES EXTRAS ---------- */
.btn--sm {
    padding: 10px 20px;
    font-size: 13px;
}

.btn--sm.loading span {
    opacity: 0;
}

.btn--sm.loading .auth-spinner {
    display: block;
}

.btn--ghost {
    background: transparent;
    border: 1px solid var(--clr-glass-border);
    color: var(--clr-text-light);
    padding: 10px 20px;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.btn--ghost:hover {
    border-color: var(--clr-primary-light);
    color: var(--clr-primary);
}

/* ---------- SEÇÃO DASHBOARD ---------- */
.dash-section {
    width: 100%;
    max-width: 700px;
}

.dash-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.dash-section__title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    font-style: italic;
    color: var(--clr-text);
}

/* ---------- FORMULÁRIO FUNCIONÁRIO ---------- */
.employee-form {
    padding: 24px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.employee-form__title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    font-style: italic;
    color: var(--clr-text);
    margin-bottom: 16px;
}

.employee-form__grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.employee-form__actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ---------- LISTA DE FUNCIONÁRIOS ---------- */
.employee-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.employee-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
}

.employee-card__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--clr-primary-light), var(--clr-primary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 600;
    flex-shrink: 0;
}

.employee-card__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.employee-card__name {
    font-size: 14px;
    font-weight: 500;
    color: var(--clr-text);
}

.employee-card__email {
    font-size: 12px;
    color: var(--clr-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-card__role {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.role--admin {
    background: rgba(212, 168, 67, 0.15);
    color: var(--clr-accent-dark);
}

.role--employee {
    background: rgba(155, 89, 182, 0.1);
    color: var(--clr-primary);
}

.employee-card__actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.employee-card__edit,
.employee-card__delete {
    background: none;
    border: none;
    color: var(--clr-text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition);
}

.employee-card__edit:hover {
    color: var(--clr-primary);
    background: rgba(155, 89, 182, 0.08);
}

.employee-card__delete:hover {
    color: #c0392b;
    background: rgba(220, 53, 69, 0.08);
}

.employee-edit {
    padding: 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}

.employee-edit__title {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    font-style: italic;
    color: var(--clr-text);
    margin-bottom: 12px;
}

.employee-loading,
.employee-empty,
.employee-error {
    text-align: center;
    padding: 32px;
    font-size: 14px;
    color: var(--clr-text-muted);
}

.employee-error {
    color: #c0392b;
}

/* ============================================
   DESKTOP - SIDEBAR FIXA
   ============================================ */
@media (min-width: 769px) {
    .sidebar {
        transform: translateX(0);
    }

    .sidebar__close {
        display: none;
    }

    .sidebar-overlay {
        display: none !important;
    }

    .dash-main {
        margin-left: 280px;
    }

    .dash-topbar__menu {
        display: none;
    }
}

/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 768px) {
    .auth-card {
        padding: 32px 24px;
    }

    .auth-title {
        font-size: 24px;
    }

    .dash-topbar__title {
        font-size: 16px;
    }

    .dash-welcome {
        padding: 32px 24px;
        margin-top: 20px;
    }

    .dash-welcome__title {
        font-size: 20px;
    }

    .dash-section__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .employee-card {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 16px;
    }

    .employee-card__role {
        order: 4;
        margin-left: 54px;
    }

    .employee-form__actions {
        flex-direction: column;
    }

    .employee-form__actions .btn {
        width: 100%;
        justify-content: center;
    }
}


/* ============================================
   CLIENTS PAGE
   ============================================ */

.clients-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 14px;
    flex-wrap: wrap;
}

.clients-toolbar__search {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(155, 89, 182, 0.15);
    border-radius: 10px;
    padding: 8px 12px;
    color: var(--clr-text-muted);
}

.clients-toolbar__search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    color: var(--clr-text);
}

.clients-toolbar__filter {
    border: 1px solid rgba(155, 89, 182, 0.2);
    border-radius: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.6);
    font: inherit;
    color: var(--clr-text);
    cursor: pointer;
}

.clients-toolbar__count {
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    margin-left: auto;
    white-space: nowrap;
}

.clients-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.client-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.client-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(155, 89, 182, 0.15);
}

.client-card__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-dark, #7d3c98));
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.client-card__info {
    flex: 1;
    min-width: 0;
}

.client-card__name {
    font-weight: 500;
    color: var(--clr-text);
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-card__meta {
    font-size: 0.82rem;
    color: var(--clr-text-muted);
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.client-card__badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 6px;
    vertical-align: middle;
}

.client-card__badge--gym {
    background: rgba(255, 165, 0, 0.15);
    color: #b65a00;
}

.client-card__badge--inactive {
    background: rgba(0, 0, 0, 0.08);
    color: var(--clr-text-muted);
}

.client-card__edit {
    background: none;
    border: none;
    color: var(--clr-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.15s;
}

.client-card__edit:hover {
    background: rgba(155, 89, 182, 0.1);
}

.clients-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 16px;
    color: var(--clr-text-muted);
    font-size: 0.9rem;
}

/* ----- MODAL ----- */

.client-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.client-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(58, 31, 78, 0.5);
    backdrop-filter: blur(6px);
}

.client-modal__content {
    position: relative;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 18px;
    padding: 24px;
}

.client-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.client-modal__title {
    margin: 0;
    font-size: 1.4rem;
    color: var(--clr-text);
}

.client-modal__close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--clr-text-muted);
    padding: 6px;
    border-radius: 8px;
}

.client-modal__close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.client-form__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
}

.auth-field--full {
    grid-column: 1 / -1;
}

.client-form__grid select,
.client-form__grid textarea {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    color: var(--clr-text);
    resize: vertical;
}

.client-modal__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(155, 89, 182, 0.1);
}

.btn--danger {
    color: #c0392b;
    margin-right: auto;
}

.btn--danger:hover {
    background: rgba(192, 57, 43, 0.1);
}

/* ----- ANAMNESE ----- */

.client-anamnese {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(155, 89, 182, 0.1);
}

.client-anamnese h4 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: var(--clr-text);
}

.client-anamnese__list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.client-anamnese__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    font-size: 0.85rem;
}

.client-anamnese__item span:first-child {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anamnese-download {
    background: none;
    border: 1px solid var(--clr-primary);
    color: var(--clr-primary);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}

.anamnese-download:hover {
    background: var(--clr-primary);
    color: white;
}

/* Mobile */
@media (max-width: 768px) {
    .client-form__grid {
        grid-template-columns: 1fr;
    }

    .clients-toolbar__count {
        order: -1;
        width: 100%;
        margin-left: 0;
    }

    .client-modal__actions {
        flex-direction: column-reverse;
    }

    .client-modal__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .btn--danger {
        margin-right: 0;
    }
}

/* ============================================
   SERVICES & PACKAGES PAGE
   ============================================ */

.svc-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(155, 89, 182, 0.15);
}

.svc-tab {
    background: none;
    border: none;
    padding: 10px 18px;
    font: inherit;
    color: var(--clr-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}

.svc-tab:hover { color: var(--clr-text); }
.svc-tab.active {
    color: var(--clr-primary);
    border-bottom-color: var(--clr-primary);
    font-weight: 500;
}

.svc-tab-content { display: none; }
.svc-tab-content.active { display: block; }

.svc-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.svc-toolbar__check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--clr-text-muted);
    cursor: pointer;
}

.svc-group {
    margin-bottom: 24px;
}

.svc-group__title {
    font-size: 0.95rem;
    color: var(--clr-text-muted);
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.svc-group__title span {
    font-weight: 400;
    color: var(--clr-text-muted);
    opacity: 0.7;
}

.svc-group__items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.svc-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.svc-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(155, 89, 182, 0.15);
}

.svc-card--inactive {
    opacity: 0.55;
}

.svc-card__main { flex: 1; min-width: 0; }
.svc-card__name {
    font-weight: 500;
    color: var(--clr-text);
    margin-bottom: 4px;
}
.svc-card__meta {
    font-size: 0.8rem;
    color: var(--clr-text-muted);
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}
.svc-card__price {
    font-weight: 600;
    color: var(--clr-primary);
    white-space: nowrap;
}

/* Pacotes */
.packages-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.pkg-card {
    padding: 16px;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.pkg-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(155, 89, 182, 0.15);
}
.pkg-card__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    gap: 8px;
}
.pkg-card__name {
    margin: 0;
    font-size: 1.05rem;
    color: var(--clr-text);
}
.pkg-card__price {
    color: var(--clr-primary);
    font-weight: 700;
    font-size: 1.05rem;
    white-space: nowrap;
}
.pkg-card__desc {
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    margin: 0 0 10px 0;
}
.pkg-card__stats {
    display: flex;
    gap: 12px;
    font-size: 0.82rem;
    color: var(--clr-text-muted);
    margin-bottom: 8px;
}
.pkg-card__stats strong {
    color: var(--clr-text);
}
.pkg-card__rules {
    font-size: 0.78rem;
    color: var(--clr-text-muted);
    margin: 0;
    padding-top: 8px;
    border-top: 1px dashed rgba(155, 89, 182, 0.15);
    font-style: italic;
}

/* Lista de profissionais no modal */
.svc-professionals {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(155, 89, 182, 0.1);
}
.svc-professionals h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: var(--clr-text);
}
.svc-professionals__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.svc-prof-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(155, 89, 182, 0.12);
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.86rem;
    transition: background 0.15s, border-color 0.15s;
}
.svc-prof-item:hover {
    background: rgba(155, 89, 182, 0.06);
}
.svc-prof-item input { cursor: pointer; }
.svc-prof-item input:checked ~ span {
    color: var(--clr-primary);
    font-weight: 500;
}

@media (max-width: 768px) {
    .svc-group__items,
    .packages-list {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   EMPLOYEE EDIT - Vínculo de serviços
   ============================================ */

.emp-services {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(155, 89, 182, 0.1);
}

.emp-services h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: var(--clr-text);
}

.emp-services__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.emp-svc-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 4px;
}

.emp-svc-btn-link {
    background: none;
    border: none;
    color: var(--clr-primary);
    font: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.emp-svc-btn-link:hover { opacity: 0.8; }

.emp-svc-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.emp-svc-group__label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--clr-text-muted);
    opacity: 0.8;
}

.emp-svc-group__items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 8px;
}

/* ============================================
   SETTINGS PAGE
   ============================================ */

.settings-card {
    padding: 20px;
    border-radius: 14px;
    margin-bottom: 16px;
}

.settings-card h3 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    color: var(--clr-text);
}

.settings-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
    flex-wrap: wrap;
}

.settings-card__head h3 { margin: 0; }

.settings-hint {
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    margin: 0 0 14px 0;
}

.settings-form { width: 100%; }

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
}

.settings-days {
    margin-top: 14px;
}

.settings-days > label {
    display: block;
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    margin-bottom: 8px;
}

.settings-days__list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.settings-day {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(155, 89, 182, 0.15);
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.settings-day:hover { background: rgba(155, 89, 182, 0.06); }
.settings-day input { cursor: pointer; }
.settings-day input:checked ~ span {
    color: var(--clr-primary);
    font-weight: 500;
}

/* Bloqueios */
.block-form {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.4);
}

.blocks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.block-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
}

.block-card__date {
    font-weight: 500;
    color: var(--clr-text);
    min-width: 140px;
    font-size: 0.92rem;
}

.block-card__info {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    align-items: center;
}

.block-card__who {
    color: var(--clr-text);
    font-weight: 500;
}

.block-card__who--all {
    color: #b65a00;
    background: rgba(255, 165, 0, 0.12);
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
}

.block-card__period {
    color: var(--clr-text-muted);
}

.block-card__reason {
    flex: 1;
    color: var(--clr-text-muted);
    font-style: italic;
    font-size: 0.82rem;
}

.block-card__del {
    background: none;
    border: none;
    color: #c0392b;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    opacity: 0.7;
    transition: opacity 0.15s, background 0.15s;
}

.block-card__del:hover {
    opacity: 1;
    background: rgba(192, 57, 43, 0.1);
}

/* API Keys */
.apikey-show {
    padding: 16px;
    margin-bottom: 14px;
    border: 1px dashed var(--clr-primary);
    border-radius: 12px;
}

.apikey-show h4 {
    margin: 0 0 6px 0;
    color: var(--clr-primary);
}

.apikey-show p {
    margin: 0 0 10px 0;
    font-size: 0.85rem;
    color: var(--clr-text-muted);
}

.apikey-show__value {
    display: flex;
    gap: 8px;
    align-items: center;
    background: rgba(0, 0, 0, 0.05);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
}

.apikey-show__value code {
    flex: 1;
    word-break: break-all;
    font-size: 0.85rem;
    color: var(--clr-text);
}

.apikeys-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.apikey-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 12px;
}

.apikey-card__main { flex: 1; min-width: 0; }

.apikey-card__name {
    font-weight: 500;
    color: var(--clr-text);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.apikey-card__meta {
    font-size: 0.82rem;
    color: var(--clr-text-muted);
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.apikey-card__meta code {
    background: rgba(0, 0, 0, 0.06);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.78rem;
}

.apikey-card__badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 500;
}

.apikey-card__badge--active {
    background: rgba(34, 187, 102, 0.15);
    color: #1e8449;
}

.apikey-card__badge--revoked {
    background: rgba(0, 0, 0, 0.08);
    color: var(--clr-text-muted);
}

@media (max-width: 768px) {
    .settings-grid { grid-template-columns: 1fr; }
    .block-card { flex-wrap: wrap; }
    .block-card__date { width: 100%; }
}

/* ============================================
   INFO TOOLTIP (i)
   ============================================ */

.info-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    border-radius: 50%;
    background: rgba(155, 89, 182, 0.15);
    color: var(--clr-primary);
    font-size: 11px;
    font-weight: 700;
    font-style: italic;
    font-family: Georgia, serif;
    cursor: help;
    user-select: none;
    position: relative;
    vertical-align: middle;
    transition: background 0.15s;
}

.info-tip::before {
    content: 'i';
    line-height: 1;
}

.info-tip:hover { background: var(--clr-primary); color: white; }

/* Tooltip content (aparece no hover ou click) */
.info-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(58, 31, 78, 0.96);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 0.78rem;
    line-height: 1.4;
    width: 260px;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s, visibility 0.18s, transform 0.18s;
    z-index: 50;
    box-shadow: 0 6px 24px rgba(58, 31, 78, 0.3);
}

.info-tip:hover::after,
.info-tip.active::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-2px);
}

/* Setinha embaixo do tooltip */
.info-tip:hover::before,
.info-tip.active::before {
    content: 'i';
}

/* Mobile: tooltip aparece embaixo se não couber em cima, e centraliza melhor */
@media (max-width: 640px) {
    .info-tip::after {
        width: 220px;
        font-size: 0.74rem;
    }
}

/* Quando o ícone está perto da borda direita, ajusta o tooltip pra não cortar */
.settings-grid .auth-field:nth-child(even) .info-tip::after,
.client-form__grid .auth-field:nth-child(even) .info-tip::after {
    left: auto;
    right: 0;
    transform: none;
}
.settings-grid .auth-field:nth-child(even) .info-tip:hover::after,
.settings-grid .auth-field:nth-child(even) .info-tip.active::after,
.client-form__grid .auth-field:nth-child(even) .info-tip:hover::after,
.client-form__grid .auth-field:nth-child(even) .info-tip.active::after {
    transform: translateY(-2px);
}

/* ============================================
   AGENDA PAGE
   ============================================ */

.agenda-section { padding: 0; }

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

.agenda-toolbar__nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.agenda-toolbar__title {
    margin: 0 0 0 12px;
    font-size: 1.2rem;
    color: var(--clr-text);
    font-weight: 500;
}

.agenda-toolbar__filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.agenda-nav-btn {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(155, 89, 182, 0.15);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    color: var(--clr-text);
    transition: background 0.15s, border-color 0.15s;
    display: inline-flex;
    align-items: center;
}

.agenda-nav-btn:hover {
    background: rgba(155, 89, 182, 0.1);
    border-color: var(--clr-primary);
}

.agenda-view-toggle {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(155, 89, 182, 0.15);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}

.agenda-view-btn {
    background: none;
    border: none;
    padding: 6px 14px;
    font: inherit;
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.agenda-view-btn:hover { color: var(--clr-text); }
.agenda-view-btn.active {
    background: var(--clr-primary);
    color: white;
}

.agenda-container {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

/* Grid */
.agw-grid {
    display: flex;
    flex-direction: column;
    min-width: 720px;
}
.agw-grid--day {
    --col-count: 1;
    min-width: 360px;
}

.agw-head {
    display: grid;
    grid-template-columns: 56px repeat(6, 1fr);
    background: rgba(155, 89, 182, 0.04);
    border-bottom: 1px solid rgba(155, 89, 182, 0.12);
    position: sticky;
    top: 0;
    z-index: 10;
}

.agw-grid--day .agw-head {
    grid-template-columns: 56px repeat(var(--col-count), 1fr);
}

.agw-cell {
    padding: 10px 8px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--clr-text-muted);
}

.agw-day-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border-left: 1px solid rgba(155, 89, 182, 0.08);
}

.agw-day-name {
    font-weight: 500;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.agw-day-num {
    font-size: 1.1rem;
    color: var(--clr-text);
    font-weight: 600;
}

.agw-day-head--today .agw-day-num {
    color: white;
    background: var(--clr-primary);
    width: 28px;
    height: 28px;
    line-height: 28px;
    border-radius: 50%;
    margin-top: 2px;
}

.agw-time-head { background: transparent; }

.agw-body {
    display: grid;
    grid-template-columns: 56px 1fr;
}

.agw-time-col {
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(155, 89, 182, 0.08);
}

.agw-time-cell {
    height: 28px;
    line-height: 28px;
    font-size: 0.7rem;
    color: var(--clr-text-muted);
    text-align: right;
    padding: 0 6px 0 0;
    border-bottom: 1px dashed rgba(155, 89, 182, 0.06);
}

.agw-days {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
}
.agw-grid--day .agw-days {
    grid-template-columns: repeat(var(--col-count), 1fr);
}

.agw-day-col {
    position: relative;
    border-left: 1px solid rgba(155, 89, 182, 0.08);
}

.agw-slot {
    height: 28px;
    border-bottom: 1px dashed rgba(155, 89, 182, 0.06);
    cursor: pointer;
    transition: background 0.1s;
}

.agw-grid--day .agw-time-cell,
.agw-grid--day .agw-slot {
    height: 36px;
    line-height: 36px;
}

.agw-slot:hover { background: rgba(155, 89, 182, 0.07); }

/* Cards de agendamento */
.agw-appt {
    position: absolute;
    left: 2px;
    right: 2px;
    border-radius: 6px;
    padding: 4px 6px;
    font-size: 0.74rem;
    line-height: 1.2;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    z-index: 2;
    background: rgba(155, 89, 182, 0.18);
    border-left: 3px solid var(--clr-primary);
    color: var(--clr-text);
}

.agw-appt:hover {
    transform: translateX(1px);
    box-shadow: 0 4px 14px rgba(155, 89, 182, 0.25);
    z-index: 3;
}

.agw-appt__time {
    font-weight: 600;
    font-size: 0.72rem;
    color: var(--clr-primary);
}

.agw-appt__client {
    font-weight: 500;
    color: var(--clr-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.agw-appt__svc {
    color: var(--clr-text-muted);
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cores por status */
.agw-appt--held {
    background: rgba(255, 165, 0, 0.18);
    border-left-color: #f39c12;
}
.agw-appt--held .agw-appt__time { color: #d35400; }

.agw-appt--scheduled {
    background: rgba(155, 89, 182, 0.18);
    border-left-color: var(--clr-primary);
}

.agw-appt--confirmed {
    background: rgba(34, 187, 102, 0.18);
    border-left-color: #1e8449;
}
.agw-appt--confirmed .agw-appt__time { color: #1e8449; }

.agw-appt--realized {
    background: rgba(0, 0, 0, 0.06);
    border-left-color: #888;
    opacity: 0.85;
}
.agw-appt--realized .agw-appt__time { color: #555; }

.agw-appt--canceled {
    background: rgba(0, 0, 0, 0.04);
    border-left-color: #aaa;
    opacity: 0.55;
    text-decoration: line-through;
}

.agw-appt--no_show {
    background: rgba(192, 57, 43, 0.16);
    border-left-color: #c0392b;
}
.agw-appt--no_show .agw-appt__time { color: #c0392b; }

.agw-appt--gympass {
    box-shadow: inset 3px 0 0 #ff8c00;
}

.agw-appt--ia::after {
    content: '🤖';
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Modal Novo agendamento — estilos extras */
.appt-checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin-bottom: 0 !important;
    padding-top: 4px;
}

.appt-checkbox-label input { cursor: pointer; }

.appt-client-search { position: relative; }

.appt-client-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid rgba(155, 89, 182, 0.2);
    border-radius: 10px;
    margin-top: 4px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 20;
    box-shadow: 0 8px 24px rgba(58, 31, 78, 0.15);
}

.appt-client-result {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(155, 89, 182, 0.06);
    transition: background 0.1s;
}

.appt-client-result:hover { background: rgba(155, 89, 182, 0.08); }
.appt-client-result strong { color: var(--clr-text); }
.appt-client-result span { color: var(--clr-text-muted); font-size: 0.78rem; }

.appt-client-empty {
    padding: 12px;
    color: var(--clr-text-muted);
    font-size: 0.85rem;
    text-align: center;
}

.appt-client-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(155, 89, 182, 0.1);
    border: 1px solid rgba(155, 89, 182, 0.2);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--clr-text);
    font-size: 0.9rem;
}

.appt-client-clear {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--clr-text-muted);
    padding: 4px;
    border-radius: 6px;
}
.appt-client-clear:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #c0392b;
}

.appt-payment {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.appt-payment-radios {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.appt-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(155, 89, 182, 0.15);
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85rem;
}

.appt-radio input { cursor: pointer; }
.appt-radio input:checked + span {
    color: var(--clr-primary);
    font-weight: 500;
}

.appt-payment-amount {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    flex-wrap: wrap;
}

.appt-payment-amount input {
    width: 110px;
    padding: 4px 8px;
    border: 1px solid rgba(155, 89, 182, 0.2);
    border-radius: 6px;
    font: inherit;
}

/* Detalhes do agendamento */
.appt-detail {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0 16px 0;
}

.appt-detail__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--clr-text);
    font-size: 0.92rem;
}

.appt-detail__row--head {
    align-items: center;
    flex-wrap: wrap;
}

.appt-detail__notes {
    background: rgba(255, 255, 255, 0.4);
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--clr-text-muted);
    font-size: 0.88rem;
}

.appt-detail__status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
}
.appt-detail__status--held { background: rgba(255, 165, 0, 0.18); color: #d35400; }
.appt-detail__status--scheduled { background: rgba(155, 89, 182, 0.18); color: var(--clr-primary); }
.appt-detail__status--confirmed { background: rgba(34, 187, 102, 0.18); color: #1e8449; }
.appt-detail__status--realized { background: rgba(0, 0, 0, 0.08); color: #555; }
.appt-detail__status--canceled { background: rgba(0, 0, 0, 0.06); color: #888; }
.appt-detail__status--no_show { background: rgba(192, 57, 43, 0.16); color: #c0392b; }

.appt-detail__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid rgba(155, 89, 182, 0.1);
}

@media (max-width: 768px) {
    .agenda-toolbar { flex-direction: column; align-items: stretch; }
    .agenda-toolbar__nav { justify-content: space-between; }
    .agenda-toolbar__title {
        margin-left: 0;
        font-size: 1rem;
        flex: 1;
        text-align: center;
    }
    .agenda-toolbar__filters { justify-content: space-between; }
    .agw-day-name { font-size: 0.7rem; }
    .agw-day-num { font-size: 0.95rem; }
    .agw-cell { padding: 8px 4px; }
    .agw-time-col { width: 44px; }
    .agw-body { grid-template-columns: 44px 1fr; }
    .agw-head { grid-template-columns: 44px repeat(6, 1fr); }
    .agw-time-cell { font-size: 0.65rem; padding-right: 4px; }
}

/* ============================================
   PAGE TRANSITION OVERLAY (compartilhado)
   ============================================ */
.page-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #f3e8ff 0%, #ede0f7 50%, #f9f0ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.55s ease, visibility 0s linear 0s;
    z-index: 99999;
    will-change: opacity;
}
.page-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.55s ease, visibility 0s linear 0.55s;
}
.page-overlay__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}
.page-overlay__logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 6px 20px rgba(155, 89, 182, 0.18));
    animation: pageOverlayPulse 1.4s ease-in-out infinite;
}
@keyframes pageOverlayPulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.08); opacity: 1; }
}
.page-overlay__bar {
    width: 220px;
    height: 4px;
    background: rgba(155, 89, 182, 0.15);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}
.page-overlay__bar-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #c08cdb, #9b59b6);
    border-radius: 999px;
    box-shadow: 0 0 8px rgba(155, 89, 182, 0.35);
}
.page-overlay.loading .page-overlay__bar-fill {
    width: 100%;
    transition: width 1.6s linear;
}
.page-overlay.complete .page-overlay__bar-fill {
    width: 100%;
    transition: none;
}

/* ============================================
   HOME PAGE — Dashboard Início
   ============================================ */

#pageHome.dash-page {
    align-items: stretch;
    width: 100%;
}
#pageHome.dash-page > * {
    width: 100%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.home-header {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(155, 89, 182, 0.12);
}
.home-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--clr-text);
    margin: 0 0 4px;
    font-weight: 600;
}
.home-subtitle {
    color: var(--clr-text-light);
    font-size: 0.95rem;
    margin: 0;
}

.home-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 60px 20px;
    color: var(--clr-text-muted);
    justify-content: center;
}
.home-spinner {
    width: 22px;
    height: 22px;
    border-width: 3px;
}

.home-section {
    margin-bottom: 32px;
}
.home-section:last-child { margin-bottom: 0; }
.home-section__title {
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    color: var(--clr-text);
    margin: 0 0 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.home-section__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.home-section__header .home-section__title { margin: 0; }

.home-badge {
    background: var(--clr-primary);
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 10px;
    border-radius: 999px;
    font-weight: 600;
}

/* ========== CARDS (KPIs) ========== */
.home-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.home-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(155, 89, 182, 0.12);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    backdrop-filter: blur(10px);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
    min-height: 102px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.home-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(155, 89, 182, 0.10);
}
.home-card__label {
    font-size: 0.72rem;
    color: var(--clr-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
    font-weight: 600;
}
.home-card__value {
    font-size: 1.7rem;
    font-weight: 600;
    color: var(--clr-text);
    line-height: 1.1;
    font-family: 'Playfair Display', serif;
}
.home-card__value--sm { font-size: 1.3rem; }
.home-card__sub {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--clr-text-light);
    line-height: 1.3;
}
.home-card--ok .home-card__value { color: #1f9156; }
.home-card--ok { border-left: 3px solid #27ae60; }
.home-card--warn .home-card__value { color: #c97a14; }
.home-card--warn { border-left: 3px solid #e8a93f; }
.home-card--accent { border-left: 3px solid var(--clr-primary); }

/* ========== GRÁFICOS — grid 2x2 fixo em desktop ========== */
.home-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.home-chart-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(155, 89, 182, 0.12);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    backdrop-filter: blur(10px);
}
.home-chart-card__title {
    margin: 0 0 14px;
    font-size: 0.88rem;
    color: var(--clr-text);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.home-chart-card__canvas-wrap {
    position: relative;
    height: 240px;
}

/* ========== Bottom grid: pendentes (2/3) + pacotes (1/3) ========== */
.home-bottom-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
.home-bottom-grid > .home-section { margin-bottom: 0; }

/* Pendentes */
.home-pendentes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.home-empty {
    background: rgba(255, 255, 255, 0.45);
    border: 1px dashed var(--clr-glass-border, rgba(155, 89, 182, 0.2));
    padding: 18px;
    text-align: center;
    color: var(--clr-text-muted);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
}
.pendente-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 14px;
    align-items: center;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid var(--clr-glass-border, rgba(155, 89, 182, 0.15));
    border-radius: var(--radius-sm);
    padding: 12px 14px;
}
.pendente-row__when {
    font-size: 0.78rem;
    color: var(--clr-text-muted);
    margin-bottom: 2px;
}
.pendente-row__cliente {
    font-weight: 600;
    color: var(--clr-text);
    font-size: 0.95rem;
    margin-bottom: 2px;
}
.pendente-row__svc {
    font-size: 0.82rem;
    color: var(--clr-text-light);
}
.pendente-row__money {
    text-align: right;
    min-width: 110px;
}
.pendente-row__valor {
    font-weight: 600;
    color: var(--clr-text);
    font-size: 1.05rem;
}
.pendente-row__tags {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
    margin-top: 4px;
    flex-wrap: wrap;
}
.pendente-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 500;
}
.pendente-tag--pending {
    background: #fdf3e2;
    color: #b86e0c;
}
.pendente-tag--partial {
    background: #fff7d6;
    color: #8a6d12;
}
.pendente-tag--ok {
    background: #e0f4e9;
    color: #1f7042;
}
.pendente-row__actions {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}
.pendente-row__actions .btn {
    white-space: nowrap;
}

/* Pacotes */
.home-pacotes-summary {
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid var(--clr-glass-border, rgba(155, 89, 182, 0.12));
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--clr-text-light);
    margin-bottom: 10px;
    font-size: 0.95rem;
}
.home-pacotes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pacote-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--clr-glass-border, rgba(155, 89, 182, 0.1));
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    gap: 10px;
}
.pacote-row__cliente {
    font-weight: 600;
    color: var(--clr-text);
    font-size: 0.9rem;
}
.pacote-row__pkg {
    font-size: 0.78rem;
    color: var(--clr-text-light);
}
.pacote-row__sessions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pacote-badge {
    background: var(--clr-primary);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 999px;
    min-width: 36px;
    text-align: center;
}
.pacote-row__exp {
    font-size: 0.72rem;
    color: var(--clr-text-muted);
}

/* Modal pagamento */
.pay-info {
    background: rgba(155, 89, 182, 0.06);
    border: 1px solid rgba(155, 89, 182, 0.15);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 14px;
}
.pay-info__line {
    font-size: 0.88rem;
    color: var(--clr-text-light);
    margin-bottom: 4px;
}
.pay-info__line:last-child { margin-bottom: 0; }
.pay-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.75rem;
    color: var(--clr-text-muted);
}

/* ========== Tablet (≤1024px): bottom grid empilha ========== */
@media (max-width: 1024px) {
    .home-bottom-grid { grid-template-columns: 1fr; gap: 24px; }
    .home-bottom-grid > .home-section { margin-bottom: 0; }
}

/* ========== Mobile (≤700px) ========== */
@media (max-width: 700px) {
    .home-header { margin-bottom: 20px; padding-bottom: 14px; }
    .home-title { font-size: 1.45rem; }
    .home-subtitle { font-size: 0.88rem; }

    .home-section { margin-bottom: 24px; }
    .home-section__title { font-size: 0.92rem; margin-bottom: 10px; }

    .home-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .home-card { padding: 14px 16px; min-height: 88px; }
    .home-card__label { font-size: 0.66rem; margin-bottom: 6px; }
    .home-card__value { font-size: 1.35rem; }
    .home-card__value--sm { font-size: 1rem; }
    .home-card__sub { font-size: 0.72rem; }

    .home-charts { grid-template-columns: 1fr; gap: 12px; }
    .home-chart-card { padding: 14px 16px; }
    .home-chart-card__canvas-wrap { height: 200px; }
    .home-chart-card__title { font-size: 0.82rem; }

    .pendente-row {
        grid-template-columns: 1fr auto;
        gap: 8px 12px;
    }
    .pendente-row__actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }
    .pendente-row__actions .btn {
        flex: 1;
    }
    .pacote-row { flex-wrap: wrap; }
}

/* ========== Mobile pequeno (≤380px): cards empilham ========== */
@media (max-width: 380px) {
    .home-cards { grid-template-columns: 1fr; }
}

/* ============================================
   MOBILE FIXES — sidebar + clientes + dimensionamento geral
   ============================================ */
@media (max-width: 768px) {
    /* Container principal não estoura mais */
    .dash-content {
        padding: 20px 14px;
    }

    /* Sidebar não passa da tela em devices estreitos */
    .sidebar {
        width: min(280px, calc(100vw - 48px));
    }
    .sidebar__header {
        padding: 14px 18px;
        gap: 10px;
    }
    .sidebar__name {
        font-size: 16px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .sidebar__subtitle {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .sidebar__nav {
        padding: 16px 14px;
    }
    .sidebar__footer {
        padding: 14px 16px;
    }
    .sidebar__user-name,
    .sidebar__user-email {
        max-width: 100%;
    }

    /* Página clientes — toolbar respira melhor */
    .clients-toolbar {
        gap: 8px;
        padding: 10px 12px;
    }
    .clients-toolbar__search {
        min-width: 0;
        flex: 1 1 100%;
    }
    .clients-toolbar__filter {
        flex: 1 1 auto;
        min-width: 0;
    }
    .clients-toolbar__count {
        margin-left: 0;
    }

    /* Card de cliente cabe em qualquer tela */
    .client-card {
        padding: 10px 12px;
        gap: 10px;
        min-width: 0;
    }
    .client-card__info {
        min-width: 0;
    }
    .client-card__name {
        white-space: normal;
        word-break: break-word;
        line-height: 1.3;
    }
    .client-card__avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .client-card__edit {
        padding: 6px;
        flex-shrink: 0;
    }

    /* Modal cliente — mais espaço útil em telas pequenas */
    .client-modal {
        padding: 12px;
    }
    .client-modal__content {
        padding: 18px 16px;
        max-height: 92vh;
    }
    .client-modal__title {
        font-size: 1.15rem;
    }

    /* Título da seção encolhe pra não vazar */
    .dash-section__title {
        font-size: 20px;
    }

    /* Bloqueia o auto-zoom do iOS ao focar inputs (precisa ser >= 16px) */
    input,
    textarea,
    select {
        font-size: 16px;
    }
}

/* ========== Mobile pequeno (≤380px): aperta ainda mais ========== */
@media (max-width: 380px) {
    .dash-content {
        padding: 16px 10px;
    }
    .dash-topbar {
        padding: 14px 14px;
        gap: 12px;
    }
    .dash-topbar__title {
        font-size: 14px;
    }
    .clients-toolbar__filter {
        flex: 1 1 100%;
    }
    .client-card {
        padding: 10px;
    }
    .client-modal__content {
        padding: 16px 12px;
    }
}
