:root {
    color-scheme: light;
    --ink: #15201d;
    --muted: #65716d;
    --line: #e4e9e7;
    --surface: #ffffff;
    --soft: #f4f7f6;
    --accent: #173f35;
    --accent-soft: #e6f0ec;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: #f7f9f8; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
.topbar { min-height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 5vw; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 760; letter-spacing: -.02em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--accent); }
.topbar-actions, .header-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.organization-pill, .group-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 650; }
.link-button { appearance: none; border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.page-shell { width: min(1180px, 90vw); margin: 0 auto; padding: 46px 0 72px; }
.content-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.content-header.narrow, .organization-grid.narrow, .narrow-header { width: min(760px, 100%); margin-left: auto; margin-right: auto; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.045em; line-height: 1.02; }
h2 { margin-bottom: 0; font-size: 22px; letter-spacing: -.025em; }
h3 { font-size: 15px; }
.eyebrow { color: #527469; font-size: 12px; font-weight: 760; text-transform: uppercase; letter-spacing: .11em; margin-bottom: 9px; }
.muted { color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 22px; }
.metric-card, .panel, .organization-card, .auth-card, .hint-panel { background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 35px rgba(23, 63, 53, .055); }
.metric-card { border-radius: 18px; padding: 20px; display: flex; justify-content: space-between; align-items: end; min-height: 110px; }
.metric-card span { color: var(--muted); font-size: 13px; }
.metric-card strong { font-size: 34px; letter-spacing: -.04em; }
.panel { border-radius: 22px; margin-top: 18px; overflow: hidden; }
.compact-panel { padding-bottom: 18px; }
.panel-heading { padding: 22px 24px; display: flex; align-items: end; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 24px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; white-space: nowrap; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; background: #fbfcfc; }
tbody tr:last-child td { border-bottom: 0; }
.person-cell { display: flex; align-items: center; gap: 11px; }
.avatar-placeholder, .person-avatar { width: 34px; height: 34px; border-radius: 50%; flex: 0 0 34px; }
.avatar-placeholder { display: grid; place-items: center; background: #edf2f0; color: var(--accent); font-weight: 800; }
.person-avatar { object-fit: cover; background: #edf2f0; }
.group-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.group-column { padding: 22px 24px 28px; border-right: 1px solid var(--line); }
.group-column:last-child { border-right: 0; }
.group-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.group-row small { color: var(--muted); }
.primary-button, .secondary-button { display: inline-flex; justify-content: center; align-items: center; border-radius: 12px; padding: 11px 16px; font-weight: 700; cursor: pointer; border: 1px solid transparent; }
.primary-button { background: var(--accent); color: white; }
.secondary-button { background: white; color: var(--accent); border-color: #cfd9d5; }
.auth-card { width: min(440px, 100%); margin: 9vh auto 0; padding: 34px; border-radius: 24px; }
.stack-form { display: grid; gap: 16px; margin-top: 26px; }
.stack-form label { display: grid; gap: 7px; font-size: 13px; font-weight: 680; }
.stack-form input, .stack-form select, .inline-form input { width: 100%; padding: 12px 13px; border: 1px solid #ced8d4; border-radius: 11px; outline: none; background: white; }
.stack-form input:focus, .stack-form select:focus, .inline-form input:focus { border-color: #7fa397; box-shadow: 0 0 0 3px rgba(82,116,105,.12); }
.alert, .message.error, .danger-panel { background: #fff0ee; color: #8e3027; }
.message.success, .success-panel { background: #edf7f2; color: #245f4d; }
.organization-grid { display: grid; gap: 12px; }
.organization-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 20px; border-radius: 16px; }
.organization-card div { display: grid; gap: 4px; }
.organization-card span { color: var(--muted); font-size: 13px; }
.empty-state { color: var(--muted); padding: 20px; text-align: center; }
.empty-state.compact { padding: 12px 0; text-align: left; font-size: 13px; }
.message-stack { display: grid; gap: 8px; margin-bottom: 18px; }
.message { border-radius: 12px; padding: 12px 15px; border: 1px solid currentColor; font-size: 14px; }
.form-panel { width: min(760px, 100%); margin-left: auto; margin-right: auto; padding: 24px; }
.form-panel .panel-heading { margin: -24px -24px 0; }
.upload-zone { min-height: 180px; display: grid; place-items: center; align-content: center; text-align: center; gap: 9px; border: 1.5px dashed #aebdb7; border-radius: 18px; background: var(--soft); padding: 28px; cursor: pointer; }
.upload-zone input { max-width: 360px; }
.upload-title { font-size: 19px; font-weight: 760; }
.field-row { display: grid; gap: 7px; }
.field-row label { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.field-row label small { color: var(--muted); font-weight: 500; }
.required-dot { color: #8e3027; font-size: 11px; font-weight: 700; }
.field-error, .form-errors { color: #9a3026; font-size: 13px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.hint-panel { width: min(760px, 100%); margin: 14px auto 0; padding: 15px 18px; border-radius: 14px; display: flex; gap: 12px; font-size: 13px; }
.credential-reveal { margin: 24px 0 14px; padding: 18px; border: 1px dashed #8eaa9f; border-radius: 14px; background: rgba(255,255,255,.72); text-align: center; }
.credential-reveal code { font-size: clamp(20px, 4vw, 30px); letter-spacing: .08em; font-weight: 760; color: var(--ink); word-break: break-all; }
.two-column-layout { display: grid; grid-template-columns: minmax(320px, .75fr) minmax(0, 1.25fr); gap: 18px; align-items: start; }
.two-column-layout .form-panel { width: 100%; margin-top: 0; }
.preview-panel { margin-top: 0; }
.compact-table th, .compact-table td { padding: 11px 14px; font-size: 12px; }
.validation-panel { padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.validation-list { display: grid; gap: 8px; margin-top: 18px; }
.validation-item { display: flex; gap: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.7); }
.commit-panel { padding: 24px; display: grid; grid-template-columns: 1fr minmax(260px, 380px); gap: 24px; align-items: end; }
.inline-form { display: grid; gap: 12px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; padding: 18px 24px 0; }
.data-chip { border: 1px solid var(--line); background: var(--soft); border-radius: 999px; padding: 7px 10px; font-size: 12px; color: var(--muted); }
@media (max-width: 820px) {
    .two-column-layout, .commit-panel { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .page-shell { width: min(92vw, 1180px); padding-top: 28px; }
    .content-header { align-items: flex-start; flex-direction: column; }
    .topbar { padding: 0 4vw; }
    .organization-pill { display: none; }
    th, td { padding-left: 16px; padding-right: 16px; }
    .panel-heading, .validation-panel { align-items: flex-start; flex-direction: column; }
    .hint-panel { flex-direction: column; }
}