:root {
    --bs-primary: #820AD1;
    --bs-primary-rgb: 130, 10, 209;
    --bg-card: rgba(26, 26, 46, 0.8);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --glass-bg: rgba(26, 26, 46, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --sidebar-width: 240px;
    --sidebar-collapsed-width: 68px;
}

/* ── Sidebar Init (no transition during page load) ── */
html.sidebar-init .sidebar,
html.sidebar-init .main-content {
    transition: none !important;
}

html.sidebar-init-collapsed .sidebar {
    width: var(--sidebar-collapsed-width) !important;
}

html.sidebar-init-collapsed .sidebar .sidebar-brand span,
html.sidebar-init-collapsed .sidebar .sidebar-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

html.sidebar-init-collapsed .sidebar .sidebar-link {
    padding: 11px 12px;
    justify-content: center;
}

html.sidebar-init-collapsed .sidebar .sidebar-brand {
    padding: 20px 14px;
    justify-content: center;
}

html.sidebar-init-collapsed .sidebar .sidebar-brand span {
    display: none;
}

html.sidebar-init-collapsed .sidebar ~ .main-content {
    margin-left: var(--sidebar-collapsed-width) !important;
}

/* ── Sidebar ── */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16162a 100%);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    z-index: 1030;
    transition: width 0.3s ease, transform 0.3s ease;
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.sidebar-brand i {
    font-size: 1.4rem;
    color: #820AD1;
    flex-shrink: 0;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.25);
    padding: 14px 14px 6px;
    user-select: none;
}

[data-bs-theme="light"] .sidebar-section-label {
    color: rgba(0, 0, 0, 0.3);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    position: relative;
    flex-shrink: 0;
}

.sidebar-link i {
    font-size: 1.2rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.sidebar-link:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(130, 10, 209, 0.08);
}

.sidebar-link.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(130, 10, 209, 0.2), rgba(130, 10, 209, 0.05));
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: #820AD1;
    border-radius: 0 3px 3px 0;
}

.sidebar-link.active i {
    color: #820AD1;
}

.sidebar-footer {
    border-top: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-user i {
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-footer-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 10px 12px;
}

.sidebar-footer-actions form {
    display: flex;
}

.sidebar-toggle-btn,
.sidebar-theme-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    background: transparent;
    color: rgba(255, 255, 255, 0.4);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover,
.sidebar-theme-btn:hover {
    background: rgba(130, 10, 209, 0.1);
    color: #820AD1;
    border-color: rgba(130, 10, 209, 0.3);
}

/* ── Collapsed Sidebar ── */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .sidebar-link span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-link {
    padding: 11px 12px;
    justify-content: center;
}

.sidebar.collapsed .sidebar-link i {
    margin: 0;
}

.sidebar.collapsed .sidebar-section-label {
    opacity: 0;
    height: 0;
    padding: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-brand {
    padding: 20px 14px;
    justify-content: center;
}

.sidebar.collapsed .sidebar-footer-actions {
    flex-wrap: wrap;
    gap: 4px;
    padding: 6px 8px 10px;
}

.sidebar.collapsed .sidebar-toggle-btn,
.sidebar.collapsed .sidebar-theme-btn {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
    border-radius: 8px;
}

.sidebar.collapsed .notif-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
}

.sidebar.collapsed .notif-dropdown {
    left: 56px;
}

.sidebar.collapsed .sidebar-brand span {
    display: none;
}

.sidebar.collapsed .sidebar-user span {
    display: none;
}

.sidebar.collapsed .sidebar-user {
    justify-content: center;
    padding: 10px 0;
}

/* ── Main Content ── */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 24px;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* ── Mobile Overlay ── */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1029;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

.mobile-toggle-btn {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1031;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg) !important;
    backdrop-filter: blur(10px);
    font-size: 1.3rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    background: linear-gradient(135deg, #820AD1, #9b30e8);
    border: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #6a0dad, #820AD1);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(130, 10, 209, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-light {
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline-warning,
.btn-outline-danger {
    border-radius: 8px;
    transition: all 0.2s ease;
}

.table-dark {
    background-color: #1a1a2e;
}

.modal-content {
    border: none;
    border-radius: 16px;
    background: linear-gradient(145deg, #1e1e36, #1a1a2e);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    padding: 1.25rem 1.5rem 0;
}

.modal-body {
    padding: 1.25rem 1.5rem;
}

.modal-footer {
    padding: 0 1.5rem 1.25rem;
}

.modal-title {
    font-size: 1.1rem;
}

/* ── Floating labels ── */
.form-floating > .form-control,
.form-floating > .form-select {
    height: calc(3.5rem + 2px);
    line-height: 1.25;
    border-radius: 12px;
    font-size: 20px;
}

.form-floating > label {
    padding: 1rem 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    color: #820AD1;
    transform: scale(0.85) translateY(-0.6rem) translateX(0.15rem);
    font-weight: 500;
}

/* ── Inputs ── */
.form-control,
.form-select {
    border-radius: 12px;
    padding: 0.75rem 1rem;
    background: var(--glass-bg) !important;
    border: 1.5px solid var(--glass-border) !important;
    color: #fff !important;
    transition: all 0.3s ease;
}

.form-control:hover,
.form-select:hover {
    border-color: rgba(130, 10, 209, 0.3) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #820AD1 !important;
    box-shadow: 0 0 0 3px rgba(130, 10, 209, 0.15), 0 2px 10px rgba(130, 10, 209, 0.1) !important;
    background: rgba(26, 26, 46, 0.9) !important;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-floating > textarea.form-control {
    height: auto;
}

select.form-select option {
    background: #1a1a2e;
    color: #fff;
}

/* ── Checkbox cards grid (Servicos) ── */
.servico-search {
    position: relative;
    margin-bottom: 10px;
}

.servico-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    z-index: 1;
    pointer-events: none;
}

.servico-search input {
    padding-left: 38px;
    border-radius: 10px;
}

.servico-grid-scroll {
    max-height: 260px;
    overflow-y: auto;
    padding-right: 4px;
}

.servico-grid-scroll::-webkit-scrollbar {
    width: 4px;
}

.servico-grid-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.servico-grid-scroll::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

.checkbox-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.checkbox-card-grid #id_servicos {
    display: contents;
}

.checkbox-card-grid #id_servicos > div {
    position: relative;
}

.checkbox-card-grid input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.checkbox-card-grid label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 0.75rem;
    min-height: 70px;
    background: var(--glass-bg);
    border: 1.5px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    font-size: 0.980rem;
    gap: 0.2rem;
    margin: 0;
    position: relative;
}

