/* =======================================================
   CDT Registration — estilos
   ======================================================= */
:root {
    --cdtr-brand:        #047857;
    --cdtr-brand-dark:   #065f46;
    --cdtr-brand-light:  #ecfdf5;
    --cdtr-brand-border: #a7f3d0;
    --cdtr-slate-50:  #f8fafc;
    --cdtr-slate-100: #f1f5f9;
    --cdtr-slate-200: #e2e8f0;
    --cdtr-slate-400: #94a3b8;
    --cdtr-slate-500: #64748b;
    --cdtr-slate-600: #475569;
    --cdtr-slate-700: #334155;
    --cdtr-slate-900: #0f172a;
    --cdtr-red:       #dc2626;
    --cdtr-radius:    12px;
}

.cdtr-wrap, .cdtr-wrap * {
    box-sizing: border-box;
    font-family: 'DM Sans', system-ui, sans-serif;
}
.cdtr-wrap {
    max-width: 820px;
    margin: 40px auto;
    padding: 0 16px;
    color: var(--cdtr-slate-700);
}
.cdtr-head { text-align: center; margin-bottom: 24px; }
.cdtr-badge {
    display: inline-block;
    background: var(--cdtr-brand-light);
    color: var(--cdtr-brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 10px;
}
.cdtr-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--cdtr-slate-900);
    margin: 0 0 6px;
}
.cdtr-sub { color: var(--cdtr-slate-500); margin: 0; font-size: 14px; }

/* Steps progress */
.cdtr-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: 480px;
    margin: 0 auto 28px;
}
.cdtr-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}
.cdtr-step-dot span {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--cdtr-slate-200);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: var(--cdtr-slate-500);
    font-size: 14px;
    transition: all .2s;
}
.cdtr-step-dot small {
    font-size: 11px;
    color: var(--cdtr-slate-500);
    font-weight: 500;
}
.cdtr-step-dot.is-active span,
.cdtr-step-dot.is-done span {
    background: var(--cdtr-brand);
    border-color: var(--cdtr-brand);
    color: #fff;
}
.cdtr-step-line {
    flex: 1;
    max-width: 60px;
    height: 2px;
    background: var(--cdtr-slate-200);
}

/* Form wrapper */
.cdtr-form-wrap {
    background: #fff;
    border: 1px solid var(--cdtr-slate-200);
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0,0,0,.04);
    overflow: hidden;
}
.cdtr-form-wrap--sm { max-width: 460px; margin: 0 auto; }

.cdtr-pane {
    display: none;
    padding: 28px 32px;
}
.cdtr-pane.is-active { display: block; animation: cdtrFade .25s ease; }
@keyframes cdtrFade {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.cdtr-pane__head { text-align: center; margin-bottom: 24px; }
.cdtr-pane__icon {
    width: 56px; height: 56px;
    border-radius: 18px;
    background: var(--cdtr-brand-light);
    color: var(--cdtr-brand);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin-bottom: 12px;
}
.cdtr-pane h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    margin: 0 0 4px;
    color: var(--cdtr-slate-900);
}
.cdtr-pane__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    margin: 6px 0 4px;
    color: var(--cdtr-slate-900);
}
.cdtr-pane__desc { margin: 0 0 20px; color: var(--cdtr-slate-500); font-size: 14px; }

.cdtr-pane__back {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}
.cdtr-back {
    background: transparent;
    border: none;
    color: var(--cdtr-slate-400);
    cursor: pointer;
    width: 32px; height: 32px;
    border-radius: 50%;
    transition: all .15s;
}
.cdtr-back:hover { background: var(--cdtr-slate-100); color: var(--cdtr-slate-600); }
.cdtr-step-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--cdtr-brand);
    background: var(--cdtr-brand-light);
    padding: 4px 10px;
    border-radius: 999px;
}

