/* ---- Shared page chrome, used by every page on the site ---- */
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, sans-serif;
}
.content {
    max-width: 900px;
    margin: 40px auto;
    background: var(--surface);
    color: var(--text);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Inline text links, site-wide - themed instead of browser default blue/purple.
   Excludes link classes that already manage their own color (nav buttons, CTA
   buttons, the muted logout link). */
a:not(.button):not(.menu-btn):not(.admin-nav-link):not(.admin-nav-logout):not(.logout-link):not(.btn-link):not(.view-link) {
    color: var(--primary);
}
a:not(.button):not(.menu-btn):not(.admin-nav-link):not(.admin-nav-logout):not(.logout-link):not(.btn-link):not(.view-link):visited {
    color: var(--secondary);
}
a:not(.button):not(.menu-btn):not(.admin-nav-link):not(.admin-nav-logout):not(.logout-link):not(.btn-link):not(.view-link):hover {
    color: color-mix(in srgb, var(--primary) 80%, black);
}

/* Header container */
.menu-header {
    background: var(--primary);
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Brand text */
.brand {
    font-size: 22px;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
}

/* Navigation container */
.menu-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* Button-style links */
.menu-btn {
    background: var(--secondary);
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s, transform 0.1s;
}

/* Hover effect */
.menu-btn:hover {
    background: color-mix(in srgb, var(--secondary) 80%, black);
    transform: translateY(-2px);
}

/* Active (current page) tab - same color as hover */
.menu-btn.active {
    background: color-mix(in srgb, var(--secondary) 80%, black);
}

/* Show/Hide button injected next to any password field - see password-toggle.js.
   Width/height/display are pinned explicitly so a page's own generic `button {}`
   rule (e.g. login.php's full-width submit button) can't stretch this icon button
   to fill the field - that was the cause of the earlier layout bug. */
.password-toggle-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
}
.password-toggle-btn img {
    width: 18px;
    height: 18px;
    display: block;
    opacity: 0.5;
}
.password-toggle-btn:hover img {
    opacity: 0.8;
}
.password-toggle-btn.is-active {
    background: var(--surface-alt);
}
.password-toggle-btn.is-active img {
    opacity: 1;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    .menu-btn {
        padding: 12px 18px;
        font-size: 16px;
    }
}