.checkbox-card-grid label:hover {
    border-color: rgba(130, 10, 209, 0.4);
    background: rgba(130, 10, 209, 0.04);
    transform: translateY(-1px);
}

.checkbox-card-grid #id_servicos > div:has(input:checked) label {
    border-color: #820AD1;
    background: rgba(130, 10, 209, 0.12);
    box-shadow: 0 0 20px rgba(130, 10, 209, 0.12);
}

.checkbox-card-grid #id_servicos > div:has(input:checked) label::after {
    content: "✓";
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 1rem;
    color: #820AD1;
    font-weight: 700;
}

.servico-duracao-label {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.75rem;
    font-weight: 400;
    margin-top: 0.1rem;
}

/* ── Calendar ── */
#calendar {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--glass-border);
    min-height: 0;
    height: calc(100vh - 200px);
}

#calendar .fc {
    height: 100%;
}

.fc {
    color: #fff;
}

.fc .fc-toolbar-title {
    color: #fff;
    font-size: 1.3rem;
}

.fc .fc-button-primary {
    background: linear-gradient(135deg, #820AD1, #9b30e8);
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.fc .fc-button-primary:hover {
    background: linear-gradient(135deg, #6a0dad, #820AD1);
    box-shadow: 0 2px 10px rgba(130, 10, 209, 0.3);
}

.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: linear-gradient(135deg, #6a0dad, #820AD1);
}

.fc .fc-daygrid-day {
    background: #16162a;
    border-color: #2a2a3e;
}

.fc .fc-daygrid-day.fc-day-today {
    background: rgba(130, 10, 209, 0.12);
}

.fc .fc-col-header-cell {
    background: #1a1a2e;
    border-color: #2a2a3e;
}

.fc .fc-col-header-cell-cushion {
    color: #fff;
}

.fc .fc-daygrid-day-number {
    color: #ccc;
}

.fc .fc-daygrid-more-link {
    color: #820AD1;
}

.fc .fc-event {
    background: linear-gradient(135deg, #820AD1, #9b30e8);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 6px 4px;
    font-size: 0.85rem;
    transition: transform 0.2s ease;
    color: #fff;
    font-weight: 500;
}

.fc-event-pago {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

.fc-daygrid-event-dot {
    border-color: #fff !important;
}

.fc-daygrid-event-harness {
    margin-bottom:4px;
}

.fc .fc-event:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 10px rgba(130, 10, 209, 0.3);
}

.fc-event-pago .fc-event-title::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 10px;
    margin-right: 4px;
    vertical-align: middle;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'%3E%3Crect x='1' y='1' width='22' height='14' rx='2' fill='none' stroke='%23bbf7d0' stroke-width='1.5'/%3E%3Crect x='1' y='4' width='22' height='3' fill='%23bbf7d0' opacity='0.5'/%3E%3Crect x='3' y='10' width='6' height='2' rx='0.5' fill='%23bbf7d0' opacity='0.7'/%3E%3Crect x='15' y='10' width='4' height='2' rx='0.5' fill='%23bbf7d0' opacity='0.5'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.fc-event-feriado {
    background: rgba(130, 10, 209, 0.12) !important;
    border-left: 3px solid #820AD1 !important;
}

.fc-event-feriado .fc-daygrid-event-dot {
    border-color: #820AD1 !important;
}

.fc-event-feriado .fc-event-title {
    color: #7c3aed !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
}

.fc .fc-daygrid-event .fc-event-feriado .fc-event-title {
    color: #7c3aed !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
}

.fc .fc-timegrid-slot {
    background: #16162a;
    border-color: #2a2a3e;
}

.fc .fc-timegrid-axis {
    background: #1a1a2e;
}

.fc .fc-timegrid-now-indicator-line {
    border-color: #820AD1;
}

.fc .fc-timegrid-now-indicator-arrow {
    border-color: #820AD1;
    color: #820AD1;
}

/* ── Toast ── */
.toast-container {
    z-index: 9999;
}

.toast {
    min-width: 300px;
    border-radius: 12px;
    border: none;
}

.toast.bg-success {
    background: linear-gradient(135deg, #198754, #157347) !important;
}

.toast.bg-danger {
    background: linear-gradient(135deg, #dc3545, #b02a37) !important;
}

.toast.bg-warning {
    background: linear-gradient(135deg, #ffc107, #e6a800) !important;
    color: #000 !important;
}

.toast-progress {
    height: 3px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 0 0 12px 12px;
    transition: width 3s linear;
}

/* ── Table ── */
.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead th {
    border-bottom: 2px solid rgba(130, 10, 209, 0.3);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
}

.table tbody tr {
    transition: background 0.2s ease;
}

.table tbody tr:hover {
    background: rgba(130, 10, 209, 0.04);
}

/* ── Page title ── */
h2 i {
    color: #820AD1;
}

/* ── Modal detail (agendamento) ── */
.detail-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.detail-row + .detail-row {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.detail-label {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.detail-label i {
    font-size: 0.85rem;
    color: #820AD1;
}

.detail-value {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: background 0.2s;
}

.service-item:hover {
    background: rgba(130, 10, 209, 0.06);
}

.service-name {
    color: #fff;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.service-name::before {
    content: "•";
    color: #820AD1;
    font-weight: 700;
    font-size: 1.1rem;
}

.service-price {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-weight: 500;
}

.detail-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding: 0.75rem 0.75rem 0;
    border-top: 1.5px solid rgba(130, 10, 209, 0.2);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.5);
}

.total-amount {
    font-size: 1.2rem;
    font-weight: 700;
    color: #820AD1;
}

.detail-obs {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 0.25rem 0;
}

/* ── Payment Card ── */
.payment-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
    margin-top: 0.75rem;
    transition: border-color 0.2s ease;
}

.payment-card:hover {
    border-color: rgba(130, 10, 209, 0.15);
}

.payment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 0.85rem;
}

.payment-id {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    font-weight: 500;
}

.payment-id i {
    color: #820AD1;
    font-size: 0.9rem;
}

.payment-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.payment-status i {
    font-size: 0.8rem;
}

.payment-status--received,
.payment-status--confirmed,
.payment-status--received_in_cash {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
}

.payment-status--pending {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
}

.payment-status--overdue {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.payment-status--cancelled,
.payment-status--failed {
    background: rgba(107, 114, 128, 0.12);
    color: #9ca3af;
}

.payment-status--refunded,
.payment-status--refund_requested {
    background: rgba(168, 85, 247, 0.12);
    color: #a78bfa;
}

.payment-status--chargeback_requested,
.payment-status--chargeback_dispute,
.payment-status--awaiting_chargeback_reversal {
    background: rgba(251, 146, 60, 0.12);
    color: #fb923c;
}

.payment-status--checkout_created {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
}

.payment-status--checkout_paid {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.payment-status--checkout_expired {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.payment-amount-box {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 0.75rem 0;
    margin-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.payment-currency {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
}

.payment-amount {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    line-height: 1;
}

.payment-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.payment-meta-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.payment-meta-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(130, 10, 209, 0.08);
    flex-shrink: 0;
}

.payment-meta-icon i {
    font-size: 0.8rem;
    color: #820AD1;
}

.payment-meta-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.payment-meta-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.payment-meta-value {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.payment-link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 0.85rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(135deg, rgba(130, 10, 209, 0.15), rgba(130, 10, 209, 0.05));
    border: 1.5px solid rgba(130, 10, 209, 0.25);
    border-radius: 10px;
    color: #a78bfa;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}

.payment-link-btn:hover {
    background: linear-gradient(135deg, rgba(130, 10, 209, 0.25), rgba(130, 10, 209, 0.1));
    border-color: rgba(130, 10, 209, 0.4);
    color: #c4b5fd;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(130, 10, 209, 0.15);
}

.payment-link-btn--whatsapp {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.15), rgba(37, 211, 102, 0.05));
    border-color: rgba(37, 211, 102, 0.25);
    color: #25d366;
}

.payment-link-btn--whatsapp:hover {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.25), rgba(37, 211, 102, 0.1));
    border-color: rgba(37, 211, 102, 0.4);
    color: #2ef579;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
}

.payment-card--empty {
    text-align: center;
    padding: 1.5rem 1rem;
}

.payment-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    margin: 0 auto 0.65rem;
}

.payment-empty-icon i {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.15);
}

.payment-card--empty span {
    display: block;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.25);
}

/* ── Delete confirmation ── */
.modal-body p {
    font-size: 1.05rem;
}

/* ── Form Validation ── */
.invalid-feedback {
    display: block !important;
    font-size: 0.78rem;
    font-weight: 500;
    color: #f87171;
    margin-top: 6px;
    padding: 6px 10px;
    background: rgba(239, 68, 68, 0.08);
    border-left: 3px solid #ef4444;
    border-radius: 0 8px 8px 0;
    animation: errorSlideIn 0.25s ease;
}

@keyframes errorSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.is-invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

[data-bs-theme="light"] .invalid-feedback {
    color: #dc2626;
    background: rgba(239, 68, 68, 0.06);
}

/* ── Spinner ── */
.spinner-border {
    color: #820AD1;
}

/* ── Search Box ── */
.search-box {
    position: relative;
    max-width: 600px;
}

.search-box-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.3);
    z-index: 5;
    font-size: 1rem;
    pointer-events: none;
}

