/*
 * Estilos básicos para o plugin Desi Pet Shower Base.
 */
.dps-base-wrapper {
    margin: 20px 0;
    font-family: Arial, sans-serif;
}
/* Container de navegação - inclui abas e seletor mobile */
.dps-nav-container {
    position: relative;
    margin-bottom: 0;
}

/* Toggle mobile: oculto por padrão em desktop (display: block via media query < 768px).
   Especificidade aumentada (.dps-base-wrapper .dps-nav-container) para evitar sobrescrita por temas. */
.dps-base-wrapper .dps-nav-container .dps-nav-mobile-toggle {
    display: none;
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    position: relative;
}

.dps-base-wrapper .dps-nav-container .dps-nav-mobile-toggle::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #6b7280;
    transition: transform 0.2s ease;
}

.dps-base-wrapper .dps-nav-container .dps-nav-mobile-toggle.is-open::after {
    transform: translateY(-50%) rotate(180deg);
}

.dps-base-wrapper .dps-nav-container .dps-nav-mobile-toggle:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.dps-base-wrapper .dps-nav-container .dps-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    border-bottom: 2px solid #e5e7eb;
}
.dps-base-wrapper .dps-nav-container .dps-nav li {
    margin: 0;
}
.dps-base-wrapper .dps-nav-container .dps-nav .dps-tab-link {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-bottom: none;
    background: #f9fafb;
    text-decoration: none;
    color: #6b7280;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.dps-base-wrapper .dps-nav-container .dps-nav .dps-tab-link:hover {
    background: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}
.dps-base-wrapper .dps-nav-container .dps-nav .dps-tab-link.active {
    background: #ffffff;
    border-color: #e5e7eb;
    color: #0ea5e9;
    font-weight: 600;
}

/* === NAVEGAÇÃO RESPONSIVA - DESKTOP (min-width: 769px) === */
/* Garantir que em desktop: toggle oculto, abas visíveis */
@media (min-width: 769px) {
    /* Ocultar toggle em desktop - !important para evitar overrides de temas WordPress */
    .dps-base-wrapper .dps-nav-container .dps-nav-mobile-toggle {
        display: none !important;
    }
    
    /* Garantir que abas estejam visíveis em desktop */
    .dps-base-wrapper .dps-nav-container .dps-nav {
        display: flex !important;
    }
}
.dps-section {
    display: none;
    border: 1px solid #ccc;
    border-top: none;
    padding: 15px;
    background: #fff;
}
.dps-section.active {
    display: block;
}
.dps-form p {
    margin-bottom: 10px;
}
.dps-form input[type="text"],
.dps-form input[type="email"],
.dps-form input[type="date"],
.dps-form input[type="time"],
.dps-form input[type="number"],
.dps-form select,
.dps-form textarea {
    width: 100%;
    padding: 6px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.dps-form .dps-client-select,
.dps-form #appointment_date,
.dps-form #appointment_time {
    max-width: 420px;
    width: 100%;
}
.dps-form textarea {
    resize: vertical;
}
.dps-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
    margin-bottom: 0;
}
.dps-table th,
.dps-table td {
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
}
.dps-table th {
    background: #f9fafb;
    font-weight: 600;
    font-size: 0.875rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
.dps-table td {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #374151;
}

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

.dps-table tbody tr:hover,
.dps-table tbody tr.status-pendente:hover,
.dps-table tbody tr.status-finalizado:hover,
.dps-table tbody tr.status-finalizado_pago:hover,
.dps-table tbody tr.status-cancelado:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Wrapper para prevenir overflow horizontal em tabelas */
.dps-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 4px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.dps-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.dps-table-wrapper::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 4px;
}

.dps-table-wrapper::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.dps-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

.dps-table-wrapper .dps-table {
    margin: 0;
    border: 0;
}

.dps-table-wrapper .dps-table th:first-child,
.dps-table-wrapper .dps-table td:first-child {
    border-left: 0;
}

.dps-table-wrapper .dps-table th:last-child,
.dps-table-wrapper .dps-table td:last-child {
    border-right: 0;
}

.dps-table-wrapper .dps-table thead tr:first-child th {
    border-top: 0;
}

.dps-table-wrapper .dps-table tbody tr:last-child td {
    border-bottom: 0;
}

