/* 
 * Tribunal Portal Styles
 * Unified color scheme using blues, greys, and teal accents
 * Created: June 2025
 */

/* Tribunal Portal Color Palette */
.header-primary { 
    background-color: #2563eb; 
    color: white; 
}

.header-blue-light { 
    background-color: #3b82f6; 
    color: white; 
}

.header-grey-medium { 
    background-color: #6b7280; 
    color: white; 
}

.header-grey-light { 
    background-color: #f3f4f6; 
    color: #374151; 
    border-bottom: 1px solid #d1d5db;
}

.header-orange { 
    background-color: #2563eb; 
    color: white; 
}

.header-orange-light { 
    background-color: #dbeafe; 
    color: #1e40af; 
}

/* Button styles for tribunal */
.btn-tribunal-primary { 
    background-color: #2563eb; 
    border-color: #2563eb; 
    color: white; 
}

.btn-tribunal-primary:hover { 
    background-color: #1e40af; 
    border-color: #1e40af; 
    color: white;
}

/* Permission update animation */
.permissions-updated {
    background-color: #dbeafe !important;
    border: 2px solid #2563eb !important;
    border-radius: 8px;
    transition: all 0.3s ease-in-out;
}

.permissions-updated .form-check-label {
    color: #1e40af !important;
    font-weight: 500;
}

