.category-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.category-stats > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--line, #e3ebe9);
  border-radius: 15px;
  min-height: 88px;
  padding: 18px 20px;
  gap: 16px;
}

.category-stats span {
  color: var(--muted, #7e918d);
  font-size: var(--text-sm, .875rem);
  font-weight: var(--weight-medium, 550);
  line-height: 1.7;
}

.category-stats b {
  color: var(--success, #0f766e);
  font-size: var(--text-xl, 1.375rem);
  font-weight: var(--weight-bold, 750);
  line-height: 1;
}

.category-help {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 16px;
  margin-bottom: 15px;
  background: #f0f8f6;
  border-color: #d9ebe7;
}

.category-help > span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0f766e;
  color: white;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 10px;
}

.category-help b { font-size: 9px; }
.category-help p { color: #617873; font-size: 8px; line-height: 1.9; margin: 3px 0 0; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.category-card {
  background: #fff;
  border: 1px solid #e3ebe9;
  border-radius: 14px;
  padding: 17px;
  transition: transform .2s, box-shadow .2s;
}

.category-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px #193f3920; }
.category-card.category-inactive { opacity: .68; background: #fafbfb; }

.category-card-head {
  display: grid;
  grid-template-columns: 39px 1fr auto;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid #edf1f0;
}

.category-card-head > i {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--category-color);
  background: color-mix(in srgb, var(--category-color) 13%, white);
  font-style: normal;
  font-size: 19px;
}

.category-card-head h3 { font-size: 11px; margin: 0 0 3px; }
.category-card-head small { color: #93a19e; font-size: 7px; direction: ltr; display: block; text-align: right; }

.rule-primary { padding: 14px 0 12px; }
.rule-primary > span { color: #8a9b97; display: block; font-size: 8px; margin-bottom: 4px; }
.rule-primary > b { color: #264a44; display: block; font-size: 11px; }
.rule-primary > small { color: #849692; display: block; font-size: 7px; line-height: 1.8; margin-top: 5px; min-height: 26px; }

.rule-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.rule-pills span { background: #f0f6f4; color: #55706b; border-radius: 8px; padding: 5px 7px; font-size: 7px; }
.category-card > button { width: 100%; }

#categoryModal input[type="color"] { padding: 5px; cursor: pointer; }

@media (max-width: 1120px) {
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .category-stats { grid-template-columns: 1fr; }
  .category-grid { grid-template-columns: 1fr; }
}

/* Financial report and review workflows */
.form-grid textarea {
  width: 100%;
  border: 1px solid #dbe5e2;
  border-radius: 9px;
  padding: 10px 12px;
  outline: none;
  resize: vertical;
  font: inherit;
  font-size: 11px;
}

.form-grid textarea:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px #dff1ed;
}

.report-action-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 16px;
}

.report-action-bar button {
  min-height: 44px;
  border: 1px solid #dce7e4;
  border-radius: 10px;
  background: #fff;
  color: #47635e;
  cursor: pointer;
  font-size: 9px;
}

.report-action-bar button:hover { border-color: #0f766e; background: #eef7f4; color: #0f766e; }
.submission-title { background: #f7faf9; border-radius: 9px; padding: 10px 12px; margin-top: 14px; }
.submission-title b, .submission-title small { display: block; }
.submission-title b { font-size: 9px; }
.submission-title small { color: #879894; font-size: 7px; margin-top: 3px; }

.review-effect {
  background: #eef8f5;
  border-right: 3px solid #0f766e;
  border-radius: 8px;
  padding: 9px 11px;
  margin-top: 14px;
}

.review-effect b { font-size: 8px; color: #0f766e; }
.review-effect p { font-size: 8px; color: #637b76; line-height: 1.8; margin: 3px 0 0; }
.approval-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin-top: 11px; }
.approval-options label > span { display: block; color: #81938f; font-size: 7px; margin-bottom: 5px; }
.approval-options select { width: 100%; height: 35px; border: 1px solid #dce6e3; border-radius: 8px; background: #fff; padding: 0 8px; font-size: 8px; }
.rejection-reason { background: #fff0ee; color: #b9564d; border-radius: 8px; padding: 9px; margin-top: 12px; font-size: 8px; }

.file-field {
  border: 1px dashed #cbdcd8;
  border-radius: 10px;
  background: #f8fbfa;
  padding: 11px;
}

.file-field input[type="file"] {
  height: auto;
  border: 0;
  background: transparent;
  padding: 5px 0;
  font-size: 9px;
}

.file-field small { color: #879995; display: block; font-size: 7px; margin-top: 4px; }
.attachment-list { display: grid; gap: 6px; margin-top: 12px; }
.attachment-link { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; border: 1px solid #dce8e5; border-radius: 8px; padding: 7px 9px; text-decoration: none; color: #35534e; background: #fbfdfc; }
.attachment-link:hover { border-color: #0f766e; background: #eef7f4; }
.attachment-link > span { width: 28px; height: 28px; border-radius: 7px; background: #e6f3ef; color: #0f766e; display: grid; place-items: center; font-size: 7px; font-weight: 800; }
.attachment-link b { font-size: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-link small { color: #829590; font-size: 7px; }

@media (max-width: 560px) {
  .report-action-bar { grid-template-columns: 1fr; }
  .approval-options { grid-template-columns: 1fr; }
}

/* Building registry, accounts, contacts and documents */
.records-section .settings-heading .add-record { margin-right: auto; min-width: 82px; }
.record-list { display: grid; gap: 9px; }
.record-row { display: grid; grid-template-columns: 110px repeat(3,minmax(120px,1fr)) auto 32px; gap: 7px; align-items: center; padding: 9px; border: 1px solid #e2ebe8; border-radius: 11px; background: #f9fbfa; }
.record-row.contact-row { grid-template-columns: 100px repeat(5,minmax(110px,1fr)) auto 32px; }
.record-row input,.record-row select,.document-upload input { width: 100%; min-width: 0; height: 37px; border: 1px solid #dbe5e2; border-radius: 8px; background: #fff; padding: 0 9px; outline: none; font: inherit; font-size: var(--text-xs); }
.record-row input:focus,.record-row select:focus,.document-upload input:focus { border-color: #0f766e; box-shadow: 0 0 0 2px #dff1ed; }
.mini-check { display: flex; align-items: center; gap: 4px; font-size: var(--text-xs); color: #58706c; white-space: nowrap; }
.mini-check input { width: 14px; height: 14px; }
.remove-record { border: 0; background: var(--danger-soft,#fff0ee); color: var(--danger,#bc554b); border-radius: 7px; cursor: pointer; height: 30px; width: 30px; padding: 0; justify-self: center; display: grid; place-items: center; font-size: 15px; line-height: 1; }
.delete-document { border: 0; background: var(--danger-soft,#fff0ee); color: var(--danger,#bc554b); border-radius: 7px; cursor: pointer; height: 30px; padding: 0 10px; font-size: var(--text-xs); }
.document-upload { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 9px; align-items: center; }
.document-upload input[type="file"] { height: auto; padding: 8px; }
.document-list { display: grid; gap: 7px; margin-top: 14px; }
.document-list>div { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 9px; align-items: center; border: 1px solid #e1eae7; border-radius: 9px; padding: 8px 10px; }
.document-list>div>span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; background: #e9f5f2; color: #0f766e; }
.document-list a { color: #244b45; text-decoration: none; font-size: var(--text-xs); font-weight: 700; }
.document-list small,.muted-copy { color: #879894; font-size: var(--text-xs); }
.records-save { justify-self: end; }
.edit-unit { min-width: 65px; }
.public-record { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid #edf1f0; }
.public-record:last-child { border-bottom: 0; }
.public-record b,.public-record a,.public-record span { font-size: 9px; color: #31534d; }
.public-record a { color: #0f766e; text-decoration: none; }
.public-record small { grid-column: 1/-1; color: #879894; font-size: 7px; }
.login-card select { width: 100%; height: 49px; border: 1px solid #d9e4e1; border-radius: 11px; padding: 0 14px; outline: none; font: inherit; font-size: 12px; background: #fbfcfc; color: #24443f; }
.login-card select:focus { border-color: #0f766e; box-shadow: 0 0 0 3px #e0f1ed; }
.manager-card { grid-template-columns: 38px 1fr auto; }
.profile-actions { display: flex; align-items: center; }
.profile-actions button { width: 25px; height: 30px; }
.unit-actions { display: grid; grid-template-columns: repeat(2,minmax(70px,1fr)); gap: 5px; min-width: 160px; }
.unit-actions button { min-width: 0; padding: 0 6px; height: 31px; font-size: 7px; }
.data-table { min-width: 900px; }
.table-panel { overflow-x: auto; }
.one-time-password { padding: 18px; border: 1px solid #d9e8e4; border-radius: 12px; background: #f5faf8; text-align: center; }
.one-time-password p { margin: 0 0 10px; color: #4c6863; font-size: 10px; }
.one-time-password input { width: 100%; height: 52px; border: 1px solid #bdd8d1; border-radius: 10px; background: #fff; color: #0f766e; text-align: center; font: 700 20px monospace; letter-spacing: 2px; }
.one-time-password small { display: block; color: #7e918d; font-size: 8px; line-height: 1.9; margin-top: 10px; }

@media (max-width: 900px) {
  .record-row,.record-row.account-row,.record-row.contact-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .remove-record { width: 32px; }
}
@media (max-width: 600px) {
  .record-row,.record-row.account-row,.record-row.contact-row,.document-upload { grid-template-columns: 1fr; }
  .document-list>div { grid-template-columns: 30px 1fr auto; }
  .document-list small { grid-column: 2/-1; }
}

.settings-layout.sectional-settings { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; }
.section-save-row { display: flex; align-items: center; justify-content: flex-end; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 1px solid #edf2f1; }
.section-save-row small { margin-left: auto; color: #7b8e8a; font-size: var(--text-xs); }
.section-save-row .primary-button:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.instant-save-badge { margin-right: auto; padding: 7px 10px; border-radius: 999px; background: #e7f5f1; color: #0f766e; font-size: var(--text-xs); font-weight: 700; white-space: nowrap; }
.document-save-note { margin: 10px 0 0; color: #64807a; font-size: var(--text-xs); }
@media (max-width: 600px) {
  .section-save-row { align-items: stretch; flex-direction: column; }
  .section-save-row small { margin-left: 0; }
  .instant-save-badge { margin-right: 0; }
}
