:root {
    --primary-color: #004D40;
    --primary-hover: #00332c;
    --text-main: #1A202C;
    --text-muted: #718096;
    --border-color: #CBD5E0;
    --border-radius: 12px;
    --error-color: #E53E3E;
    --success-color: #38A169;
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    font-family: var(--font-stack);
    background-color: #F8FAFC;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.login-container {
    display: flex;
    width: 100vw;
    height: 100vh;
    position: relative;
    background-color: #F8FAFC;
}

.hero-side {
    position: absolute;
    top: 0;
    left: 0;
    width: 55%;
    height: 100%;
    overflow: hidden;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 77, 64, 0.45) 0%, rgba(20, 30, 25, 0.75) 100%);
}

.hero-content {
    position: absolute;
    bottom: 12%;
    left: 8%;
    z-index: 5;
    color: #ffffff;
    max-width: 500px;
}

.hero-content h1 {
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.hero-content p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.form-side {
    position: absolute;
    right: 0;
    top: 0;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 2%;
    z-index: 10;
}

.card {
    background-color: #ffffff;
    width: 100%;
    max-width: 520px;
    padding: 50px 55px;
    border-radius: var(--border-radius) 0px 0px var(--border-radius);
    box-shadow: -10px 0px 30px rgba(0, 0, 0, 0.04);
    height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Visibility State Rules */
.card.hidden {
    display: none !important;
    opacity: 0;
    transform: translateY(15px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--primary-color);
}

h2 {
    font-size: 2.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 25px;
}

/* Alert Boxes Style */
.alert-box {
    display: none;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.4;
}

.alert-box.error {
    background-color: #FFF5F5;
    color: var(--error-color);
    border: 1px solid #FED7D7;
}

.alert-box.success {
    background-color: #F0FFF4;
    color: var(--success-color);
    border: 1px solid #C6F6D5;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 77, 64, 0.1);
}

.input-group.error input {
    border-color: var(--error-color);
}

.error-msg {
    display: none;
    color: var(--error-color);
    font-size: 0.8rem;
    margin-top: 5px;
}

.input-group.error .error-msg {
    display: block;
}

.forgot-link {
    text-align: right;
    margin-top: -10px;
    margin-bottom: 15px;
}

.forgot-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.form-utilities {
    margin-bottom: 25px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 26px;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--text-muted);
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 16px;
    width: 16px;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
}

.form-footer {
    margin-top: 30px;
    text-align: center;
}

.form-footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Custom interactive reset buttons for clean swapping links */
.toggle-link-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.toggle-link-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.helper-tip {
    position: absolute;
    bottom: 25px;
    width: 100%;
    text-align: center;
    font-size: 0.85rem;
    color: #CBD5E0;
    pointer-events: none;
    z-index: 1;
}

@media (max-width: 1024px) {
    .hero-side {
        display: none;
    }
    .form-side {
        width: 100%;
        justify-content: center;
        padding-left: 0;
    }
    .card {
        border-radius: var(--border-radius);
        height: auto;
        margin: 20px;
        padding: 40px 30px;
    }
}
