/* Login page (index.php in the site root): a centred sign-in card over the full-screen picture */

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    color: #1f2430;
    background-color: #23272f;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ---------- Page: picture, dark overlay, card in the middle ---------- */

.login-page {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100%;
    padding: 32px 16px 20px;
    background-image: url("../../../uploads/back.jpg");
    background-position: center;
    background-size: cover;
}

.login-page::before {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    content: "";
    background-image: linear-gradient(135deg, rgba(27, 30, 36, 0.9) 0%, rgba(35, 39, 47, 0.8) 55%, rgba(127, 29, 31, 0.82) 100%);
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    margin: auto 0;
    overflow: hidden;
    background-color: #fff;
    border-radius: 18px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

/* Red strip along the top of the card */
.login-card::before {
    display: block;
    height: 6px;
    content: "";
    background-image: linear-gradient(90deg, #c93235 0%, #e0763a 100%);
}

.login-card-head {
    padding: 34px 40px 0;
    text-align: center;
}

.login-logo {
    display: inline-block;
    width: 240px;
    max-width: 100%;
}

.login-title {
    margin: 26px 0 0;
    font-size: 22px;
    font-weight: 600;
}

.login-subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    color: #6b7280;
}

.login-card-body {
    padding: 26px 40px 34px;
}

/* Message shown when a sign-in fails */
.login-error {
    margin-bottom: 18px;
    padding: 11px 14px;
    font-size: 14px;
    color: #a72b2d;
    background-color: rgba(201, 50, 53, 0.08);
    border: 1px solid rgba(201, 50, 53, 0.3);
    border-radius: 12px;
}

/* ---------- Fields ---------- */

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

.login-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
}

.login-input-wrap {
    position: relative;
}

.login-input-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    font-size: 14px;
    color: #9aa1ad;
    transform: translateY(-50%);
    transition: color 0.2s ease;
}

.login-input-wrap:focus-within .login-input-icon {
    color: #c93235;
}

.login-input {
    width: 100%;
    height: 48px;
    padding: 0 46px;
    font-family: inherit;
    font-size: 15px;
    color: #1f2430;
    background-color: #f3f4f7;
    border: 1px solid transparent;
    border-radius: 24px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.login-input:focus {
    background-color: #fff;
    border-color: #c93235;
    box-shadow: 0 0 0 3px rgba(201, 50, 53, 0.15);
}

.login-input-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 36px;
    height: 36px;
    padding: 0;
    font-size: 14px;
    color: #9aa1ad;
    cursor: pointer;
    background-color: transparent;
    border: 0;
    border-radius: 50%;
    transform: translateY(-50%);
    transition: color 0.2s ease;
}

.login-input-toggle:hover,
.login-input-toggle:focus {
    color: #c93235;
    outline: none;
}

/* ---------- Buttons ---------- */

.login-submit {
    width: 100%;
    height: 48px;
    margin-top: 10px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.4px;
    color: #fff;
    cursor: pointer;
    background-image: linear-gradient(90deg, #c93235 0%, #b02a2d 100%);
    border: 0;
    border-radius: 24px;
    box-shadow: 0 8px 18px rgba(201, 50, 53, 0.3);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.login-submit:hover,
.login-submit:focus {
    box-shadow: 0 12px 24px rgba(201, 50, 53, 0.42);
    outline: none;
    transform: translateY(-1px);
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 18px;
    font-size: 12px;
    color: #9aa1ad;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-divider::before,
.login-divider::after {
    flex: 1;
    height: 1px;
    content: "";
    background-color: #e3e6ec;
}

.login-portal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 46px;
    font-size: 14px;
    font-weight: 600;
    color: #4b5563;
    border: 1px solid #e3e6ec;
    border-radius: 23px;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.login-portal:hover,
.login-portal:focus {
    color: #c93235;
    background-color: rgba(201, 50, 53, 0.05);
    border-color: #c93235;
    outline: none;
}

.login-footer {
    position: relative;
    margin-top: 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
}

/* ---------- Small screens ---------- */

@media (max-width: 480px) {
    .login-page {
        padding: 20px 12px 16px;
    }

    .login-card-head {
        padding: 28px 22px 0;
    }

    .login-card-body {
        padding: 22px 22px 26px;
    }

    .login-logo {
        width: 200px;
    }

    .login-title {
        margin-top: 20px;
        font-size: 20px;
    }
}
