/* ============================================================
   Gurdwara Management — Modern theme
   Palette inspired by Sikh tradition:
   Khalsa blue (deep navy), Kesari/saffron (Nishan Sahib),
   gold accents, warm cream background.
   ============================================================ */

:root {
    --saffron:       #EE7F1A;   /* kesari – primary accent / actions */
    --saffron-dark:  #C75D0A;
    --saffron-soft:  #FCEBD7;
    --blue:          #14366E;   /* Khalsa blue – structure / header */
    --blue-dark:     #0E2550;
    --blue-light:    #1E4D9B;
    --gold:          #C8A028;
    --cream:         #FBF8F3;   /* page background */
    --surface:       #FFFFFF;   /* cards / content */
    --ink:           #2A2A2A;
    --muted:         #6B7280;
    --line:          #E6E1D8;
    --danger:        #C0392B;
    --success:       #1E7A46;
    --radius:        10px;
    --radius-sm:     6px;
    --shadow:        0 2px 8px rgba(20, 54, 110, 0.08);
    --shadow-lg:     0 8px 28px rgba(20, 54, 110, 0.14);
    --transition:    0.18s ease;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--cream);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    /* Sticky footer: fill at least the viewport so the footer is pinned to
       the bottom on short pages, and pushed down naturally on long ones. */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5 {
    font-family: "Poppins", -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--blue);
    line-height: 1.25;
    margin: 0 0 0.6em;
}

h1 { font-size: 2rem; }
h2 {
    font-size: 1.55rem;
    padding-bottom: 0.3em;
    border-bottom: 3px solid var(--saffron);
    display: inline-block;
}

a { color: var(--blue-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--saffron-dark); }

/* ── Header / Navigation ─────────────────────────────────── */
.site-header {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    border-bottom: 4px solid var(--saffron);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 64px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-family: "Poppins", sans-serif;
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: 0.3px;
    padding: 8px 0;
}
.brand:hover { color: #fff; }
.brand-logo { height: 40px; width: auto; display: block; }
.brand-name { color: #fff; }

/* Hamburger toggle — hidden on desktop, shown on mobile */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    cursor: pointer;
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.12); box-shadow: none; }
.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    margin: 0 auto;
    background: #fff;
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle.is-active .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle.is-active .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.nav-links a {
    color: #E8EDF6;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    position: relative;
    transition: background var(--transition), color var(--transition);
}
.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.nav-links a.active {
    background-color: var(--saffron);
    color: #fff;
}

.nav-links form { display: inline; margin: 0; }
.nav-links button {
    background: transparent;
    border: 1.5px solid var(--saffron);
    color: var(--saffron);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--transition);
}
.nav-links button:hover {
    background-color: var(--saffron);
    color: #fff;
}

/* ── Admin dropdown ──────────────────────────────────────── */
.nav-links .nav-dropdown { position: relative; display: inline-flex; }
.nav-links .nav-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #E8EDF6;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.nav-links .nav-dropdown-toggle:hover,
.nav-links .nav-dropdown.open .nav-dropdown-toggle {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}
.nav-dropdown-caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform var(--transition);
}
.nav-links .nav-dropdown.open .nav-dropdown-caret { transform: rotate(180deg); }

