@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800;900&family=Lato:wght@300;400;700&display=swap');

/* ── VARIABLES ── */
:root {
    --verde: #1a4731;
    --verde-osc: #0f2b1d;
    --verde-med: #22593e;
    --verde-claro: #e6eeea;
    --verde-hover: #1f5439;
    --blanco: #ffffff;
    --fondo: #f0f4f2;
    --borde: #e0e0e0;
    --gris: #666;
    --negro: #1a1a1a;
    --azul: #1d4ed8;
    --azul-claro: #eff6ff;
    --amber: #ba7517;
    --amber-claro: #fdf3e0;
}

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

body {
    font-family: 'DM Sans', system-ui, sans-serif;
    background: var(--fondo);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ── TOPBAR ── */
.topbar {
    height: 5px;
    background: linear-gradient(90deg, var(--verde-osc), var(--verde), var(--verde-med));
    flex-shrink: 0;
}

/* ── NAVBAR ── */
.navbar {
    background: var(--blanco);
    padding: 16px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--borde);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
}

.nav-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--verde), var(--verde-med));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(26, 71, 49, 0.3);
    flex-shrink: 0;
}

.nav-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 22px;
    color: var(--verde-osc);
    letter-spacing: -0.5px;
}

.nav-title span {
    color: var(--verde);
}

.nav-sub {
    font-size: 10px;
    color: #aaa;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 3px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #bbb;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.nav-dot {
    width: 7px;
    height: 7px;
    background: var(--verde);
    border-radius: 50%;
    animation: pulso 2s infinite;
    flex-shrink: 0;
}

@keyframes pulso {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .5; transform: scale(1.3); }
}

/* ── MAIN ── */
.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
}

/* ── CARD ── */
.card {
    display: flex;
    background: var(--blanco);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.10);
    border: 1px solid var(--borde);
    max-width: 860px;
    width: 100%;
    animation: aparecer 0.4s ease;
}

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

/* ── SIDEBAR ── */
.sidebar {
    width: 270px;
    flex-shrink: 0;
    background: linear-gradient(165deg, var(--verde-osc) 0%, var(--verde) 100%);
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.sidebar::before {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 50px solid rgba(255, 255, 255, 0.05);
    top: -80px;
    right: -80px;
    pointer-events: none;
}

.sidebar::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 40px solid rgba(255, 255, 255, 0.05);
    bottom: -60px;
    left: -60px;
    pointer-events: none;
}

.sb-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 18px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    width: fit-content;
    position: relative;
    z-index: 1;
}

.sb-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 20px;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.sb-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

.sb-div {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    margin: 22px 0;
    position: relative;
    z-index: 1;
}

.sb-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.sb-feat {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sb-feat-ico {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.sb-feat-ico svg {
    width: 14px;
    height: 14px;
}

.sb-feat-txt {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
}

.sb-bottom {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.25);
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* ── SIDEBAR CONTENT / BTN APRENDIZ ── */
.sidebar-content {
    position: relative;
    z-index: 1;
}

.opciones-publicas {
    margin-top: 24px;
}

.btn-aprendiz {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    gap: 12px;
}

.btn-aprendiz:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-aprendiz .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.text-group {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.text-group strong {
    font-size: 1rem;
    font-weight: 600;
}

.text-group span {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* ── FORM ÁREA ── */
.form-area {
    flex: 1;
    padding: 52px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.form-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--verde-claro);
    color: var(--verde-med);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 18px;
    width: fit-content;
}

.form-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--negro);
    letter-spacing: -0.5px;
    margin-bottom: 4px;
}

.form-sub {
    color: #aaa;
    font-size: 13px;
    margin-bottom: 32px;
}

/* ── ALERTAS ── */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.alert-error {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: #cc3333;
}

.alert-success {
    background: var(--verde-claro);
    border: 1px solid #a8c8b8;
    color: var(--verde-med);
}

.alert-info {
    background: #fff8e0;
    border: 1px solid #ffe080;
    color: #886600;
}

/* ── CAMPOS ── */
.field {
    margin-bottom: 18px;
}

.flabel {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #555;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.flabel-bar {
    width: 3px;
    height: 11px;
    background: var(--verde);
    border-radius: 2px;
    flex-shrink: 0;
}

.iwrap {
    position: relative;
}

.iico {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    opacity: 0.35;
    pointer-events: none;
    display: flex;
    align-items: center;
}

.finput {
    width: 100%;
    padding: 13px 14px 13px 42px;
    border: 1.5px solid var(--borde);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
    color: var(--negro);
    background: #fafafa;
    outline: none;
    transition: all 0.25s;
    -webkit-text-size-adjust: 100%;
}

.finput:focus {
    border-color: var(--verde);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 71, 49, 0.12);
}

.finput::placeholder {
    color: #ccc;
    font-size: 13px;
}

/* ── OPCIONES ── */
.opts-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 10px;
}

.rem {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gris);
    cursor: pointer;
}

