/* General reset and base styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
.form-container,
.navbar,
h2,
label,
input,
a {
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f4f8;
    height: 100vh;
    color: #111;
}

/* Navbar */
.navbar {
    background-color: #122d4b;
    color: white;
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar .brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.navbar .brand img {
    height: 45px;
    width: auto;
}

.navbar .brand h1 {
    font-size: 20px;
    font-weight: 600;
}

.dark-toggle {
    background: none;
    border: 2px solid white;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.dark-toggle:hover {
    background: white;
    color: #002B5B;
}

/* Page layout */
.page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    min-height: calc(100vh - 80px);
}

.form-container {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.form-container .logo {
    display: block;
    margin: 0 auto 20px auto;
    width: 100px;
    height: auto;
}

.form-container h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #002B5B;
}

.form-group {
    margin-bottom: 18px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    border-color: #00ac17;
    outline: none;
}

.input-error {
    color: #d93025;
    font-size: 0.85em;
    margin-top: 6px;
}

.form-group.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #555;
}

.form-actions {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.btn {
    background-color: #00ac17;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
    background-color: #07f060;
    box-shadow: 0 4px 12px rgba(0, 172, 23, 0.2);
}

.link {
    color: #002B5B;
    text-decoration: none;
    font-size: 0.9em;
    transition: text-decoration 0.3s ease;
}

.link:hover {
    text-decoration: underline;
}

/* Dark Mode */
body.dark {
    background: #1e1e2f;
    color: #f5f5f5;
}

body.dark .navbar {
    background-color: #111827;
    color: #f5f5f5;
}

body.dark .form-container {
    background: #2c2c3e;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.05);
}

body.dark .form-container h2 {
    color: #90cdf4;
}

body.dark label {
    color: #d1d5db;
}

body.dark input {
    background: #1f2937;
    color: #f5f5f5;
    border: 1px solid #4b5563;
}

body.dark .link {
    color: #90cdf4;
}

body.dark .input-error {
    color: #ff6b6b;
}

body.dark .dark-toggle {
    border-color: #f5f5f5;
    color: #f5f5f5;
}

body.dark .dark-toggle:hover {
    background: #f5f5f5;
    color: #002B5B;
}

/* Responsive */
@media (max-width: 500px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .form-container {
        padding: 30px 20px;
    }
}