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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e8f8f5 0%, #d4f1e8 100%);
    min-height: 100vh;
    padding: 20px;
}

.register-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    position: relative;
}

/* Botón para volver */
.btn-back {
    position: absolute;
    top: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.9);
    color: #2d3e50;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    z-index: 10;
    border: 1px solid #e8f5f1;
}

.btn-back:hover {
    background: white;
    transform: translateX(-3px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.back-arrow {
    font-size: 1.2rem;
    color: #5cb85c;
}

/* Header */
.register-header {
    background: linear-gradient(135deg, #5cb85c 0%, #4cae4c 100%);
    padding: 3rem 2rem;
    padding-top: 4rem;
    text-align: center;
    color: white;
}

.register-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.register-header p {
    font-size: 1rem;
    opacity: 0.95;
}

/* Selector de tipo de usuario */
.user-type-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 2rem;
    background: #f8fdf9;
}

.type-btn {
    background: white;
    border: 3px solid #e8f5f1;
    border-radius: 15px;
    padding: 2rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.type-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(92, 184, 92, 0.15);
    border-color: #5cb85c;
}

.type-btn.active {
    background: linear-gradient(135deg, #5cb85c 0%, #4cae4c 100%);
    color: white;
    border-color: #5cb85c;
    box-shadow: 0 8px 20px rgba(92, 184, 92, 0.3);
}

.type-btn .icon {
    font-size: 3rem;
}

.type-btn .type-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.type-btn .type-desc {
    font-size: 0.9rem;
    opacity: 0.8;
}

.type-btn.active .type-desc {
    opacity: 1;
}

/* Contenedor de formularios */
.forms-container {
    padding: 2.5rem;
}

.register-form {
    display: none;
    padding: 30px;
}

.register-form.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.register-form h2 {
    color: #2d3e50;
    font-size: 1.5rem;
    margin: 2rem 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8f5f1;
}

.register-form h2:first-of-type {
    margin-top: 0;
}

.register-form h3 {
    color: #5cb85c;
    font-size: 1.1rem;
    margin: 1.5rem 0 1rem 0;
}

/* Form groups */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #2d3e50;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e8f5f1;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fdf9;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #5cb85c;
    background: white;
    box-shadow: 0 0 0 3px rgba(92, 184, 92, 0.1);
}

.form-group select {
    cursor: pointer;
}

.form-group input[type="file"] {
    padding: 10px;
    cursor: pointer;
}

.file-info {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.foto-preview-container {
    margin-top: 10px;
    width: 150px;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #e8f5f1;
    background-color: #f8fdf9;
}

.foto-preview-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.password-input {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.toggle-password:hover {
    opacity: 1;
}

.error-message {
    display: block;
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    min-height: 18px;
}

.password-strength {
    display: block;
    font-size: 0.85rem;
    margin-top: 0.3rem;
    font-weight: 500;
}

.password-strength.weak {
    color: #dc3545;
}

.password-strength.medium {
    color: #ffc107;
}

.password-strength.strong {
    color: #28a745;
}

/* Checkbox group */
.checkbox-group {
    margin: 2rem 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    cursor: pointer;
    color: #5a6c7d;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #5cb85c;
}

.link {
    color: #5cb85c;
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

/* Info box */
.info-box {
    background: #e8f5f1;
    border-left: 4px solid #5cb85c;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    color: #2d3e50;
}

.info-box strong {
    color: #5cb85c;
}

/* Campos de vehículo */
.vehiculo-fields {
    padding: 1.5rem;
    background: #f8fdf9;
    border-radius: 10px;
    border: 2px dashed #e8f5f1;
    margin: 1rem 0;
}

.vehiculo-fields h3 {
    margin-top: 0;
}

/* Botón submit */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #5cb85c 0%, #4cae4c 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(92, 184, 92, 0.3);
    margin-top: 1rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(92, 184, 92, 0.4);
}

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

/* Footer */
.register-footer {
    text-align: center;
    padding: 2rem;
    background: #f8fdf9;
    color: #6c757d;
    font-size: 0.95rem;
}

/* Success message */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 1px solid #c3e6cb;
    display: none;
    text-align: center;
}

.success-message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

/* Loading spinner */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading-spinner.show {
    display: block;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #5cb85c;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* Responsive */
@media (max-width: 768px) {
    .register-container {
        margin: 10px;
    }

    .btn-back {
        top: 15px;
        left: 15px;
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    .register-header {
        padding: 2rem 1.5rem;
        padding-top: 3.5rem;
    }

    .register-header h1 {
        font-size: 2rem;
    }

    .user-type-selector {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .forms-container {
        padding: 1.5rem;
    }

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

    .register-form h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .btn-back span:last-child {
        display: none;
    }

    .register-header {
        padding: 1.5rem 1rem;
        padding-top: 3rem;
    }

    .register-header h1 {
        font-size: 1.8rem;
    }

    .type-btn {
        padding: 1.5rem 1rem;
    }

    .type-btn .icon {
        font-size: 2.5rem;
    }

    .type-btn .type-title {
        font-size: 1.1rem;
    }

    .forms-container {
        padding: 1rem;
    }
}