.dps-search {
    width: 100%;
    padding: 6px;
    margin-bottom: 16px;
    box-sizing: border-box;
}
.dps-history-toolbar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}
/* Filtros de período rápido */
.dps-history-quick-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}
.dps-history-quick-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-right: 4px;
}
.dps-history-quick-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
    border-radius: 4px !important;
}
.dps-history-quick-btn.active {
    background: #0ea5e9 !important;
    border-color: #0ea5e9 !important;
    color: #ffffff !important;
}
.dps-history-filters-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}
.dps-history-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.dps-history-filter label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
}
.dps-history-filter input,
.dps-history-filter select {
    min-width: 170px;
}
.dps-history-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.dps-history-summary {
    background: #f8f9fa;
    border: 1px solid #e2e6ea;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}
/* Estilos para ordenação de tabelas */
.dps-table-sortable .dps-sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}
.dps-table-sortable .dps-sortable:hover {
    background-color: #e5e7eb;
}
.dps-sort-icon {
    font-size: 10px;
    color: #9ca3af;
    margin-left: 4px;
}
.dps-sortable.asc .dps-sort-icon::after {
    content: '↑';
}
.dps-sortable.desc .dps-sort-icon::after {
    content: '↓';
}
.dps-sortable.asc .dps-sort-icon,
.dps-sortable.desc .dps-sort-icon {
    color: #0ea5e9;
}
.dps-pet-picker {
    border: 1px solid #e2e2e2;
    background: #fafafa;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
}
.dps-pet-picker--disabled {
    opacity: 0.6;
}
.dps-pet-picker--warning {
    border-color: #dc3545;
    box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.15);
}
.dps-pet-picker-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}
.dps-pet-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}
.dps-pet-option {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.dps-pet-option:hover {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px rgba(0, 115, 170, 0.15);
}
.dps-pet-option input[type="checkbox"] {
    margin-right: 6px;
}
.dps-pet-option .dps-pet-name {
    font-weight: 600;
    color: #1d2327;
}
.dps-pet-option .dps-pet-owner,
.dps-pet-option .dps-pet-breed,
.dps-pet-option .dps-pet-size {
    font-size: 12px;
    color: #555d66;
}
.dps-pet-option .dps-pet-breed::before,
.dps-pet-option .dps-pet-owner::before,
.dps-pet-option .dps-pet-size::before {
    content: '';
}

/* Container principal de listagem de agendamentos */
.dps-appointments {
    margin-top: 20px;
}

.dps-appointments > h3 {
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
}

.dps-appointments .dps-appointments-search {
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.95rem;
}

.dps-appointments-empty {
    padding: 24px;
    text-align: center;
    color: #6b7280;
    background: #f9fafb;
    border: 1px dashed #e5e7eb;
    border-radius: 6px;
    margin-top: 16px;
}

/* Empty state melhorado */
.dps-empty-state {
    padding: 40px 24px;
    text-align: center;
    background: #f9fafb;
    border: 1px dashed #e5e7eb;
    border-radius: 8px;
    margin: 20px 0;
}

.dps-empty-state__icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    opacity: 0.7;
}

.dps-empty-state__title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px 0;
}

