/* Main layout */
body {
    background-color: #f8f9fa;
}

/* Card styles */
.card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Table styles */
.table-responsive {
    margin-bottom: 1rem;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Form styles */
.form-label {
    font-weight: 500;
}

.form-text {
    color: #6c757d;
}

/* Button styles */
.btn-group {
    gap: 0.25rem;
}

/* Badge styles */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Custom status colors */
.status-created {
    color: #198754;
}

.status-pending {
    color: #ffc107;
}

.status-completed {
    color: #0dcaf0;
}

/* Document list styles */
.document-list {
    list-style: none;
    padding-left: 0;
}

.document-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.document-list li:last-child {
    border-bottom: none;
}

/* Alert styles */
.alert {
    border: none;
    border-radius: 0.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Navigation styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Tribunal navigation styles */
.navbar .nav-link[href*="tribunal"] {
    color: #f97316 !important;
    font-weight: 500;
}

.navbar .nav-link[href*="tribunal"]:hover {
    color: #ea580c !important;
    background-color: rgba(249, 115, 22, 0.1);
    border-radius: 0.375rem;
}

.navbar .dropdown-toggle[id="tribunalDropdown"] {
    color: #f97316 !important;
    font-weight: 500;
}

.navbar .dropdown-toggle[id="tribunalDropdown"]:hover {
    color: #ea580c !important;
    background-color: rgba(249, 115, 22, 0.1);
    border-radius: 0.375rem;
}

.navbar .dropdown-menu[aria-labelledby="tribunalDropdown"] .dropdown-header {
    color: #f97316;
    font-weight: 600;
}

.navbar .dropdown-menu[aria-labelledby="tribunalDropdown"] .dropdown-item:hover {
    background-color: rgba(249, 115, 22, 0.1);
    color: #ea580c;
}

/* Breadcrumb improvements for tribunal */
.tribunal-breadcrumb {
    background-color: rgba(249, 115, 22, 0.1);
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
}

.tribunal-breadcrumb .breadcrumb-item a {
    color: #f97316;
    text-decoration: none;
}

.tribunal-breadcrumb .breadcrumb-item a:hover {
    color: #ea580c;
}

/* Modal styles */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Custom utilities */
.text-small {
    font-size: 0.875rem;
}

.mt-lg {
    margin-top: 2rem;
}

.mb-lg {
    margin-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    
    /* Page header adjustments */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Card spacing on mobile */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Filter form improvements */
    .form-select, .btn {
        height: 42px;
    }
    
    /* Badge sizing */
    .badge {
        font-size: 0.75rem;
        padding: 0.375em 0.75em;
    }
    
    /* Improved text sizing for readability */
    .card-header h6 {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .fw-medium {
        font-size: 0.9rem;
    }
    
    /* Touch-friendly buttons */
    .btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }
    
    /* Better spacing for mobile cards */
    .concurso-card .row.g-2 {
        margin-bottom: 0.75rem;
    }
    
    .concurso-card .row.g-2:last-of-type {
        margin-bottom: 1rem;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 576px) {
    /* Navbar brand text sizing */
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    /* Page title */
    h2 {
        font-size: 1.5rem;
    }
    
    /* Filter card header */
    .card-header h5 {
        font-size: 1rem;
    }
    
    /* Concurso card adjustments */
    .concurso-card .card-header {
        padding: 0.5rem 0.75rem;
    }
    
    .concurso-card .card-body {
        padding: 0.75rem;
    }
    
    /* Smaller badges on very small screens */
    .badge {
        font-size: 0.7rem;
        padding: 0.25em 0.5em;
    }
    
    /* Alert text sizing */
    .alert {
        font-size: 0.9rem;
    }
}

/* Mobile-friendly styles for public concursos page */
.concurso-card {
    border-left: 4px solid #0d6efd;
    transition: transform 0.2s, box-shadow 0.2s;
}

.concurso-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.concurso-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 0.75rem 1rem;
}

.concurso-card .card-body {
    padding: 1rem;
}

/* Mobile styles for detail page */
@media (max-width: 992px) {
    /* Detail page improvements */
    .card-header h2 {
        font-size: 1.3rem;
        line-height: 1.3;
    }
    
    .card-header h4 {
        font-size: 1.1rem;
    }
    
    /* Table responsiveness on detail page */
    .table th {
        font-size: 0.85rem;
        padding: 0.5rem 0.4rem;
    }
    
    .table td {
        font-size: 0.85rem;
        padding: 0.5rem 0.4rem;
    }
    
    /* Instructivo card adjustments */
    .card h5 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .card p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* Alert improvements */
    .alert {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    
    .alert i {
        margin-right: 0.5rem;
    }
}

/* Specific improvements for very small screens */
@media (max-width: 576px) {
    /* Back button styling */
    .btn-secondary {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Card header title */
    .card-header h2 {
        font-size: 1.1rem;
        word-wrap: break-word;
    }
    
    /* Section titles */
    h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    /* Table responsiveness */
    .table-responsive {
        border: none;
    }
    
    .table th {
        font-size: 0.8rem;
        font-weight: 600;
        background-color: #f8f9fa;
    }
    
    .table td {
        font-size: 0.8rem;
        word-break: break-word;
    }
    
    /* Card spacing */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    /* Instructivo section */
    .card h5 {
        font-size: 0.95rem;
        color: #495057;
    }
    
    /* Alert adjustments for small screens */
    .alert {
        margin-top: 1rem;
        border-radius: 0.375rem;
    }
}

/* Tribunal navigation styles */
.navbar .nav-link[href*="tribunal"] {
    color: #f97316 !important;
    font-weight: 500;
}

.navbar .nav-link[href*="tribunal"]:hover {
    color: #ea580c !important;
    background-color: rgba(249, 115, 22, 0.1);
    border-radius: 0.375rem;
}

.navbar .dropdown-toggle[id="tribunalDropdown"] {
    color: #f97316 !important;
    font-weight: 500;
}

.navbar .dropdown-toggle[id="tribunalDropdown"]:hover {
    color: #ea580c !important;
    background-color: rgba(249, 115, 22, 0.1);
    border-radius: 0.375rem;
}

.navbar .dropdown-menu[aria-labelledby="tribunalDropdown"] .dropdown-header {
    color: #f97316;
    font-weight: 600;
}

.navbar .dropdown-menu[aria-labelledby="tribunalDropdown"] .dropdown-item:hover {
    background-color: rgba(249, 115, 22, 0.1);
    color: #ea580c;
}

/* Breadcrumb improvements for tribunal */
.tribunal-breadcrumb {
    background-color: rgba(249, 115, 22, 0.1);
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
}

.tribunal-breadcrumb .breadcrumb-item a {
    color: #f97316;
    text-decoration: none;
}

.tribunal-breadcrumb .breadcrumb-item a:hover {
    color: #ea580c;
}

/* Google Drive loading styles are now handled inline by the JavaScript */