.nav-links .nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 190px;
    flex-direction: column;
    gap: 2px;
    padding: 6px;
    background: var(--blue-dark);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
}
.nav-links .nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-links .nav-dropdown-menu a {
    display: block;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: #E8EDF6;
    font-weight: 500;
    white-space: nowrap;
}
.nav-links .nav-dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}
/* Form/button items (e.g. Log Off) styled like the link items, not the saffron button */
.nav-links .nav-dropdown-menu form { display: block; margin: 0; }
.nav-links .nav-dropdown-menu button {
    display: block;
    width: 100%;
    margin: 0;
    text-align: left;
    background: transparent;
    border: none;
    color: #E8EDF6;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.nav-links .nav-dropdown-menu button:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* ── Main content ────────────────────────────────────────── */
main {
    padding: 28px 20px 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    display: flow-root;   /* contain floated page content (e.g. Videos page) */
    flex: 1 0 auto;       /* grow to fill, pushing the footer to the bottom */
}

/* Optional content card wrapper if pages use it */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 100%);
    border-top: 4px solid var(--saffron);
    color: #D7DEEA;
    padding: 22px 20px;
    text-align: center;
    clear: both;        /* never let floated page content wrap beside the footer */
    flex-shrink: 0;     /* keep full height in the flex column */
}
footer p { margin: 0 0 8px; }
footer nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 18px;
}
footer a { color: #F0C99B; }
footer a:hover { color: var(--saffron); }

/* ── Tables ──────────────────────────────────────────────── */
table {
    border-collapse: collapse;
    width: 100%;
}

.tablewithborder {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.tablewithborder th,
.tablewithborder td {
    border-bottom: 1px solid var(--line);
    padding: 10px 14px;
    text-align: left;
}
.tablewithborder th {
    background-color: var(--blue);
    color: #fff;
    font-weight: 600;
    border-bottom: none;
}
.tablewithborder tr:nth-child(even) td {
    background-color: #FAF9F6;
}
.tablewithborder tr:hover td {
    background-color: var(--saffron-soft);
}

/* ── Forms ───────────────────────────────────────────────── */
label { font-weight: 500; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="datetime-local"],
input[type="month"],
input[type="date"],
input[type="search"],
select,
textarea {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
    transition: border-color var(--transition), box-shadow var(--transition);
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--saffron);
    box-shadow: 0 0 0 3px var(--saffron-soft);
}

/* Stacked field layout: each field group is a direct <div> child of the form,
   holding a <label>, an <input>/<select>/<textarea>, and a validation <span>. */
form > div {
    margin-bottom: 14px;
}
form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--blue);
}
form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="number"],
form input[type="tel"],
form input[type="datetime-local"],
form input[type="month"],
form input[type="date"],
form input[type="search"],
form select,
form textarea {
    display: block;
    width: 100%;
    max-width: 440px;
}
form textarea { max-width: 100%; }

/* Validation messages sit on their own line under the field */
form .text-danger,
form span[asp-validation-for],
.field-validation-error {
    display: block;
    margin-top: 4px;
    font-size: 0.9rem;
}

/* Checkboxes / radios stay inline with their label */
form input[type="checkbox"],
form input[type="radio"] {
    width: auto;
    margin-right: 7px;
    vertical-align: middle;
    transform: scale(1.1);
}
form label:has(+ input[type="checkbox"]),
form label:has(+ input[type="radio"]) {
    display: inline-block;
    margin: 0 8px 0 0;
}

form button[type="submit"],
form input[type="submit"] {
    margin-top: 4px;
}

/* Centered, card-style wrapper for compact auth/single-column forms */
.form-card {
    max-width: 480px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 26px;
    margin-bottom: 20px;
}
.form-card input,
.form-card select,
.form-card textarea { max-width: 100%; }

/* ── Buttons ─────────────────────────────────────────────── */
/* Bare `button` covers submit/button types; exclude the hamburger so it
   isn't matched by a higher-specificity button[type="button"] selector. */
button:not(.nav-toggle),
input[type="submit"],
.linkbutton {
    display: inline-block;
    background-color: var(--saffron);
    color: #fff;
    border: none;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    /* Explicit line-height + vertical-align so a <button> and an <a class="linkbutton">
       render at the same height (the <button> UA default is line-height:normal). */
    line-height: 1.5;
    vertical-align: middle;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    white-space:nowrap;
}

/* Row of action buttons (e.g. Save / Cancel) — even spacing, aligned heights. */
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
}
/* Cancel the default submit-button top margin so a <button> lines up exactly with
   an <a class="linkbutton"> in the same row. */
.form-actions button[type="submit"],
.form-actions input[type="submit"] {
    margin-top: 0;
}
button:not(.nav-toggle):hover,
input[type="submit"]:hover,
.linkbutton:hover {
    background-color: var(--saffron-dark);
    color: #fff;
    box-shadow: var(--shadow);
}
button:not(.nav-toggle):active,
.linkbutton:active { transform: translateY(1px); }

/* Secondary (blue) button variant */
.btn-secondary {
    background-color: var(--blue) !important;
}
.btn-secondary:hover {
    background-color: var(--blue-dark) !important;
}

/* Required-field marker (red asterisk appended to labels). */
.req { color: var(--danger); font-weight: 700; }

/* Subtle secondary text (e.g. inline totals next to a heading). */
.muted { color: var(--muted); font-weight: 400; font-size: 0.85em; }

/* Year section heading (e.g. My Ardases) — extra space above to separate from the
   preceding table. */
.year-heading { margin-top: 28px; }

/* Summary line under a page title. */
.page-summary { color: var(--muted); margin: 0 0 4px; }

