* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #ecf0f1;
    --border-color: #bdc3c7;
    --text-color: #2c3e50;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.navbar-brand h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.navbar .subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.navbar-menu {
    display: flex;
    gap: 30px;
    margin-top: 15px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Main Content */
main {
    min-height: calc(100vh - 300px);
    margin-bottom: 40px;
}

.page {
    display: none;
    animation: fadeIn 0.3s;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 40px;
    border-radius: 8px;
    margin-bottom: 40px;
    text-align: center;
}

.hero h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    opacity: 0.9;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.info-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--secondary-color);
}

.info-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.info-card p {
    font-size: 14px;
    color: #7f8c8d;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1a252f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Registration Steps */
.registration-steps {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--light-bg);
}

.step {
    padding: 10px 20px;
    border-radius: 20px;
    background: var(--light-bg);
    color: #7f8c8d;
    font-weight: 600;
    text-align: center;
    flex: 1;
    margin: 0 5px;
}

.step.active {
    background: var(--primary-color);
    color: white;
}

.step-content h3 {
    margin-bottom: 25px;
    color: var(--primary-color);
}

.step-buttons {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: flex-end;
}

/* District Grid */
.district-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.district-card {
    padding: 20px;
    border: 2px solid var(--light-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.district-card:hover {
    border-color: var(--primary-color);
    background: rgba(44, 62, 80, 0.05);
}

.district-card.selected {
    border-color: var(--secondary-color);
    background: rgba(231, 76, 60, 0.1);
}

.district-card h4 {
    margin-bottom: 5px;
    color: var(--primary-color);
}

.district-card p {
    font-size: 12px;
    color: #7f8c8d;
}

/* Family Tree */
.family-tree {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    min-height: 200px;
}

.family-member {
    background: white;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.family-member-info h4 {
    margin-bottom: 5px;
}

.family-member-info p {
    font-size: 12px;
    color: #7f8c8d;
}

.remove-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.family-tree-controls {
    margin-bottom: 20px;
}

/* Requirements Box */
.requirements-box {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.requirement-section {
    margin-bottom: 20px;
}

.requirement-section h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.requirement-list {
    list-style: none;
    padding-left: 0;
}

.requirement-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.requirement-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Search */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
}

.search-results {
    display: grid;
    gap: 15px;
}

.result-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--primary-color);
}

.result-card h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.result-card p {
    margin: 5px 0;
    font-size: 14px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
}

.status-badge.pendiente {
    background: var(--warning-color);
    color: white;
}

.status-badge.aprobado {
    background: var(--success-color);
    color: white;
}

.status-badge.rechazado {
    background: var(--danger-color);
    color: white;
}

/* Admin */
.admin-login-container {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.admin-login-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color), #34495e);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-card .number {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-card .label {
    font-size: 14px;
    opacity: 0.9;
}

.applications-list {
    display: grid;
    gap: 15px;
}

.app-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.app-card h4 {
    margin-bottom: 10px;
}

.app-card p {
    font-size: 14px;
    color: #7f8c8d;
}

.app-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.app-actions button {
    flex: 1;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-menu {
        flex-direction: column;
        gap: 10px;
    }

    .hero {
        padding: 30px 20px;
    }

    .hero h2 {
        font-size: 24px;
    }

    .step-indicator {
        flex-direction: column;
        gap: 10px;
    }

    .step {
        margin: 5px 0;
    }

    .step-buttons {
        flex-direction: column;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}
