/* ======= GENERAL NAVBAR STYLES ======= */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #eaf4ec;
    padding: 14px 24px;
    border-bottom: 2px solid #137b13;
}

.nav-left,
.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

nav a {
    color: #003300;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

nav a:hover {
    text-decoration: underline;
    color: #228b22;
}

nav span {
    font-weight: bold;
    color: #003300;
}

.logout-button {
    background: #f44336;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.logout-button:hover {
    background: #d32f2f;
}

/* ======= SWITCH TOGGLE ======= */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #006400;
    transition: background 0.4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: transform 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2e5e32;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider:after {
    content: "🌞";
    position: absolute;
    left: 7px;
    top: 2.5px;
    font-size: 13px;
    opacity: 1;
    transition: opacity 0.3s;
}

input:checked + .slider:after {
    content: "🌙";
    left: 21px;
    color: #fff8;
}

/* ======= DARK MODE ======= */
body.dark-mode nav {
    background: #133e1e;
    border-bottom: 2px solid #7fdb6a;
}

body.dark-mode nav a {
    color: #8bf599;
}

body.dark-mode nav a:hover {
    color: #b7ffcc;
}

body.dark-mode nav span {
    color: #ffffff;
}

body.dark-mode .logout-button {
    background: #f44336;
}

body.dark-mode .logout-button:hover {
    background: #e53935;
}

body.dark-mode .slider {
    background-color: #26482b;
}

body.dark-mode input:checked + .slider {
    background-color: #49aa6e;
}