.search-box-input {
    padding-left: 2.75rem !important;
    background: var(--glass-bg) !important;
    border: 1.5px solid var(--glass-border) !important;
    border-radius: 12px !important;
    height: 48px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-box-input:focus {
    border-color: #820AD1 !important;
    box-shadow: 0 0 0 3px rgba(130, 10, 209, 0.15), 0 2px 10px rgba(130, 10, 209, 0.1) !important;
    background: rgba(26, 26, 46, 0.9) !important;
}

/* ── Modern Table ── */
.modern-table {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
}

.modern-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.modern-table thead th {
    background: rgba(130, 10, 209, 0.08);
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

.modern-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.modern-table tbody tr:last-child {
    border-bottom: none;
}

.modern-table tbody tr:hover {
    background: rgba(130, 10, 209, 0.04);
}

.modern-table tbody tr:has(.btn-action:focus) {
    background: rgba(130, 10, 209, 0.06);
}

.modern-table tbody td {
    padding: 0.875rem 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    vertical-align: middle;
}

.modern-table .record-tag-price {
    color: #4ade80;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ── Action Buttons ── */
.btn-action {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1.5px solid transparent;
    padding: 0;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.05);
}

.btn-action:hover {
    transform: translateY(-1px);
}

.btn-edit {
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.25);
    background: rgba(251, 191, 36, 0.1);
}

.btn-edit:hover {
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.2);
    border-color: rgba(251, 191, 36, 0.4);
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.2);
}