.rem input {
    accent-color: var(--verde);
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.flink {
    font-size: 13px;
    color: var(--verde);
    text-decoration: none;
    font-weight: 600;
}

.flink:hover {
    color: var(--verde-osc);
}

/* ── BOTÓN PRINCIPAL ── */
.btn-main {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--verde), var(--verde-med));
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 6px 20px rgba(26, 71, 49, 0.30);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    touch-action: manipulation;
}

.btn-main:hover {
    background: linear-gradient(135deg, var(--verde-hover), var(--verde));
    box-shadow: 0 10px 28px rgba(26, 71, 49, 0.40);
    transform: translateY(-1px);
}

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

/* ── FOOTER ── */
.footer {
    background: var(--blanco);
    border-top: 1px solid var(--borde);
    padding: 14px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #ccc;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 6px;
}

.footer a {
    color: var(--verde);
    text-decoration: none;
}

/* ════════════════════════════════
   RESPONSIVE — de mayor a menor
   ════════════════════════════════ */

@media (min-width: 1100px) {
    .card {
        max-width: 920px;
    }
}

@media (max-width: 1024px) {
    .navbar {
        padding: 14px 32px;
    }

    .main {
        padding: 36px 20px;
    }

    .card {
        max-width: 780px;
    }

    .sidebar {
        width: 240px;
        padding: 40px 24px;
    }

    .sb-title {
        font-size: 18px;
    }

    .form-area {
        padding: 44px 40px;
    }

    .form-title {
        font-size: 25px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 12px 20px;
    }

    .nav-title {
        font-size: 18px;
    }

    .nav-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
        border-radius: 11px;
    }

    .nav-sub {
        font-size: 9px;
    }

    .nav-right {
        font-size: 11px;
    }

    .main {
        padding: 28px 16px;
        align-items: flex-start;
    }

    .card {
        flex-direction: column;
        border-radius: 20px;
        max-width: 540px;
        margin: 0 auto;
    }

    .sidebar {
        width: 100%;
        padding: 24px 28px;
        flex-direction: column;
        justify-content: flex-start;
        gap: 0;
        min-height: unset;
    }

    .sidebar::before,
    .sidebar::after {
        display: none;
    }

    .sb-title {
        font-size: 17px;
        margin-bottom: 8px;
    }

    .sb-desc {
        font-size: 12px;
        line-height: 1.6;
    }

    .sb-div {
        margin: 16px 0;
    }

    .sb-features {
        display: none;
    }

    .sb-bottom {
        display: none;
    }

    .sidebar-content {
        margin-top: 16px;
    }

    .opciones-publicas {
        margin-top: 0;
    }

    .btn-aprendiz {
        padding: 10px 14px;
    }

    .text-group strong {
        font-size: 0.9rem;
    }

    .text-group span {
        font-size: 0.75rem;
    }

    .form-area {
        padding: 32px 28px;
    }

    .form-title {
        font-size: 24px;
    }

    .footer {
        padding: 14px 20px;
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .main {
        padding: 0;
        align-items: stretch;
    }

    .card {
        flex-direction: column;
        border-radius: 0;
        box-shadow: none;
        border: none;
        min-height: 100vh;
        max-width: 100%;
    }

    .sidebar {
        width: 100%;
        padding: 20px 20px 18px;
        border-radius: 0;
    }

    .sb-title {
        font-size: 15px;
        margin-bottom: 5px;
    }

    .sb-desc {
        font-size: 11px;
        line-height: 1.5;
    }

    .sb-div {
        margin: 12px 0;
    }

    .sb-features,
    .sb-bottom {
        display: none;
    }

    .sidebar-content {
        margin-top: 14px;
    }

    .opciones-publicas {
        margin-top: 0;
        padding: 0;
    }

    .btn-aprendiz {
        padding: 10px 12px;
        border-radius: 10px;
    }

    .text-group strong {
        font-size: 0.85rem;
    }

    .text-group span {
        font-size: 0.72rem;
    }

    .form-area {
        flex: 1;
        padding: 28px 20px 32px;
        justify-content: flex-start;
    }

    .form-title {
        font-size: 22px;
    }

    .form-sub {
        font-size: 12px;
        margin-bottom: 24px;
    }

    .field {
        margin-bottom: 16px;
    }

    .finput {
        font-size: 16px;
        padding: 14px 14px 14px 42px;
    }

    .opts-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 22px;
    }

    .btn-main {
        font-size: 14px;
        padding: 14px;
    }

    .footer {
        padding: 12px 20px;
        flex-direction: column;
        gap: 4px;
        text-align: center;
    }
}

@media (max-width: 360px) {
    .nav-title {
        font-size: 15px;
    }

    .nav-sub {
        display: none;
    }

    .nav-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .form-title {
        font-size: 19px;
    }

    .form-area {
        padding: 22px 16px 28px;
    }

    .sidebar {
        padding: 16px;
    }

    .sb-title {
        font-size: 13px;
    }
}