/* Role selection */
.cdtr-role-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.cdtr-role-card {
    background: #fff;
    border: 2px solid var(--cdtr-slate-200);
    border-radius: 16px;
    padding: 20px 16px;
    cursor: pointer;
    text-align: center;
    transition: all .2s;
    font-family: inherit;
}
.cdtr-role-card:hover {
    border-color: var(--cdtr-brand-border);
    background: var(--cdtr-slate-50);
    transform: translateY(-2px);
}
.cdtr-role-card.is-selected {
    border-color: var(--cdtr-brand);
    background: var(--cdtr-brand-light);
    box-shadow: 0 8px 20px rgba(4,120,87,.12);
}
.cdtr-role-card__icon {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--cdtr-slate-100);
    color: var(--cdtr-slate-500);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    margin: 0 auto 14px;
    transition: all .2s;
}
.cdtr-role-card.is-selected .cdtr-role-card__icon {
    background: var(--cdtr-brand);
    color: #fff;
}
.cdtr-role-card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    margin: 0 0 4px;
    color: var(--cdtr-slate-900);
}
.cdtr-role-card p {
    font-size: 12px;
    color: var(--cdtr-slate-500);
    margin: 0 0 10px;
}
.cdtr-role-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    font-size: 12px;
    color: var(--cdtr-slate-500);
}
.cdtr-role-card ul li { margin-bottom: 4px; }
.cdtr-role-card ul li i { color: #10b981; margin-right: 4px; }

/* Avatar upload */
.cdtr-avatar-field {
    text-align: center;
    margin-bottom: 18px;
}
.cdtr-avatar-field small {
    display: block;
    margin-top: 6px;
    color: var(--cdtr-slate-400);
    font-size: 11px;
}
.cdtr-avatar-upload {
    position: relative;
    display: inline-block;
    width: 96px; height: 96px;
}
.cdtr-avatar-upload img {
    width: 96px; height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--cdtr-brand-border);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.cdtr-avatar-upload__btn {
    position: absolute;
    bottom: 2px; right: 2px;
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--cdtr-brand);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
    border: 2px solid #fff;
    transition: all .15s;
}
.cdtr-avatar-upload__btn:hover { background: var(--cdtr-brand-dark); transform: scale(1.05); }

/* Fields */
.cdtr-fields { display: flex; flex-direction: column; gap: 14px; }
.cdtr-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cdtr-field label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--cdtr-slate-500);
    font-weight: 600;
    margin-bottom: 6px;
}
.cdtr-optional {
    text-transform: none;
    color: var(--cdtr-slate-400);
    font-weight: 400;
    font-size: 10px;
    letter-spacing: 0;
}
.cdtr-input {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--cdtr-slate-200);
    border-radius: var(--cdtr-radius);
    padding: 9px 14px;
    background: #fff;
    transition: all .15s;
}
.cdtr-input i { color: var(--cdtr-slate-400); font-size: 14px; }
.cdtr-input input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-family: inherit;
    color: var(--cdtr-slate-900);
    padding: 2px 0;
}
.cdtr-input:focus-within {
    border-color: var(--cdtr-brand);
    box-shadow: 0 0 0 3px var(--cdtr-brand-light);
}

/* Divider */
.cdtr-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 10px;
}
.cdtr-divider::before, .cdtr-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--cdtr-slate-200);
}
.cdtr-divider span {
    color: var(--cdtr-slate-500);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 600;
}

/* Service badges */
.cdtr-services {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.cdtr-service-badge {
    background: #fff;
    border: 1.5px solid var(--cdtr-slate-200);
    color: var(--cdtr-slate-700);
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all .15s;
}
.cdtr-service-badge:hover {
    border-color: var(--cdtr-brand-border);
    background: var(--cdtr-slate-50);
}
.cdtr-service-badge.is-selected {
    background: var(--cdtr-brand);
    color: #fff;
    border-color: var(--cdtr-brand);
}

/* Checkbox */
.cdtr-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: var(--cdtr-slate-600);
    cursor: pointer;
    line-height: 1.5;
    margin-top: 4px;
}
.cdtr-checkbox input {
    margin-top: 3px;
    accent-color: var(--cdtr-brand);
}
.cdtr-checkbox a { color: var(--cdtr-brand); text-decoration: underline; }

