/* ==========================================================================
   Login card - C&G Safari Management System
   ========================================================================== */

:root {
    --cg-red: #d5202a;
    --cg-red-dark: #a8151e;
    --cg-navy: #0e1726;
    --cg-ink: #1f2937;
    --cg-muted: #7b8598;
    --cg-border: #e4e8ef;
    --cg-field: #f6f8fb;
}

/* keep the card hugging the form instead of stretching the full column */
.auth-page > .col-md-8 {
    max-width: 468px;
}

.auth-page .card {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(14, 23, 38, .12), 0 2px 6px rgba(14, 23, 38, .04);
    overflow: hidden;
}

/* thin brand stripe across the top of the card */
.auth-page .card::before {
    content: "";
    display: block;
    height: 5px;
    background: linear-gradient(90deg, var(--cg-red) 0%, var(--cg-red-dark) 55%, var(--cg-navy) 100%);
}

.login-card {
    padding: 44px 46px 38px;
}

.login-inner {
    max-width: 372px;
    margin: 0 auto;
}

.login-logo {
    display: block;
    text-align: center;
    margin-bottom: 26px;
}

.login-logo img {
    height: 38px;
}

.login-card h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--cg-navy);
    text-align: center;
    margin: 0 0 6px;
    letter-spacing: -.3px;
}

.login-card .login-sub {
    font-size: 14px;
    color: var(--cg-muted);
    text-align: center;
    margin: 0 0 28px;
}

/* ---------- fields ---------- */

.login-field {
    margin-bottom: 18px;
}

.login-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 7px;
}

.login-input {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input .icon {
    position: absolute;
    left: 14px;
    display: inline-flex;
    color: #9aa4b5;
    pointer-events: none;
}

.login-input .icon svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-input input {
    width: 100%;
    height: 48px;
    padding: 0 16px 0 42px;
    font-size: 14.5px;
    color: var(--cg-ink);
    background: var(--cg-field);
    border: 1px solid var(--cg-border);
    border-radius: 10px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-input input::placeholder {
    color: #a9b2c1;
}

.login-input input:focus {
    background: #ffffff;
    border-color: #9fb2d4;
    box-shadow: 0 0 0 4px rgba(30, 64, 124, .08);
}

.login-input.has-toggle input {
    padding-right: 46px;
}

.login-input .toggle-password {
    position: absolute;
    right: 6px;
    height: 36px;
    width: 36px;
    border: 0;
    background: transparent;
    color: #9aa4b5;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}

.login-input .toggle-password:hover {
    color: var(--cg-navy);
    background: #eef1f6;
}

.login-input .toggle-password svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-input.is-invalid input {
    border-color: var(--cg-red);
    background: #fff7f7;
}

/* ---------- remember row ---------- */

.login-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 0 22px;
}

.login-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    color: #55607a;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
    user-select: none;
}

.login-check input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.login-check .box {
    height: 18px;
    width: 18px;
    border: 1.5px solid #cbd3e0;
    border-radius: 5px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, border-color .15s ease;
}

.login-check .box svg {
    width: 11px;
    height: 11px;
    stroke: #fff;
    stroke-width: 3.2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0;
    transform: scale(.6);
    transition: opacity .12s ease, transform .12s ease;
}

.login-check input:checked + .box {
    background: var(--cg-red);
    border-color: var(--cg-red);
}

.login-check input:checked + .box svg {
    opacity: 1;
    transform: scale(1);
}

.login-help {
    font-size: 12.5px;
    color: var(--cg-muted);
}

/* ---------- submit ---------- */

.login-submit {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--cg-red) 0%, var(--cg-red-dark) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: 0 8px 20px rgba(213, 32, 42, .22);
    transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(213, 32, 42, .3);
    color: #fff;
}

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

.login-submit[disabled] {
    opacity: .72;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.login-submit svg {
    width: 17px;
    height: 17px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-submit .spinner {
    display: none;
    height: 16px;
    width: 16px;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: login-spin .6s linear infinite;
}

.login-submit.is-loading .spinner {
    display: inline-block;
}

.login-submit.is-loading .arrow {
    display: none;
}

@keyframes login-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- alerts + footer ---------- */

.login-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.login-alert svg {
    flex: 0 0 17px;
    width: 17px;
    height: 17px;
    margin-top: 1px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-alert.error {
    background: #fdf0f1;
    border: 1px solid #f6d4d7;
    color: #a8151e;
}

.login-alert.success {
    background: #eef9f2;
    border: 1px solid #cfeadb;
    color: #1c7a49;
}

.login-foot {
    margin: 26px 0 0;
    padding-top: 18px;
    border-top: 1px solid #eef1f6;
    font-size: 12px;
    color: #a3abba;
    text-align: center;
}

/* ---------- responsive ---------- */

@media (max-width: 575px) {
    .login-card {
        padding: 32px 22px 28px;
    }

    .login-card h1 {
        font-size: 21px;
    }
}