.btn-tribunal-primary:focus {
    background-color: #1e40af; 
    border-color: #1e40af; 
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.btn-tribunal-secondary { 
    background-color: #6b7280; 
    border-color: #6b7280; 
    color: white; 
}

.btn-tribunal-secondary:hover { 
    background-color: #374151; 
    border-color: #374151; 
    color: white;
}

.btn-tribunal-secondary:focus {
    background-color: #374151; 
    border-color: #374151; 
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(107, 114, 128, 0.25);
}

.btn-tribunal-accent { 
    background-color: #2563eb; 
    border-color: #2563eb; 
    color: white; 
}

.btn-tribunal-accent:hover { 
    background-color: #1e40af; 
    border-color: #1e40af; 
    color: white;
}

.btn-tribunal-accent:focus {
    background-color: #1e40af; 
    border-color: #1e40af; 
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Small button enhancements */
.btn-sm.btn-tribunal-primary,
.btn-sm.btn-tribunal-secondary,
.btn-sm.btn-tribunal-accent,
.btn-sm.btn-tribunal-success {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Large button enhancements */
.btn-lg.btn-tribunal-accent {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
    border-radius: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-lg.btn-tribunal-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    line-height: 1.2;
}

.btn-group-vertical .btn + .btn {
    margin-top: -1px;
}

.btn-sm.btn-tribunal-accent i {
    margin-right: 0.25rem;
}

/* Success button variant */
.btn-tribunal-success { 
    background-color: #059669; 
    border-color: #059669; 
    color: white; 
}

.btn-tribunal-success:hover { 
    background-color: #047857; 
    border-color: #047857; 
    color: white;
}

.btn-tribunal-success:focus {
    background-color: #047857; 
    border-color: #047857; 
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(5, 150, 105, 0.25);
}

/* Badge styles - MAXIMUM specificity to override Bootstrap */
span.badge.badge-tribunal-primary,
.badge.badge-tribunal-primary,
table .badge.badge-tribunal-primary,
.tribunal-table .badge.badge-tribunal-primary { 
    background-color: #2563eb !important; 
    color: white !important;
    border: 1px solid #1e40af !important;
    background-image: none !important;
}

span.badge.badge-tribunal-secondary,
.badge.badge-tribunal-secondary,
table .badge.badge-tribunal-secondary,
.tribunal-table .badge.badge-tribunal-secondary { 
    background-color: #6b7280 !important; 
    color: white !important;
    border: 1px solid #4b5563 !important;
    background-image: none !important;
}

span.badge.badge-tribunal-accent,
.badge.badge-tribunal-accent,
table .badge.badge-tribunal-accent,
.tribunal-table .badge.badge-tribunal-accent { 
    background-color: #f97316 !important; 
    color: white !important;
    border: 1px solid #ea580c !important;
    background-image: none !important;
}

span.badge.badge-tribunal-success,
.badge.badge-tribunal-success,
table .badge.badge-tribunal-success,
.tribunal-table .badge.badge-tribunal-success { 
    background-color: #059669 !important; 
    color: white !important;
    border: 1px solid #047857 !important;
    background-image: none !important;
}

span.badge.badge-tribunal-warning,
.badge.badge-tribunal-warning,
table .badge.badge-tribunal-warning,
.tribunal-table .badge.badge-tribunal-warning { 
    background-color: #d97706 !important; 
    color: white !important;
    border: 1px solid #b45309 !important;
    background-image: none !important;
}

span.badge.badge-tribunal-info,
.badge.badge-tribunal-info,
table .badge.badge-tribunal-info,
.tribunal-table .badge.badge-tribunal-info { 
    background-color: #2563eb !important; 
    color: white !important;
    border: 1px solid #1e40af !important;
    background-image: none !important;
}

/* Tab styling improvements for tribunal portal */
.tribunal-tabs .nav-link {
    border-radius: 0.5rem 0.5rem 0 0;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    color: #6b7280;
}

.tribunal-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #dee2e6;
    background-color: #f8f9fa;
    color: #2563eb;
}

.tribunal-tabs .nav-link.active {
    background-color: #fff;
    border-color: #2563eb #2563eb #fff;
    border-bottom-color: transparent;
    font-weight: 600;
    color: #2563eb;
}

.tribunal-tabs .nav-link i {
    margin-right: 0.5rem;
}

/* Tab content styling */
.tribunal-tab-content {
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    background-color: #fff;
    padding: 1.5rem;
}

/* Card styling within tabs */
.tribunal-tab-content .card {
    border: none;
    box-shadow: none;
}

.tribunal-tab-content .card-header {
    border-radius: 0.5rem 0.5rem 0 0;
    border: none;
}

.tribunal-tab-content .card-body {
    padding: 1.5rem;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
}

/* Notification badges styling */
.notification-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Temas list styling */
.temas-list {
    display: flex;
    flex-wrap: wrap;
}

.temas-list .badge {
    border: 1px solid #dee2e6;
    margin: 0.25rem;
}

/* Table enhancements for tribunal */
.tribunal-table .table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: #f8fafc;
}

.tribunal-table .table-hover > tbody > tr:hover > td {
    background-color: #e2e8f0;
}

.tribunal-table .table th {
    background-color: #f1f5f9;
    color: #374151;
    font-weight: 600;
    border-color: #e2e8f0;
}

.tribunal-table .table td {
    border-color: #e2e8f0;
    vertical-align: middle;
}

/* Ensure badges work in tribunal tables */
.tribunal-table .badge[class*="badge-tribunal-"] {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    font-weight: 500;
}

/* Card enhancements */
.tribunal-card {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.tribunal-card .card-header {
    border-bottom: 1px solid #d1d5db;
}

/* Alert styling for tribunal */
.alert-tribunal-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.alert-tribunal-warning {
    background-color: #f0f9ff;
    border-color: #cff7fe;
    color: #0e7490;
}

.alert-tribunal-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #15803d;
}

/* List group enhancements for tribunal */
.list-group-item {
    border-color: #e5e7eb;
    transition: background-color 0.15s ease-in-out;
    padding: 1rem;
}

.list-group-item:hover {
    background-color: #f8fafc;
}

.list-group-item h5 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.list-group-item .badge {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.list-group-item .badge + .badge {
    margin-left: 0.5rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .tribunal-tabs .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .tribunal-tabs .nav-link i {
        margin-right: 0.25rem;
    }
    
    .tribunal-tab-content {
        padding: 1rem;
    }
}

/* Accordion styling for tribunal */
.accordion-button:not(.collapsed) {
    background-color: #f8f9fa;
    color: #374151;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0,0,0,.125);
}

.accordion-button {
    color: #374151;
    font-weight: 500;
}

.accordion-item {
    border-color: #e5e7eb;
}

.accordion-body {
    background-color: #fafbfc;
}

.alert-sm {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Print styles */
@media print {
    .btn-tribunal-primary,
    .btn-tribunal-secondary,
    .btn-tribunal-accent {
        border: 1px solid #000 !important;
        background: transparent !important;
        color: #000 !important;
    }
    
    .header-primary,
    .header-blue-light,
    .header-grey-medium,
    .header-orange {
        background: #f8f9fa !important;
        color: #000 !important;
        border: 1px solid #000 !important;
    }
}

/* General Tab Layout Enhancements */
.tab-pane#general .card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 8px;
    overflow: hidden;
}

.tab-pane#general .card-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.tab-pane#general .card-header h4 {
    font-size: 1.1rem;
    margin: 0;
}

.tab-pane#general .card-body p {
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.tab-pane#general .card-body strong {
    color: #374151;
    font-weight: 600;
    display: inline-block;
    min-width: 120px;
}