.dps-empty-state__description {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 16px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.dps-empty-state__action {
    display: inline-block;
    margin-top: 8px;
}

.dps-appointments-group {
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 6px;
    border-left: 3px solid #0ea5e9;
    background: #f9fafb;
}
.dps-appointments-group h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}
.dps-appointments .dps-table {
    min-width: 640px;
}
.dps-appointments .dps-table th,
.dps-appointments .dps-table td {
    padding: 8px 10px;
}
.dps-table tr.status-pendente {
    background: #fef3c7;
}
.dps-table tr.status-finalizado {
    background: #f3f4f6;
}
.dps-table tr.status-finalizado_pago,
.dps-table tr.status-finalizado\ e\ pago {
    background: #d1fae5;
}
.dps-table tr.status-cancelado {
    opacity: 0.6;
}
.dps-inline-status-form {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.dps-inline-status-form select {
    min-width: 140px;
}
.dps-inline-status-form.is-updating select {
    opacity: 0.6;
    pointer-events: none;
}
.dps-alert {
    padding: 16px 20px;
    border-left: 4px solid #f59e0b;
    background: #ffffff;
    margin: 20px 0;
    border-radius: 4px;
    color: #374151;
}
.dps-alert--danger {
    border-left-color: #ef4444;
}
.dps-alert--pending {
    border-left-color: #f59e0b;
}
.dps-alert--info {
    border-left-color: #0ea5e9;
}
.dps-alert--success {
    border-left-color: #10b981;
}
.dps-alert strong {
    display: inline-block;
    margin-bottom: 6px;
}
.dps-client-select--warning {
    border-color: #f59e0b !important; /* Override default border regardless of state */
    background: #fffbeb;
    color: #374151;
}

/* Responsividade para tablets e mobile */
@media (max-width: 1024px) {
    .dps-history-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    .dps-history-quick-filters {
        flex-wrap: wrap;
        gap: 6px;
    }
    .dps-history-quick-btn {
        flex: 1 1 auto;
        min-width: 70px;
    }
    .dps-history-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .dps-history-filters input,
    .dps-history-filters select {
        min-width: 0;
        width: 100%;
    }

    /* Garantir que tabelas tenham largura mínima em tablets */
    .dps-table-wrapper .dps-table {
        min-width: 620px;
    }
    
    /* Ajustar espaçamento em grupos de agendamentos */
    .dps-appointments-group {
        margin-top: 12px;
        margin-bottom: 12px;
        padding: 12px;
    }
}

@media (max-width: 768px) {
    /* Prevenir overflow horizontal */
    .dps-section {
        overflow-x: hidden;
    }
    
    .dps-form {
        max-width: 100%;
        overflow-x: hidden;
    }
    
    /* === NAVEGAÇÃO RESPONSIVA - DROPDOWN EM MOBILE === */
    /* Mostrar o botão toggle em mobile - !important para garantir sobrescrita de temas */
    .dps-base-wrapper .dps-nav-container .dps-nav-mobile-toggle {
        display: block !important;
        margin-bottom: 0;
    }
    
    /* Ocultar abas por padrão em mobile (apenas mostrar quando toggle está aberto) */
    /* !important para garantir que sobrescreva estilos base e de temas */
    .dps-base-wrapper .dps-nav-container .dps-nav {
        display: none !important;
        flex-direction: column;
        gap: 0;
        border-bottom: none;
        border: 1px solid #e5e7eb;
        border-top: none;
        border-radius: 0 0 4px 4px;
        background: #ffffff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        /* 300px permite exibir ~6-7 itens de 44px cada (padrão de altura de toque em mobile)
           Se houver mais itens, scroll vertical é habilitado */
        max-height: 300px;
        overflow-y: auto;
    }
    
    /* Mostrar abas quando container está aberto */
    .dps-base-wrapper .dps-nav-container.is-open .dps-nav {
        display: flex !important;
    }
    
    .dps-base-wrapper .dps-nav-container.is-open .dps-nav-mobile-toggle {
        border-radius: 4px 4px 0 0;
        border-bottom: none;
    }
    
    .dps-base-wrapper .dps-nav-container .dps-nav li {
        margin: 0;
        width: 100%;
    }
    
    .dps-base-wrapper .dps-nav-container .dps-nav .dps-tab-link {
        display: block;
        width: 100%;
        padding: 12px 16px;
        border: none;
        border-radius: 0;
        border-bottom: 1px solid #f3f4f6;
        background: #ffffff;
        text-align: left;
        font-size: 15px;
    }
    
    .dps-base-wrapper .dps-nav-container .dps-nav li:last-child .dps-tab-link {
        border-bottom: none;
    }
    
    .dps-base-wrapper .dps-nav-container .dps-nav .dps-tab-link:hover,
    .dps-base-wrapper .dps-nav-container .dps-nav .dps-tab-link:focus {
        background: #f9fafb;
        color: #0ea5e9;
    }
    
    .dps-base-wrapper .dps-nav-container .dps-nav .dps-tab-link.active {
        background: #eff6ff;
        color: #0ea5e9;
        font-weight: 600;
    }
    /* === FIM NAVEGAÇÃO RESPONSIVA === */
    
    /* Ajustar padding das células em mobile */
    .dps-table th,
    .dps-table td {
        padding: 8px 6px;
        font-size: 0.875rem;
    }
    
    /* Esconder colunas menos importantes em mobile */
    .dps-table .hide-mobile {
        display: none;
    }
    
    /* Ajustar tabela dentro do wrapper */
    .dps-table-wrapper .dps-table {
        min-width: 600px;
        white-space: nowrap;
    }
    
    /* Grid de formulários empilha em coluna única */
    .dps-form-row--2col,
    .dps-form-row--3col {
        grid-template-columns: 1fr;
    }
    
    /* Ajustes para fieldsets */
    .dps-fieldset {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    /* Reduzir padding em inputs e selects para mobile */
    .dps-form input[type="text"],
    .dps-form input[type="email"],
    .dps-form input[type="date"],
    .dps-form input[type="time"],
    .dps-form input[type="number"],
    .dps-form select,
    .dps-form textarea {
        padding: 8px;
        font-size: 16px;
    }
    
    /* Inputs de valor em mobile */
    .dps-form input.dps-input-money {
        width: 100%;
        max-width: 180px;
    }
    
    /* Compactar grupos de agendamentos em mobile */
    .dps-appointments-group {
        padding: 12px;
        margin-top: 12px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    /* Tabelas ainda mais compactas em mobile pequeno */
    .dps-table th,
    .dps-table td {
        padding: 6px 4px;
        font-size: 0.8125rem;
    }
    
    .dps-table-wrapper .dps-table {
        min-width: 450px;
    }
    
    /* Reduzir ainda mais o espaçamento dos grupos */
    .dps-appointments-group {
        padding: 10px;
        margin-top: 10px;
        margin-bottom: 10px;
    }
    
    .dps-appointments-group h4 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
}

/* Grid responsivo para formulários */
.dps-form-row {
    display: grid;
    gap: 16px;
    margin-bottom: 12px;
}

.dps-form-row--2col {
    grid-template-columns: 1fr 1fr;
}

.dps-form-row--3col {
    grid-template-columns: 1fr 1fr 1fr;
}

.dps-form-row--2col .dps-form-field,
.dps-form-row--3col .dps-form-field {
    min-width: 0;
}

.dps-form-col {
    margin: 0;
}

/* Fieldsets padronizados */
.dps-fieldset {
    border: 1px solid #e5e7eb;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.dps-fieldset__legend {
    font-weight: 600;
    color: #374151;
    padding: 0 8px;
    font-size: 16px;
}

/* Indicador de campo obrigatório */
.dps-required {
    color: #ef4444;
    font-weight: 700;
}

/* Checkbox melhorado */
.dps-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.dps-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    width: auto;
}

.dps-checkbox-text {
    flex: 1;
}

/* Upload de arquivo estilizado */
.dps-file-upload {
    margin-bottom: 12px;
}

.dps-file-upload__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.dps-file-upload__label {
    display: inline-block;
    padding: 10px 20px;
    background: #f9fafb;
    border: 2px dashed #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dps-file-upload__label:hover {
    border-color: #0ea5e9;
    background: #eff6ff;
}

.dps-file-upload__text {
    display: inline-block;
}

.dps-file-upload__preview {
    margin-top: 12px;
    max-width: 200px;
}

.dps-file-upload__preview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
}

/* Botão de submit */
.dps-submit-btn {
    min-width: 160px;
    font-weight: 600;
}

.dps-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Dicas de preenchimento de campos */
.dps-field-hint {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    margin-bottom: 0;
}

/* Campos condicionais */
.dps-conditional-field {
    margin-top: 12px;
    padding-left: 24px;
}

/* Form field wrapper */
.dps-form-field {
    margin-bottom: 12px;
}

/* Inputs de valores monetários */
.dps-form input.dps-input-money {
    width: 120px;
    max-width: 100%;
    text-align: right;
    box-sizing: border-box;
}
.dps-form .dps-service-price,
.dps-form #dps-appointment-total,
.dps-form #dps-subscription-total,
.dps-form #dps-subscription-base,
.dps-form #dps-simple-extra-value,
.dps-form #dps-subscription-extra-value {
    width: 140px;
    max-width: 100%;
    display: inline-block;
}

