:root { font-family: Inter, "Segoe UI", "Noto Sans SC", sans-serif; color: #1f2a2d; background: #f5f7f6; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input, textarea { font: inherit; letter-spacing: 0; }
select { font: inherit; border: 1px solid #b8c5c1; border-radius: 4px; padding: 5px 8px; margin-top: 8px; max-width: 100%; background: white; }
button { cursor: pointer; border: 1px solid #146b62; border-radius: 6px; padding: 10px 16px; background: #146b62; color: #fff; min-height: 42px; }
button:hover:not(:disabled) { background: #0f5952; }
button:focus-visible, input:focus-visible { outline: 2px solid #df9d32; outline-offset: 2px; }
textarea:focus-visible, select:focus-visible { outline: 2px solid #df9d32; outline-offset: 2px; }
button:disabled { cursor: not-allowed; color: #6c7779; border-color: #d7dedd; background: #eef1f0; }
button.quiet { border-color: #c9d3d1; color: #255552; background: transparent; }
button.quiet:hover:not(:disabled) { background: #e7efed; }
button.text-command { border: 0; background: transparent; color: #0f6159; padding-left: 0; text-decoration: underline; }
button.text-command:hover { background: transparent; color: #073d38; }
.topbar { height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 max(24px, calc((100vw - 1040px) / 2)); border-bottom: 1px solid #dce3e0; background: #fff; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; white-space: nowrap; }
.brand-mark { width: 28px; height: 28px; display: grid; place-items: center; background: #174d49; color: white; border-radius: 6px; font-family: Georgia, serif; }
.top-actions { display: flex; align-items: center; gap: 12px; color: #52615f; font-size: 13px; min-width: 0; }
#account-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
main { max-width: 1040px; margin: 0 auto; padding: 32px 24px 72px; }
.heading h1 { margin: 0; font-size: 26px; line-height: 1.3; }
.heading p { margin: 8px 0 22px; color: #65716f; min-height: 20px; }
.message { padding: 12px 15px; margin: 0 0 22px; border-left: 3px solid #c57e20; background: #fff8e9; color: #593a19; overflow-wrap: anywhere; }
.message.error { border-color: #a93b37; background: #fff1ef; color: #722724; }
.auth-view { max-width: 520px; padding-top: 12px; }
h2, h3 { letter-spacing: 0; }
.auth-view h2 { font-size: 20px; margin: 0 0 20px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.form-row { display: flex; align-items: stretch; gap: 10px; }
.form-row input { flex: 1 1 0; }
.form-row button { flex: 0 0 160px; width: 160px; }
input { border: 1px solid #b8c5c1; border-radius: 6px; min-width: 0; width: 100%; padding: 10px 12px; background: #fff; color: #21312f; }
textarea { width: 100%; min-width: 0; resize: vertical; border: 1px solid #b8c5c1; border-radius: 6px; padding: 10px 12px; background: #fff; }
.step { margin-top: 28px; border-top: 1px solid #dce3e0; padding-top: 22px; }
.step h3 { font-size: 16px; margin: 0 0 17px; }
.workspace-bar { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding: 8px 0 18px; border-bottom: 1px solid #dce3e0; }
.workspace-bar h2 { margin: 2px 0 0; font-size: 22px; }
.eyebrow { color: #697674; font-size: 12px; }
.sync-state { display: inline-block; margin: 16px 0 0; padding: 7px 10px; border-radius: 4px; color: #714e21; background: #f7ead3; font-size: 12px; }
.tabs { display: flex; gap: 24px; margin-top: 24px; border-bottom: 1px solid #dce3e0; }
.tab { border: 0; border-radius: 0; background: transparent; color: #65716f; padding: 11px 2px; font-weight: 600; }
.tab:hover:not(:disabled) { background: transparent; color: #1e3835; }
.tab.active { color: #145c55; border-bottom: 2px solid #145c55; }
.panel { padding-top: 22px; }
.section-bar { display: flex; justify-content: space-between; align-items: baseline; color: #677471; }
.section-bar h3 { margin: 0 0 12px; color: #263835; font-size: 16px; }
.rows { border-top: 1px solid #dce3e0; }
.row { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #dce3e0; }
.row-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-main .identity { min-width: 0; overflow-wrap: anywhere; }
.row-main strong { display: block; font-size: 14px; }
.row-main small { display: block; margin-top: 3px; color: #687673; }
.row-actions { display: flex; gap: 8px; flex-shrink: 0; }
.row-actions button { min-height: 34px; padding: 6px 10px; font-size: 12px; }
.badge { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #f0b653; color: #372b16; font-size: 17px; flex: 0 0 auto; }
.plain-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #dde9e6; color: #23665c; font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.invite-form { margin: 10px 0 24px; max-width: 580px; }
.empty { color: #77827f; padding: 20px 0; }
.authority-line { display: flex; gap: 12px; align-items: center; padding: 16px 0; border-top: 1px solid #dce3e0; }
.authority-line p { margin: 4px 0 0; font-size: 13px; color: #6b7774; }
.authority-line div { min-width: 0; overflow-wrap: anywhere; }
.verification-state { font-size: 12px; color: #6b7774; margin: 10px 0 0; }
.blocked-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 12px; }
.grant-heading { margin-top: 36px; }
.grant-form { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 16px; padding: 8px 0 24px; }
.grant-form select { width: 100%; min-height: 42px; margin-top: 0; }
.grant-resources { grid-column: 1 / -1; }
.grant-form button { justify-self: start; grid-column: 1 / -1; }
.leave-home { padding-top: 28px; }
@media (max-width: 580px) {
  .topbar { padding: 0 16px; }
  main { padding: 24px 16px 56px; }
  .heading h1 { font-size: 22px; }
  .form-row { flex-direction: column; }
  .form-row input { flex: none; }
  .form-row button { flex: none; width: 100%; }
  .row { align-items: flex-start; flex-direction: column; padding: 14px 0; gap: 12px; }
  .row-actions { padding-left: 40px; }
  .tabs { gap: 20px; }
  .grant-form { grid-template-columns: 1fr; }
}
