:root {
  --bg: #f4f7fb;
  --bg-soft: #f8fbff;
  --panel: #ffffff;
  --panel-soft: #fbfcfe;

  --text: #122033;
  --text-soft: #425268;
  --text-muted: #6b7280;

  --line: #e4ebf3;
  --line-strong: #d7e0ea;

  --brand: #17263d;
  --brand-2: #223a5c;
  --brand-soft: #eef4ff;

  --blue: #2d5fe6;
  --blue-soft: #eaf1ff;

  --green: #197a43;
  --green-soft: #edf8f1;

  --orange: #bf6a00;
  --orange-soft: #fff5e8;

  --red: #b9382f;
  --red-soft: #fdf0ef;

  --radius-xs: 10px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 18px 46px rgba(15, 23, 42, 0.08);

  --content-width: 1480px;
}

/* Inline Editing Styles */
.inline-edit-cell {
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
  min-height: 1.5em;
  display: inline-block;
  width: calc(100% - 4px);
  border: 1px solid transparent;
}
.inline-edit-cell:hover {
  background: var(--bg-soft);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-sm);
}
.inline-edit-cell:empty::after {
  content: '—';
  color: var(--text-muted);
}

.inline-input-active {
  width: 100%;
  border: 1px solid var(--blue);
  border-radius: 6px;
  padding: 4px 8px;
  font-family: inherit;
  font-size: inherit;
  color: var(--text);
  background: #ffffff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 95, 230, 0.1);
}

.text-right .inline-input-active {
  text-align: right;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(232, 240, 255, 0.42), transparent 30%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--text);
  line-height: 1.5;
}

a:hover {
  text-decoration: underline;
}

.page-wrap,
.auth-wrap {
  width: min(var(--content-width), calc(100vw - 40px));
  margin: 0 auto;
  padding: 20px;
}

@media (max-width: 1200px) {
  .page-wrap,
  .auth-wrap {
    width: min(var(--content-width), calc(100vw - 32px));
    padding: 16px;
  }
}

@media (max-width: 640px) {
  .page-wrap,
  .auth-wrap {
    width: 100%;
    padding: 12px;
  }
}

/* =========================================================
   CARDS / PANELS
========================================================= */

.card,
.auth-card,
.contact-card,
.property-card,
.address-card,
.address-display-card,
.comm-item,
.modal-content {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.auth-card,
.card {
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* =========================================================
   TYPOGRAPHY / PAGE HEADER
========================================================= */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--text);
}

.page-header p {
  margin: 6px 0 0 0;
}