/* Resumo do agendamento */
.dps-appointment-summary {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin: 32px auto 20px auto;
    max-width: 800px;
}

.dps-appointment-summary h3 {
    margin: 0 0 16px 0;
    color: #374151;
    font-size: 18px;
    font-weight: 600;
}

.dps-appointment-summary__empty {
    color: #6b7280;
    font-size: 14px;
    margin: 0;
}

.dps-appointment-summary__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dps-appointment-summary__list li {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
    font-size: 14px;
}

.dps-appointment-summary__list li:last-child,
.dps-appointment-summary__list .dps-appointment-summary__notes {
    border-bottom: none;
}

.dps-appointment-summary__list strong {
    display: inline-block;
    min-width: 140px;
    color: #6b7280;
    font-weight: 600;
}

.dps-appointment-summary__list [data-summary="price"] {
    color: #0ea5e9;
    font-weight: 700;
    font-size: 16px;
}

.dps-appointment-summary__notes {
    display: none; /* Hidden by default, shown via JS when notes exist */
}

.dps-appointment-summary__notes [data-summary="notes"] {
    display: block;
    margin-top: 4px;
    color: #6b7280;
    font-style: italic;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Mensagens de erro do formulário */
.dps-form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 4px;
    padding: 16px;
    margin: 20px 0;
    color: #991b1b;
}

