/* Reset e configurações base */
.oab-tribunal-container {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fafbfc;
    color: #2c3e50;
    line-height: 1.6;
}

.oab-tribunal-container *,
.oab-tribunal-container *::before,
.oab-tribunal-container *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Header */
.tribunal-header {
    background-color: #34495e;
    color: white;
    padding: 25px 40px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.title-section {
    text-align: center;
}

.title-section h1 {
    font-size: 28px;
    font-weight: 600;
    color: white;
    display: inline;
    margin-right: 20px;
}

.title-section h2 {
    font-size: 16px;
    font-weight: 400;
    color: #bdc3c7;
    display: inline;
}

/* Controls Section */
.controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
    flex-wrap: wrap;
}

.search-group {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 2px;
    flex: 1;
    max-width: 400px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.search-field {
    flex: 1;
    padding: 12px 16px;
    border: none;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: transparent;
}

.search-field::placeholder {
    color: #95a5a6;
}

.search-btn {
    padding: 12px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-btn:hover {
    background: #2980b9;
}

.search-icon {
    font-size: 14px;
}

.filter-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.filter-select {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: white;
    cursor: pointer;
    min-width: 180px;
    outline: none;
    transition: border-color 0.2s ease;
}

.filter-select:focus {
    border-color: #3498db;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid #34495e;
    border-radius: 6px;
    background: white;
    color: #34495e;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #34495e;
    color: white;
}

.action-btn.secondary {
    border-color: #27ae60;
    color: #27ae60;
}

.action-btn.secondary:hover {
    background: #27ae60;
    color: white;
}

.btn-icon {
    font-size: 12px;
}

.btn-text {
    font-weight: 500;
}

/* Members Section */
.members-section {
    margin-bottom: 40px;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.member-card {
    background: white;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 24px;
    transition: all 0.2s ease;
    position: relative;
}

.member-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.card-header {
    margin-bottom: 16px;
    display: flex;
    justify-content: flex-end;
}

.member-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.badge-presidente {
    background-color: #8e44ad;
}

.badge-vice {
    background-color: #34495e;
}

.badge-secretario {
    background-color: #e67e22;
}

.badge-corregedor {
    background-color: #c0392b;
}

.badge-subcorregedor {
    background-color: #16a085;
}

.badge-conselheiro {
    background-color: #2980b9;
}

.card-content {
    text-align: left;
}

.member-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.3;
}

.member-oab {
    font-size: 14px;
    color: #3498db;
    font-weight: 500;
    margin-bottom: 6px;
}

.member-position {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 400;
}

/* Statistics Section */
.statistics-section {
    margin-top: 40px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
    display: block;
}

.stat-label {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

.loading-text {
    font-size: 16px;
    color: #7f8c8d;
    font-weight: 500;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Hidden class for filtering */
.hidden {
    display: none !important;
}

/* Card animation */
.member-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation delay */
.member-card:nth-child(1) { animation-delay: 0.05s; }
.member-card:nth-child(2) { animation-delay: 0.1s; }
.member-card:nth-child(3) { animation-delay: 0.15s; }
.member-card:nth-child(4) { animation-delay: 0.2s; }
.member-card:nth-child(5) { animation-delay: 0.25s; }
.member-card:nth-child(6) { animation-delay: 0.3s; }
.member-card:nth-child(7) { animation-delay: 0.35s; }
.member-card:nth-child(8) { animation-delay: 0.4s; }
.member-card:nth-child(n+9) { animation-delay: 0.45s; }

/* Responsive Design */
@media (max-width: 768px) {
    .oab-tribunal-container {
        padding: 15px;
    }
    
    .tribunal-header {
        padding: 20px 25px;
    }
    
    .title-section h1 {
        font-size: 24px;
        display: block;
        margin-bottom: 8px;
        margin-right: 0;
    }
    
    .title-section h2 {
        font-size: 14px;
        display: block;
    }
    
    .controls-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-group {
        max-width: none;
        margin-bottom: 15px;
    }
    
    .filter-group {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .filter-select {
        min-width: auto;
        flex: 1;
    }
    
    .members-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .member-card {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-number {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .tribunal-header {
        padding: 15px 20px;
    }
    
    .title-section h1 {
        font-size: 20px;
    }
    
    .title-section h2 {
        font-size: 12px;
    }
    
    .filter-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-btn {
        justify-content: center;
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .member-name {
        font-size: 16px;
    }
    
    .card-header {
        justify-content: center;
    }
}