/* Right-align numeric (e.g. currency) table cells. */
.tablewithborder th.num,
.tablewithborder td.num { text-align: right; }

/* Let wide tables scroll horizontally on small screens instead of overflowing. */
.table-wrap { overflow-x: auto; }

/* ── Rich CMS content (Sikhism, etc.) ───────────────────── */
/* Any image dropped into CMS content stays within its container on mobile. */
.cms-content img { max-width: 100%; height: auto; }

/* Hero: text + image side by side, stacking on narrow screens. */
.cms-hero { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; margin-bottom: 28px; }
.cms-hero-text { flex: 1 1 300px; }
.cms-hero-text .lead { font-size: 1.08rem; }
.cms-hero-media { flex: 1 1 300px; }
.cms-hero-media img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); display: block; }

/* Belief / tenet cards — responsive auto-fit grid. */
.belief-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin: 12px 0 28px; }
.belief-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--saffron);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
}
.belief-card .belief-icon { font-size: 1.6rem; line-height: 1; }
.belief-card h4 { margin: 8px 0 4px; color: var(--blue); font-family: "Poppins", -apple-system, sans-serif; }
.belief-card p { margin: 0; font-size: 0.92rem; }

/* Tinted callout (image + body), stacks on mobile. */
.cms-callout {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    align-items: center;
    background: var(--saffron-soft);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin: 8px 0 24px;
}
.cms-callout-media { flex: 1 1 220px; }
.cms-callout-media img { width: 100%; border-radius: var(--radius-sm); box-shadow: var(--shadow); display: block; }
.cms-callout-body { flex: 2 1 320px; }
.cms-callout-body h3 { margin-top: 0; }

/* Home page quick-link cards (clickable). */
.home-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin: 12px 0 28px; }
.home-link {
    display: block;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px 16px;
    color: var(--ink);
    transition: transform var(--transition), box-shadow var(--transition);
}
.home-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: var(--ink); }
.home-link-icon { font-size: 2rem; line-height: 1; }
.home-link-title { font-family: "Poppins", -apple-system, sans-serif; font-weight: 600; color: var(--blue); margin-top: 10px; }

/* Schedule cards (e.g. About page worship schedule). */
.schedule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 12px 0 24px; }
.schedule-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3px solid var(--saffron);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 20px;
}
.schedule-card h4 {
    margin: 0 0 10px;
    color: var(--blue);
    font-family: "Poppins", -apple-system, sans-serif;
    border-bottom: 1px solid var(--line);
    padding-bottom: 8px;
}
.schedule-card ul { list-style: none; padding: 0; margin: 0; }
.schedule-card li { padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: 0.92rem; }
.schedule-card li:last-child { border-bottom: none; }
.schedule-card .time { display: block; color: var(--saffron-dark); font-weight: 600; font-size: 0.85rem; }

/* Centered tinted banner (e.g. langar notice). */
.cms-banner {
    background: var(--saffron-soft);
    border-radius: var(--radius);
    padding: 18px 24px;
    margin: 8px 0 24px;
    text-align: center;
    font-size: 1.05rem;
    color: var(--blue);
}

/* Contact / people cards (CMS contact page). */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
    margin: 10px 0 26px;
}
.contact-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3px solid var(--saffron);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 16px;
    text-align: center;
}
.contact-photo {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--cream);
    border: 1px solid var(--line);
    margin-bottom: 12px;
}
.contact-name {
    font-family: "Poppins", -apple-system, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    color: var(--blue);
}
.contact-role { color: var(--muted); font-size: 0.85rem; margin-bottom: 6px; }
.contact-phone a { font-weight: 500; }

/* Date chip grid (e.g. Ardases by date). */
.month-block { margin-bottom: 16px; }
.month-label { margin: 0 0 8px; color: var(--muted); font-size: 0.95rem; font-weight: 600; }
.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.linkbutton.chip { padding: 6px 12px; font-size: 13px; min-width: 64px; text-align: center; }

/* ── Messages ────────────────────────────────────────────── */
.text-danger, .errortext { color: var(--danger); }
.message-success { color: var(--success); font-weight: 600; }