.dps-form-error strong {
    display: block;
    margin-bottom: 8px;
    color: #7f1d1d;
}

.dps-form-error ul {
    margin: 0;
    padding-left: 20px;
}

.dps-form-error li {
    margin: 4px 0;
}

.dps-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.dps-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dps-summary-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.dps-summary-value {
    font-size: 16px;
    color: #374151;
    font-weight: 600;
}

.dps-summary-item--highlight .dps-summary-value {
    font-size: 20px;
    color: #0ea5e9;
}

/* Tooltips */
.dps-tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    color: #6b7280;
    font-size: 14px;
    margin-left: 4px;
}

.dps-tooltip[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #374151;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: normal;
    max-width: 250px;
    z-index: 10;
    line-height: 1.4;
    font-weight: 400;
}

.dps-tooltip[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #374151;
    z-index: 10;
}

/* Ações do formulário */
.dps-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.dps-form-actions .dps-btn {
    min-width: 140px;
}

/* Radio buttons estilizados */
.dps-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dps-radio-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dps-radio-option:hover {
    border-color: #0ea5e9;
    background: #f0f9ff;
}

.dps-radio-option input[type="radio"] {
    margin-top: 2px;
    width: auto;
}

.dps-radio-label {
    flex: 1;
}

.dps-radio-label strong {
    display: block;
    color: #374151;
    margin-bottom: 4px;
}

.dps-radio-label p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

@media (max-width: 640px) {
    .dps-summary-grid {
        grid-template-columns: 1fr;
    }
    
    .dps-form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dps-form-actions .dps-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .dps-pet-list {
        grid-template-columns: 1fr;
    }
    
    /* Ajustar todos os inputs de formulário em mobile pequeno */
    .dps-form input[type="text"],
    .dps-form input[type="email"],
    .dps-form input[type="date"],
    .dps-form input[type="time"],
    .dps-form input[type="number"],
    .dps-form select {
        font-size: 16px;
        padding: 10px 8px;
    }
    
    /* Textarea também precisa de ajuste */
    .dps-form textarea {
        font-size: 16px;
        padding: 10px 8px;
    }
    
    .dps-alert {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .dps-submit-btn {
        width: 100%;
    }
    
    .dps-conditional-field {
        padding-left: 12px;
    }
    
    .dps-appointment-summary {
        padding: 16px;
        margin: 24px auto 16px auto;
    }
    
    /* Reduzir largura mínima dos labels em telas pequenas */
    .dps-appointment-summary__list strong {
        min-width: 100px;
        font-size: 13px;
    }
    
    .dps-appointment-summary__list li {
        font-size: 13px;
    }
    
    .dps-appointment-summary h3 {
        font-size: 16px;
    }
    
    /* Inputs de valor em mobile pequeno */
    .dps-form input.dps-input-money {
        width: 100%;
        max-width: 150px;
        font-size: 16px; /* Evita zoom automático no iOS */
    }
    
    /* Reduzir padding em fieldsets para aproveitar espaço */
    .dps-fieldset {
        padding: 12px;
        margin-bottom: 12px;
    }
    
    /* Labels e textos menores em telas muito pequenas */
    .dps-fieldset__legend {
        font-size: 15px;
    }
}

/* Pet Picker com scroll vertical em mobile/tablet */
@media (max-width: 768px) {
    .dps-pet-list {
        max-height: 400px;
        overflow-y: auto;
        border: 1px solid #e5e7eb;
        border-radius: 4px;
        padding: 8px;
        margin-top: 8px;
    }
    
    .dps-pet-list::-webkit-scrollbar {
        width: 8px;
    }
    
    .dps-pet-list::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 4px;
    }
    
    .dps-pet-list::-webkit-scrollbar-track {
        background: #f1f5f9;
    }
}

/* ================================================
   PÁGINA DE DETALHES DO CLIENTE
   ================================================ */

/* Container principal */
.dps-client-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Header com navegação e ações */
.dps-client-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.dps-client-header__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.dps-client-header__back:hover {
    color: #0ea5e9;
}

.dps-client-header__title {
    flex: 1;
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #374151;
}

