/* --- ESCAVADOR (DADOS DO PROCESSO) --- */
.adv-escavador-section {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.10);
    padding: 0;
    border: 1px solid #c8e6c9;
}
.adv-escavador-section,
.adv-escavador-section * {
    color: #060606;
}
.adv-escavador-title {
    color: #060606 !important;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0;
    background: none;
    padding: 18px 24px 0 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}
/* Removido - movido para o bloco acima */
.adv-escavador-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
    padding: 0 24px 24px 24px;
}
.adv-escavador-info .adv-section-title {
    grid-column: 1 / -1;
}
.adv-escavador-info .adv-info-row {
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    padding: 12px 18px;
    border: 1px solid #e0e0e0;
    color: #060606 !important;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.adv-escavador-info .adv-info-row-full {
    grid-column: 1 / -1;
}
@media (max-width: 768px) {
    .adv-escavador-info {
        grid-template-columns: 1fr;
    }
}
.adv-escavador-info .adv-info-row label {
    color: #059669 !important;
    font-size: 13px;
    font-weight: 700;
    margin: 0;
    min-width: 180px;
    text-transform: none;
}
#escavador-dados-section .adv-info-row span,
.adv-escavador-info .adv-info-row span {
    color: #060606 !important;
    font-size: 14px;
    background: transparent;
    border: none;
    font-weight: 600;
    padding: 0;
    margin: 0;
    width: 100%;
    resize: none;
    text-align: right;
}
#escavador-dados-section .adv-info-row textarea,
.adv-escavador-info .adv-info-row textarea {
    min-height: 32px;
    background: rgba(255,255,255,0.5);
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #060606 !important;
    font-size: 13px;
    font-family: inherit;
    padding: 8px 12px;
    margin: 0;
    width: 100%;
    resize: vertical;
    text-align: left;
}
.adv-escavador-info .adv-info-row-ativo label .adv-tag-success {
    margin-right: 8px;
}
.adv-escavador-info .adv-info-row-passivo label .adv-tag-error {
    margin-right: 8px;
}
#escavador-dados-section textarea:read-only,
.adv-escavador-info .adv-info-row textarea:read-only {
    background: rgba(255,255,255,0.5);
    color: #060606 !important;
}
.adv-escavador-info .adv-info-row-adv textarea {
    min-height: 24px;
}
.adv-escavador-info .adv-info-row textarea.escavador-textarea-mono {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    line-height: 1.6;
}
.adv-escavador-info .adv-info-row textarea::placeholder {
    color: rgba(6,6,6,0.4);
}
/* --- ARQUIVO: dashboard-shared.css --- */
/* Estilos usados tanto pelo Advogado quanto pelo Cliente */

/* --- VARIÁVEIS GERAIS --- */
:root {
    --adv-primary: #0f4c75;       /* Azul Profundo */
    --adv-secondary: #3282b8;     /* Azul Médio */
    --adv-accent: #0f9b8e;        /* Verde Teal */
    --adv-bg: #f4f7fa;            /* Fundo Geral */
    --adv-white: #ffffff;
    --adv-text: #334155;          /* Texto Escuro */
    --adv-border: #e2e8f0;
    --adv-radius: 12px;
    --adv-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
}

/* --- RESET DE BLINDAGEM --- */
.adv-dashboard-wrapper, .adv-dashboard-client, .adv-dashboard-lawyer {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--adv-text);
    box-sizing: border-box;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    line-height: 1.5;
}
.adv-dashboard-wrapper * { box-sizing: border-box; }

/* --- HEADER GERAL --- */
.adv-header {
    background: var(--adv-white);
    padding: 25px 30px;
    border-radius: var(--adv-radius);
    box-shadow: var(--adv-shadow);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 4px solid var(--adv-primary);
}
.adv-header h1 { font-size: 22px; margin: 0; color: var(--adv-primary); font-weight: 800; }
.adv-header .header-info p { margin: 5px 0 0 0; font-size: 14px; color: #64748b; }

/* --- GRID SYSTEM --- */
.adv-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; align-items: start; }
.adv-col-half, .adv-col-full { width: 100%; }

/* --- CARDS & BOXES --- */
.adv-card {
    background: var(--adv-white);
    padding: 30px;
    border-radius: var(--adv-radius);
    border: 1px solid var(--adv-border);
    box-shadow: var(--adv-shadow);
    margin-bottom: 25px;
    position: relative;
    overflow: hidden;
}

/* --- PADRÃO DE TÍTULOS DE ABAS --- */
.adv-card h3,
.adv-tab-content h3 {
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--adv-primary);
    margin: 0;
}

.adv-card p,
.adv-tab-content p {
    font-size: 13px;
    color: #64748b;
    margin: 6px 0 0;
}