.btn-delete {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.25);
    background: rgba(248, 113, 113, 0.1);
}

.btn-delete:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.2);
    border-color: rgba(248, 113, 113, 0.4);
    box-shadow: 0 2px 8px rgba(248, 113, 113, 0.2);
}

[data-bs-theme="light"] .btn-action {
    background: rgba(0, 0, 0, 0.04);
}

[data-bs-theme="light"] .btn-edit {
    color: #d97706;
    border-color: rgba(217, 119, 6, 0.2);
    background: rgba(217, 119, 6, 0.08);
}

[data-bs-theme="light"] .btn-edit:hover {
    background: rgba(217, 119, 6, 0.15);
    border-color: rgba(217, 119, 6, 0.35);
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.15);
}

[data-bs-theme="light"] .btn-delete {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.2);
    background: rgba(220, 38, 38, 0.08);
}

[data-bs-theme="light"] .btn-delete:hover {
    background: rgba(220, 38, 38, 0.15);
    border-color: rgba(220, 38, 38, 0.35);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}
}

/* ── Pagination ── */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border-radius: 8px !important;
    border: 1.5px solid var(--glass-border) !important;
    background: var(--glass-bg) !important;
    color: rgba(255, 255, 255, 0.6) !important;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: rgba(130, 10, 209, 0.1) !important;
    border-color: rgba(130, 10, 209, 0.3) !important;
    color: #fff !important;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #820AD1, #9b30e8) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 2px 10px rgba(130, 10, 209, 0.3);
}

.page-item.disabled .page-link {
    opacity: 0.3;
    cursor: not-allowed;
}


/* ── Toggle Switch ── */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 26px;
    transition: background 0.3s ease;
    border: 1.5px solid var(--glass-border);
}

.toggle-slider::before {
    content: "";
    position: absolute;
    left: 3px;
    bottom: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #820AD1, #9b30e8);
    border-color: #820AD1;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

.toggle-switch input:focus-visible + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(130, 10, 209, 0.25);
}

.toggle-label {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    user-select: none;
}

.toggle-label:hover {
    color: #fff;
}

/* ── Quick Add Cliente ── */
.btn-add-cliente {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1.5px solid var(--glass-border);
    background: var(--glass-bg);
    color: rgba(255, 255, 255, 0.4);
    font-size: 1.15rem;
    transition: all 0.25s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.btn-add-cliente:hover {
    border-color: #820AD1;
    color: #820AD1;
    background: rgba(130, 10, 209, 0.08);
    box-shadow: 0 0 12px rgba(130, 10, 209, 0.15);
}

/* ── Total Box ── */
.total-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, rgba(130, 10, 209, 0.12), rgba(130, 10, 209, 0.03));
    border: 1.5px solid rgba(130, 10, 209, 0.2);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    position: relative;
    overflow: hidden;
}

.total-box::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 0% 100%, rgba(130, 10, 209, 0.08), transparent 70%);
    pointer-events: none;
}

.total-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(130, 10, 209, 0.15);
    color: #820AD1;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.total-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.total-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.total-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #820AD1;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