.alert {
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
    border-left: 4px solid;
}
.alert-success { background: #E9F6EE; border-color: var(--success); color: #155734; }
.alert-danger  { background: #FBEAE8; border-color: var(--danger);  color: #8A2017; }

/* ── Fieldsets ───────────────────────────────────────────── */
fieldset {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 20px;
    margin-bottom: 18px;
    background: var(--surface);
}
legend {
    font-weight: 600;
    color: var(--blue);
    padding: 0 8px;
    font-family: "Poppins", sans-serif;
}

/* ── Admin dashboard ─────────────────────────────────────── */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
    margin-top: 22px;
}
.admin-tile {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--saffron);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px;
    color: var(--ink);
    transition: transform var(--transition), box-shadow var(--transition);
}
.admin-tile:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--ink);
}
.admin-tile-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    background: var(--saffron-soft);
    border-radius: var(--radius-sm);
}
.admin-tile-body { min-width: 0; }
.admin-tile-title {
    display: block;
    font-family: "Poppins", -apple-system, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    color: var(--blue);
    margin: 0 0 3px;
}
.admin-tile-desc {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.4;
}

/* ── Calendar / events ───────────────────────────────────── */
.mobileonly { display: none; }
.desktoponly { display: block; }

.eventcontainer {
    border: 1px solid var(--line);
    border-left: 4px solid var(--saffron);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 12px;
    background-color: var(--surface);
    box-shadow: var(--shadow);
}
.eventheader { font-weight: 600; color: var(--blue); }

/* dhtmlxScheduler event appearance.
   Month view renders events as colored bars (.dhx_cal_event_clear); the stock
   theme paints small blue text on the event's colored background, which is
   unreadable. Force white text with enough height, padding, rounded ends, and
   an ellipsis for overflow. */
.dhx_cal_data .dhx_cal_event_clear,
.dhx_cal_data .dhx_cal_event_line {
    /* dhtmlx sizes the bar with content-box and an inline pixel width to fit the
       day cell, so keep border-box here — otherwise the padding is added on top
       of that width and the pill spills past the cell's right edge. */
    box-sizing: border-box !important;
    /* Let the title wrap onto multiple lines and grow the pill downward instead
       of truncating. height:auto overrides dhtmlx's fixed single-line bar. */
    height: auto !important;
    min-height: 17px !important;
    line-height: 1.3 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    color: #fff !important;
    padding: 2px 8px !important;
    border-radius: 6px !important;
    white-space: normal !important;
    overflow: hidden !important;
    word-break: break-word;
    box-shadow: 0 1px 2px rgba(20, 54, 110, 0.18);
}

/* Day / week view event blocks: keep white, readable text and rounded corners. */
.dhx_cal_event,
.dhx_cal_event .dhx_body,
.dhx_cal_event .dhx_title {
    color: #fff !important;
}
.dhx_cal_event .dhx_body { font-size: 12px; padding: 2px 6px; }
.dhx_cal_event,
.dhx_cal_event .dhx_header { border-radius: var(--radius-sm); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .header-inner {
        min-height: 56px;
        flex-wrap: wrap;          /* let the open menu drop to its own row */
        justify-content: space-between;
        padding-top: 8px;
        padding-bottom: 8px;
    }
    .brand { flex: 1 1 0; min-width: 0; }
    .brand-name { font-size: 1rem; }
    .brand-logo { height: 34px; }

    /* Keep the hamburger on the brand row, pinned right */
    .nav-toggle { display: flex; flex: 0 0 auto; order: 2; }

    /* Collapsed by default; expands when toggled */
    .nav-links {
        display: none;
        order: 3;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 8px 0 4px;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        margin-top: 8px;
    }
    .nav-links.open { display: flex; }

    .nav-links a {
        padding: 11px 12px;
        border-radius: var(--radius-sm);
    }
    .nav-links form { display: block; }
    .nav-links button { width: 100%; margin-top: 4px; }

    /* Admin dropdown expands inline (accordion) rather than as a floating panel */
    .nav-links .nav-dropdown { width: 100%; flex-direction: column; align-items: stretch; }
    .nav-links .nav-dropdown-toggle { width: 100%; justify-content: space-between; padding: 11px 12px; margin-top: 0; }
    .nav-links .nav-dropdown-menu {
        position: static;
        min-width: 0;
        width: 100%;
        margin-top: 2px;
        padding: 2px 0 2px 10px;
        background: rgba(255, 255, 255, 0.06);
        border: none;
        box-shadow: none;
    }

    .mobileonly { display: block; }
    .desktoponly { display: none; }
    .noprint { display: none; }
    main { padding: 20px 16px 32px; }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
}

/* ── Print ───────────────────────────────────────────────── */
@media print {
    .noprint { display: none !important; }
    header, footer, nav, .site-header { display: none !important; }
    body { background: #fff; }
}
