/* ============================================================
   Classroom Connect — Auth Styles
   Diseño: cálido, refinado, educativo
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=DM+Serif+Display&display=swap');

/* ============================================================
   RESET BÁSICO
   Solo box-sizing — el HTML ya está estructurado correctamente
   ============================================================ */

.cc-auth-wrapper input,
.cc-auth-wrapper button,
.cc-auth-wrapper div,
.cc-auth-wrapper form,
.cc-auth-wrapper label,
.cc-auth-wrapper a,
.cc-auth-wrapper h2,
.cc-auth-wrapper p,
.cc-auth-wrapper small {
    box-sizing: border-box;
}

/* ============================================================
   WRAPPER
   ============================================================ */

.cc-auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 72vh;
    padding: 48px 20px;
    background: transparent;
    font-family: 'DM Sans', system-ui, sans-serif;
}

/* ============================================================
   CARD
   ============================================================ */

.cc-auth-card {
    width: 100%;
    max-width: 420px;
    background: #ffffff;
    padding: 44px 40px 40px;
    border-radius: 16px;
    border: 1px solid #e8e0d8;
    box-shadow: 0 4px 6px rgba(60, 40, 20, 0.04), 0 24px 48px rgba(60, 40, 20, 0.10);
    position: relative;
}

/* Detalle decorativo superior */
.cc-auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(90deg, #d4712a 0%, #e8a056 50%, #d4712a 100%);
}

/* ============================================================
   TÍTULO
   ============================================================ */

.cc-auth-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
    font-size: 26px;
    color: #1c1410;
    text-align: center;
    margin: 0 0 28px 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* ============================================================
   FORM
   ============================================================ */

.cc-auth-form {
    display: block;
    width: 100%;
}

/* ============================================================
   FIELDS
   ============================================================ */

.cc-field {
    display: block;
    width: 100%;
    margin: 0 0 18px 0;
}

.cc-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #6b5c4e;
    margin: 0 0 7px 0;
    letter-spacing: 0.01em;
}

.cc-field input {
    display: block;
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    border: 1.5px solid #ddd5cb;
    font-size: 14px;
    font-family: 'DM Sans', system-ui, sans-serif;
    color: #1c1410;
    background: #fdfcfb;
    transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cc-field input:hover {
    border-color: #c8b9aa;
}

.cc-field input:focus {
    border-color: #d4712a;
    box-shadow: 0 0 0 4px rgba(220, 135, 60, 0.18);
    background: #ffffff;
    outline: none;
}

.cc-field input::placeholder {
    color: #c4b5a8;
}

.cc-field small {
    display: block;
    margin: 6px 0 0 0;
    font-size: 12px;
    color: #a0907e;
    line-height: 1.4;
}

/* ============================================================
   PASSWORD WRAPPER Y TOGGLE
   ============================================================ */

.cc-password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.cc-password-wrapper input {
    width: 100%;
    padding-right: 44px;
}

.cc-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
    color: #a0907e;
    line-height: 1;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cc-toggle-password:hover {
    color: #6b5c4e;
}

.cc-toggle-password:focus-visible {
    outline: 2px solid #d4712a;
    border-radius: 4px;
}

/* ============================================================
   BOTÓN PRINCIPAL
   ============================================================ */

.cc-auth-button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    margin: 8px 0 0 0;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #d4712a 0%, #c4621a 100%);
    color: #ffffff;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    text-align: center;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(212, 113, 42, 0.30);
}

.cc-auth-button:hover {
    background: linear-gradient(135deg, #c4621a 0%, #b55310 100%);
    box-shadow: 0 4px 16px rgba(212, 113, 42, 0.40);
    transform: translateY(-1px);
}

.cc-auth-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(212, 113, 42, 0.25);
}

.cc-auth-button:focus-visible {
    outline: 3px solid rgba(212, 113, 42, 0.45);
    outline-offset: 2px;
}