/* Instructivo section styling */
.tab-pane#general .card-body h6 {
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tab-pane#general .card-body .text-muted {
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid #3b82f6;
    margin-bottom: 0;
}

/* Responsive adjustments for General tab */
@media (max-width: 768px) {
    .tab-pane#general .row {
        margin-bottom: 1rem;
    }
    
    .tab-pane#general .col-md-4,
    .tab-pane#general .col-md-8 {
        margin-bottom: 1rem;
    }
}

/* ========================================
   LOGIN PAGES STYLES
   ======================================== */

/* Main Login Page Styles */
.login-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.login-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.login-body {
    padding: 2rem;
}

.tribunal-access {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border: none;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: white;
    transition: all 0.3s ease;
}

.tribunal-access:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.3);
    color: white;
}

.admin-access {
    background: rgba(37, 99, 235, 0.05);
    border: 2px solid rgba(37, 99, 235, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.admin-access:hover {
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(37, 99, 235, 0.1);
}

.btn-tribunal-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

.btn-tribunal-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
    color: white;
}

.divider {
    text-align: center;
    margin: 2rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    background: white;
    padding: 0 1rem;
    color: #6b7280;
    font-weight: 500;
}

/* Tribunal Login Page Styles */
.tribunal-login-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.tribunal-login-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15);
    overflow: hidden;
    max-width: 450px;
    margin: 0 auto;
}

.tribunal-login-header {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.tribunal-login-body {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02) 0%, rgba(59, 130, 246, 0.02) 100%);
}

.form-control {
    border: 2px solid rgba(37, 99, 235, 0.1);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {    border-color: #2563eb;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.btn-tribunal-login {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-tribunal-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    color: white;
}

.tribunal-links {
    background: rgba(37, 99, 235, 0.05);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
}

.tribunal-links a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.tribunal-links a:hover {
    color: #1e40af;
    text-decoration: underline;
}

.back-to-main {
    text-align: center;
    margin-top: 1rem;
}

.back-to-main a {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.back-to-main a:hover {
    color: #374151;
    text-decoration: underline;
}

/* Account Activation Page Styles */
.activation-container {
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.activation-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.15);
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
}

.activation-header {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.activation-body {
    padding: 2rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02) 0%, rgba(96, 165, 250, 0.02) 100%);
}

/* Activation form controls */
.activation-body .form-control {
    border: 2px solid rgba(59, 130, 246, 0.1);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.activation-body .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.btn-activation {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
}

.btn-activation:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    color: white;
}

.btn-back {
    background: rgba(107, 114, 128, 0.1);
    border: 2px solid rgba(107, 114, 128, 0.2);
    border-radius: 0.5rem;
    padding: 0.75rem 2rem;
    font-weight: 500;
    color: #6b7280;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(107, 114, 128, 0.2);
    border-color: rgba(107, 114, 128, 0.3);
    color: #374151;
}

.info-section {
    background: rgba(59, 130, 246, 0.05);
    border-left: 4px solid #3b82f6;
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 1rem 1.5rem;
    margin-bottom: 2rem;
}

.info-section p {
    margin-bottom: 0.5rem;
    color: #374151;
}

.info-section p:last-child {
    margin-bottom: 0;
}
