/* Light theme (default) */
body {
    font-family: Arial, sans-serif;
    background: #f7f3f0;
    color: #3d1f1f;
}

.container {
    max-width: 400px;
    padding: 20px;
    border: 1px solid #e0bcbc;
    border-radius: 8px;
    background: #fff8f6;
    box-shadow: 0 2px 8px rgba(120, 40, 40, 0.05);
}
.main-content {
    margin-left: 142px;
    min-width: 640px;
    padding: 60px 30px 30px 30px;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center all children horizontally */
    flex-wrap: wrap;
    justify-content: flex-start;
}

.toggle {
    margin-bottom: 20px;
}
.toggle button {
    margin-right: 10px;
    background: #b04a5a;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}
.toggle button:hover {
    background: #8a2c3a;
}

.hidden {
    display: none;
}
label {
    display: block;
    margin-top: 10px;
}
input[type="text"], input[type="password"], input[type="email"] {
    width: 90%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #e0bcbc;
    border-radius: 4px;
    background: #fff;
    color: #3d1f1f;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus {
    border-color: #b04a5a;
    outline: none;
}

.submit-btn, button {
    margin-top: 15px;
    width: 90%;
    background: #b04a5a;
    color: #fff;
    border: none;
    padding: 10px 0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}
button:hover, .submit-btn:hover {
    background: #8a2c3a;
}

.message {
    margin-top: 10px;
    color: #388e3c;
}
.error {
    margin-top: 10px;
    color: #b04a5a;
}

.switch-link {
    margin-top: 15px;
    text-align: center;
}
.switch-link a {
    color: #b04a5a;
    text-decoration: none;
    margin-left: 5px;
}
.switch-link a:hover {
    text-decoration: underline;
}

/* Center h1 and the paragraph below */
.main-content h1,
.main-content p {
    text-align: center;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Add User form and User List side by side */
.admin-flex-row {
    display: flex;
    flex-direction: row;
    gap: 40px; /* space between form and list */
    width: 100%;
    justify-content: center;
    align-items: flex-start;
}

#add-user-form {
    min-width: 260px;
    max-width: 320px;
    flex: 1 1 320px;
}

.user-list-section {
    min-width: 260px;
    max-width: 400px;
    flex: 1 1 320px;
}

.about-content {
    max-width: 600px;
    margin: 40px auto 0 auto;
    padding: 30px 24px;
    background: #fff8f6;
    border: 1px solid #e0bcbc;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(120, 40, 40, 0.07);
    font-size: 1.1em;
    line-height: 1.7;
}

@media (max-width: 900px) {
    .admin-flex-row {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    #add-user-form, .user-list-section {
        max-width: 100%;
        min-width: 0;
    }
}

/* Dark theme */
body.dark-theme {
    background: #2b1216 !important;
    color: #ffeaea !important;
}
body.dark-theme .container {
    background: #3d1f24 !important;
    border: 1px solid #8a2c3a !important;
}
body.dark-theme input[type="text"],
body.dark-theme input[type="password"],
body.dark-theme input[type="email"] {
    background: #2b1216 !important;
    color: #ffeaea !important;
    border: 1px solid #8a2c3a !important;
}
body.dark-theme .submit-btn,
body.dark-theme button {
    background: #8a2c3a !important;
    color: #ffeaea !important;
}
body.dark-theme button:hover,
body.dark-theme .submit-btn:hover {
    background: #b04a5a !important;
}
body.dark-theme .message {
    color: #81c784 !important;
}
body.dark-theme .error {
    color: #ffb3b3 !important;
}
body.dark-theme .switch-link a {
    color: #e57373 !important;
}

.nav-container {
    width: 15vw;
    min-width: 150px;
    background: #b04a5a;
    color: #fff;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 30px 10px 10px 10px;
    z-index: 100;
}
.nav-container h2 {
    margin-top: 0;
}
.nav-container a, .nav-container button {
    color: #fff;
    display: block;
    margin: 15px 0;
    text-decoration: none;
    font-weight: bold;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 1em;
}
.nav-container a:hover, .nav-container button:hover {
    text-decoration: underline;
}

/* Navigation unordered list styling */
.nav-container ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.nav-container ul li {
    margin: 10px 0;
    padding: 0;
}

.nav-container ul ul {
    margin-left: 18px;
    margin-top: 5px;
}

.nav-container ul ul li {
    font-size: 0.95em;
    margin: 6px 0;
    opacity: 0.85;
}

body.dark-theme .about-content {
    background: #3d1f24 !important;
    border: 1px solid #8a2c3a !important;
    color: #ffeaea !important;
}
#mac-list {
    list-style: none;
    padding: 0;
}
#mac-list li {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}
.mac-label {
    flex: 1;
}
.mac-btn-group button {
    display: inline-block;
    margin-left: 5px;
    width: auto !important;
    min-width: 60px;
    padding: 6px 14px;
    margin-top: 0;
}