.cc-auth-button:disabled {
    background: linear-gradient(135deg, #e4a97a 0%, #dda068 100%);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    opacity: 0.85;
}

/* ============================================================
   MENSAJES
   ============================================================ */

.cm-error {
    background: #fef2f0;
    color: #c0392b;
    padding: 11px 14px;
    border-radius: 10px;
    margin: 0 0 22px 0;
    font-size: 13.5px;
    border-left: 3px solid #e74c3c;
    line-height: 1.5;
}

.cm-success {
    background: #f0faf4;
    color: #1e7e4a;
    padding: 11px 14px;
    border-radius: 10px;
    margin: 0 0 22px 0;
    font-size: 13.5px;
    border-left: 3px solid #27ae60;
    line-height: 1.5;
}

.cm-info {
    background: #f0f7ff;
    color: #1a5f99;
    padding: 11px 14px;
    border-radius: 10px;
    margin: 0 0 22px 0;
    font-size: 13.5px;
    border-left: 3px solid #3498db;
    line-height: 1.5;
}

/* ============================================================
   LINKS
   ============================================================ */

.cc-auth-links,
.cm-auth-links {
    margin: 20px 0 0 0;
    text-align: center;
}

.cc-auth-links a,
.cm-auth-links a {
    font-size: 14px;
    font-weight: 500;
    color: #d4712a;
    text-decoration: none;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cc-auth-links a:hover,
.cm-auth-links a:hover {
    color: #b85e1e;
    text-decoration: underline;
}

/* ¿Olvidaste tu contraseña? */
.cc-forgot-password {
    margin: 14px 0 0 0;
    text-align: center;
}

.cc-forgot-password a {
    font-size: 13px;
    color: #a0907e;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cc-forgot-password a:hover {
    color: #d4712a;
    text-decoration: underline;
}

/* ← Volver al acceso */
.cc-auth-secondary {
    display: block;
    font-size: 13.5px;
    color: #a0907e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 20px 0 0 0;
    text-align: center;
}

.cc-auth-secondary:hover {
    color: #d4712a;
}

/* ============================================================
   SESIÓN ACTIVA
   ============================================================ */

.cm-user-box {
    max-width: 420px;
    margin: 40px auto;
    background: #ffffff;
    padding: 36px 40px;
    border-radius: 16px;
    border: 1px solid #e8e0d8;
    box-shadow: 0 4px 6px rgba(60, 40, 20, 0.04), 0 24px 48px rgba(60, 40, 20, 0.10);
    font-family: 'DM Sans', system-ui, sans-serif;
    position: relative;
}

.cm-user-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(90deg, #d4712a 0%, #e8a056 50%, #d4712a 100%);
}

.cm-user-box h3 {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 20px;
    font-weight: 400;
    color: #1c1410;
    margin: 0 0 20px 0;
    padding-bottom: 14px;
    border-bottom: 1px solid #e8e0d8;
    letter-spacing: -0.01em;
}

.cm-user-box p {
    font-size: 14px;
    color: #6b5c4e;
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.cm-user-box p strong {
    color: #1c1410;
    font-weight: 600;
    margin-right: 4px;
}

.cm-logout {
    display: inline-block;
    margin: 18px 0 0 0;
    padding: 9px 18px;
    background: #faf7f4;
    color: #6b5c4e;
    border: 1.5px solid #e8e0d8;
    border-radius: 10px;
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cm-logout:hover {
    background: #fef2f0;
    color: #c0392b;
    border-color: #f5b7b1;
}

/* ============================================================
   SEPARADOR OPCIONAL
   ============================================================ */

.cc-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: #a0907e;
    font-size: 12px;
}

.cc-auth-divider::before,
.cc-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8e0d8;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 480px) {
    .cc-auth-card {
        padding: 36px 24px 30px;
    }

    .cc-auth-title {
        font-size: 22px;
    }

    .cm-user-box {
        padding: 28px 24px;
        margin: 20px auto;
    }
}