/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    background-color: #000;
    min-height: 100vh;
    padding: 20px;
    color: #2c3e50;
    
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.form-wrapper {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 800px;
    margin: 0 auto;
}

h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 28px;
    text-align: center;
}

h2 {
    color: #34495e;
    font-size: 20px;
    margin-bottom: 20px;
}

.form-description {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 14px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
}

.required {
    color: #e74c3c;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Participants Section */
.participants-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #ecf0f1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.participant-item {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.participant-item:hover {
    border-color: #00ffbd;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.1);
}

.participant-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.participant-header h3 {
    color: #2c3e50;
    font-size: 16px;
    margin: 0;
}

.participant-fields {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 15px;
}

.participant-count {
    text-align: center;
    margin-top: 15px;
    font-weight: 600;
    color: #7f8c8d;
    font-size: 14px;
}

/* Validation Status */
.validation-status {
    margin-top: 5px;
    font-size: 12px;
    min-height: 18px;
}

.validation-status.loading {
    color: #3498db;
}

.validation-status.success {
    color: #27ae60;
    font-weight: 600;
}

.validation-status.error {
    color: #e74c3c;
    font-weight: 600;
}

.error-message {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
    min-height: 18px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #08af4eab;
    color: white;
    width: 100%;
    font-size: 16px;
    padding: 15px;
}

.btn-primary:hover:not(:disabled) {
    background-color: #1e8047;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.btn-secondary:hover {
    background: #dee2e6;
}

.btn-remove {
    background: #e02c14;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #dd6b20;
}

/* Form Actions */
.form-actions {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Messages */
.message {
    padding: 15px 20px;
    border-radius: 6px;
    margin-top: 20px;
    font-size: 14px;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-wrapper {
        padding: 20px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    .participant-fields {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .section-header button {
        width: 100%;
    }
    
    .participant-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Admin Panel Styles */
.admin-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-header h1 {
    margin: 0;
    text-align: left;
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading::after {
    content: " ";
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #3498db;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-left: 5px;
    vertical-align: middle;
}

/* Smooth Transitions */
.participant-item,
.form-control,
.btn,
.validation-status {
    transition: all 0.3s ease;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Print styles for admin panel */
@media print {
    body {
        background: white;
    }
    
    .btn, .filters, .pagination {
        display: none;
    }
    
    .submissions-table {
        box-shadow: none;
    }
}

/* Header con Logos */
.form-header {
    background: transparent;
    padding: 40px 20px 30px;
    margin-bottom: 30px;
}

.header-container {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
}

.logo-left,
.logo-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-left .header-logo {
    width: 350px;
    height: 120px;
    scale: 1.4;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.logo-right .header-logo {
    width: 200px;
    height: 90px;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Responsive Design para Header */
@media (max-width: 768px) {
    .form-header {
        padding: 30px 15px 20px;
    }
    
    .header-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .logo-left .header-logo {
        width: 280px;
        height: 100px;
    }
    
    .logo-right .header-logo {
        width: 200px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    .form-header {
        padding: 20px 10px 15px;
    }
    
    .header-container {
        gap: 20px;
    }
    
    .logo-left .header-logo {
        width: 240px;
        height: 85px;
    }
    
    .logo-right .header-logo {
        width: 170px;
        height: 60px;
    }
}

/* Ajuste del body y container para el header */
body {
    margin: 0;
    padding: 0;
}

.container {
    margin-top: 0;
}

/* Estadísticas de Empresas */
.empresa-stats {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f8f9fa;
    border-left: 4px solid #27ae60;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #27ae60;
    transition: all 0.3s ease;
}

.empresa-stats span {
    font-weight: 700;
}

/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

.login-page {
    background: #1a1d23;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-page .form-header {
    background: rgba(0, 0, 0, 0.5);
    margin-bottom: 0;
}

.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: #2d3238;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: #ffffff;
    font-size: 28px;
    margin-bottom: 10px;
}

.login-header p {
    color: #a0aec0;
    font-size: 14px;
    margin: 0;
}

.login-form {
    margin-top: 30px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    color: #e2e8f0;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.login-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #404550;
    background: #1a1d23;
    color: #ffffff;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.login-form .form-control::placeholder {
    color: #718096;
}

.login-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 10px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.btn-link {
    color: #81a1ff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.btn-link:hover {
    color: #667eea;
    text-decoration: underline;
}

/* Login page messages */
.login-page .message.error {
    background: #2d1f1f;
    border: 1px solid #e53e3e;
    color: #feb2b2;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.login-page .message.success {
    background: #1f2d1f;
    border: 1px solid #48bb78;
    color: #9ae6b4;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ============================================
   ADMIN HEADER WITH USER INFO
   ============================================ */

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-header-left h1 {
    margin: 0;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.user-icon {
    font-size: 20px;
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-danger {
    background: #ed8936;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #dd6b20;
}

/* Responsive for admin header */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .admin-header-left,
    .admin-header-right {
        width: 100%;
    }
    
    .admin-header-right {
        flex-direction: column;
        align-items: stretch;
    }
    
    .user-info {
        justify-content: space-between;
    }
}

/* Search Section Styles */
.search-section {
    margin-top: 40px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    position: relative;
}

.search-section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    border-radius: 2px;
}

.search-header {
    text-align: center;
    margin-bottom: 25px;
}

.search-header h2 {
    color: #2d3748;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.search-header p {
    color: #718096;
    font-size: 16px;
    margin: 0;
}

.search-section .form-group {
    margin-bottom: 20px;
}

.search-section .form-control {
    background: white;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.search-section .form-control:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.search-section .btn-secondary {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
}

.search-section .btn-secondary:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.search-section .btn-secondary:disabled {
    background: #a0aec0;
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
}

.search-section .message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
}

.search-section .message.success {
    background: #f0fff4;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.search-section .message.error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #feb2b2;
}

/* Search result with button styles */
.search-section .message.success-result {
    background: white;
    border: 2px solid #48bb78;
    padding: 0;
}

.search-result-success {
    padding: 25px;
    text-align: center;
}

.search-result-success .result-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border-radius: 50%;
    font-size: 32px;
    font-weight: bold;
    margin: 0 auto 15px;
}

.search-result-success h3 {
    color: #22543d;
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px 0;
}

.result-details {
    background: #f7fafc;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.result-item {
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 15px;
    color: #2d3748;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item strong {
    color: #1a202c;
    font-weight: 600;
    display: inline-block;
    min-width: 120px;
}

.edit-limit-info {
    padding: 10px 0;
    font-size: 14px;
    color: #4a5568;
    font-style: italic;
}

.btn-edit-group {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.btn-edit-group:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(72, 187, 120, 0.4);
}

.btn-edit-group:active {
    transform: translateY(0);
}

/* Mobile responsive for search section */
@media (max-width: 768px) {
    .search-section {
        margin-top: 30px;
        padding: 20px;
    }
    
    .search-header h2 {
        font-size: 20px;
    }
    
    .search-header p {
        font-size: 14px;
    }
    
    .search-result-success {
        padding: 20px;
    }
    
    .search-result-success .result-icon {
        width: 50px;
        height: 50px;
        font-size: 26px;
    }
    
    .search-result-success h3 {
        font-size: 20px;
    }
    
    .result-details {
        padding: 15px;
    }
    
    .result-item {
        font-size: 14px;
    }
    
    .result-item strong {
        display: block;
        min-width: auto;
        margin-bottom: 5px;
    }
    
    .btn-edit-group {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }
}

