/* Diagraff shared site shell — loaded by base.html on every page (after colors.css).
   Holds the cross-page chrome: reset, body base, site header/nav, theme toggle, CTA
   buttons, footer, error page, table scroller. App-only styles live in styles.css,
   which app pages load AFTER this file (its rules win where they overlap). */

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Site header ──────────────────────────────────────────────────────────── */
.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 24px;
}

.site-nav-brand { display: inline-flex; align-items: center; color: var(--text-primary); }
.site-nav-brand:hover { text-decoration: none; opacity: 0.85; }

.site-logo-lockup { height: 34px; width: auto; display: block; }

.site-nav-title { font-size: 18px; font-weight: 600; color: var(--text-primary); }

.site-nav-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.site-nav-links a { color: var(--text-secondary); font-weight: 500; font-size: 15px; }
.site-nav-links a:hover { color: var(--text-primary); text-decoration: none; }

/* Theme toggle: shows the icon of the side you'd switch TO. */
.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; padding: 0;
    background: transparent; border: 1px solid var(--border-medium); border-radius: 8px;
    color: var(--text-secondary); cursor: pointer;
}
.theme-toggle:hover { color: var(--text-primary); border-color: var(--border-dark); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-moon { display: none; }
body.light-mode .theme-toggle .icon-sun { display: none; }
body.light-mode .theme-toggle .icon-moon { display: block; }

/* ── CTA buttons (previously re-declared on every marketing page) ─────────── */
.btn-cta {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary);
    color: var(--text-on-primary);
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-cta:hover { background: var(--primary-dark); text-decoration: none; }
.btn-cta-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary-light);
}
body.light-mode .btn-cta-outline { color: var(--primary-dark); }
.btn-cta-outline:hover { background: rgba(13, 148, 136, 0.15); }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
    max-width: 1100px;
    margin: 40px auto 0;
    padding: 24px;
    border-top: 1px solid var(--border-light);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 14px;
}
.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--text-primary); }

/* ── Branded error page (error.html) ─────────────────────────────────────── */
.error-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
}
.error-card { max-width: 460px; width: 100%; }
.error-card .site-logo-lockup { height: 40px; margin: 0 auto 28px; }
.error-code { font-size: 64px; font-weight: 700; line-height: 1; color: var(--accent); margin: 0 0 8px; }
.error-title { font-size: 22px; margin: 0 0 12px; color: var(--text-primary); }
.error-message { color: var(--text-secondary); margin: 0 0 28px; line-height: 1.5; }

/* ── Wide-table scroller (teams members, admin users) ────────────────────── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