.muted {
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* =========================================================
   FORMS
========================================================= */

label {
  display: block;
  margin: 0 0 7px;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 13px;
  border-radius: var(--radius-xs);
  border: 1px solid #cfd8e3;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
  font-family: inherit;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #bcc9d8;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(45, 95, 230, 0.1);
  background: #fff;
}

textarea {
  resize: vertical;
  min-height: 110px;
}

.stack-form > * + * {
  margin-top: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* =========================================================
   BUTTONS / LINKS
========================================================= */

button {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--brand);
  color: #fff;
  font-size: 0.94rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
  font-family: inherit;
}

button:hover {
  background: var(--brand-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn,
.btn-secondary-inline,
.btn-linkish {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 0.87rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn {
  background: #f7f9fc;
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.btn:hover {
  background: #eef3f8;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-secondary-inline {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--text);
}

.btn-secondary-inline:hover {
  background: #f8fafc;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-linkish {
  background: transparent;
  border: none;
  padding: 0;
  min-height: auto;
  color: var(--blue);
}

.btn-linkish:hover {
  text-decoration: underline;
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-danger:hover {
  background: #a52f27;
}

.btn-success {
  background: var(--green);
  color: #fff;
}

.btn-success:hover {
  background: #126238;
}

/* =========================================================
   ALERTS / BADGES
========================================================= */

.alert {
  padding: 12px 16px;
  border-radius: 12px;
  margin: 16px 0;
  font-size: 0.9rem;
  border: 1px solid transparent;
}

.alert-error {
  background: var(--red-soft);
  color: var(--red);
  border-color: #fecaca;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.badge,
.badge-soft,
.badge-danger,
.badge-warning {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.badge {
  background: var(--blue-soft);
  color: #2344a0;
}

.badge-soft {
  background: var(--bg-soft);
  color: var(--text-soft);
  border: 1px solid var(--line);
}

.badge-danger {
  background: var(--red-soft);
  color: var(--red);
}

.badge-warning {
  background: var(--orange-soft);
  color: var(--orange);
}

/* =========================================================
   CONTACTS / PROPERTIES / DETAIL LAYOUTS
========================================================= */

.contact-list,
.property-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.contact-card,
.property-card {
  padding: 20px;
}

.contact-card h2,
.property-card h2 {
  margin: 0 0 8px 0;
  font-size: 1.02rem;
  line-height: 1.25;
}

.person-fields,
.company-fields {
  display: block;
}

.form-section {
  margin-top: 32px;
  padding-top: 8px;
}

.form-section h2,
.detail-block h2 {
  margin: 0 0 16px 0;
  font-size: 1.1rem;
  line-height: 1.2;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-grid,
.address-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.header-actions,
.card-actions,
.actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.actions {
  margin: 20px 0 24px;
}

.actions form {
  margin: 0;
}

/* =========================================================
   ADDRESS CARDS / RADIO / CHECKBOX
========================================================= */

.address-card,
.address-display-card {
  padding: 20px;
}

.address-card + .address-card {
  margin-top: 16px;
}

.address-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.checkbox-item,
.radio-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  cursor: pointer;
}

.checkbox-item input,
.radio-item input {
  width: auto;
  margin: 0;
}

/* =========================================================
   TABLES
========================================================= */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  margin-bottom: 24px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.report-table th,
.report-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.report-table th {
  background: #f8fafc;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.03em;
}

.text-right {
  text-align: right;
}

/* =========================================================
   COMMUNICATIONS
========================================================= */

.activity-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.activity-card:hover {
  background: var(--panel-soft);
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.comm-item {
  padding: 16px;
  margin-bottom: 12px;
}

.comm-subject {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.35;
}

.comm-message-dialog {
  border: 0;
  border-radius: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  color: var(--text);
  max-height: 90vh;
  max-width: min(800px, calc(100vw - 32px));
  padding: 0;
  width: 100%;
}

/* Glass Alerts */
.glass-alert {
  padding: 16px 20px;
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(31, 38, 135, 0.05);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.glass-alert.success {
  background: rgba(240, 253, 244, 0.7);
  color: #166534;
  border-color: rgba(187, 247, 208, 0.5);
}

.glass-alert.warning {
  background: rgba(255, 251, 235, 0.7);
  color: #92400e;
  border-color: rgba(254, 243, 199, 0.5);
}

.glass-alert.danger {
  background: rgba(254, 242, 242, 0.7);
  color: #991b1b;
  border-color: rgba(254, 202, 202, 0.5);
}

.comm-message-dialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
}

.comm-message-dialog-head {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 24px;
  background: var(--brand-soft);
}

.comm-message-dialog-title {
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.02em;
}

.comm-message-dialog-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
  font-weight: 500;
}

.comm-message-dialog-close {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text-soft);
  cursor: pointer;
  display: inline-flex;
  font-size: 24px;
  height: 40px;
  justify-content: center;
  line-height: 1;
  width: 40px;
  transition: all 0.2s;
}

.comm-message-dialog-close:hover {
  background: var(--red-soft);
  color: var(--red);
  border-color: var(--red);
}

.comm-message-dialog-body {
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  overflow: auto;
  padding: 32px;
}

/* =========================================================
   MODAL / INLINE HELPERS
========================================================= */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.32);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  padding: 20px;
  width: min(420px, 100%);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
}

.contact-select-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.contact-select-row select {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.contact-select-row .open-contact-modal {
  width: auto;
  flex: 0 0 auto;
  margin-top: 0;
  padding: 0 14px;
  min-width: 88px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f5f7fa;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  line-height: 1;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (min-width: 768px) {
  .contact-list,
  .property-list,
  .detail-grid,
  .address-grid {
    grid-template-columns: 1fr 1fr;
  }

  .checkbox-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
}

@media (max-width: 640px) {
  .page-wrap,
  .auth-wrap {
    width: min(var(--content-width), calc(100vw - 20px));
    padding: 10px;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header button {
    width: 100%;
  }

  .header-actions,
  .card-actions,
  .actions {
    align-items: stretch;
  }
}

/* =========================================================
   FINANCE DASHBOARD & KPI
========================================================= */

.big-money {
  font-size: 2rem;
  font-weight: 800;
  margin: 0;
}

.statement-line-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #eceff3;
}

.statement-line-row:last-child {
  border-bottom: none;
}

.finance-type-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  vertical-align: middle;
}

.finance-type-income {
  background: #e8f7ee;
  color: #166534;
}

.finance-type-expense {
  background: #fdecec;
  color: #991b1b;
}

.finance-type-pass_through {
  background: #eef2ff;
  color: #3730a3;
}

.finance-amount-income {
  color: #166534;
}

.finance-amount-expense {
  color: #991b1b;
}

.finance-amount-pass_through {
  color: #3730a3;
}

.finance-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #eceff3;
}

.finance-summary-row:last-child {
  border-bottom: none;
}

.finance-summary-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.finance-dashboard-page {
  max-width: 1440px;
}

.finance-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 420px);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 22px;
}

.finance-kicker,
.finance-panel-kicker {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.finance-hero h1 {
  margin: 0;
  font-size: 2.2rem;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.finance-hero-subtitle {
  margin: 10px 0 0;
  max-width: 760px;
  color: #64748b;
  font-size: 1rem;
  line-height: 1.6;
}

.finance-period-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #dbe5ef;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.finance-period-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.finance-period-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.finance-period-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
}

.finance-period-btn {
  width: 100%;
  margin-top: 2px;
}

.finance-kpi-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.finance-kpi {
  position: relative;
  overflow: hidden;
  min-height: 144px;
  padding: 20px;
  border-radius: 22px;
  border: 1px solid #dbe5ef;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.finance-kpi::after {
  content: '';
  position: absolute;
  inset: auto -24px -24px auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  opacity: 0.08;
  pointer-events: none;
}

.finance-kpi-primary {
  background: linear-gradient(135deg, #17263d 0%, #1f3b63 100%);
  color: #ffffff;
  border-color: #1f3b63;
}

.finance-kpi-primary::after {
  background: #ffffff;
}

.finance-kpi-income::after {
  background: #166534;
}

.finance-kpi-expense::after {
  background: #991b1b;
}

.finance-kpi-neutral::after {
  background: #3730a3;
}

.finance-kpi-label {
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.78;
}

.finance-kpi-primary .finance-kpi-label,
.finance-kpi-primary .finance-kpi-meta,
.finance-kpi-primary .finance-kpi-value {
  color: #ffffff;
}

.finance-kpi-value {
  margin-top: 10px;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #0f172a;
}

.finance-kpi-meta {
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #64748b;
}

.finance-vat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.finance-vat-card {
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.finance-vat-card-highlight {
  background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
  border-color: #fed7aa;
}

.finance-vat-label {
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.finance-vat-value {
  margin-top: 8px;
  font-size: 1.55rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.finance-vat-meta {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.45;
}

.finance-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.finance-bottom-grid {
  margin-bottom: 8px;
}

.finance-panel {
  padding: 22px 20px;
  border-radius: 22px;
  border: 1px solid #dbe5ef;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.finance-panel-wide {
  margin-bottom: 20px;
}

.finance-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.finance-panel-header h2 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.finance-panel-subtitle {
  margin: 7px 0 0;
  font-size: 0.94rem;
  line-height: 1.5;
  color: #64748b;
}

.finance-empty-state {
  padding: 20px 0 6px;
  color: #64748b;
}

.finance-breakdown-list,
.finance-property-list,
.finance-transaction-list,
.finance-invoice-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.finance-breakdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid #e7edf5;
  background: #fbfcfe;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.finance-breakdown-item:hover,
.finance-property-item:hover,
.finance-invoice-item:hover {
  transform: translateY(-1px);
  border-color: #d9e3ef;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.finance-breakdown-item-income {
  background: linear-gradient(to right, rgba(22, 101, 52, 0.035), #fbfcfe 28%);
}

.finance-breakdown-item-expense {
  background: linear-gradient(to right, rgba(153, 27, 27, 0.035), #fbfcfe 28%);
}

.finance-breakdown-main {
  min-width: 0;
}

.finance-breakdown-label,
.finance-category,
.finance-property-name,
.finance-invoice-number {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
  color: #0f172a;
}

.finance-breakdown-amount,
.finance-property-amount,
.finance-invoice-amount,
.finance-row-right {
  flex-shrink: 0;
  font-size: 1.04rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.finance-property-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid #e7edf5;
  background: #fbfcfe;
}

.finance-property-meta,
.finance-row-meta,
.finance-invoice-meta {
  margin-top: 6px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #64748b;
}

.finance-row {
  padding: 14px 0;
  border-bottom: 1px solid #edf2f7;
}

.finance-row:last-child {
  border-bottom: none;
}

.finance-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.finance-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.finance-invoice-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid #e7edf5;
  background: #fbfcfe;
  text-decoration: none;
}

.finance-invoice-item:hover .finance-invoice-number {
  text-decoration: underline;
}

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

  .finance-vat-grid,
  .finance-two-col,
  .finance-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .finance-dashboard-page {
    max-width: 100%;
  }

  .finance-hero h1 {
    font-size: 1.8rem;
  }

  .finance-kpi-grid {
    grid-template-columns: 1fr;
  }

  .finance-period-fields {
    grid-template-columns: 1fr;
  }

  .finance-row-top,
  .finance-breakdown-item,
  .finance-property-item,
  .finance-invoice-item {
    align-items: flex-start;
  }

  .finance-row-top,
  .finance-breakdown-item,
  .finance-property-item,
  .finance-invoice-item {
    flex-direction: column;
  }

  .finance-breakdown-amount,
  .finance-property-amount,
  .finance-invoice-amount,
  .finance-row-right {
    margin-top: 4px;
  }
}

.finance-range-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.finance-range-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.finance-range-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .finance-range-fields {
    grid-template-columns: 1fr;
  }
}

.finance-section-heading {
  margin: 26px 0 14px;
}

.finance-section-heading h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.finance-kpi-grid-secondary {
  margin-bottom: 22px;
}

.finance-kpi-owned::after {
  background: #0f766e;
}

.finance-kpi-owned-net::after {
  background: #7c3aed;
}

.finance-filter-note {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.45;
}

.finance-three-col {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.finance-forecast-table-wrap {
  overflow-x: auto;
}

.finance-forecast-table {
  width: 100%;
  border-collapse: collapse;
}

.finance-forecast-table th,
.finance-forecast-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #e8edf3;
  text-align: left;
  white-space: nowrap;
}

.finance-forecast-table th {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.finance-forecast-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.finance-forecast-item {
  padding: 15px 16px;
  border-radius: 16px;
  border: 1px solid #e7edf5;
  background: #fbfcfe;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.finance-forecast-item:hover {
  transform: translateY(-1px);
  border-color: #d9e3ef;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.finance-forecast-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.finance-forecast-amount {
  flex-shrink: 0;
  font-size: 1.04rem;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.finance-forecast-meta,
.finance-forecast-submeta {
  margin-top: 6px;
  font-size: 0.92rem;
  line-height: 1.45;
  color: #64748b;
}

.finance-amount-owned {
  color: #0f766e;
}

.finance-muted-panel {
  background: linear-gradient(180deg, #fbfcfe 0%, #f8fafc 100%);
}

@media (max-width: 1280px) {
  .finance-three-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .finance-forecast-top {
    flex-direction: column;
  }
}

.finance-kpi-meta-split {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.finance-kpi-meta-split span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.finance-three-col-forecast {
  align-items: start;
}

.finance-forecast-item {
  padding: 18px 18px 16px;
  border-radius: 18px;
}

.finance-forecast-item-income {
  background: linear-gradient(to bottom right, rgba(22, 101, 52, 0.035), #fbfcfe 38%);
}

.finance-forecast-item-theoretical {
  background: linear-gradient(to bottom right, rgba(55, 48, 163, 0.04), #fbfcfe 38%);
}

.finance-forecast-item-owned {
  background: linear-gradient(to bottom right, rgba(15, 118, 110, 0.04), #fbfcfe 38%);
}

.finance-forecast-heading {
  min-width: 0;
}

.finance-forecast-amount-block {
  flex-shrink: 0;
  text-align: right;
}

.finance-forecast-amount-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}

.finance-forecast-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e7edf5;
}

.finance-forecast-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.finance-forecast-stat-label {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}

.finance-forecast-stat strong {
  font-size: 0.95rem;
  line-height: 1.35;
  color: #0f172a;
}

@media (max-width: 720px) {
  .finance-kpi-meta-split {
    flex-direction: column;
    gap: 6px;
  }

  .finance-forecast-grid {
    grid-template-columns: 1fr;
  }

  .finance-forecast-amount-block {
    text-align: left;
  }
}

.finance-kpi-grid-secondary {
  display: grid;
  grid-template-columns: repeat(3, minmax(320px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
  align-items: stretch;
}

.finance-kpi-grid-secondary .finance-kpi {
  min-height: 210px;
  padding: 22px 20px;
}

.finance-kpi-grid-secondary .finance-kpi-meta {
  margin-top: 14px;
  line-height: 1.55;
}

.finance-kpi-grid-secondary .finance-kpi-meta-split {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.finance-kpi-grid-secondary .finance-kpi-meta-split span {
  display: block;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #dbe1ea;
  text-align: left;
  vertical-align: top;
}

.inline-input {
  width: 100%;
  min-width: 90px;
  padding: 8px 10px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  font-size: 14px;
}

.table-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.danger-link {
  color: #b42318;
}

.finance-kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.finance-kpi-action {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1f3a5f;
  color: #fff;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s ease;
}

.finance-kpi-action:hover {
  background: #162c47;
  transform: scale(1.05);
}

.income-row-list {
  display: grid;
  gap: 16px;
}

.income-row-card {
  border: 1px solid #dbe1ea;
  border-radius: 16px;
  background: #fff;
  padding: 16px;
}

.income-row-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(120px, 1fr));
  gap: 14px;
  align-items: end;
}

.income-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.income-field label {
  font-size: 13px;
  font-weight: 600;
  color: #4b5b76;
}

.income-field-wide {
  grid-column: span 2;
}

.income-field-actions {
  min-width: 140px;
}

.income-static-value {
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 8px 0;
  color: #102a43;
}

@media (max-width: 1200px) {
  .income-row-grid {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
  }

  .income-field-wide {
    grid-column: span 2;
  }
}

@media (max-width: 700px) {
  .income-row-grid {
    grid-template-columns: 1fr;
  }

  .income-field-wide {
    grid-column: span 1;
  }
}
.income-static-subvalue {
  font-size: 13px;
  color: #6b7a90;
  padding-top: 4px;
}

.income-lookup {
  width: 100%;
}

.income-hidden-id {
  display: none;
}

.agency-income-page .card {
  border-radius: 18px;
}

.agency-income-add-card {
  margin-bottom: 20px;
}

.agency-income-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: end;
}

.agency-income-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.agency-income-field label {
  font-size: 13px;
  font-weight: 600;
  color: #4b5b76;
}

.agency-income-field-wide {
  grid-column: span 2;
}

.agency-income-field-actions {
  justify-content: flex-end;
}

.agency-income-row-list {
  display: grid;
  gap: 18px;
}

.agency-income-row-card {
  border: 1px solid #dbe1ea;
  border-radius: 16px;
  background: #fff;
  padding: 18px;
}

.agency-income-subline {
  font-size: 12px;
  color: #6b7a90;
  padding-top: 2px;
}

@media (max-width: 1200px) {
  .agency-income-form-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .agency-income-field-wide {
    grid-column: span 1;
  }
}

@media (max-width: 700px) {
  .agency-income-form-grid {
    grid-template-columns: 1fr;
  }
}

.agency-expense-row-list {
  display: grid;
  gap: 16px;
}

.expense-view-card,
.expense-edit-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  background: #fff;
}

.expense-view-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.expense-view-title {
  font-size: 16px;
  color: #111827;
}

.expense-view-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
  color: #6b7280;
}

.expense-view-amount {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}

.expense-view-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.expense-view-stat {
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.expense-view-label {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.expense-view-value {
  display: block;
  font-size: 14px;
  color: #111827;
  font-weight: 600;
}

.expense-view-notes {
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 12px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  color: #374151;
}

.expense-view-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.mode-view .expense-view-card {
  display: block;
}

.mode-view .expense-edit-card {
  display: none;
}

.mode-edit .expense-view-card {
  display: none;
}

.mode-edit .expense-edit-card {
  display: block;
}

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

@media (max-width: 640px) {
  .expense-view-top {
    flex-direction: column;
  }

  .expense-view-grid {
    grid-template-columns: 1fr;
  }
}

.role-group-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px;
  background: #fff;
  margin-top: 16px;
}

.role-group-card h3 {
  margin: 0 0 12px 0;
  font-size: 15px;
  color: #111827;
}

.role-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.role-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
}

.role-chip input {
  width: auto;
  margin: 0;
}

.role-chip span {
  font-size: 14px;
  color: #111827;
}

@media (max-width: 700px) {
  .role-chip-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================
   RESPONSIVE TABLE -> MOBILE CARDS
================================ */

@media (max-width: 760px) {
  .responsive-table {
    border: 0;
    width: 100%;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tr {
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
  }

  .responsive-table td {
    border: 0;
    padding: 6px 0;
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
  }

  .responsive-table td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .responsive-table td.text-right {
    text-align: left;
  }

  .responsive-table td.actions-cell {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
  }

  .responsive-table td.actions-cell::before {
    display: none;
  }
}

.actions-cell a {
  font-weight: 600;
  color: #1d4ed8;
  text-decoration: none;
}

.actions-cell a:hover {
  text-decoration: underline;
}

.actions-cell form {
  display: inline;
}

.actions-cell .btn {
  padding: 4px 10px;
  font-size: 12px;
}

/* Compact table action buttons on desktop */
@media (min-width: 761px) {
  .responsive-table td.actions-cell {
    white-space: nowrap;
  }

  .responsive-table td.actions-cell form {
    display: inline-block !important;
    margin: 0 0 0 8px !important;
    width: auto !important;
  }

  .responsive-table td.actions-cell .btn,
  .responsive-table td.actions-cell button {
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 5px 10px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    border-radius: 9px !important;
    display: inline-flex !important;
  }
}

@media (min-width: 761px) {
  .responsive-table td.actions-cell .btn-danger-inline,
  .responsive-table td.actions-cell .btn-secondary-inline {
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 6px 10px !important;
    font-size: 12px !important;
    border-radius: 9px !important;
  }
}

/* Small inline action buttons (mobile + desktop) */
.btn-danger-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 6px 10px;
  font-size: 12px;
  border-radius: 10px;

  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;

  width: auto;
  min-width: 0;
}

/* prevent mobile full-width stretching */
.btn-danger-inline,
.btn-secondary-inline {
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .agency-income-form-grid {
    grid-template-columns: 1fr !important;
  }

  .agency-income-field,
  .agency-income-field-wide,
  .agency-income-field-actions {
    grid-column: auto !important;
  }

  .agency-expense-row-card {
    padding: 0 !important;
  }

  .expense-view-top {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 10px;
  }

  .expense-view-amount {
    font-size: 20px;
  }

  .expense-view-grid {
    grid-template-columns: 1fr !important;
  }

  .expense-view-actions,
  .table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .expense-view-actions .btn-secondary-inline,
  .expense-view-actions .btn-linkish,
  .table-actions .btn-linkish {
    width: auto !important;
    min-width: 0 !important;
    padding: 7px 10px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
  }

  .danger-link {
    color: #dc2626 !important;
  }
}

.agency-expense-mobile-cards {
  display: none;
}

.agency-expense-desktop-table {
  display: block;
}

@media (max-width: 760px) {
  .agency-expense-desktop-table {
    display: none;
  }

  .agency-expense-mobile-cards {
    display: block;
  }
}

/* Agency Expenses hybrid desktop table / edit cards */
.agency-expenses-page.mode-view .expense-edit-card {
  display: none;
}

.agency-expenses-page.mode-edit .agency-expense-desktop-table {
  display: none;
}

.agency-expenses-page.mode-edit .agency-expense-mobile-cards {
  display: grid;
  gap: 14px;
}

.agency-expenses-page.mode-edit .expense-view-card {
  display: none;
}

.agency-expenses-page.mode-edit .expense-edit-card {
  display: block;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.table-actions form {
  margin: 0;
}

.table-actions .btn-linkish {
  padding: 0;
  font-size: 13px;
  white-space: nowrap;
}

.table-actions .danger-link {
  color: #dc2626;
}

.agency-income-mobile-cards {
  display: none;
}

.agency-income-desktop-table {
  display: block;
}

.agency-income-page.mode-view .expense-edit-card {
  display: none;
}

.agency-income-page.mode-edit .agency-income-desktop-table {
  display: none;
}

.agency-income-page.mode-edit .agency-income-mobile-cards {
  display: grid;
  gap: 14px;
}

.agency-income-page.mode-edit .expense-view-card {
  display: none;
}

.agency-income-page.mode-edit .expense-edit-card {
  display: block;
}

@media (max-width: 760px) {
  .agency-income-desktop-table {
    display: none;
  }

  .agency-income-mobile-cards {
    display: grid;
    gap: 14px;
  }
}

.form-accordion {
  margin-bottom: 20px;
}

.collapsible-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 0;
}

.collapsible-summary::-webkit-details-marker {
  display: none;
}

.collapsible-summary h2 {
  margin: 0;
}

.collapsible-summary p {
  margin: 6px 0 0;
}

.collapsible-summary span {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eef4ff;
  color: #102647;
  font-weight: 900;
}

.form-accordion[open] .collapsible-summary span {
  transform: rotate(45deg);
}

.collapsible-body {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #edf2f7;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  align-items: end;
}

.filter-bar select,
.filter-bar input {
  min-height: 42px;
}

.income-filter-bar {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.income-total-row td {
  background: #f8fafc;
  border-top: 2px solid #dbe4f0;
  font-weight: 800;
}

/* =========================================================
   FINANCIAL MODULES OVERRIDES & SERVICE CHARGES
========================================================= */

.date-col {
  width: 90px;
}
.amount-col {
  width: 90px;
}
.status-col {
  width: 120px;
}
.net-col {
  width: 85px;
}
.vat-col {
  width: 75px;
}
.gross-col {
  width: 85px;
}

/* Lower breakpoint for financial modules to support 3/4 desktop layouts */
@media (max-width: 900px) {
  .agency-income-desktop-table,
  .agency-expense-desktop-table {
    display: none !important;
  }

  .agency-income-mobile-cards,
  .agency-expense-mobile-cards {
    display: grid !important;
    gap: 14px;
  }
}

.service-charge-card {
  padding: 0;
}

.service-charge-table,
.history-table {
  width: 100%;
}

.service-charge-table th,
.service-charge-table td,
.history-table th,
.history-table td {
  padding: 11px 12px;
  vertical-align: top;
  line-height: 1.4;
}

.status-pill,
.coverage-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-agency_paid,
.coverage-covered {
  background: #ecfdf5;
  color: #047857;
}
.status-landlord_paid {
  background: #eef2ff;
  color: #3730a3;
}
.status-invoiced,
.status-missing,
.coverage-unpaid {
  background: #fff7ed;
  color: #9a3412;
}
.coverage-soon {
  background: #fef3c7;
  color: #92400e;
}
.coverage-overdue {
  background: #fee2e2;
  color: #991b1b;
}
.coverage-not_required_freehold,
.coverage-not_full_management,
.coverage-landlord_handles {
  background: #e2e8f0;
  color: #475569;
}

.muted-small {
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}
.cell-dash {
  color: #94a3b8;
}

.service-charge-note {
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  font-weight: 700;
}

.requirement-editor {
  display: none !important;
  width: 100%;
  max-width: 160px;
  padding: 7px 9px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-weight: 700;
}

.requirement-form.is-editing .coverage-display {
  display: none;
}
main .requirement-form.is-editing .requirement-editor {
  display: block !important;
}

.service-charge-table tr.is-excluded td:not(.property-cell) {
  color: #94a3b8;
  background: #f8fafc;
}
.service-charge-table tr.is-excluded .muted-small {
  color: #94a3b8;
}
.service-charge-table tr.is-excluded .coverage-pill {
  background: #e2e8f0;
  color: #64748b;
}
.service-charge-table tr.is-excluded .actions-cell a {
  pointer-events: none;
  opacity: 0.42;
  filter: grayscale(1);
}

@media (max-width: 900px) {
  .service-charge-table,
  .history-table {
    display: block !important;
    width: 100%;
    border: 0;
  }

  .service-charge-table thead,
  .history-table thead {
    display: none;
  }

  .service-charge-table tbody,
  .history-table tbody,
  .service-charge-table tr,
  .history-table tr,
  .service-charge-table td,
  .history-table td {
    display: block;
    width: 100%;
  }

  .service-charge-table tr,
  .history-table tr {
    box-sizing: border-box;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: #fff;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
  }

  .service-charge-table td {
    padding: 8px 0;
    border: 0;
    display: grid !important;
    grid-template-columns: 120px 1fr !important;
    gap: 12px;
    align-items: start;
  }

  .service-charge-table td::before,
  .history-table td::before {
    content: attr(data-label);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .service-charge-table td.property-cell,
  .history-table td.property-cell {
    display: block !important;
    padding-top: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 8px;
  }

  .service-charge-table td.property-cell::before,
  .service-charge-table td.actions-cell-wrap::before,
  .history-table td.actions-cell-wrap::before {
    display: none !important;
  }
}

.table-wrap {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1rem;
  width: 100%;
  max-width: 100%;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}
