/* ============================================================
   Login redesign - ClubManager
   Aislado del resto de la app: todo bajo .cm-login-page
   ============================================================ */

.cm-login-page {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: #0d0d0d url('img/login-desk-bg.png') center center / cover no-repeat fixed;
    position: relative;
    font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif;
}

/* Oscurecido general del fondo para dar contraste al card */
.cm-login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.7) 100%);
    z-index: 0;
}

.cm-login-main {
    position: relative;
    z-index: 1;
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
}

/* ---------- Card ---------- */
.cm-login-card {
    width: 100%;
    max-width: 430px;
    background: rgba(24, 24, 26, 0.92);
    border: 1px solid #ff6a00;
    border-radius: 18px;
    padding: 34px 34px 26px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 106, 0, 0.15);
    backdrop-filter: blur(2px);
}

.cm-login-logo {
    display: block;
    width: 130px;
    height: auto;
    margin: 0 auto 12px;
}

.cm-login-welcome {
    text-align: center;
    color: #e9e9e9;
    font-size: 16px;
    margin: 0 0 10px;
    letter-spacing: 0.5px;
}

.cm-login-brand {
    display: block;
    max-width: 240px;
    height: auto;
    margin: 0 auto 6px;
}

.cm-login-subtitle {
    text-align: center;
    color: #9a9a9a;
    font-size: 10px;
    letter-spacing: 2px;
    margin: 0 0 22px;
    text-transform: uppercase;
    position: relative;
}

.cm-login-subtitle::before,
.cm-login-subtitle::after {
    content: "";
    display: inline-block;
    width: 28px;
    height: 1px;
    background: #4a4a4a;
    vertical-align: middle;
    margin: 0 8px;
}

/* ---------- Fields ---------- */
.cm-field {
    margin-bottom: 16px;
}

.cm-field-label {
    display: block;
    color: #e9e9e9;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 7px;
}

.cm-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.cm-input-wrap .cm-input-icon {
    position: absolute;
    left: 14px;
    color: #ffffff;
    font-size: 15px;
    pointer-events: none;
}

.cm-login-input {
    width: 100%;
    height: 46px;
    background: #201f22;
    border: 1px solid #3a3a3d;
    border-radius: 9px;
    color: #f1f1f1;
    font-size: 14px;
    padding: 0 42px 0 40px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cm-login-input::placeholder {
    color: #7a7a7a;
}

.cm-login-input:focus {
    outline: none;
    border-color: #ff6a00;
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.18);
}

/* Autofill: Chrome/Safari fuerzan fondo claro y texto negro.
   Sobrescribimos el fondo con un box-shadow interno y el color del texto. */
.cm-login-input:-webkit-autofill,
.cm-login-input:-webkit-autofill:hover,
.cm-login-input:-webkit-autofill:focus,
.cm-login-input:-webkit-autofill:active {
    -webkit-text-fill-color: #f1f1f1;
    caret-color: #f1f1f1;
    -webkit-box-shadow: 0 0 0 1000px #201f22 inset;
    box-shadow: 0 0 0 1000px #201f22 inset;
    border: 1px solid #3a3a3d;
    transition: background-color 9999s ease-in-out 0s;
}

.cm-login-input:-webkit-autofill:focus {
    border-color: #ff6a00;
}

.cm-toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    line-height: 1;
}

.cm-toggle-password:hover {
    color: #ff6a00;
}

/* ---------- Options row ---------- */
.cm-login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 20px;
}

.cm-remember {
    display: flex;
    align-items: center;
    color: #cfcfcf;
    font-size: 13px;
    cursor: pointer;
    margin: 0;
    font-weight: normal;
}

.cm-remember input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: relative;
    flex-shrink: 0;
    margin: 0 8px 0 0;
    width: 17px;
    height: 17px;
    border: 1px solid #5a5a5d;
    border-radius: 4px;
    background: #201f22;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cm-remember input:hover {
    border-color: #ff6a00;
}

.cm-remember input:checked {
    background: #ff6a00;
    border-color: #ff6a00;
}

/* Tilde (check) que aparece al marcar */
.cm-remember input:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.cm-remember input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.18);
}

.cm-forgot {
    color: #ff6a00;
    font-size: 13px;
    text-decoration: none;
}

.cm-forgot:hover {
    color: #ff8534;
    text-decoration: underline;
}

/* ---------- Submit ---------- */
.cm-login-submit {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff7a00 0%, #ff5a00 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: filter 0.15s ease, transform 0.05s ease;
}

.cm-login-submit:hover {
    filter: brightness(1.07);
}

.cm-login-submit:active {
    transform: translateY(1px);
}

.cm-login-submit .cm-arrow {
    position: absolute;
    right: 20px;
    font-size: 15px;
}

/* ---------- Footer of card ---------- */
.cm-login-divider {
    border: none;
    border-top: 1px solid #3a3a3d;
    margin: 22px 0 16px;
}

.cm-login-register {
    text-align: center;
    font-size: 13px;
    margin: 0;
}

.cm-register-question {
    display: block;
    color: #b7b7b7;
    margin-bottom: 6px;
}

.cm-login-register a {
    display: inline-block;
    color: #ff6a00;
    font-weight: 700;
    text-decoration: none;
}

.cm-login-register a:hover {
    text-decoration: underline;
}

/* ---------- Alerts (client + server) ---------- */
.cm-login-alert {
    background: rgba(220, 53, 69, 0.15);
    border: 1px solid rgba(220, 53, 69, 0.5);
    color: #ff9a9a;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 16px;
    position: relative;
}

.cm-login-alert .close {
    color: #ff9a9a;
    opacity: 0.8;
    float: right;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

/* ---------- Features strip ---------- */
.cm-features {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    padding: 26px 16px 34px;
}

.cm-feature {
    text-align: center;
    color: #ffffff;
    width: 190px;
    padding: 0 26px;
    position: relative;
}

/* Separadores verticales entre features */
.cm-feature + .cm-feature::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 54px;
    width: 1px;
    background: rgba(255, 255, 255, 0.18);
}

.cm-feature-icon {
    font-size: 26px;
    color: #ffffff;
    margin-bottom: 10px;
    display: block;
}

.cm-feature-title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 3px;
}

.cm-feature-desc {
    font-size: 12px;
    color: #c9c9c9;
    margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .cm-login-page {
        background-image: url('img/login-movil-bg.png');
        background-attachment: scroll;
    }
}

@media (max-width: 600px) {
    .cm-login-main {
        padding: 0 16px;
    }

    .cm-features {
        padding-top: 10px;
    }

    .cm-feature {
        width: 45%;
        padding: 12px 10px;
    }

    /* En movil los items se acomodan en 2 columnas: quitamos las lineas verticales */
    .cm-feature + .cm-feature::before {
        display: none;
    }

    .cm-login-card {
        padding: 26px 22px 22px;
    }
}