.tab-header h3 { margin: 0; }
.tab-header p { margin: 4px 0 0; }

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.tab-header-spaced { margin-bottom: 16px; }

.tab-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* --- BOTÕES --- */
.adv-btn, .adv-btn-primary {
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    line-height: 1;
}
.adv-btn { background: #fff; border: 1px solid var(--adv-border); color: #64748b; }
.adv-btn-primary { background: linear-gradient(135deg, var(--adv-primary) 0%, #155e8f 100%); color: white; box-shadow: 0 4px 6px -1px rgba(15, 76, 117, 0.2); }
.adv-btn:hover { background: #f8fafc; color: var(--adv-primary); border-color: var(--adv-primary); }
.adv-btn-primary:hover { opacity: 0.95; transform: translateY(-1px); }

/* --- FORMULÁRIOS --- */
.adv-form .form-group { margin-bottom: 20px; }
.adv-form label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 13px; color: #475569; }
.adv-form input, .adv-form select, .adv-form textarea { width: 100%; padding: 12px 15px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 15px; background: #fff; box-shadow: inset 0 1px 2px rgba(0,0,0,0.02); }
.adv-form input:focus { border-color: var(--adv-accent); outline: none; background: #fff; }
.adv-row { display: flex; gap: 20px; }

/* --- MODAIS BASE --- */
.adv-modal-overlay {
    display: none; /* Controlado via JS (display: flex) */
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}
.adv-modal-content {
    background-color: #fff;
    width: 90%;
    max-width: 800px;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    position: relative;
    overflow: hidden;
    animation: advZoomIn 0.2s ease-out;
}
.adv-modal-header {
    background: #fff;
    padding: 20px 30px;
    border-bottom: 1px solid var(--adv-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.adv-modal-header h2 { margin: 0; font-size: 20px; color: var(--adv-text); font-weight: 700; }
.adv-modal-close { font-size: 28px; cursor: pointer; color: #94a3b8; transition: 0.2s; }
.adv-modal-close:hover { color: #ef4444; }
.adv-modal-body { padding: 30px; overflow-y: auto; background: #f8fafc; }

/* --- CHAT IA --- */
.adv-virtual-judge-box { background: var(--adv-white); border-radius: var(--adv-radius); box-shadow: var(--adv-shadow); display: flex; flex-direction: column; height: 550px; border: 1px solid var(--adv-border); overflow: hidden; }
.adv-virtual-judge-box h3 { background: linear-gradient(135deg, var(--adv-primary) 0%, var(--adv-secondary) 100%); color: white; margin: 0; padding: 20px; font-size: 16px; }
.adv-chat-window { flex: 1; overflow-y: auto; padding: 20px; background: #f1f5f9; display: flex; flex-direction: column; gap: 15px; }
.adv-chat-input-area { padding: 15px; background: #fff; border-top: 1px solid var(--adv-border); display: flex; gap: 10px; align-items: center; }
.msg-judge { background: #fff; padding: 15px; border-radius: 12px; font-size: 14px; max-width: 85%; align-self: flex-start; border: 1px solid #e2e8f0; }
.msg-user { background: var(--adv-primary); color: white; padding: 15px; border-radius: 12px; font-size: 14px; max-width: 85%; align-self: flex-end; }

/* --- BADGES --- */
.status-badge { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: bold; display: inline-block; white-space: nowrap; }
.st-ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; } 
.st-blue { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.st-err { background: #fee2e2; color: #991b1b; }

@keyframes advZoomIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* Mobile Shared */
@media (max-width: 768px) {
    .adv-grid { display: block; }
    .adv-header { flex-direction: column; text-align: center; gap: 15px; }
    .adv-header .header-actions { width: 100%; justify-content: center; }
    .adv-row { flex-direction: column; gap: 0; }
    .adv-card { overflow-x: auto; padding: 20px; }
    .adv-btn, .adv-btn-primary { width: 100%; margin-bottom: 5px; }
    .adv-virtual-judge-box { height: 450px; margin-top: 30px; }
}

/* --- USER MENU DROPDOWN --- */
.adv-user-menu {
    position: relative;
}
.adv-user-menu-toggle .dashicons-arrow-down-alt2 {
    font-size: 12px;
    transition: transform 0.2s ease-in-out;
}
.adv-user-menu.is-active .adv-user-menu-toggle .dashicons-arrow-down-alt2 {
    transform: rotate(180deg);
}
.adv-user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 5px);
    background: var(--adv-white);
    border: 1px solid var(--adv-border);
    border-radius: var(--adv-radius);
    box-shadow: var(--adv-shadow);
    z-index: 1000;
    min-width: 200px;
    padding: 5px;
    animation: advZoomIn 0.1s ease-out;
}
.adv-user-menu.is-active .adv-user-dropdown {
    display: block;
}
.adv-user-dropdown .adv-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--adv-text);
}
.adv-user-dropdown .adv-btn:hover {
    background: #f8fafc;
    color: var(--adv-primary);
}
.adv-user-dropdown .adv-btn .dashicons-exit {
    color: #ef4444;
}

/* ============================================
   SISTEMA DE NAVEGAÇÃO POR TELAS (Sem Modais)
   Estilo limpo - Mobile-First
   ============================================ */

/* Views/Telas */
.adv-view { animation: advSlideIn 0.2s ease-out; }
@keyframes advSlideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* Header da View com botão voltar */
.adv-view-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--adv-border);
}
.adv-view-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--adv-text);
}

/* Botão Voltar */
.adv-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.adv-btn-back:hover {
    background: #e2e8f0;
    color: var(--adv-primary);
}
.adv-btn-back .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Botão Secundário */
.adv-btn-secondary {
    padding: 12px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.adv-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

/* Lista de Items (Mobile-Friendly) */
.adv-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.15s;
}
.adv-list-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.adv-list-item:active {
    background: #f1f5f9;
}

.adv-list-item-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.adv-list-item-content {
    flex: 1;
    min-width: 0;
}
.adv-list-item-title {
    font-weight: 600;
    font-size: 15px;
    color: #1e293b;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.adv-list-item-subtitle {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
}
.adv-list-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #94a3b8;
}
.adv-list-item-meta span {
    display: inline-flex;
    align-items: center;
}

.adv-list-item-arrow {
    color: #cbd5e1;
}
.adv-list-item-arrow .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Tags/Badges Limpos */
.adv-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.adv-tag-success {
    background: #ecfdf5;
    color: #059669;
}
.adv-tag-error {
    background: #fef2f2;
    color: #dc2626;
}
.adv-tag-info {
    background: #eff6ff;
    color: #2563eb;
}

/* Seções de Informação (Perfil) */
.adv-profile-content {
    padding: 0;
}
.adv-info-section {
    background: #f8fafc;
    border-radius: 8px;
    padding: 4px 0;
    margin-bottom: 20px;
}
.adv-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.adv-info-row:last-child {
    border-bottom: none;
}
.adv-info-row label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin: 0;
}
.adv-info-row span {
    font-size: 14px;
    color: #1e293b;
    font-weight: 500;
    text-align: right;
}

/* Estatísticas */
.adv-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}
.adv-stat-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}
.adv-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    margin-bottom: 6px;
}
.adv-stat-label {
    font-size: 13px;
    color: #64748b;
}

/* Título de Seção */
.adv-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e2e8f0;
}

/* Sub-lista (ex: clientes do advogado) */
.adv-sub-list {
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
}
.adv-sub-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.adv-sub-list-item:last-child {
    border-bottom: none;
}
.adv-sub-list-info strong {
    display: block;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 2px;
}
.adv-sub-list-info span {
    font-size: 12px;
    color: #64748b;
}
.adv-sub-list-badge {
    font-size: 12px;
    color: #64748b;
    background: #e2e8f0;
    padding: 4px 10px;
    border-radius: 4px;
}

/* Estado Vazio */
.adv-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}
.adv-empty-state .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}
.adv-empty-state p {
    margin: 0;
    font-size: 15px;
}
.adv-empty-state-small {
    text-align: center;
    padding: 30px 20px;
    color: #94a3b8;
    font-size: 14px;
}

/* Formulário Limpo */
.adv-form-clean {
    padding: 0;
}
.adv-form-group {
    margin-bottom: 20px;
}
.adv-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}
.adv-form-group input,
.adv-form-group select,
.adv-form-group textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    transition: border-color 0.15s;
}
.adv-form-group input:focus,
.adv-form-group select:focus,
.adv-form-group textarea:focus {
    outline: none;
    border-color: #94a3b8;
}
.adv-form-group input::placeholder {
    color: #94a3b8;
}

.adv-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.adv-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    margin-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.adv-form-message {
    text-align: center;
    padding: 12px;
    margin-top: 16px;
    font-weight: 500;
}

/* Mobile Responsivo */
@media (max-width: 640px) {
    .adv-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .adv-form-actions {
        flex-direction: column;
    }
    .adv-form-actions button {
        width: 100%;
    }
    .adv-stats-row {
        grid-template-columns: 1fr;
    }
    .adv-list-item-avatar {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 14px;
    }
    .adv-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .adv-info-row span {
        text-align: left;
    }
    .tab-header {
        flex-direction: column;
        align-items: stretch;
    }
    .tab-actions {
        flex-direction: column;
    }
    .tab-actions > * {
        width: 100%;
    }
}