.terms-view { padding-bottom: 36px; }
.terms-intro { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; margin-bottom:18px; }
.terms-version { display:flex; gap:8px; flex-wrap:wrap; }
.terms-version span { background:#eef6f0; color:#376849; border:1px solid #cfe0d4; border-radius:999px; padding:6px 9px; font-size:11px; font-weight:750; }
.terms-note { background:#f7faf8; border:1px solid #dbe6de; border-left:4px solid #4f8a60; border-radius:10px; padding:12px 14px; color:#435149; font-size:12.5px; line-height:1.5; margin-bottom:16px; }
.terms-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-bottom:16px; }
.term-stat { appearance:none; border:1px solid #d7e1da; background:#fff; border-radius:12px; padding:13px; text-align:left; cursor:pointer; transition:.15s ease; }
.term-stat:hover { border-color:#7bab88; box-shadow:0 4px 14px rgba(29,69,41,.07); transform:translateY(-1px); }
.term-stat strong { display:block; font-size:22px; color:#21402c; }
.term-stat span { display:block; margin-top:3px; color:#68766e; font-size:11px; }
.terms-toolbar { display:grid; grid-template-columns:minmax(240px,1.8fr) minmax(170px,.7fr) minmax(170px,.7fr) auto; gap:10px; padding:12px; border:1px solid #d7e1da; border-radius:12px; background:#fff; margin-bottom:10px; position:sticky; top:8px; z-index:3; box-shadow:0 4px 16px rgba(20,40,27,.04); }
.terms-toolbar input,.terms-toolbar select { width:100%; min-height:40px; box-sizing:border-box; border:1px solid #cbd8d0; border-radius:9px; background:#fff; padding:9px 11px; font-size:12px; color:#26362c; outline:none; }
.terms-toolbar input:focus,.terms-toolbar select:focus { border-color:#65a879; box-shadow:0 0 0 3px rgba(101,168,121,.12); }
.terms-toolbar button { min-height:40px; border:1px solid #ccd9d0; border-radius:9px; padding:8px 13px; background:#f8faf9; color:#425248; cursor:pointer; }
.terms-toolbar button:hover { background:#eef5f0; }
.terms-count { display:flex; justify-content:flex-end; color:#748078; font-size:11px; margin:0 2px 10px; }
.terms-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; }
.term-card { background:#fff; border:1px solid #d7e1da; border-radius:14px; padding:17px; box-shadow:0 4px 16px rgba(17,35,23,.035); min-width:0; }
.term-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; margin-bottom:12px; }
.term-category { display:inline-block; color:#4d7659; text-transform:uppercase; letter-spacing:.06em; font-size:9px; font-weight:850; margin-bottom:4px; }
.term-card h3 { margin:0; color:#17261c; font-size:17px; line-height:1.25; }
.term-system-name { margin-top:5px; color:#78847d; font-size:10.5px; }
.term-system-name code { color:#405148; background:#f3f6f4; padding:1px 4px; border-radius:4px; }
.term-source { display:inline-flex; flex:0 0 auto; max-width:150px; text-align:center; justify-content:center; border-radius:999px; padding:5px 8px; font-size:8.8px; font-weight:850; line-height:1.15; border:1px solid; }
.term-source.source-law { color:#2f6540; background:#eaf5ed; border-color:#bdd8c5; }
.term-source.source-municipio { color:#5f6330; background:#f8f7e9; border-color:#dedbb7; }
.term-source.source-crm { color:#466172; background:#edf3f6; border-color:#c9d8df; }
.term-source.source-other { color:#63596b; background:#f4f1f6; border-color:#d9d0de; }
.term-definition { color:#2f3f35; font-size:13px; line-height:1.55; margin-bottom:13px; }
.term-section { border-top:1px solid #edf1ee; padding-top:10px; margin-top:8px; }
.term-section h4 { margin:0 0 4px; color:#65736a; text-transform:uppercase; letter-spacing:.05em; font-size:9.5px; }
.term-section p { margin:0; color:#435148; font-size:12px; line-height:1.45; }
.term-distinction { background:#fff8ed; border:1px solid #eadabd; border-radius:8px; padding:9px 10px; margin-top:11px; color:#624d2d; font-size:11.5px; line-height:1.42; }
.term-reference { border-top:1px solid #edf1ee; margin-top:11px; padding-top:10px; color:#68766e; font-size:10.8px; line-height:1.4; }
.term-reference a { display:inline-block; margin-left:5px; color:#397c4d; font-weight:700; text-decoration:none; }
.term-reference a:hover { text-decoration:underline; }
.terms-empty,.terms-error { border:1px dashed #cad7ce; border-radius:12px; padding:24px; text-align:center; color:#6c786f; background:#fafcfb; }
.terms-error { border-color:#e2bcbc; background:#fff5f5; color:#873636; }
@media (max-width:1050px) { .terms-grid { grid-template-columns:1fr; } .terms-stats { grid-template-columns:repeat(2,1fr); } .terms-toolbar { grid-template-columns:1fr 1fr; } }
@media (max-width:700px) { .terms-stats,.terms-toolbar { grid-template-columns:1fr; } .term-card-head { flex-direction:column; } .term-source { max-width:none; } }
