/* =========================================================
   Login screen — full-screen elegant layout
   Scoped via body.login-page to not affect logged-in pages.
   ========================================================= */

body.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: #1a1a1a;
    background: linear-gradient(135deg, #006627 0%, #008F38 45%, #00AD45 100%);
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    overflow-x: hidden;
}

body.login-page::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(255,255,255,0.18), transparent 45%),
        radial-gradient(circle at 82% 78%, rgba(0,0,0,0.25), transparent 45%);
    pointer-events: none;
    z-index: 0;
}

.login-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.28),
        0 8px 20px rgba(0, 0, 0, 0.12);
    padding: 44px 36px 36px;
    text-align: center;
    animation: loginFadeIn 0.5s ease-out;
}

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

.login-logo {
    margin-bottom: 22px;
}

.login-logo img {
    width: 300px;
    max-width: 70%;
    height: auto;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
}

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

.login-alert {
    background: #fdecea;
    color: #b71c1c;
    border-left: 3px solid #d32f2f;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    text-align: left;
    margin: 0 0 18px;
}

.login-form {
    text-align: left;
}

.login-form .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.login-field {
    position: relative;
    margin-bottom: 14px;
}

.login-field .login-icon {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 46px;
    color: #98a2b3;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: color 0.2s ease;
}

.login-field .login-icon svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 14px 13px 46px;
    border: 1px solid #d9dde3;
    border-radius: 10px;
    font-size: 14px;
    color: #1a1a1a;
    background: #f7f8fa;
    font-family: inherit;
    outline: none;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.login-form input::placeholder {
    color: #98a2b3;
}

.login-form input:focus {
    background: #ffffff;
    border-color: #00AD45;
    box-shadow: 0 0 0 4px rgba(0, 173, 69, 0.12);
}

.login-field:focus-within .login-icon {
    color: #008F38;
}

.login-field--password .login-form input,
.login-field--password input[type="text"],
.login-field--password input[type="password"] {
    padding-right: 46px;
}

.login-toggle-pass {
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #98a2b3;
    transition: color 0.15s ease;
}

.login-toggle-pass:hover,
.login-toggle-pass:focus {
    color: #008F38;
    outline: none;
}

.login-toggle-pass svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-toggle-pass .eye-off { display: none; }
.login-toggle-pass.is-visible .eye-on { display: none; }
.login-toggle-pass.is-visible .eye-off { display: block; }

.login-button {
    width: 100%;
    padding: 13px 16px;
    margin-top: 10px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #00AD45 0%, #008F38 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 8px 20px rgba(0, 143, 56, 0.32);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.15s ease;
}

.login-button:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(0, 143, 56, 0.42);
}

.login-button:active {
    transform: translateY(0);
    filter: brightness(0.96);
    box-shadow: 0 6px 14px rgba(0, 143, 56, 0.32);
}

.login-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    font-size: 12px;
    color: #008F38;
    text-decoration: none;
    transition: color 0.15s ease;
}

.login-link:hover {
    color: #006627;
    text-decoration: underline;
}

.login-footer {
    text-align: center;
    margin-top: 22px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 12px;
    letter-spacing: 0.2px;
}

.login-footer a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .login-card { padding: 34px 24px 28px; border-radius: 14px; }
    .login-title { font-size: 21px; }
    .login-logo img { width: 300px; }
}