/* ── Light Theme ── */
[data-bs-theme="light"] .sidebar {
    background: linear-gradient(180deg, #f5f5f5 0%, #ffffff 100%);
    border-right-color: #e0e0e0;
}

[data-bs-theme="light"] .sidebar-brand {
    color: #1a1a2e;
    border-bottom-color: #e0e0e0;
}

[data-bs-theme="light"] .sidebar-link {
    color: rgba(0, 0, 0, 0.5);
}

[data-bs-theme="light"] .sidebar-link:hover {
    color: rgba(0, 0, 0, 0.8);
    background: rgba(130, 10, 209, 0.04);
}

[data-bs-theme="light"] .sidebar-link.active {
    color: #820AD1;
    background: rgba(130, 10, 209, 0.08);
}

[data-bs-theme="light"] .sidebar-footer {
    border-top-color: #e0e0e0;
}

[data-bs-theme="light"] .sidebar-user {
    color: rgba(0, 0, 0, 0.45);
}

[data-bs-theme="light"] .sidebar-toggle-btn,
[data-bs-theme="light"] .sidebar-theme-btn {
    color: rgba(0, 0, 0, 0.35);
    border-color: #d0d0d0;
}

[data-bs-theme="light"] .sidebar-toggle-btn:hover,
[data-bs-theme="light"] .sidebar-theme-btn:hover {
    background: rgba(130, 10, 209, 0.06);
    color: #820AD1;
    border-color: rgba(130, 10, 209, 0.3);
}

[data-bs-theme="light"] .mobile-toggle-btn {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: #d0d0d0;
    color: #1a1a2e;
}

[data-bs-theme="light"] .modal-content {
    background: linear-gradient(145deg, #f8f9fa, #ffffff);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="light"] .modal-title {
    color: #1a1a2e;
}

[data-bs-theme="light"] #calendar {
    background: #ffffff;
    border-color: #e0e0e0;
}

[data-bs-theme="light"] .fc {
    color: #1a1a2e;
}

[data-bs-theme="light"] .fc .fc-toolbar-title {
    color: #1a1a2e;
}

[data-bs-theme="light"] .fc .fc-daygrid-day {
    background: #ffffff;
    border-color: #e8e8e8;
}

[data-bs-theme="light"] .fc .fc-daygrid-day.fc-day-today {
    background: rgba(130, 10, 209, 0.06);
}

[data-bs-theme="light"] .fc .fc-col-header-cell {
    background: #f5f5f5;
    border-color: #e8e8e8;
}

[data-bs-theme="light"] .fc .fc-col-header-cell-cushion {
    color: #1a1a2e;
}

[data-bs-theme="light"] .fc .fc-daygrid-day-number {
    color: #333;
}

[data-bs-theme="light"] .fc .fc-timegrid-slot {
    background: #ffffff;
    border-color: #e8e8e8;
}

[data-bs-theme="light"] .fc .fc-timegrid-axis {
    background: #f5f5f5;
}

[data-bs-theme="light"] .fc .fc-popover {
    background: #ffffff;
    border-color: #e0e0e0;
    color: #1a1a2e;
}

[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .form-select {
    background: #ffffff !important;
    border-color: #d0d0d0 !important;
    color: #1a1a2e !important;
}

[data-bs-theme="light"] .form-floating > label {
    color: rgba(0, 0, 0, 0.4);
}

[data-bs-theme="light"] .form-control::placeholder {
    color: rgba(0, 0, 0, 0.25);
}

[data-bs-theme="light"] .checkbox-card-grid label {
    background: #f8f9fa;
    border-color: #e0e0e0;
    color: #1a1a2e;
}

[data-bs-theme="light"] .checkbox-card-grid label:hover {
    background: rgba(130, 10, 209, 0.04);
    border-color: rgba(130, 10, 209, 0.3);
}

[data-bs-theme="light"] .checkbox-card-grid #id_servicos > div:has(input:checked) label {
    background: rgba(130, 10, 209, 0.08);
}

[data-bs-theme="light"] .total-box {
    background: linear-gradient(135deg, rgba(130, 10, 209, 0.08), rgba(130, 10, 209, 0.02));
    border-color: rgba(130, 10, 209, 0.2);
}

[data-bs-theme="light"] .total-icon {
    background: rgba(130, 10, 209, 0.1);
}

[data-bs-theme="light"] .detail-card {
    background: #f8f9fa;
    border-color: #e8e8e8;
}

[data-bs-theme="light"] .detail-label {
    color: rgba(0, 0, 0, 0.45);
}

[data-bs-theme="light"] .detail-value {
    color: #1a1a2e;
}

[data-bs-theme="light"] .detail-obs {
    color: #333;
}

[data-bs-theme="light"] .service-item {
    background: rgba(0, 0, 0, 0.02);
}

[data-bs-theme="light"] .service-item:hover {
    background: rgba(130, 10, 209, 0.04);
}

[data-bs-theme="light"] .service-name {
    color: #1a1a2e;
}

[data-bs-theme="light"] .service-price {
    color: rgba(0, 0, 0, 0.5);
}

[data-bs-theme="light"] .btn-outline-light {
    color: #495057;
    border-color: #adb5bd;
}

[data-bs-theme="light"] .btn-outline-light:hover {
    color: #fff;
    background: #6c757d;
    border-color: #6c757d;
}

[data-bs-theme="light"] .toggle-label {
    color: rgba(0, 0, 0, 0.7);
}

[data-bs-theme="light"] .text-muted,
[data-bs-theme="light"] .form-label.text-muted {
    color: rgba(0, 0, 0, 0.55) !important;
}

[data-bs-theme="light"] .form-floating > label {
    color: rgba(0, 0, 0, 0.5);
}

[data-bs-theme="light"] .total-label {
    color: rgba(0, 0, 0, 0.55);
}

[data-bs-theme="light"] .detail-label {
    color: rgba(0, 0, 0, 0.5);
}

[data-bs-theme="light"] .detail-obs {
    color: #1a1a2e;
}

[data-bs-theme="light"] .payment-card {
    background: #f8f9fa;
    border-color: #e8e8e8;
}

[data-bs-theme="light"] .payment-card:hover {
    border-color: rgba(130, 10, 209, 0.2);
}

[data-bs-theme="light"] .payment-id {
    color: rgba(0, 0, 0, 0.45);
}

[data-bs-theme="light"] .payment-amount {
    color: #1a1a2e;
}

[data-bs-theme="light"] .payment-currency {
    color: rgba(0, 0, 0, 0.3);
}

[data-bs-theme="light"] .payment-meta-value {
    color: #1a1a2e;
}

[data-bs-theme="light"] .payment-meta-label {
    color: rgba(0, 0, 0, 0.4);
}

[data-bs-theme="light"] .payment-meta-icon {
    background: rgba(130, 10, 209, 0.06);
}

[data-bs-theme="light"] .payment-link-btn {
    background: rgba(130, 10, 209, 0.06);
    border-color: rgba(130, 10, 209, 0.2);
    color: #7c3aed;
}

[data-bs-theme="light"] .payment-link-btn:hover {
    background: rgba(130, 10, 209, 0.12);
    border-color: rgba(130, 10, 209, 0.35);
    color: #6d28d9;
}

[data-bs-theme="light"] .payment-card--empty {
    background: #f8f9fa;
    border-color: #e8e8e8;
}

[data-bs-theme="light"] .payment-empty-icon {
    background: rgba(0, 0, 0, 0.03);
}

[data-bs-theme="light"] .payment-empty-icon i {
    color: rgba(0, 0, 0, 0.15);
}

[data-bs-theme="light"] .payment-card--empty span {
    color: rgba(0, 0, 0, 0.3);
}

[data-bs-theme="light"] .service-price {
    color: rgba(0, 0, 0, 0.5);
}

[data-bs-theme="light"] .servico-duracao-label {
    color: rgba(0, 0, 0, 0.4);
}

[data-bs-theme="light"] .search-box-input {
    background: #ffffff !important;
    border-color: #d0d0d0 !important;
    color: #1a1a2e !important;
}

[data-bs-theme="light"] select.form-select option {
    background: #ffffff;
    color: #1a1a2e;
}

[data-bs-theme="light"] .page-link {
    background: #ffffff !important;
    border-color: #d0d0d0 !important;
    color: #333 !important;
}

[data-bs-theme="light"] .page-item.active .page-link {
    color: #fff !important;
}

[data-bs-theme="light"] .table thead th {
    color: rgba(0, 0, 0, 0.6);
}

[data-bs-theme="light"] .table tbody tr:hover {
    background: rgba(130, 10, 209, 0.03);
}

[data-bs-theme="light"] .modern-table {
    background: #ffffff;
    border-color: #e0e0e0;
}

[data-bs-theme="light"] .modern-table thead th {
    background: rgba(130, 10, 209, 0.05);
    color: rgba(0, 0, 0, 0.6);
    border-bottom-color: #e0e0e0;
}

[data-bs-theme="light"] .modern-table tbody tr {
    border-bottom-color: rgba(0, 0, 0, 0.04);
}

[data-bs-theme="light"] .modern-table tbody td {
    color: rgba(0, 0, 0, 0.75);
}

[data-bs-theme="light"] .modern-table tbody tr:hover {
    background: rgba(130, 10, 209, 0.03);
}

[data-bs-theme="light"] .list-card {
    background: #ffffff;
    border-color: #e8e8e8;
}

[data-bs-theme="light"] .list-header {
    border-bottom-color: #e8e8e8;
}

[data-bs-theme="light"] .list-header-left h2 {
    color: #1a1a2e;
}

[data-bs-theme="light"] .list-count {
    color: rgba(0, 0, 0, 0.35);
}

[data-bs-theme="light"] .list-row-primary {
    color: #1a1a2e;
}

[data-bs-theme="light"] .list-row-secondary {
    color: rgba(0, 0, 0, 0.35);
}

[data-bs-theme="light"] .list-row-secondary .separator {
    color: rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .list-row + .list-row {
    border-top-color: rgba(0, 0, 0, 0.04);
}

[data-bs-theme="light"] .list-row:hover {
    background: rgba(130, 10, 209, 0.03);
}

[data-bs-theme="light"] .list-tag-duration {
    background: rgba(130, 10, 209, 0.06);
    color: rgba(0, 0, 0, 0.5);
}

[data-bs-theme="light"] .list-empty {
    color: rgba(0, 0, 0, 0.2);
}

[data-bs-theme="light"] .modern-table tbody tr:has(.btn-action:focus) {
    background: rgba(130, 10, 209, 0.04);
}

[data-bs-theme="light"] .filter-check label {
    color: rgba(0, 0, 0, 0.5);
}

/* ── Modern List ── */
.list-page {
    margin: 0 auto;
}

.list-page-header {
    margin-bottom: 1.5rem;
    padding: 1.75rem 2rem;
    background: linear-gradient(135deg, rgba(130, 10, 209, 0.12), rgba(130, 10, 209, 0.03));
    border: 1px solid rgba(130, 10, 209, 0.15);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.list-page-header::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -20px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(130, 10, 209, 0.15), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.list-page-header::after {
    content: "";
    position: absolute;
    bottom: -30px;
    left: 30%;
    width: 200px;
    height: 80px;
    background: radial-gradient(ellipse, rgba(130, 10, 209, 0.08), transparent 70%);
    pointer-events: none;
}

.list-page-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    z-index: 1;
}

.list-page-header h1 i {
    color: #820AD1;
    font-size: 1.35rem;
}

.list-page-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.88rem;
    position: relative;
    z-index: 1;
}

[data-bs-theme="light"] .list-page-header {
    background: linear-gradient(135deg, rgba(130, 10, 209, 0.08), rgba(130, 10, 209, 0.02));
    border-color: rgba(130, 10, 209, 0.12);
}

[data-bs-theme="light"] .list-page-header h1 {
    color: #1a1a2e;
}

[data-bs-theme="light"] .list-page-header p {
    color: rgba(0, 0, 0, 0.45);
}

.list-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
}