/* Actions */
.cdtr-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--cdtr-slate-100);
}
.cdtr-actions--end { justify-content: flex-end; border-top: none; padding-top: 0; }

.cdtr-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--cdtr-radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    line-height: 1;
}
.cdtr-btn--primary { background: var(--cdtr-brand); color: #fff; }
.cdtr-btn--primary:hover { background: var(--cdtr-brand-dark); transform: translateY(-1px); }
.cdtr-btn--primary:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.cdtr-btn--ghost {
    background: #fff;
    color: var(--cdtr-slate-600);
    border-color: var(--cdtr-slate-200);
}
.cdtr-btn--ghost:hover { background: var(--cdtr-slate-50); }
.cdtr-btn--full { width: 100%; justify-content: center; }

/* Error */
.cdtr-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--cdtr-red);
    border-radius: 10px;
    font-size: 13px;
}

/* Login hint */
.cdtr-login-hint {
    text-align: center;
    margin: 18px 0 0;
    padding: 14px 16px 18px;
    color: var(--cdtr-slate-500);
    font-size: 13px;
}
.cdtr-login-hint a { color: var(--cdtr-brand); font-weight: 600; text-decoration: none; }
.cdtr-login-hint a:hover { text-decoration: underline; }

/* Success screen */
.cdtr-success {
    padding: 40px 32px;
    text-align: center;
}
.cdtr-success__icon {
    width: 84px; height: 84px;
    background: var(--cdtr-brand-light);
    border: 3px solid var(--cdtr-brand-border);
    color: var(--cdtr-brand);
    border-radius: 50%;
    font-size: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 18px;
}
.cdtr-success__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    margin: 0 0 10px;
    color: var(--cdtr-slate-900);
}
.cdtr-success__msg { color: var(--cdtr-slate-500); font-size: 14px; margin: 0 0 20px; }
.cdtr-success__hint { color: var(--cdtr-slate-400); font-size: 12px; margin: 0 0 12px; }
.cdtr-success__login a { color: var(--cdtr-brand); font-weight: 600; text-decoration: none; }

.cdtr-link {
    background: none;
    border: none;
    color: var(--cdtr-brand);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    padding: 0;
    font-family: inherit;
}
.cdtr-link:disabled { opacity: .5; cursor: default; }

/* Alerts */
.cdtr-alert {
    padding: 12px 14px;
    background: #f1f5f9;
    border: 1px solid var(--cdtr-slate-200);
    border-radius: 10px;
    color: var(--cdtr-slate-700);
    font-size: 13px;
    margin-bottom: 14px;
}
.cdtr-alert--ok   { background: var(--cdtr-brand-light); border-color: var(--cdtr-brand-border); color: var(--cdtr-brand-dark); }
.cdtr-alert--warn { background: #fef3c7; border-color: #fde68a; color: #92400e; }

/* Mobile */
@media (max-width: 620px) {
    .cdtr-pane { padding: 22px 18px; }
    .cdtr-role-grid { grid-template-columns: 1fr; }
    .cdtr-grid-2 { grid-template-columns: 1fr; }
    .cdtr-step-line { max-width: 24px; }
    .cdtr-title { font-size: 1.45rem; }
    .cdtr-step-dot small { display: none; }
}



/* =======================================================
   CDT Login — estilos (mismos que registration)
   ======================================================= */

/* Contenedor principal - usa las mismas variables que registration */
.cdtr-wrap {
    max-width: 820px;
    margin: 40px auto;
    padding: 0 16px;
    color: var(--cdtr-slate-700);
}

.cdtr-form-wrap {
    background: #fff;
    border: 1px solid var(--cdtr-slate-200);
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0,0,0,.04);
    overflow: hidden;
}

.cdtr-form-wrap--sm {
    max-width: 460px;
    margin: 0 auto;
}

/* Header */
.cdtr-head {
    text-align: center;
    margin-bottom: 28px;
    padding: 32px 32px 0 32px;
}

