/*
 * InovaDoc - Estilos Principais
 * Sistema integrado de beneficiários e dependentes
 * Atualizado: 2025-01-02
 */

/* === RESET E BASE === */
.inovadoc-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.inovadoc-app {
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

/* === NAVEGAÇÃO === */
.inovadoc-nav-tabs {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 0 20px;
    display: flex;
    overflow-x: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nav-tab {
    padding: 16px 24px;
    border: none;
    background: none;
    color: #6b7280;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.nav-tab:hover {
    color: #4285F4;
    background: rgba(66, 133, 244, 0.05);
}

.nav-tab.active {
    color: #4285F4;
    border-bottom-color: #4285F4;
    font-weight: 600;
}

.nav-tab svg {
    width: 16px;
    height: 16px;
}

/* === CONTEÚDO DAS PÁGINAS === */
.inovadoc-page-content {
    display: none;
    padding: 20px;
    min-height: 600px;
}

.inovadoc-page-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === BENEFICIÁRIO === */
.beneficiario-container {
    max-width: 800px;
    margin: 0 auto;
}

.status-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.ativo {
    background: #dcfce7;
    color: #16a34a;
}

.status-badge.inativo {
    background: #fee2e2;
    color: #dc2626;
}

.beneficiario-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

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

.info-label {
    font-size: 12px;
    font-weight: 500;
    color: #718096;
    text-transform: uppercase;
}

.info-value {
    font-size: 14px;
    color: #2d3748;
    font-weight: 500;
}

/* === DEPENDENTES EVOLUÍDOS === */
.dependentes-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dependentes-header {
    background: linear-gradient(135deg, #4285F4 0%, #7ED321 100%);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(66, 133, 244, 0.3);
    overflow: hidden;
}

.header-main {
    background: rgba(255, 255, 255, 0.95);
    padding: 32px;
    margin: 4px;
    border-radius: 14px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 20px;
}

.title-section {
    flex: 1;
    min-width: 300px;
}

.dependentes-title {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dependentes-subtitle {
    font-size: 16px;
    color: #718096;
    margin: 0;
    line-height: 1.5;
}

.actions-section {
    display: flex;
    align-items: flex-start;
}

/* Dashboard de estatísticas */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 0 32px 32px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.total {
    background: #e3f2fd;
    color: #1976d2;
}

.stat-icon.active {
    background: #e8f5e8;
    color: #388e3c;
}

.stat-icon.minors {
    background: #fff3e0;
    color: #f57c00;
}

.stat-icon.slots.azul {
    background: #e3f2fd;
    color: #1976d2;
}

.stat-icon.slots.amarelo {
    background: #fff3e0;
    color: #f57c00;
}

.stat-icon.slots.vermelho {
    background: #ffebee;
    color: #d32f2f;
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

.btn-novo-dependente {
    background: #4285F4;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-novo-dependente:hover {
    background: #3367d6;
    transform: translateY(-1px);
}

.limite-counter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.limite-counter.azul {
    background: #ebf8ff;
    color: #2b6cb0;
}

.limite-counter.amarelo {
    background: #fefcbf;
    color: #b7791f;
}

.limite-counter.vermelho {
    background: #fed7d7;
    color: #c53030;
}

/* === FORMULÁRIO EVOLUÍDO DE DEPENDENTES === */
.form-container {
    background: white;
    border-radius: 16px;
    padding: 0;
    margin-bottom: 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    display: none;
    overflow: hidden;
}

.form-container.show {
    display: block;
    animation: slideInDown 0.4s ease-out;
}

@keyframes slideInDown {
    from { 
        opacity: 0; 
        transform: translateY(-20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.form-header {
    background: linear-gradient(135deg, #4285F4 0%, #7ED321 100%);
    padding: 24px 32px;
    color: white;
}

.form-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-subtitle {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

.form-advanced {
    padding: 32px;
}

.form-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #f1f5f9;
}

.form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-grid-advanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.span-2 {
    grid-column: 1 / -1;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-input, .form-select, .form-textarea {
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fafbfc;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: #4285F4;
    background: white;
    box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.1);
}

.form-input.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.field-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-validation-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
}

.validation-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    color: #0369a1;
}

.validation-item:last-child {
    margin-bottom: 0;
}

.validation-item svg {
    color: #16a34a;
    flex-shrink: 0;
}

.form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    padding-top: 24px;
    border-top: 2px solid #f1f5f9;
}

.btn-cancel, .btn-save {
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-cancel {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
}

.btn-cancel:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.btn-save {
    background: #16a34a;
    color: white;
}

.btn-save:hover {
    background: #15803d;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.3);
}

/* === LISTA EVOLUÍDA DE DEPENDENTES === */
.dependentes-list {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.list-header {
    background: #f8fafc;
    padding: 24px 32px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.list-title {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-actions {
    display: flex;
    gap: 12px;
}

.btn-filter, .btn-export {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: white;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-filter:hover, .btn-export:hover {
    border-color: #4285F4;
    color: #4285F4;
    background: #f7fafc;
}

.dependentes-items {
    padding: 24px;
    display: grid;
    gap: 24px;
}

/* Cards modernos de dependentes */
.dependent-card {
    background: white;
    border: 2px solid #f1f5f9;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.dependent-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: #4285F4;
}

.card-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.dependent-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #4285F4 0%, #7ED321 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.dependent-avatar svg {
    width: 28px;
    height: 28px;
}

.dependent-header-info {
    flex: 1;
    min-width: 0;
}

.dependent-name {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dependent-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.parentesco-badge, .menor-badge, .status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.parentesco-badge {
    background: #dbeafe;
    color: #1e40af;
}

.parentesco-badge.cônjuge {
    background: #fef3c7;
    color: #92400e;
}

.parentesco-badge.filho {
    background: #d1fae5;
    color: #065f46;
}

.menor-badge {
    background: #fed7d7;
    color: #c53030;
    display: flex;
    align-items: center;
    gap: 4px;
}

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

.status-badge.inativo {
    background: #fee2e2;
    color: #dc2626;
}

.dependent-actions {
    display: flex;
    gap: 8px;
}

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #64748b;
}

.btn-action:hover {
    transform: scale(1.1);
    background: #e2e8f0;
}

.btn-action.btn-edit:hover {
    background: #dbeafe;
    color: #1e40af;
}

.btn-action.btn-more:hover {
    background: #f3f4f6;
    color: #374151;
}

.card-body {
    padding: 24px;
}

.dependent-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 16px;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.info-icon {
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    flex-shrink: 0;
}

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

.info-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-bottom: 2px;
}

.info-value {
    font-size: 14px;
    color: #2d3748;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.additional-info {
    border-top: 1px solid #f1f5f9;
    padding-top: 16px;
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-footer {
    background: #f8fafc;
    padding: 16px 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.cadastro-info {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-quick-actions {
    display: flex;
    gap: 8px;
}

.btn-quick {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-quick:hover {
    border-color: #4285F4;
    color: #4285F4;
    background: #f7fafc;
}

.btn-quick.btn-danger:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: #fef2f2;
}

/* Menu dropdown */
.dependent-options-menu {
    position: absolute;
    top: 100%;
    right: 24px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 180px;
    overflow: hidden;
}

.dependent-options-menu button {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    color: #374151;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dependent-options-menu button:hover {
    background: #f9fafb;
}

.dependent-options-menu button.text-danger {
    color: #dc2626;
}

.menu-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 4px 0;
}

/* Estado vazio evoluído */
.empty-state {
    text-align: center;
    padding: 60px 40px;
    color: #6b7280;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.empty-icon svg {
    width: 40px;
    height: 40px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin: 0 0 12px 0;
}

.empty-state p {
    font-size: 16px;
    color: #6b7280;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

/* === NOTIFICAÇÕES TOAST === */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: toastIn 0.3s ease;
}

.toast.success {
    border-color: #16a34a;
}

.toast.error {
    border-color: #dc2626;
}

.toast.warning {
    border-color: #f59e0b;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* === PLACEHOLDER CONTENT === */
.placeholder-content {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.placeholder-content h2 {
    color: #2d3748;
    margin: 0 0 12px 0;
}

.placeholder-content p {
    color: #6b7280;
    margin: 0;
}

/* === RESPONSIVIDADE === */
@media (max-width: 768px) {
    .inovadoc-container {
        padding: 0 12px;
        margin: 12px auto;
    }
    
    .inovadoc-nav-tabs {
        padding: 0 12px;
    }
    
    .nav-tab {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .inovadoc-page-content {
        padding: 16px;
    }
    
    .header-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dependent-item {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dependent-info {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .toast {
        min-width: calc(100vw - 40px);
        margin: 0 20px 12px;
    }
}


/* ─── Alertas / Notices WooCommerce ─────────────────────────────── */

/* Remove as linhas coloridas do wrapper */
.woocommerce-notices-wrapper {
    border: none !important;
    border-top: none !important;
    border-bottom: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Base dos notices */
ul.woocommerce-error,
div.woocommerce-message,
div.woocommerce-info,
.woocommerce-notices-wrapper ul.woocommerce-error,
.woocommerce-notices-wrapper div.woocommerce-message,
.woocommerce-notices-wrapper div.woocommerce-info {
    list-style: none !important;
    margin: 16px 0 !important;
    padding: 14px 18px !important;
    border-radius: 12px !important;
    border: none !important;
    border-left: none !important;
    outline: none !important;
    font-size: 14px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

/* Remove ícone padrão WooCommerce */
ul.woocommerce-error::before,
div.woocommerce-message::before,
div.woocommerce-info::before,
ul.woocommerce-error li::before {
    display: none !important;
    content: none !important;
}

/* Erro */
ul.woocommerce-error {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    box-shadow: 0 2px 12px rgba(185,28,28,.1) !important;
}
ul.woocommerce-error li {
    list-style: none !important;
    color: #b91c1c !important;
    font-size: 14px !important;
    padding: 2px 0 !important;
}
ul.woocommerce-error li a,
ul.woocommerce-error a {
    color: #b91c1c !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
}

/* Sucesso */
div.woocommerce-message {
    background: #f0fdf4 !important;
    color: #15803d !important;
    box-shadow: 0 2px 12px rgba(21,128,61,.1) !important;
}
div.woocommerce-message a:not(.button) {
    color: #15803d !important;
    font-weight: 700 !important;
}

/* Info / Cupom */
div.woocommerce-info {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    box-shadow: 0 2px 12px rgba(37,99,235,.1) !important;
}
div.woocommerce-info a:not(.button) {
    color: #2563EB !important;
    font-weight: 700 !important;
}

/* Botões dentro dos notices */
div.woocommerce-message .button,
div.woocommerce-info .button {
    background: #2563EB !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    float: none !important;
    text-decoration: none !important;
    display: inline-block !important;
}