.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--glass-border);
    flex-wrap: wrap;
}

.list-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.list-header-left h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
}

.list-header-left h2 i {
    color: #820AD1;
    margin-right: 6px;
}

.list-count {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 500;
    white-space: nowrap;
}

.list-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

.list-header-right .search-box {
    max-width: 280px;
    flex: 1;
}

.list-header-right .search-box-input {
    height: 40px;
    font-size: 0.85rem;
    padding-left: 2.5rem !important;
    border-radius: 10px !important;
}

.list-header-right .search-box-icon {
    font-size: 0.85rem;
    left: 0.85rem;
}

.list-header-right .btn {
    height: 40px;
    padding: 0 18px;
    font-size: 0.85rem;
    border-radius: 10px;
    white-space: nowrap;
}

/* ── Filter Group ── */
.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    justify-content: flex-end;
    min-width: 0;
}

.filter-group .search-box {
    max-width: 280px;
    flex: 1;
}

.filter-check {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--bs-primary);
    cursor: pointer;
}

.filter-check label {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    user-select: none;
}

.filter-select {
    width: auto !important;
    min-width: 140px;
    height: 40px;
    font-size: 0.85rem;
    border-radius: 10px !important;
}

/* ── List Rows ── */
.list-rows {
    padding: 6px;
}

.list-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    transition: all 0.15s ease;
    cursor: default;
}

.list-row:hover {
    background: rgba(130, 10, 209, 0.04);
}

.list-row + .list-row {
    border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.list-row:first-child {
    border-top: none;
}

/* ── Avatar ── */
.list-row-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    position: relative;
}

.list-row-avatar i {
    font-size: 1.2rem;
    color: #fff;
}

