body { font-family: Arial, sans-serif; margin: 0; background: #f5f5f5; color: #222; }
.topnav { background: #111; color: #fff; padding: 0 18px; min-height: 44px; display: flex; align-items: center; gap: 0; flex-wrap: wrap; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.topnav a { color: #fff; display: inline-block; padding: 14px 10px; text-decoration: none; font-weight: 600; }
.topnav a:hover { background: #2a2a2a; text-decoration: none; }
.topnav .nav-user { color: #ddd; margin-left: auto; padding: 14px 10px; font-size: 14px; }
main { max-width: 1260px; margin: 24px auto; background: #fff; padding: 22px; border-radius: 8px; box-shadow: 0 1px 8px rgba(0,0,0,.08); }
footer { max-width: 1260px; margin: 20px auto; color: #666; font-size: 13px; }
h1, h2 { margin-top: 0; }
table { width: 100%; border-collapse: collapse; margin-top: 16px; }
th, td { border-bottom: 1px solid #ddd; padding: 8px; text-align: left; vertical-align: top; }
th { background: #fafafa; }
label { display: block; margin: 12px 0 4px; font-weight: bold; }
input, select, textarea { width: 100%; max-width: 620px; padding: 8px; box-sizing: border-box; }
textarea { min-height: 110px; }
button, .button { display: inline-block; margin-top: 12px; padding: 9px 14px; background: #111; color: #fff !important; border: 0; border-radius: 4px; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: #333; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 16px; align-items: end; }
.form-grid .span-2 { grid-column: 1 / -1; }
.card { border: 1px solid #ddd; border-radius: 8px; padding: 14px; background: #fafafa; margin: 12px 0; }
details.card summary { cursor: pointer; font-weight: bold; }
.flash { padding: 10px; border-radius: 4px; margin: 10px 0; }
.flash-ok { background: #e8f7e8; border: 1px solid #9bcf9b; }
.flash-error { background: #fdeaea; border: 1px solid #e0a0a0; }
.flash-info { background: #eaf1fd; border: 1px solid #a0bce0; }
.small { color: #666; font-size: 13px; }
.badge { display: inline-block; padding: 2px 7px; border-radius: 999px; background: #eee; font-size: 12px; white-space: nowrap; }
.actions a { margin-right: 8px; }
.link-button { background: none !important; color: #111 !important; border: 0; padding: 0; margin: 0 0 0 8px; text-decoration: underline; cursor: pointer; font: inherit; }
.inline-form { display: inline; }
.wide-select { max-width: 900px; }
.thumb-row img { max-height: 160px; width: auto; }
.nowrap { white-space: nowrap; }
.checkline { display: flex; align-items: center; gap: 8px; font-weight: normal; }
.checkline input { width: auto; }
.compact-table input, .compact-table select { max-width: none; min-width: 90px; }
.compact-table td, .compact-table th { padding: 6px; }
.variant-table-wrap { overflow-x: auto; }
.small-button { padding: 6px 8px; font-size: 12px; margin-top: 0; }
.doc-section { border-left: 4px solid #111; padding-left: 12px; margin: 18px 0; }
.doc-section .meta { color: #777; font-size: 13px; }
@media (max-width: 720px) { .topnav { align-items: stretch; } .topnav .nav-user { margin-left: 0; width: 100%; } main { margin: 10px; padding: 14px; } table { font-size: 14px; display: block; overflow-x: auto; } }


/* v9 bylaws structured editor */
.bylaw-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 16px; }
.bylaw-list .bylaw-row { border-bottom: 1px solid #e4e4e4; padding: 8px 0; display: grid; grid-template-columns: 110px 1fr 220px; gap: 10px; align-items: start; }
.bylaw-list .bylaw-row:hover { background: #fafafa; }
.bylaw-label { font-weight: 700; white-space: nowrap; color: #111; }
.bylaw-title { font-weight: 600; }
.bylaw-actions { text-align: right; white-space: nowrap; }
.bylaw-depth-0 { margin-left: 0; }
.bylaw-depth-1 { margin-left: 18px; }
.bylaw-depth-2 { margin-left: 36px; }
.bylaw-depth-3 { margin-left: 54px; }
.bylaw-depth-4 { margin-left: 72px; }
.bylaw-depth-5 { margin-left: 90px; }
.bylaw-statuses { font-size: 12px; color: #666; margin-top: 3px; }
.bylaw-statuses .badge { margin-right: 4px; }
.language-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.language-grid details.card textarea { max-width: none; width: 100%; min-height: 190px; }
.language-grid details.card input, .language-grid details.card select { max-width: none; }
.doc-section { border-left: 4px solid #111; padding-left: 12px; margin: 18px 0; }
.doc-section.depth-0 { margin-left: 0; }
.doc-section.depth-1 { margin-left: 18px; border-left-color: #444; }
.doc-section.depth-2 { margin-left: 36px; border-left-color: #777; }
.doc-section.depth-3 { margin-left: 54px; border-left-color: #aaa; }
.doc-section.depth-4 { margin-left: 72px; border-left-color: #ccc; }
.doc-section .meta { color: #777; font-size: 13px; }
.doc-clause { margin: 8px 0; }
@media (max-width: 760px) { .bylaw-list .bylaw-row { grid-template-columns: 1fr; } .bylaw-actions { text-align:left; } .bylaw-depth-1,.bylaw-depth-2,.bylaw-depth-3,.bylaw-depth-4,.bylaw-depth-5 { margin-left: 0; } }

/* v10 usability fixes */
.badge-ok { background: #d9f4dd; color: #145c1f; border: 1px solid #8cca94; }
.badge-missing { background: #fde2e2; color: #8a1111; border: 1px solid #e2a1a1; }
.language-stack { display: block; }
.language-editor { width: 100%; box-sizing: border-box; }
.language-editor input, .language-editor select, .language-editor textarea { max-width: none; width: 100%; }
.language-editor textarea { min-height: 330px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; line-height: 1.45; }
.language-editor summary { display: flex; gap: 8px; align-items: center; }
.bylaw-statuses { display: flex; flex-wrap: wrap; gap: 4px; }
.public-order-preview { margin: 8px 0; font-weight: bold; }
.danger-zone { border-color: #d49a9a; background: #fff4f4; }
.danger-button { background: #8a1111 !important; }