.cdtr-badge {
    display: inline-block;
    background: var(--cdtr-brand-light);
    color: var(--cdtr-brand);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.cdtr-badge i {
    margin-right: 6px;
}

.cdtr-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--cdtr-slate-900);
    margin: 0 0 8px;
}

.cdtr-sub {
    color: var(--cdtr-slate-500);
    margin: 0;
    font-size: 14px;
}

/* Formulario */
.cdtr-form {
    padding: 0 32px;
}

/* Campos */
.cdtr-fields {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 20px;
}

.cdtr-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cdtr-field label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--cdtr-slate-500);
    font-weight: 600;
    margin-bottom: 0;
}

.cdtr-input {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--cdtr-slate-200);
    border-radius: var(--cdtr-radius);
    padding: 11px 14px;
    background: #fff;
    transition: all .15s;
}

.cdtr-input i {
    color: var(--cdtr-slate-400);
    font-size: 14px;
    width: 16px;
}

.cdtr-input input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    font-family: inherit;
    color: var(--cdtr-slate-900);
    padding: 2px 0;
}

.cdtr-input input::placeholder {
    color: var(--cdtr-slate-400);
    font-size: 13px;
}

.cdtr-input:focus-within {
    border-color: var(--cdtr-brand);
    box-shadow: 0 0 0 3px var(--cdtr-brand-light);
}

/* Checkbox */
.cdtr-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--cdtr-slate-600);
    cursor: pointer;
    margin-top: 4px;
    margin-bottom: 0;
    padding: 4px 0;
}

.cdtr-checkbox input {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--cdtr-brand);
}

.cdtr-checkbox span {
    user-select: none;
}

/* Error message */
.cdtr-error {
    margin-top: 16px;
    margin-bottom: 20px;
    padding: 12px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--cdtr-red);
    border-radius: 10px;
    font-size: 13px;
}

/* Alert */
.cdtr-alert {
    margin: 0 32px 20px 32px;
    padding: 12px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    color: #92400e;
    font-size: 13px;
}

.cdtr-alert--warn {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #b45309;
}

.cdtr-alert strong {
    font-weight: 700;
}

.cdtr-link {
    background: none;
    border: none;
    color: var(--cdtr-brand);
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    padding: 0;
    margin-left: 6px;
    font-family: inherit;
}

.cdtr-link:hover {
    color: var(--cdtr-brand-dark);
}

/* Botones */
.cdtr-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 28px;
    margin-bottom: 32px;
}

.cdtr-actions--end {
    justify-content: flex-end;
    border-top: none;
    padding-top: 0;
}

.cdtr-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--cdtr-radius);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
    line-height: 1;
}

.cdtr-btn--primary {
    background: var(--cdtr-brand);
    color: #fff;
}

.cdtr-btn--primary:hover {
    background: var(--cdtr-brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(4, 120, 87, 0.2);
}

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

.cdtr-btn--primary:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

.cdtr-btn--full {
    width: 100%;
    justify-content: center;
}

/* Enlaces de ayuda */
.cdtr-login-hint {
    text-align: center;
    margin: 0;
    padding: 0 32px 28px 32px;
    color: var(--cdtr-slate-500);
    font-size: 13px;
    background: #fff;
}

.cdtr-login-hint:last-child {
    padding-bottom: 32px;
}

.cdtr-login-hint a {
    color: var(--cdtr-brand);
    font-weight: 600;
    text-decoration: none;
    transition: color .15s;
}

.cdtr-login-hint a:hover {
    color: var(--cdtr-brand-dark);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 560px) {
    .cdtr-head {
        padding: 24px 20px 0 20px;
    }
    
    .cdtr-form {
        padding: 0 20px;
    }
    
    .cdtr-alert {
        margin: 0 20px 16px 20px;
    }
    
    .cdtr-login-hint {
        padding: 0 20px 24px 20px;
    }
    
    .cdtr-login-hint:last-child {
        padding-bottom: 24px;
    }
    
    .cdtr-actions {
        margin-top: 24px;
        margin-bottom: 24px;
    }
    
    .cdtr-btn {
        padding: 10px 20px;
    }
}