.avatar-color-0 { background: linear-gradient(135deg, #820AD1, #6a0dad); }
.avatar-color-1 { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.avatar-color-2 { background: linear-gradient(135deg, #10b981, #059669); }
.avatar-color-3 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.avatar-color-4 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.avatar-color-5 { background: linear-gradient(135deg, #ec4899, #db2777); }
.avatar-color-6 { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.avatar-color-7 { background: linear-gradient(135deg, #06b6d4, #0891b2); }

/* ── Body ── */
.list-row-body {
    flex: 1;
    min-width: 0;
}

.list-row-primary {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-row-secondary {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.list-row-secondary i {
    font-size: 0.75rem;
}

.list-row-secondary .separator {
    color: rgba(255, 255, 255, 0.12);
}

/* ── Tags / Badges ── */
.list-row-tags {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 8px;
}

.list-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.list-tag-whatsapp {
    background: rgba(37, 211, 102, 0.12);
    color: #25d366;
}

.list-tag-price {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0;
    text-transform: none;
}

.list-tag-duration {
    background: rgba(130, 10, 209, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

/* ── Actions ── */
.list-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 4px;
}

.list-row-actions .btn-action {
    width: 32px;
    height: 32px;
    font-size: 0.8rem;
    border-radius: 8px;
}

/* ── Empty State ── */
.list-empty {
    text-align: center;
    padding: 48px 20px;
    color: rgba(255, 255, 255, 0.25);
}

.list-empty i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
    opacity: 0.4;
}

.list-empty p {
    font-size: 0.9rem;
    margin: 0;
}

/* ── Pagination spacing ── */
.list-page .pagination {
    padding: 12px 0;
    margin: 0 !important;
}

/* ── Responsivo ── */
@media (max-width: 767.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }

    .sidebar.show-mobile {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        width: var(--sidebar-width) !important;
    }

    .sidebar.collapsed .sidebar-brand span,
    .sidebar.collapsed .sidebar-link span {
        opacity: 1;
        width: auto;
        overflow: visible;
    }

    .sidebar.collapsed .sidebar-link {
        justify-content: flex-start;
        padding: 11px 14px;
    }

    .sidebar.collapsed .sidebar-brand {
        justify-content: flex-start;
        padding: 20px 20px;
    }

    .sidebar.collapsed .sidebar-brand span {
        display: inline;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 16px;
    }

    .mobile-toggle-btn {
        display: flex !important;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .main-content {
        padding: 20px;
    }
}

/* Notificações */
.notif-wrapper {
    position: relative;
}

.notif-bell {
    position: relative;
}

.notif-badge {
    display: none;
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #1a1d23;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.3);
}

.notif-badge.active {
    display: block;
}

.notif-dropdown {
    display: none;
    position: fixed;
    bottom: 60px;
    left: 60px;
    width: 380px;
    max-height: 480px;
    background: #1e2028;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 9999;
}

.notif-dropdown.show {
    display: block;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.notif-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notif-header-icon {
    color: #818cf8;
    font-size: 0.9rem;
}

.notif-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.notif-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #ef4444;
    color: #fff;
    border-radius: 9px;
    font-size: 0.65rem;
    font-weight: 700;
}

.notif-mark-all {
    background: none;
    border: none;
    color: #818cf8;
    font-size: 0.72rem;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.notif-mark-all:hover {
    color: #a5b4fc;
    background: rgba(129, 140, 248, 0.1);
}

.notif-body {
    max-height: 430px;
    overflow-y: auto;
}

.notif-body::-webkit-scrollbar {
    width: 4px;
}

.notif-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.15s ease;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item--unread {
    background: rgba(129, 140, 248, 0.06);
}

.notif-item--unread:hover {
    background: rgba(129, 140, 248, 0.1);
}

.notif-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(129, 140, 248, 0.1);
    color: #818cf8;
    font-size: 0.85rem;
}

.notif-icon--unread {
    background: rgba(129, 140, 248, 0.2);
    color: #a5b4fc;
}

.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-item-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.notif-item-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.notif-dot {
    width: 6px;
    height: 6px;
    background: #818cf8;
    border-radius: 50%;
    flex-shrink: 0;
}

.notif-item-msg {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 4px;
    line-height: 1.4;
}

.notif-item-time {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 6px;
}

.notif-item-time i {
    font-size: 0.6rem;
}

.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 40px 16px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.85rem;
}

.notif-empty i {
    font-size: 2rem;
    opacity: 0.5;
}

[data-bs-theme="light"] .notif-dropdown {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

[data-bs-theme="light"] .notif-badge {
    border-color: #fff;
}

[data-bs-theme="light"] .notif-header {
    border-bottom-color: rgba(0, 0, 0, 0.06);
    background: rgba(0, 0, 0, 0.02);
}

[data-bs-theme="light"] .notif-title {
    color: #1a1d23;
}

[data-bs-theme="light"] .notif-count {
    background: #ef4444;
}

[data-bs-theme="light"] .notif-item {
    border-bottom-color: rgba(0, 0, 0, 0.04);
}

[data-bs-theme="light"] .notif-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

[data-bs-theme="light"] .notif-item--unread {
    background: rgba(129, 140, 248, 0.06);
}

[data-bs-theme="light"] .notif-item-title {
    color: #1a1d23;
}

[data-bs-theme="light"] .notif-item-msg {
    color: rgba(0, 0, 0, 0.6);
}

[data-bs-theme="light"] .notif-item-time {
    color: rgba(0, 0, 0, 0.35);
}

[data-bs-theme="light"] .notif-empty {
    color: rgba(0, 0, 0, 0.35);
}

[data-bs-theme="light"] .notif-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

.nav-tabs-custom {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-tabs-custom .nav-link {
    color: rgba(255, 255, 255, 0.5);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-tabs-custom .nav-link:hover {
    color: rgba(255, 255, 255, 0.8);
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.nav-tabs-custom .nav-link.active {
    color: #820AD1;
    border-bottom-color: #820AD1;
    background: transparent;
}

[data-bs-theme="light"] .nav-tabs-custom {
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

[data-bs-theme="light"] .nav-tabs-custom .nav-link {
    color: rgba(0, 0, 0, 0.5);
}

[data-bs-theme="light"] .nav-tabs-custom .nav-link:hover {
    color: rgba(0, 0, 0, 0.8);
    border-bottom-color: rgba(0, 0, 0, 0.15);
}

[data-bs-theme="light"] .nav-tabs-custom .nav-link.active {
    color: #820AD1;
    border-bottom-color: #820AD1;
}

.agendamento-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 16px 16px;
}

.agendamento-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    transition: all 0.2s ease;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.agendamento-actions .btn:hover {
    transform: translateY(-1px);
}

.btn-action-pago {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.btn-action-pago:hover {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(16, 185, 129, 0.1));
    border-color: rgba(16, 185, 129, 0.5);
    color: #34d399;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.btn-action-whatsapp {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.15), rgba(37, 211, 102, 0.05));
    border-color: rgba(37, 211, 102, 0.3);
    color: #25d366;
}

.btn-action-whatsapp:hover {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.25), rgba(37, 211, 102, 0.1));
    border-color: rgba(37, 211, 102, 0.5);
    color: #2ef579;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
}

.btn-action-editar {
    background: linear-gradient(135deg, rgba(130, 10, 209, 0.15), rgba(130, 10, 209, 0.05));
    border-color: rgba(130, 10, 209, 0.3);
    color: #a78bfa;
}

.btn-action-editar:hover {
    background: linear-gradient(135deg, rgba(130, 10, 209, 0.25), rgba(130, 10, 209, 0.1));
    border-color: rgba(130, 10, 209, 0.5);
    color: #c4b5fd;
    box-shadow: 0 4px 12px rgba(130, 10, 209, 0.15);
}

.btn-action-excluir {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.btn-action-excluir:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.1));
    border-color: rgba(239, 68, 68, 0.5);
    color: #f87171;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.15);
}

.btn-action-gerar {
    background: linear-gradient(135deg, #820AD1, #9b30e8);
    border-color: transparent;
    color: #fff;
}

.btn-action-gerar:hover {
    background: linear-gradient(135deg, #9b30e8, #a855f7);
    color: #fff;
    box-shadow: 0 4px 16px rgba(130, 10, 209, 0.3);
}

[data-bs-theme="light"] .btn-action-pago {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.03));
    color: #059669;
}

[data-bs-theme="light"] .btn-action-whatsapp {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.1), rgba(37, 211, 102, 0.03));
    color: #16a34a;
}

[data-bs-theme="light"] .btn-action-editar {
    background: linear-gradient(135deg, rgba(130, 10, 209, 0.1), rgba(130, 10, 209, 0.03));
    color: #7c3aed;
}

[data-bs-theme="light"] .btn-action-excluir {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.03));
    color: #dc2626;
}

[data-bs-theme="light"] .btn-action-gerar {
    background: linear-gradient(135deg, #820AD1, #9b30e8);
    color: #fff;
}

.agendamento-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agendamento-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px 16px;
    transition: all 0.2s ease;
}

.agendamento-card:hover {
    border-color: rgba(130, 10, 209, 0.2);
    background: linear-gradient(135deg, rgba(130, 10, 209, 0.05), rgba(130, 10, 209, 0.02));
}

.agendamento-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.agendamento-card-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.agendamento-card-date i {
    color: #820AD1;
}

.agendamento-card-status {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.agendamento-card-status--pago {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.08));
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.agendamento-card-status--pendente {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.agendamento-card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.agendamento-card-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
}

.agendamento-card-time i {
    font-size: 0.75rem;
}

.agendamento-card-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.agendamento-card-service {
    font-size: 0.75rem;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(130, 10, 209, 0.15), rgba(130, 10, 209, 0.05));
    border: 1px solid rgba(130, 10, 209, 0.2);
    border-radius: 6px;
    color: #a78bfa;
    font-weight: 500;
}

.agendamento-card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.agendamento-card-total {
    font-size: 0.95rem;
    font-weight: 700;
    color: #820AD1;
}

.agendamento-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    color: rgba(255, 255, 255, 0.3);
}

.agendamento-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

[data-bs-theme="light"] .agendamento-card {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.01));
    border-color: rgba(0, 0, 0, 0.06);
}

[data-bs-theme="light"] .agendamento-card:hover {
    border-color: rgba(130, 10, 209, 0.15);
    background: linear-gradient(135deg, rgba(130, 10, 209, 0.04), rgba(130, 10, 209, 0.01));
}

[data-bs-theme="light"] .agendamento-card-date {
    color: rgba(0, 0, 0, 0.85);
}

[data-bs-theme="light"] .agendamento-card-status--pendente {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.02));
    color: rgba(0, 0, 0, 0.5);
    border-color: rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .agendamento-card-time {
    color: rgba(0, 0, 0, 0.5);
}

[data-bs-theme="light"] .agendamento-card-service {
    background: linear-gradient(135deg, rgba(130, 10, 209, 0.1), rgba(130, 10, 209, 0.03));
    color: #7c3aed;
}

[data-bs-theme="light"] .agendamento-card-footer {
    border-top-color: rgba(0, 0, 0, 0.06);
}

[data-bs-theme="light"] .agendamento-empty {
    color: rgba(0, 0, 0, 0.3);
}

#clienteModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#clienteModal .modal-body::-webkit-scrollbar {
    width: 6px;
}

#clienteModal .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

#clienteModal .modal-body::-webkit-scrollbar-thumb {
    background: rgba(130, 10, 209, 0.3);
    border-radius: 3px;
}

#clienteModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(130, 10, 209, 0.5);
}