/* main.css */

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

body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

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

/* Flash messages */
.flash-messages {
    margin-bottom: 20px;
}

.alert {
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

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

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

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

.login-box h2 {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 18px;
    font-weight: normal;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-success {
    background-color: #10b981;
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

/* Admin Dashboard */
.admin-header {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-header h1 {
    color: #2c3e50;
    font-size: 24px;
}

.admin-user-info {
    display: flex;
    gap: 15px;
    align-items: center;
}

.admin-user-info span {
    color: #555;
}

/* Navigation */
.admin-nav {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-link {
    text-decoration: none;
    color: #555;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #ecf0f1;
}

.nav-link.active {
    background-color: #3498db;
    color: white;
}

.nav-link.disabled {
    color: #bdc3c7;
    cursor: not-allowed;
}

.nav-link.disabled:hover {
    background-color: transparent;
}

/* Dashboard content */
.dashboard-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.welcome-message {
    text-align: center;
    padding: 40px 20px;
}

.welcome-message h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.welcome-message p {
    color: #7f8c8d;
    margin-bottom: 10px;
}

/* Stats Grid - Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.stat-card:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stat-card:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.stat-card:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-icon {
    font-size: 48px;
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 16px;
    opacity: 0.9;
}

.stat-detail {
    font-size: 14px;
    opacity: 0.8;
    margin-top: 5px;
}

/* Quick Actions */
.quick-actions {
    margin-top: 40px;
}

.quick-actions h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-buttons .btn {
    width: auto;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.section-header h2 {
    color: #2c3e50;
    margin: 0;
}

.section-header .btn {
    width: auto;
}

/* Info Box */
.info-box {
    background-color: #e7f3ff;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.info-box p {
    margin: 0;
    color: #2c3e50;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.data-table thead {
    background-color: #34495e;
    color: white;
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.data-table tbody tr {
    border-bottom: 1px solid #ecf0f1;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

.data-table td {
    padding: 12px;
}

.data-table td.actions {
    display: flex;
    gap: 8px;
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Button Icons */
.btn-icon {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-state p {
    font-size: 18px;
    margin-bottom: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: modalFadeIn 0.3s;
}

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

.modal-header {
    padding: 20px 25px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #000;
}

.modal form {
    padding: 25px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.modal-footer .btn {
    width: auto;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group input[type="date"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #7f8c8d;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .admin-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px;
    }
}

/* Formularios Públicos */
.public-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.public-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 500px;
}

.registro-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 700px;
}

.gracias-box {
    background: white;
    padding: 60px 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
    text-align: center;
}

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

.public-header h1 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 28px;
}

.subtitle {
    color: #7f8c8d;
    font-size: 16px;
    margin: 0;
}

.access-info {
    background-color: #e7f3ff;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 4px;
}

.access-info p {
    margin: 0;
    color: #2c3e50;
    line-height: 1.6;
}

.captcha-group {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    border: 2px solid #dee2e6;
}

.captcha-question {
    background-color: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    text-align: center;
    font-size: 18px;
    color: #2c3e50;
    border: 1px solid #dee2e6;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
}

.help-text {
    margin-top: 25px;
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
}

.help-text p {
    margin: 0;
}

/* Form Sections */
.form-section-title {
    margin-top: 30px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #ecf0f1;
}

.form-section-title h3 {
    color: #2c3e50;
    font-size: 18px;
    margin: 0;
}

.form-actions {
    margin-top: 30px;
    text-align: center;
}

/* Success/Gracias Page */
.success-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounceIn 0.8s;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.gracias-box h1 {
    color: #28a745;
    font-size: 32px;
    margin-bottom: 20px;
}

.gracias-message {
    margin-bottom: 30px;
}

.gracias-message p {
    color: #2c3e50;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.bible-verse {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
}

.verse-text {
    font-size: 20px;
    font-style: italic;
    margin-bottom: 10px;
    line-height: 1.5;
}

.verse-reference {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

.gracias-actions {
    margin-top: 30px;
}

.additional-info {
    margin-top: 25px;
    color: #7f8c8d;
}

.additional-info p {
    margin: 0;
}

/* Responsive para formularios públicos */
@media (max-width: 768px) {
    .public-box,
    .registro-box,
    .gracias-box {
        padding: 30px 20px;
    }

    .public-header h1 {
        font-size: 24px;
    }

    .gracias-box h1 {
        font-size: 28px;
    }

    .success-icon {
        font-size: 60px;
    }

    .verse-text {
        font-size: 18px;
    }
}
