*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #2f5d3a;
    --primary-dark: #1e3f28;
    --primary-light: #3f7a4d;
    --accent: #c9922a;
    --text: #1a241c;
    --text-muted: #5f6f63;
    --border: #d8e2da;
    --error: #b42318;
    --error-bg: #fef3f2;
    --white: #ffffff;
    --shadow: 0 25px 50px -12px rgba(30, 63, 40, 0.22);
    --radius: 16px;
    --input-border: rgba(47, 93, 58, 0.28);
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #eef3ef;
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.login-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 15% 20%, rgba(201, 146, 42, 0.22), transparent 55%),
        radial-gradient(ellipse 60% 45% at 85% 80%, rgba(63, 122, 77, 0.35), transparent 50%),
        linear-gradient(145deg, var(--primary-dark) 0%, var(--primary) 55%, #4a8a58 100%);
    z-index: 0;
}

.login-bg::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    top: -200px;
    right: -150px;
}

.login-bg::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(201, 146, 42, 0.08);
    bottom: -100px;
    left: -100px;
}

.login-card {
    position: relative;
    z-index: 1;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 440px;
    padding: 40px 36px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.company-logo {
    display: block;
    width: 168px;
    max-width: 55%;
    height: auto;
    margin: 0 auto 20px;
    object-fit: contain;
}

.login-header h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.login-header p {
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    margin-bottom: 8px;
}

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

.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

.input-wrap input {
    width: 100%;
    padding: 12px 44px 12px 42px;
    border-radius: 10px;
    font-size: 0.9375rem;
    font-family: inherit;
}

.field-hint {
    margin-top: 6px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.toggle-password svg {
    width: 18px;
    height: 18px;
}

.toggle-password .eye-closed {
    display: none;
}

.toggle-password.active .eye-open {
    display: none;
}

.toggle-password.active .eye-closed {
    display: block;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 20px;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid #fecdca;
}

.btn-login {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(47, 93, 58, 0.35);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.btn-loader img {
    display: block;
}

@media (max-width: 480px) {
    .login-card {
        padding: 32px 24px;
    }

    .company-logo {
        width: 140px;
        max-width: 70%;
    }
}
