﻿/* ============================================
   VARIABLES GLOBALES
   ============================================ */

:root {
    --primary-color: #2c5282;
    --secondary-color: #4a90e2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --secondary-btn-color: #6c757d;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
    --text-muted: #64748b;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --body-bg: #ffffff;
}

/* ============================================
   ESTILOS GENERALES
   ============================================ */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-bg);
    color: #1a202c;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

    a:hover {
        color: var(--secondary-color);
    }

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ============================================
   HEADER
   ============================================ */

header {
    background: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

    header h1 {
        margin: 0;
        text-align: center;
        font-size: 1.8rem;
    }

/* ============================================
   FOOTER
   ============================================ */

footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: 2rem;
}

    footer p {
        margin: 0;
    }

/* ============================================
   BOTONES
   ============================================ */

.btn {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
        text-decoration: none;
    }

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
        color: white;
    }

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #ffd60a);
    color: #000;
}

    .btn-warning:hover {
        background: linear-gradient(135deg, #ffd60a, var(--warning-color));
    }

.btn-info {
    background: linear-gradient(135deg, var(--info-color), #20c997);
    color: white;
}

    .btn-info:hover {
        background: linear-gradient(135deg, #20c997, var(--info-color));
        color: white;
    }

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary-btn-color), #adb5bd);
    color: white;
}

    .btn-secondary:hover {
        background: linear-gradient(135deg, #adb5bd, var(--secondary-btn-color));
        color: white;
    }

/* ============================================
   JUDGE DETAILS - INTEGRACIÓN COMPLETA
   ============================================ */

.details-view {
    padding: 2rem 0;
    background-color: white;
}

.page-header {
    /*background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));*/
    color: black;
    padding: 0.5rem 0;
    margin-top: 0;
    margin-bottom: 1rem;
    border-radius: 0 0 20px 20px;
}

    .page-header h1 {
        font-weight: 600;
        margin-bottom: 0.5rem;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }

    .page-header .lead {
        font-size: 1.1rem;
        margin-bottom: 0;
        opacity: 0.9;
    }

.details-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

    .details-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    }

.judge-avatar {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: var(--shadow-md);
    border: 4px solid white;
}

.judge-name {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.8rem;
    margin: 1rem 0 0.5rem 0;
}

.judge-position {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.status-badge {
    background: linear-gradient(135deg, var(--success-color), #20c997);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    border: none;
    display: inline-block;
}

.section-title {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .section-title i {
        color: var(--secondary-color);
    }

.info-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    height: 100%;
}

.details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

    .details-row:hover {
        background-color: var(--light-bg);
        border-radius: 8px;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .details-row:last-child {
        border-bottom: none;
    }

.details-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
    min-width: 180px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.details-value {
    color: #1a202c;
    font-weight: 500;
    text-align: right;
    flex: 1;
}

.audit-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1.5rem;
}

.audit-title {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.audit-info {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.action-buttons {
    margin-top: 2.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================
   FORMULARIOS - NUEVOS ESTILOS
   ============================================ */

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

    .form-section:last-of-type {
        border-bottom: none;
        margin-bottom: 0;
    }

.section-subtitle {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

    .section-subtitle i {
        color: var(--secondary-color);
    }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

    .form-label i {
        color: var(--secondary-color);
        width: 16px;
    }

.form-control {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: white;
    font-family: inherit;
}

    .form-control:focus {
        outline: none;
        border-color: var(--secondary-color);
        box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
        transform: translateY(-1px);
    }

    .form-control:hover {
        border-color: var(--secondary-color);
    }

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

select.form-control {
    cursor: pointer;
}

input[type="date"].form-control {
    cursor: pointer;
}

/* ============================================
   ANIMACIONES
   ============================================ */

.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .details-card {
        padding: 1.5rem;
        margin: 0 1rem;
    }

    .judge-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }

    .judge-name {
        font-size: 1.5rem;
    }

    .details-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .details-label {
        min-width: auto;
    }

    .details-value {
        text-align: left;
        font-weight: 600;
        color: var(--primary-color);
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        justify-content: center;
        width: 100%;
    }

    .page-header {
        margin-bottom: 1rem;
        padding: 1.5rem 0;
        margin-top: 0;
        padding-top: 0;
    }

    /* Responsive para formularios */
    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.container-search {
    min-height: calc(100vh - 200px); /* ajusta 200px según header + footer */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* ajusta a flex-end si quieres más separación hacia abajo */
    padding-top: 1rem;
    margin-top: 1rem;
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.main-header + .container-search {
    margin-top: 1rem; /* separación entre el header y el formulario */
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

footer {
    margin-top: auto;
}