.dps-client-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Cards de resumo/métricas */
.dps-client-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.dps-summary-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dps-summary-card--highlight {
    border-left: 4px solid #0ea5e9;
}

.dps-summary-card--warning {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
}

.dps-summary-card--success {
    border-left: 4px solid #10b981;
}

.dps-summary-card__icon {
    font-size: 24px;
    line-height: 1;
}

.dps-summary-card__value {
    font-size: 24px;
    font-weight: 600;
    color: #374151;
}

.dps-summary-card__label {
    font-size: 13px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Seções de informações */
.dps-client-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.dps-client-section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.dps-client-section__title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dps-client-section__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: #e5e7eb;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.dps-client-section__actions {
    display: flex;
    gap: 8px;
}

.dps-client-section__content {
    padding: 20px;
}

/* Grid de informações do cliente */
.dps-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.dps-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dps-info-item__label {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.dps-info-item__value {
    font-size: 14px;
    color: #374151;
}

.dps-info-item__value a {
    color: #0ea5e9;
    text-decoration: none;
}

.dps-info-item__value a:hover {
    text-decoration: underline;
}

.dps-info-item--empty .dps-info-item__value {
    color: #9ca3af;
    font-style: italic;
}

/* Cards de pets */
.dps-pet-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.dps-pet-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.dps-pet-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.dps-pet-card--aggressive {
    border-left: 4px solid #ef4444;
}

.dps-pet-card__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.dps-pet-card__photo {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    background: #e5e7eb;
    flex-shrink: 0;
}

.dps-pet-card__photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #9ca3af;
}

.dps-pet-card__title {
    flex: 1;
}

.dps-pet-card__name {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
}

.dps-pet-card__subtitle {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.dps-pet-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #fef2f2;
    color: #ef4444;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.dps-pet-card__body {
    padding: 16px;
}

.dps-pet-card__info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.dps-pet-card__info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dps-pet-card__info-label {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
}

.dps-pet-card__info-value {
    font-size: 13px;
    color: #374151;
}

.dps-pet-card__notes {
    padding: 12px;
    background: #fffbeb;
    border-radius: 4px;
    font-size: 13px;
    color: #92400e;
    margin-bottom: 16px;
}

.dps-pet-card__notes::before {
    content: '📋 ';
}

.dps-pet-card__actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.dps-pet-card__actions .button {
    flex: 1;
    text-align: center;
}

/* Tabela de atendimentos melhorada */
.dps-client-section .dps-table-wrapper {
    margin: 0;
    border: 0;
    border-radius: 0;
}

.dps-client-section .dps-table th,
.dps-client-section .dps-table td {
    padding: 12px 16px;
}

/* Status badges em atendimentos */
.dps-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.dps-status-badge--paid {
    background: #d1fae5;
    color: #065f46;
}

.dps-status-badge--pending {
    background: #fef3c7;
    color: #92400e;
}

.dps-status-badge--cancelled {
    background: #f3f4f6;
    color: #6b7280;
}

.dps-status-badge--scheduled {
    background: #dbeafe;
    color: #1e40af;
}

/* Ações na tabela de atendimentos */
.dps-table .dps-actions-cell {
    white-space: nowrap;
}

.dps-table .dps-actions-cell a {
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
}

.dps-table .dps-actions-cell a:hover {
    color: #0ea5e9;
}

/* Botões de ação no header */
.dps-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dps-btn-action:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.dps-btn-action--primary {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #ffffff;
}

.dps-btn-action--primary:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: #ffffff;
}

/* Responsividade da página de detalhes */
@media (max-width: 768px) {
    .dps-client-detail {
        padding: 0 12px;
    }
    
    .dps-client-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dps-client-header__title {
        order: -1;
        width: 100%;
    }
    
    .dps-client-header__actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .dps-client-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dps-pet-cards {
        grid-template-columns: 1fr;
    }
    
    .dps-info-grid {
        grid-template-columns: 1fr;
    }
    
    .dps-client-section__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .dps-client-section__actions {
        width: 100%;
    }
    
    .dps-client-section__actions .button {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .dps-client-summary {
        grid-template-columns: 1fr;
    }
    
    .dps-summary-card {
        padding: 12px;
    }
    
    .dps-pet-card__info {
        grid-template-columns: 1fr;
    }
    
    .dps-pet-card__actions {
        flex-direction: column;
    }
    
    .dps-btn-action {
        width: 100%;
        justify-content: center;
    }
}
