* { box-sizing: border-box; }
:where(img) { max-width: 100%; height: auto; }

body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    background: #f8fafc url('../assets/img/leadss.jpg') no-repeat center center fixed;
    background-size: cover;
}

.login-container {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.35);
}

.login-card {
    width: 90%;
    max-width: 650px;
    background: white;
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    height: auto;
}

.login-card h2 {
    margin-bottom: 30px;
    font-size: 26px;
    color: #1e293b;
    text-align: center;
}

.login-card form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    background: none;
    padding: 0;
    box-shadow: none;
    max-width: 100%;
}

.login-card .form-group {
    width: 100%;
    margin-bottom: 0; /* Let grid gap handle spacing */
}

.login-card label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #475569;
    font-size: 14px;
}

.login-card input,
.login-card select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #dcdcdc;
    border-radius: 10px;
    font-size: 14px;
    color: #334155;
    background-color: #f9fafc;
    box-sizing: border-box; /* Ensure padding doesn't affect width */
}

.login-card input:focus,
.login-card select:focus {
    outline: none;
    border-color: #1B5E20;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(27, 94, 32, 0.1);
}

.login-card button {
    grid-column: 1 / -1; /* Span full width */
    width: 100%;
    background: linear-gradient(135deg, #1B5E20 0%, #144a1e 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px;
}

.login-card button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(27, 94, 32, 0.2);
}
/* Touch target */
.login-card button { min-height: 44px; }

.error {
    background: #FEE2E2;
    color: #B91C1C;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

.signup-link {
    text-align: center;
    margin-top: 20px;
    color: #64748b;
    font-size: 14px;
}

.signup-link a {
    color: #1B5E20;
    text-decoration: none;
    font-weight: 600;
}

.signup-link a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .login-card {
        width: 100%;
        padding: 30px 20px;
    }
    
    .login-card form {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .login-card { padding: 22px 16px; }
}

.password-validation {
    margin-top: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    display: none;
}

.password-validation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-validation li {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    color: #64748b;
    transition: color 0.2s;
}

.password-validation li:last-child {
    margin-bottom: 0;
}

.password-validation li::before {
    content: '•';
    display: inline-block;
    width: 20px;
    text-align: center;
    margin-right: 8px;
    font-weight: bold;
}

.password-validation li.valid {
    color: #16a34a;
}

.password-validation li.valid::before {
    content: '✓';
}

.password-validation li.invalid {
    color: #dc2626;
}

.password-validation li.invalid::before {
    content: '✕';
}
