/* ================================
   DESIGN TOKENS
================================ */

:root {
    --sdsu-red: #A6192E;
    --sdsu-red-dark: #8E1728;
    --bg-light: #F4F4F2;
    --border-light: #E5E5E5;
    --text-primary: #111827;
    --text-secondary: #4B5563;
    --white: #FFFFFF;
    --shadow-soft: 0 10px 25px rgba(17, 24, 39, 0.06);
}

/* ================================
   BASE LAYOUT
================================ */

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: "Inter", sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: scroll;
}

main {
    flex: 1;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

p {
    margin: 0 0 1rem;
}

/* ================================
   NAVIGATION
================================ */

.site-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
    position: relative;
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    color: var(--sdsu-red);
    font-size: 1.1rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--sdsu-red);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
}

/* ================================
   HERO
================================ */

.hero {
    background: var(--sdsu-red);
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
}

.hero-subtitle {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 400;
    max-width: 750px;
    margin: 0 auto;
}

/* ================================
   SECTIONS
================================ */

.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 1.75rem;
    margin: 0 0 2rem;
}

/* ================================
   BOARD GRID
================================ */

.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem 3rem;
    margin-top: 2rem;
}

.board-member {
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.25rem;
}

.board-role {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--sdsu-red);
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.board-name {
    font-size: 1.2rem;
    font-weight: 600;
}

.board-meta {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ================================
   ADMIN
================================ */

.admin-page {
    padding-top: 3rem;
}

.admin-shell {
    display: grid;
    gap: 2rem;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.admin-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    padding: 1.5rem;
}

.admin-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.member-form {
    display: grid;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.form-grid label {
    display: grid;
    gap: 0.4rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-grid input {
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font: inherit;
    box-sizing: border-box;
    background: var(--white);
}

.full-width {
    grid-column: 1 / -1;
}

.member-table-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.audit-table-wrap {
    overflow-x: auto;
}

.audit-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    text-align: left;
}

.audit-table th,
.audit-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: top;
}

.audit-table th {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.audit-snapshots {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 0.75rem;
}

.audit-snapshots h4 {
    margin: 0 0 0.5rem;
}

.audit-snapshots pre {
    max-width: 42ch;
    max-height: 18rem;
    overflow: auto;
    padding: 0.75rem;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 6px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.member-table-wrap {
    overflow-x: auto;
}

.member-table {
    width: 100%;
    min-width: 1480px;
    border-collapse: collapse;
    text-align: left;
}

.member-table th,
.member-table td {
    padding: 0.55rem;
    border-bottom: 1px solid var(--border-light);
}

.member-table th {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
}

.member-table td:first-child,
.member-table th:first-child,
.member-public-cell {
    text-align: center;
    width: 2.5rem;
}

.member-table input:not([type="checkbox"]) {
    width: max-content;
    min-width: 8rem;
    max-width: 34ch;
    field-sizing: content;
    padding: 0.5rem;
    border: 1px solid transparent;
    border-radius: 6px;
    box-sizing: border-box;
    font: inherit;
    background: transparent;
}

.member-table input.member-input-first {
    min-width: 12ch;
}

.member-table input.member-input-last {
    min-width: 16ch;
}

.member-table input.member-input-major {
    min-width: 24ch;
}

.member-table input.member-input-email {
    min-width: 28ch;
}

.member-table input.member-input-position {
    min-width: 18ch;
}

.member-table input:not([type="checkbox"]):hover,
.member-table input:not([type="checkbox"]):focus {
    border-color: var(--border-light);
    background: var(--white);
    outline: none;
}

.member-row-actions {
    white-space: nowrap;
}

.member-row-actions form {
    display: inline;
}

.table-button {
    padding: 0.45rem 0.65rem;
    margin-left: 0.25rem;
}

.button {
    appearance: none;
    border: none;
    background: var(--sdsu-red);
    color: var(--white);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.button:hover {
    background: var(--sdsu-red-dark);
}

.button-secondary {
    background: var(--white);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.button-secondary:hover {
    background: #f3f4f6;
}

.button-danger {
    background: var(--sdsu-red-dark);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ================================
   FOOTER
================================ */

.site-footer {
    background: var(--white);
    border-top: 1px solid var(--border-light);
    padding: 2rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: auto;
}

/* ================================
   RESPONSIVE NAV
================================ */

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        right: 20px;
        background: var(--white);
        border: 1px solid var(--border-light);
        padding: 1rem 1.5rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
        z-index: 10;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        margin: 0.5rem 0;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .container {
        padding: 0 1.25rem;
    }
}
