/* Gaya dasar aplikasi pelanggan WiFi */
:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #1f2933;
  background: #f3f6f4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

header {
  padding: 32px max(20px, calc((100% - 960px) / 2));
  color: #ffffff;
  background: #147d55;
}

header h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 5vw, 34px);
}

header p {
  margin: 0;
  color: #e3f4eb;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(960px, 100%);
  margin: 22px auto 0;
}

.main-nav a {
  padding: 9px 14px;
  color: #e3f4eb;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
}

.main-nav a:hover,
.main-nav a.active {
  color: #147d55;
  background: #ffffff;
}

main {
  width: min(960px, calc(100% - 32px));
  margin: 28px auto;
}

section {
  padding: 24px;
  background: #ffffff;
  border: 1px solid #e0e8e3;
  border-radius: 12px;
  box-shadow: 0 5px 18px rgb(26 60 43 / 6%);
}

section h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

section p {
  margin: 0;
  color: #64736a;
  line-height: 1.6;
}

@media (max-width: 600px) {
  header {
    padding-top: 24px;
    padding-bottom: 24px;
  }

  main {
    margin-top: 18px;
  }

  section {
    padding: 18px;
  }
}

/* Owner portal: separate read-only dashboard sharing the admin database. */
.owner-login-page {
  background: radial-gradient(circle at 12% 8%, #e4f6ef 0, transparent 34%), #eef3f5;
}

.owner-login-page .login-card { border-top: 5px solid #168c82; }

.owner-login-link {
  display: block;
  margin-top: 20px;
  color: #087f7f;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.owner-login-link:hover { text-decoration: underline; }
.owner-page { min-height: 100vh; background: #f2f6f5; }
.owner-header { box-shadow: 0 6px 24px rgb(31 69 62 / 7%); }
.owner-access-badge { padding: 8px 12px; border-radius: 999px; background: #e8f5f0; color: #147d55; font-size: 12px; font-weight: 750; }
.owner-main { display: grid; gap: 20px; width: min(1360px, calc(100% - 32px)); max-width: 1360px; margin: 0 auto; padding: 28px 24px 48px; }
.owner-welcome { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 24px 28px; border-radius: 18px; background: linear-gradient(120deg, #173a4b, #087f7f); color: #fff; box-shadow: 0 12px 30px rgb(19 63 72 / 13%); }
.owner-welcome .eyebrow { color: #b7ece2; }
.owner-welcome h2 { margin: 5px 0 7px; font-size: clamp(25px, 3vw, 34px); }
.owner-welcome p { margin: 0; color: #d8e9e8; }
.owner-period { flex: 0 0 auto; padding: 9px 13px; border: 1px solid rgb(255 255 255 / 24%); border-radius: 9px; color: #fff; font-size: 13px; }
.owner-section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 12px; }
.owner-section-title h3 { margin: 0; color: #203b43; font-size: 18px; }
.owner-section-title p { margin: 4px 0 0; color: #77868a; font-size: 13px; }
.owner-metrics { display: grid; gap: 12px; }
.owner-customer-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.owner-finance-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.owner-metric { display: grid; align-content: space-between; gap: 11px; min-width: 0; min-height: 104px; padding: 16px; border: 1px solid #e2ebe7; border-radius: 13px; background: #fff; box-shadow: 0 4px 14px rgb(37 68 58 / 4%); }
.owner-metric span { color: #71817c; font-size: 13px; }
.owner-metric strong { overflow-wrap: anywhere; color: #243d43; font-size: clamp(18px, 2vw, 24px); }
.owner-metric small { margin-top: -6px; color: #87938f; font-size: 11px; }
.owner-metric.metric-income strong { color: #137a59; }
.owner-metric.metric-expense strong { color: #b6533d; }
.owner-panel { min-width: 0; padding: 20px; border: 1px solid #e2ebe7; border-radius: 15px; background: #fff; box-shadow: 0 5px 18px rgb(37 68 58 / 4%); }
.owner-chart-legend { display: flex; gap: 18px; margin: 0 0 12px; color: #697a78; font-size: 12px; }
.owner-chart-legend span { display: flex; align-items: center; gap: 7px; }
.owner-chart-legend i { width: 9px; height: 9px; border-radius: 50%; }
.legend-income { background: #078f92; }
.legend-expense { background: #f4a340; }
.owner-month-chart, .owner-category-list, .owner-recent-list { display: grid; gap: 11px; }
.owner-month-row { display: grid; grid-template-columns: 120px minmax(120px, 1fr) minmax(180px, auto); align-items: center; gap: 14px; }
.owner-month-label { color: #526761; font-size: 13px; }
.owner-month-bars { display: grid; gap: 5px; }
.owner-bar-line { height: 7px; overflow: hidden; border-radius: 99px; background: #eff3f1; }
.owner-bar-line span { display: block; height: 100%; min-width: 0; border-radius: inherit; }
.owner-bar-line.income span { background: #078f92; }
.owner-bar-line.expense span { background: #f4a340; }
.owner-month-values { color: #788681; font-size: 11px; text-align: right; }
.owner-lower-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 16px; }
.owner-category-row { display: grid; gap: 7px; }
.owner-category-heading { display: flex; justify-content: space-between; gap: 12px; color: #4f625c; font-size: 13px; }
.owner-category-heading span { color: #213e42; font-weight: 700; }
.owner-category-track { height: 7px; overflow: hidden; border-radius: 99px; background: #eef3f1; }
.owner-category-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #e99a51, #ec7351); }
.owner-recent-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #edf1ef; }
.owner-recent-row:last-child { border-bottom: 0; }
.owner-recent-row > div { display: grid; gap: 4px; }
.owner-recent-row > div strong { color: #455b56; font-size: 13px; }
.owner-recent-row > div span { color: #87938f; font-size: 11px; }
.owner-recent-row > strong { flex: 0 0 auto; font-size: 13px; }
.owner-recent-row.is-income > strong { color: #147d55; }
.owner-recent-row.is-expense > strong { color: #a3443a; }
.owner-error { padding: 12px 15px; border-radius: 9px; background: #fff0ee; color: #a3332c; }
.owner-footer-note { margin: 0; color: #84918d; font-size: 12px; text-align: center; }

@media (max-width: 900px) {
  .owner-customer-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .owner-month-row { grid-template-columns: 100px minmax(100px, 1fr); }
  .owner-month-values { grid-column: 2; text-align: left; }
}

@media (max-width: 600px) {
  .owner-main { padding: 18px 14px 32px; }
  .owner-welcome { align-items: start; flex-direction: column; padding: 20px; }
  .owner-period { align-self: stretch; }
  .owner-customer-metrics, .owner-finance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .owner-lower-grid { grid-template-columns: 1fr; }
  .owner-panel { padding: 15px; }
  .owner-month-row { grid-template-columns: 80px minmax(90px, 1fr); gap: 9px; }
  .owner-month-label { font-size: 11px; }
  .owner-month-values { font-size: 10px; }
  .owner-header .main-nav { gap: 8px; }
  .owner-access-badge { font-size: 10px; }
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.button {
  padding: 10px 14px;
  color: #ffffff;
  background: #147d55;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.button:hover {
  background: #0f6846;
}

.button-secondary {
  color: #34443a;
  background: #edf2ee;
}

.button-secondary:hover {
  background: #e0e9e3;
}

.customer-form {
  margin: 18px 0;
  padding: 18px;
  background: #f7faf8;
  border: 1px solid #e0e8e3;
  border-radius: 10px;
}

.customer-form h3 {
  margin: 0 0 8px;
}

.customer-form p {
  margin-bottom: 14px;
}

@media (max-width: 480px) {
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

.form-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.form-fields label {
  display: grid;
  gap: 6px;
  color: #405047;
  font-size: 14px;
  font-weight: 700;
}

.form-fields input {
  width: 100%;
  padding: 10px 11px;
  color: #1f2933;
  background: #ffffff;
  border: 1px solid #d9e3dc;
  border-radius: 7px;
  font: inherit;
  font-weight: 400;
}

.form-fields input:focus {
  outline: 2px solid #a8d6bd;
  border-color: #147d55;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.customer-list {
  display: grid;
  gap: 10px;
}

.customer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid #e5ebe7;
  border-radius: 9px;
}

.customer-row h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.customer-row p {
  margin: 0;
  font-size: 13px;
}

.customer-row strong {
  color: #147d55;
  font-size: 14px;
  text-align: right;
}

@media (max-width: 600px) {
  .form-fields {
    grid-template-columns: 1fr;
  }

  .customer-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-row strong {
    text-align: left;
  }
}

.delete-button {
  padding: 8px 11px;
  color: #a43838;
  background: #fff5f5;
  border: 1px solid #f0dada;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.delete-button:hover {
  background: #ffe9e9;
}

.customer-actions {
  display: flex;
  gap: 7px;
}

.edit-button {
  padding: 8px 11px;
  color: #176b49;
  background: #eff8f2;
  border: 1px solid #d4e9db;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.edit-button:hover {
  background: #e1f2e7;
}

@media (max-width: 600px) {
  .customer-actions {
    width: 100%;
  }
}

.billing-info {
  display: grid;
  gap: 4px;
  min-width: 150px;
}

.billing-info strong {
  color: #147d55;
  font-size: 14px;
}

.billing-info > span:not(.payment-status) {
  color: #64736a;
  font-size: 12px;
}

.payment-status {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.payment-status.paid {
  color: #176b49;
  background: #e4f5e9;
}

.payment-status.unpaid {
  color: #986300;
  background: #fff3d7;
}

.payment-button {
  padding: 8px 10px;
  color: #176b49;
  background: #eff8f2;
  border: 1px solid #d4e9db;
  border-radius: 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.payment-button:hover {
  background: #e1f2e7;
}

.whatsapp-button {
  padding: 8px 10px;
  color: #126b43;
  background: #e9f8ef;
  border: 1px solid #ccebd7;
  border-radius: 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.whatsapp-button:hover {
  background: #daf2e3;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e0e8e3;
  border-radius: 10px;
  box-shadow: 0 5px 18px rgb(26 60 43 / 5%);
}

.summary-card span {
  color: #64736a;
  font-size: 13px;
}

.summary-card strong {
  color: #147d55;
  font-size: 22px;
}

@media (max-width: 700px) {
  .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  .summary-card {
    padding: 13px;
  }

  .summary-card strong {
    font-size: 19px;
  }
}

.customer-tools {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto minmax(150px, 190px);
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.customer-tools label {
  color: #526057;
  font-size: 13px;
  font-weight: 700;
}

.customer-tools input,
.customer-tools select {
  min-width: 0;
  padding: 10px 11px;
  color: #1f2933;
  background: #ffffff;
  border: 1px solid #d9e3dc;
  border-radius: 7px;
  font: inherit;
}

@media (max-width: 700px) {
  .customer-tools {
    grid-template-columns: 1fr 2fr;
  }
}

.heading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button-secondary {
  color: #176b49;
  background: #eff8f2;
  border: 1px solid #d4e9db;
}

.button-secondary:hover {
  background: #e1f2e7;
}

@media (max-width: 600px) {
  .heading-actions {
    width: 100%;
  }

  .heading-actions .button {
    flex: 1;
  }
}

.customer-status {
  display: inline-block;
  width: fit-content;
  margin-top: 7px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.customer-status.active {
  color: #176b49;
  background: #e4f5e9;
}

.customer-status.stopped {
  color: #6e7370;
  background: #edf0ee;
}

.stop-button,
.activate-button {
  padding: 8px 10px;
  border: 1px solid #e0e5e2;
  border-radius: 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.stop-button {
  color: #8a4a26;
  background: #fff6ed;
  border-color: #f0dfce;
}

.activate-button {
  color: #176b49;
  background: #eff8f2;
  border-color: #d4e9db;
}

.customer-stopped {
  background: #fafbfa;
}

.customer-stopped h3 {
  color: #69736d;
}

@media (min-width: 701px) {
  .summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.modem-status {
  color: #526057 !important;
  font-size: 12px;
}

.modem-button {
  padding: 8px 10px;
  color: #176b49;
  background: #eff8f2;
  border: 1px solid #d4e9db;
  border-radius: 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.modem-button:hover {
  background: #e1f2e7;
}

.brand-header {
  background: linear-gradient(120deg, #116846, #16835a);
}

.brand-lockup {
  width: min(960px, 100%);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-logo {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  color: #147d55;
  background: #ffffff;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 17px;
  box-shadow: 0 6px 18px rgb(0 0 0 / 12%);
}

.brand-logo svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
}

.brand-logo circle {
  fill: currentColor;
  stroke: none;
}

.brand-header h1 {
  margin: 0 0 5px;
  font-size: clamp(25px, 5vw, 34px);
  letter-spacing: -.5px;
}

.brand-header p {
  margin: 0;
  color: #e3f4eb;
  font-size: 14px;
}

@media (max-width: 600px) {
  .brand-lockup {
    gap: 12px;
  }

  .brand-logo {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
    border-radius: 14px;
  }

  .brand-logo svg {
    width: 34px;
    height: 34px;
  }
}

.form-note {
  margin: 6px 0 14px;
  color: #64736a;
  font-size: 13px;
}

.form-fields select {
  width: 100%;
  padding: 10px 11px;
  color: #1f2933;
  background: #ffffff;
  border: 1px solid #d9e3dc;
  border-radius: 7px;
  font: inherit;
}

.finance-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 22px;
}

.finance-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -6px 0 24px;
}

.finance-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  background: #f8faf9;
  border: 1px solid #e0e8e3;
  border-radius: 9px;
}

.finance-card span,
.transaction-row span {
  color: #64736a;
  font-size: 13px;
}

.finance-card strong {
  color: #147d55;
  font-size: 18px;
}

.finance-note {
  margin: 0 0 16px !important;
  font-size: 13px;
}

.employee-manager {
  display: grid;
  gap: 14px;
  margin: 20px 0;
  padding: 18px;
  background: #f9fbfa;
  border-color: #e5ebe7;
  box-shadow: none;
}

.employee-form {
  display: grid;
  gap: 7px;
  color: #405047;
  font-size: 14px;
  font-weight: 700;
}

.employee-form h4 {
  margin: 0;
}

.employee-add-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.employee-add-grid label {
  display: grid;
  gap: 6px;
}

.employee-add-grid input {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #d9e3dc;
  border-radius: 7px;
  font: inherit;
  font-weight: 400;
}

.employee-details {
  display: grid;
  gap: 4px;
  min-width: 160px;
}

.employee-details span {
  color: #64736a;
  font-size: 12px;
}

.transaction-helper {
  margin: -3px 0 12px !important;
  padding: 10px 12px;
  color: #325b44 !important;
  background: #edf7f0;
  border: 1px solid #d6ebdd;
  border-radius: 8px;
  font-size: 13px;
}

.employee-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.employee-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 9px 7px 12px;
  background: #ffffff;
  border: 1px solid #e3eae5;
  border-radius: 9px;
  font-size: 13px;
}

.employee-empty {
  font-size: 13px;
}

[hidden] {
  display: none !important;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 5px;
  color: #147d55;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.2px;
}

.accounting-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 22px;
}

.accounting-card {
  display: grid;
  gap: 10px;
  min-height: 140px;
  padding: 20px;
  color: #ffffff;
  border-radius: 14px;
  box-shadow: 0 10px 24px rgb(31 41 51 / 9%);
}

.accounting-card span {
  font-size: 14px;
  font-weight: 700;
  opacity: .9;
}

.accounting-card strong {
  align-self: center;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -.5px;
  overflow-wrap: anywhere;
}

.accounting-card small {
  opacity: .82;
}

.income-card { background: linear-gradient(135deg, #13855d, #28a879); }
.expense-card { background: linear-gradient(135deg, #db704c, #ee9860); }
.balance-card { background: linear-gradient(135deg, #345f9a, #588bc5); }
.balance-card strong.negative { color: #ffe0d8; }

.statistics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, 1fr);
  gap: 16px;
  margin: 22px 0;
}

.statistics-panel {
  min-width: 0;
  padding: 20px;
  background: #fbfcfb;
  border: 1px solid #e4ebe6;
  border-radius: 12px;
}

.panel-heading h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.panel-heading p {
  color: #748178;
  font-size: 12px;
}

.chart-legend {
  display: flex;
  gap: 16px;
  margin: 17px 0 12px;
  color: #66736b;
  font-size: 12px;
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-income { background: #16865f; }
.legend-expense { background: #eb8b5d; }

.daily-chart-scroll {
  width: 100%;
  overflow-x: auto;
  padding: 8px 0 4px;
  scrollbar-color: #b7c9bd transparent;
}

.daily-chart-scroll svg {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
  overflow: visible;
}

.chart-gridline {
  stroke: #e8eeea;
  stroke-width: 1;
}

.chart-axis-label {
  fill: #7b8880;
  font-family: Arial, sans-serif;
  font-size: 11px;
}

.chart-date-label { text-transform: capitalize; }

.daily-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.daily-line-income { stroke: #16865f; }
.daily-line-expense { stroke: #eb8b5d; }

.daily-point {
  stroke: #ffffff;
  stroke-width: 1.5;
  cursor: help;
}

.daily-point-income { fill: #16865f; }
.daily-point-expense { fill: #eb8b5d; }

.expense-breakdown { margin-top: 16px; }
.expense-donut-layout {
  display: grid;
  grid-template-columns: minmax(150px, .85fr) minmax(130px, 1.15fr);
  align-items: center;
  gap: 18px;
}
.expense-donut { display: block; width: min(100%, 220px); margin: 0 auto; overflow: visible; }
.expense-donut-track,
.expense-donut-slice { fill: none; stroke-width: 16; }
.expense-donut-track { stroke: #e9efeb; }
.expense-donut-slice { stroke-linecap: butt; }
.expense-donut-total { fill: #25372e; font-size: 10px; font-weight: 800; text-anchor: middle; }
.expense-donut-caption { fill: #7b8981; font-size: 6px; font-weight: 700; letter-spacing: .8px; text-anchor: middle; }
.expense-legend { display: grid; gap: 11px; }
.expense-legend-row,
.expense-legend-label,
.expense-legend-values { display: flex; align-items: center; }
.expense-legend-row { justify-content: space-between; gap: 8px; }
.expense-legend-label { min-width: 0; gap: 8px; color: #53645b; font-size: 12px; }
.expense-legend-label i { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--category-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--category-color) 16%, white); }
.expense-legend-label span { overflow: hidden; text-overflow: ellipsis; }
.expense-legend-values { flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 2px; }
.expense-legend-values strong { color: #26342c; font-size: 12px; white-space: nowrap; }
.expense-legend-values small { color: #8a968f; font-size: 10px; }


.category-track {
  height: 9px;
  overflow: hidden;
  background: #edf1ee;
  border-radius: 99px;
}

.chart-empty {
  margin-top: 22px !important;
  font-size: 13px;
}

.finance-shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 6px 0 24px;
  padding: 18px;
  background: linear-gradient(135deg, #e9f6f2, #f5f8ff);
  border: 1px solid #dbece4;
  border-radius: 16px;
}

.transaction-heading {
  margin: 20px 0 10px;
  font-size: 16px;
}

.transaction-history-toolbar {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
}

.transaction-history-toolbar label {
  color: #40534a;
  font-size: 13px;
  font-weight: 600;
}

.transaction-history-toolbar input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  color: #1d2b24;
  background: #fff;
  border: 1px solid #d5dfd9;
  border-radius: 9px;
  font: inherit;
}

.transaction-history-toolbar input:focus-visible {
  border-color: #078f92;
  outline: 3px solid rgb(7 143 146 / 15%);
}

.transaction-history-toolbar span {
  color: #718078;
  font-size: 12px;
  white-space: nowrap;
}

.transaction-history-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.transaction-history-filters label {
  display: grid;
  gap: 5px;
  color: #53645b;
  font-size: 12px;
  font-weight: 600;
}

.transaction-history-filters select,
.transaction-history-filters input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  color: #26362e;
  background: #fff;
  border: 1px solid #d5dfd9;
  border-radius: 8px;
  font: inherit;
  font-weight: 400;
}

.transaction-history-filters select:focus-visible,
.transaction-history-filters input:focus-visible {
  border-color: #078f92;
  outline: 3px solid rgb(7 143 146 / 15%);
}

.transaction-filter-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.transaction-filter-summary article {
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 76px;
  padding: 12px;
  border: 1px solid #e1ebe5;
  border-radius: 10px;
  background: #f7faf8;
}

.transaction-filter-summary span {
  color: #61736a;
  font-size: 12px;
}

.transaction-filter-summary strong {
  overflow-wrap: anywhere;
  color: #203b32;
  font-size: 16px;
}

.transaction-filter-summary .filtered-income strong { color: #147d55; }
.transaction-filter-summary .filtered-expense strong { color: #a43838; }

.transaction-list {
  display: grid;
  gap: 8px;
}

.transaction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid #e5ebe7;
  border-radius: 9px;
}

.transaction-row > div {
  display: grid;
  gap: 4px;
}

.transaction-amount.income {
  color: #147d55;
}

.transaction-amount.expense {
  color: #a43838;
}

@media (max-width: 600px) {
  .transaction-filter-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .accounting-summary {
    grid-template-columns: 1fr;
  }

  .accounting-card {
    min-height: 120px;
  }

  .statistics-grid {
    grid-template-columns: 1fr;
  }

  .download-actions {
    width: 100%;
  }

  .download-actions .button {
    flex: 1;
  }

  .finance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .expense-donut-layout { grid-template-columns: minmax(110px, .8fr) minmax(110px, 1.2fr); gap: 10px; }
  .finance-shortcuts a { flex: 1 1 100%; text-align: center; }

  .employee-add-grid {
    grid-template-columns: 1fr;
  }

  .transaction-row {
    grid-template-columns: 1fr auto;
  }

  .transaction-history-toolbar {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .transaction-history-toolbar span {
    white-space: normal;
  }

  .transaction-history-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .transaction-row .delete-button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 380px) {
  .finance-summary {
    grid-template-columns: 1fr;
  }

  .transaction-history-filters {
    grid-template-columns: 1fr;
  }
}

/* Polished dashboard styling for the finance page. */
.finance-page {
  color: #1d2b24;
  background:
    radial-gradient(ellipse at 95% 10%, rgb(203 233 216 / 42%), transparent 28rem),
    #f2f6f3;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.finance-page header {
  background: linear-gradient(118deg, #0c513d, #147d55 55%, #1c9367);
  box-shadow: 0 10px 30px rgb(18 77 55 / 15%);
}

.finance-page main {
  width: min(1120px, calc(100% - 36px));
  margin-top: 34px;
  margin-bottom: 48px;
}

.finance-page main > section {
  padding: clamp(20px, 3.2vw, 34px);
  border: 1px solid rgb(219 229 222 / 90%);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgb(31 65 47 / 8%);
}

.finance-page #finance-heading {
  margin: 0;
  font-size: clamp(24px, 3vw, 30px);
  letter-spacing: -.7px;
}

.finance-page .section-heading { margin-bottom: 22px; }

.finance-page .accounting-card {
  min-height: 154px;
  padding: 22px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgb(31 41 51 / 10%);
}

.finance-page .finance-card {
  padding: 15px 17px;
  border-radius: 12px;
}

.finance-page .statistics-panel {
  padding: 22px;
  background: linear-gradient(160deg, #ffffff, #fbfdfb);
  border-color: #e3ebe5;
  border-radius: 16px;
  box-shadow: 0 7px 22px rgb(35 64 47 / 4%);
}

.finance-page .button {
  border-radius: 9px;
  box-shadow: 0 3px 8px rgb(27 89 62 / 12%);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.finance-page .button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgb(27 89 62 / 16%);
}

.finance-page .customer-form,
.finance-page .employee-manager { border-radius: 13px; }

/* Investor portal and administration */
.investor-login-page .login-card { border-top: 5px solid #0d9488; }
.investor-page .main-nav { align-items: center; justify-content: flex-end; }
.investor-page .main-nav span { margin: auto 8px auto 0; font-weight: 700; }
.investor-page h2,
.investor-admin-page h2 { margin: 0; }
.investor-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 12px;
  color: #116450;
  background: #e2f5ec;
  border: 1px solid #b9e6d0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.investor-status.status-pending_validation { color: #855c0a; background: #fff5d9; border-color: #f1d995; }
.investor-status.status-completed { color: #52615a; background: #eef1ef; border-color: #dce2de; }
.investor-status.status-lockup { color: #5140a0; background: #efedff; border-color: #d4cef8; }
.investor-portfolio-card { position: relative; overflow: hidden; margin: 0 0 18px; padding: clamp(18px, 3vw, 30px); background: radial-gradient(circle at 92% 8%, rgb(106 228 195 / 34%), transparent 28%), linear-gradient(128deg, #123f50 0%, #087f80 55%, #0b987e 100%); border: 1px solid rgb(255 255 255 / 42%); border-radius: 24px; box-shadow: 0 18px 44px rgb(12 79 75 / 17%); }
.investor-portfolio-head { position: relative; display: flex; justify-content: flex-start; align-items: center; gap: 20px; min-height: 96px; margin-bottom: 22px; }
.investor-profile-block { display: flex; align-items: center; gap: 17px; min-width: 0; }
.investor-avatar-wrap { position: relative; flex: 0 0 88px; width: 88px; height: 88px; display: grid; place-items: center; color: #176a68; background: linear-gradient(145deg, #fff, #c8f7e8); border: 3px solid rgb(255 255 255 / 82%); border-radius: 50%; box-shadow: 0 7px 20px rgb(0 0 0 / 18%); }
.investor-profile-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.investor-profile-initials { font-size: 25px; font-weight: 850; letter-spacing: .04em; }
.investor-photo-button { position: absolute; right: -3px; bottom: -3px; display: grid; width: 32px; height: 32px; place-items: center; padding: 6px; color: #fff; background: #173f51; border: 2px solid #fff; border-radius: 50%; cursor: pointer; box-shadow: 0 3px 8px rgb(0 0 0 / 20%); }
.investor-photo-button:hover { background: #126b67; }
.investor-photo-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.investor-profile-copy { display: grid; justify-items: start; gap: 5px; min-width: 0; }
.investor-portfolio-eyebrow { color: #b9f3e2; font-size: 11px; font-weight: 850; letter-spacing: .15em; }
.investor-profile-copy h2 { color: #fff; font-size: clamp(22px, 3vw, 31px); letter-spacing: -.025em; }
.investor-profile-copy > p { margin: 0; color: rgb(255 255 255 / 88%); font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.investor-profile-copy .investor-status { margin-top: 3px; }
.investor-photo-message { color: #c6f4e7; font-size: 11px; }
.investor-photo-message.is-error { color: #ffe3c4; }
.investor-photo-message.is-success { color: #c1ffd5; }
.investor-summary-grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.investor-summary-card { display: grid; gap: 10px; min-width: 0; min-height: 126px; padding: 17px; background: linear-gradient(145deg, rgb(255 255 255 / 98%), rgb(242 250 247 / 96%)); border: 1px solid rgb(223 240 233 / 92%); border-radius: 17px; box-shadow: 0 8px 20px rgb(6 49 48 / 12%); transition: transform .18s ease, box-shadow .18s ease; }
.investor-summary-card:hover { transform: translateY(-2px); box-shadow: 0 12px 25px rgb(6 49 48 / 16%); }
.investor-summary-label { display: flex; align-items: center; gap: 9px; color: #61736d; font-size: 12px; font-weight: 700; }
.investor-summary-icon { display: inline-grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; color: #087f80; background: #e3f5ef; border-radius: 10px; font-size: 12px; font-weight: 850; }
.investor-summary-card strong { color: #173c4d; font-size: clamp(17px, 2vw, 23px); line-height: 1.2; overflow-wrap: anywhere; }
.investor-summary-card small { color: #81908b; font-size: 11px; line-height: 1.35; }
.investor-summary-card.summary-monthly .investor-summary-icon { color: #2874ba; background: #e9f2ff; }
.investor-summary-card.summary-paid .investor-summary-icon { color: #188354; background: #e5f6e9; }
.investor-summary-card.summary-pending .investor-summary-icon { color: #a27014; background: #fff3dc; }
.investor-notice { margin: 0 0 18px; padding: 14px 16px; color: #72510d; background: #fff6df; border: 1px solid #efd99c; border-radius: 12px; }
.investor-formula { margin: 0 0 18px; padding: 20px; background: linear-gradient(125deg, #eaf7f3, #eef4ff); border: 1px solid #d9e9e2; border-radius: 16px; }
.investor-formula h3 { margin: 0 0 10px; }
.investor-formula p { margin: 0 0 10px; line-height: 1.65; }
.investor-formula small { color: #6d7b73; line-height: 1.55; }
.investor-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.investor-bank-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; margin: 0; border-bottom: 1px solid #edf1ee; font-size: 13px; }
.investor-bank-row span { color: #75837a; }
.investor-bank-row strong { text-align: right; overflow-wrap: anywhere; }
.investor-bank-row .investor-bank-brand { display: flex; align-items: center; }
.investor-bsi-logo { display: block; width: 94px; height: 36px; overflow: visible; }
.investor-bsi-wordmark { fill: #008f84; font-family: Arial, sans-serif; font-size: 27px; font-weight: 750; letter-spacing: -1.7px; }
.investor-bsi-star { fill: #f4b323; }
.investor-bsi-caption { fill: #008f84; font-family: Arial, sans-serif; font-size: 6.4px; font-weight: 700; letter-spacing: .2px; }
.investor-document-name,.investor-muted { color: #75837a; font-size: 13px; }
.investor-section-heading { display: flex; justify-content: space-between; align-items: end; gap: 15px; margin: 20px 0 12px; }
.investor-section-heading h3 { margin: 0 0 4px; }
.investor-section-heading p { margin: 0; color: #78847d; font-size: 13px; }
.investor-section-heading label { display: grid; gap: 5px; color: #56665d; font-size: 12px; }
.investor-section-heading select,.investor-dialog input { min-height: 40px; padding: 8px 10px; background: #fff; border: 1px solid #d5dfd9; border-radius: 8px; font: inherit; }
.table-scroll { width: 100%; overflow-x: auto; border: 1px solid #e0e8e3; border-radius: 12px; }
.investor-table { width: 100%; min-width: 620px; border-collapse: collapse; background: #fff; font-size: 13px; }
.investor-table th { padding: 12px; color: #fff; background: #087f80; text-align: left; white-space: nowrap; }
.investor-table td { padding: 12px; border-top: 1px solid #e9efeb; }
.investor-table-amount { color: #147d55; font-weight: 750; white-space: nowrap; }
.investor-payout-status { display: inline-block; padding: 5px 9px; color: #7a5a0d; background: #fff2d2; border-radius: 999px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.investor-payout-status.payout-paid { color: #11694a; background: #e2f5eb; }
.investor-payout-status.payout-processing { color: #365e99; background: #e9f1ff; }
.investor-test-badge { display: inline-flex; width: fit-content; padding: 5px 9px; color: #67440a; background: #fff1c7; border: 1px solid #efd77e; border-radius: 999px; font-size: 11px; font-weight: 800; }
.investor-test-note { color: #75510c; font-weight: 650; }
.investor-test-banner { color: #694b0b; background: #fff6dc; border-color: #eed791; font-weight: 700; }
.investor-test-option { display: flex !important; grid-column: 1 / -1; align-items: flex-start; gap: 9px !important; padding: 12px 14px; color: #67440a !important; background: #fff8e5; border: 1px solid #efdca0; border-radius: 10px; line-height: 1.5; }
.investor-test-option input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: #c48b17; }
.investor-calculator { margin-top: 24px; padding: 20px; background: #fbfcff; border: 1px solid #e0e7f1; border-radius: 16px; }
.investor-range-label,.investor-term-label { display: grid; gap: 10px; margin: 14px 0; color: #53645b; font-size: 13px; }
.investor-range-label strong { color: #126b4e; font-size: 20px; }
.investor-range-label input { width: 100%; accent-color: #138564; }
.investor-term-label select { max-width: 260px; min-height: 40px; padding: 8px 10px; background: #fff; border: 1px solid #d5dfd9; border-radius: 8px; font: inherit; }
.investor-projection { display: grid; grid-template-columns: 1fr auto; gap: 9px 14px; margin: 16px 0; padding: 14px; background: #edf7f2; border-radius: 11px; font-size: 13px; }
.investor-projection span { color: #63746b; }
.investor-projection strong { color: #116b4c; text-align: right; }
.investor-projection-table { margin-top: 14px; }
.investor-topup-list { margin-top: 15px; }
.investor-topup-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #e7ece8; font-size: 13px; }
.investor-updates-section { margin-top: 24px; }
.investor-project-updates,.admin-project-updates { display: grid; gap: 12px; }
.investor-update-card { padding: 16px; background: #fff; border: 1px solid #e1e9e4; border-radius: 12px; }
.investor-update-date { color: #07857d; font-size: 12px; font-weight: 750; }
.investor-update-card h4 { margin: 7px 0; }
.investor-update-card p { margin: 0 0 10px; color: #59675f; line-height: 1.55; white-space: pre-wrap; }
.investor-file-link { display: inline-flex; margin-top: 5px; text-decoration: none; }
.investor-dialog { width: min(520px, calc(100% - 28px)); max-height: min(88vh, 850px); padding: 26px; color: #23342b; border: 1px solid #dce6df; border-radius: 18px; box-shadow: 0 24px 90px rgb(16 39 27 / 30%); }
.investor-dialog::backdrop { background: rgb(15 32 23 / 55%); backdrop-filter: blur(3px); }
.investor-dialog h2 { margin: 5px 0 10px; }
.investor-dialog p { color: #68766e; line-height: 1.55; }
.investor-dialog > label { display: grid; gap: 7px; margin: 12px 0; font-size: 13px; font-weight: 650; }
.dialog-close-row { display: flex; justify-content: flex-end; margin: -10px -5px 10px; }
.dialog-close-row button { width: 36px; height: 36px; color: #526058; background: #edf2ee; border: 0; border-radius: 50%; font-size: 22px; cursor: pointer; }
.investor-receipt-dialog img { display: block; max-width: 100%; max-height: 60vh; margin: 12px auto; border-radius: 8px; }
.investor-admin-note { padding: 14px 16px; color: #475c50; background: #edf7f1; border: 1px solid #dbece2; border-radius: 12px; line-height: 1.55; }
.investor-admin-create,.investor-admin-section { margin: 18px 0; padding: 18px; background: #fbfdfb; border: 1px solid #e1e9e4; border-radius: 15px; }
.investor-admin-create summary { color: #175f47; font-size: 17px; font-weight: 800; cursor: pointer; }
.investor-admin-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 16px; }
.investor-admin-form label { display: grid; align-content: start; gap: 6px; color: #53645b; font-size: 12px; font-weight: 650; }
.investor-admin-form input,.investor-admin-form select,.investor-admin-form textarea,.investor-admin-actions input,.investor-admin-actions select,.admin-payout-actions input,.admin-payout-actions select { width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; color: #27392f; background: #fff; border: 1px solid #d7e1da; border-radius: 8px; font: inherit; font-weight: 400; }
.investor-admin-form .investor-test-option input[type="checkbox"] { flex: 0 0 18px; width: 18px; min-height: 18px; height: 18px; padding: 0; border-radius: 4px; }
.investor-test-option > span { display: grid; gap: 3px; }
.investor-test-option small { color: #786324; font-size: 11px; font-weight: 400; }
.investor-admin-form textarea { resize: vertical; }
.investor-file-field { grid-column: span 2; }
.investor-admin-form-note { grid-column: 1 / -1; margin: 0; color: #6d7c72; font-size: 12px; line-height: 1.5; }
.investor-admin-form > button { justify-self: start; }
.project-update-description { grid-column: 1 / -1; }
.admin-investor-list,.admin-topup-list { display: grid; gap: 14px; }
.admin-investor-card { padding: 17px; background: #fff; border: 1px solid #dfe9e2; border-radius: 14px; box-shadow: 0 4px 14px rgb(27 59 39 / 4%); }
.admin-investor-header { display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.admin-investor-header h4 { margin: 0 0 3px; font-size: 17px; }
.admin-investor-header > div { display: grid; gap: 6px; }
.admin-investor-principal { color: #116c4c; font-size: 19px; white-space: nowrap; }
.admin-investor-details { display: grid; gap: 6px; margin: 14px 0; color: #67756d; font-size: 12px; }
.investor-admin-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 12px; }
.investor-edit-dialog { width: min(820px, calc(100% - 28px)); }
.investor-edit-heading,.investor-edit-actions { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.investor-edit-heading h2 { margin: 5px 0 0; }
.investor-edit-actions { justify-content: flex-end; margin-top: 6px; }
.investor-admin-actions > input[type=date],.investor-admin-actions > select { width: auto; min-width: 150px; }
.investor-admin-actions small { flex: 1 1 100%; }
.investor-status-controls { padding-top: 12px; border-top: 1px solid #edf1ee; }
.admin-payouts-details { margin-top: 14px; padding-top: 12px; border-top: 1px solid #edf1ee; }
.admin-payouts-details summary { color: #175f47; font-weight: 750; cursor: pointer; }
.admin-payout-row,.admin-topup-row { display: grid; gap: 10px; padding: 13px 0; border-bottom: 1px solid #edf1ee; }
.admin-payout-row > div:first-child { display: grid; gap: 4px; }
.admin-payout-actions { display: grid; grid-template-columns: 120px 150px minmax(150px, 1fr) auto auto; gap: 8px; align-items: center; }
.admin-payout-actions input[type=file] { font-size: 11px; }
.admin-topup-row { grid-template-columns: 1fr auto; align-items: center; }
.admin-topup-row .investor-admin-actions { margin: 0; }

.investor-application-page .brand-header { margin-bottom: 12px; }
.investor-application-page main { width: min(100% - 28px, 760px); margin: 26px auto 48px; }
.investor-application-page main > section { padding: clamp(20px, 4vw, 36px); background: #fff; border: 1px solid #e0e9e3; border-radius: 18px; box-shadow: 0 14px 38px rgb(25 57 40 / 8%); }
.investor-application-page h2 { margin: 6px 0; color: #193b4c; }
.investor-application-intro,.investor-application-privacy { color: #627169; line-height: 1.55; }
.investor-application-form { display: grid; gap: 17px; margin-top: 22px; }
.investor-application-form fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; min-width: 0; padding: 17px; border: 1px solid #dce8e1; border-radius: 13px; }
.investor-application-form legend { padding: 0 7px; color: #087f80; font-weight: 800; }
.investor-application-form label { display: grid; align-content: start; gap: 6px; min-width: 0; color: #52635b; font-size: 13px; font-weight: 650; }
.investor-application-form input:not([type=checkbox]),.investor-application-form select,.investor-application-form textarea { width: 100%; min-height: 42px; padding: 9px 11px; color: #25392f; background: #fff; border: 1px solid #d2ded7; border-radius: 9px; font: inherit; font-weight: 400; }
.investor-application-form label small { color: #78867e; font-weight: 400; line-height: 1.4; }
.investor-application-form fieldset:first-of-type label:nth-of-type(3),.investor-application-form fieldset:last-of-type,.investor-application-consents { grid-column: 1 / -1; }
.investor-application-consents { grid-template-columns: 1fr !important; }
.investor-application-form .investor-consent { display: flex; align-items: flex-start; gap: 9px; line-height: 1.5; }
.investor-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: #07857d; }
.investor-application-form > button { justify-self: start; }
.investor-application-alert,.investor-application-success { margin-top: 18px; padding: 18px; border-radius: 12px; }
.investor-application-alert { color: #755319; background: #fff5dc; border: 1px solid #efd99c; }
.investor-application-success { color: #185c45; background: #eaf7f0; border: 1px solid #c8e6d6; }
.investor-application-success h3 { margin: 0 0 6px; }
.investor-application-success p { margin: 0; line-height: 1.55; }
.investor-review-page main { width: min(100% - 28px, 1040px); margin: 26px auto 48px; }
.investor-review-card { padding: clamp(20px, 4vw, 36px); background: #fff; border: 1px solid #e0e9e3; border-radius: 18px; box-shadow: 0 14px 38px rgb(25 57 40 / 8%); }
.investor-review-card h2 { margin: 6px 0; color: #193b4c; }
.investor-review-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin: 16px 0 12px; padding: 13px 15px; color: #294a3b; background: #edf7f1; border-radius: 10px; }
.investor-review-document { overflow: hidden; height: min(72vh, 900px); min-height: 580px; border: 1px solid #dce5df; border-radius: 10px; background: #fff; }
.investor-review-document iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.investor-review-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.investor-review-form { margin-top: 20px; padding: 18px; background: #f7faf8; border: 1px solid #e1e9e4; border-radius: 12px; }
.investor-review-form fieldset { display: grid; gap: 13px; padding: 14px; border: 1px solid #dce8e1; border-radius: 10px; }
.investor-review-form legend { padding: 0 7px; color: #087f80; font-weight: 800; }
.investor-review-form .investor-consent { display: flex; align-items: flex-start; gap: 9px; line-height: 1.5; }
.investor-review-form fieldset > label:last-child { display: grid; gap: 6px; color: #52635b; font-size: 13px; font-weight: 650; }
.investor-review-form textarea { width: 100%; padding: 10px; border: 1px solid #d2ded7; border-radius: 9px; font: inherit; }
.investor-review-form > button { margin-top: 12px; }
.investor-review-link-panel { display: grid; gap: 8px; margin-top: 12px; padding: 12px; background: #eff8f6; border: 1px solid #cce5de; border-radius: 10px; color: #305548; }
.investor-review-link-panel p,.investor-review-link-panel small { margin: 0; line-height: 1.45; }
.investor-review-link-value { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.investor-review-link-value input { min-width: 0; padding: 9px; border: 1px solid #cbdcd3; border-radius: 8px; }
.investor-review-link-value small { grid-column: 1 / -1; }
.investor-review-link-panel > .button { justify-self: start; }
.investor-signed-upload { margin-top: 18px; padding: 18px; background: #f3f9f6; border: 1px solid #cfe5d8; border-radius: 12px; }
.investor-signed-upload h3 { margin: 0 0 7px; color: #175f47; }
.investor-signed-upload > p { color: #53645b; line-height: 1.5; }
.investor-signed-upload-form { display: grid; gap: 13px; margin-top: 14px; }
.investor-signed-upload-form > label:not(.investor-consent) { display: grid; gap: 6px; color: #52635b; font-size: 13px; font-weight: 650; }
.investor-signed-upload-form input[type=file] { width: 100%; padding: 10px; background: #fff; border: 1px solid #d2ded7; border-radius: 9px; font: inherit; }
.investor-signed-upload-form .investor-consent { display: flex; align-items: flex-start; gap: 9px; line-height: 1.5; }
.investor-signed-upload-form > button { justify-self: start; }
.investor-signed-document-card { margin: 14px 0; padding: 14px; background: #f5faf7; border: 1px solid #d8e8df; border-radius: 11px; }
.investor-signed-document-card h4 { margin: 0 0 8px; color: #193b4c; }
.investor-signed-document-card > p { margin: 7px 0; color: #53645b; overflow-wrap: anywhere; }
.investor-signed-document-note { width: 100%; min-height: 60px; margin-top: 10px; padding: 9px 10px; border: 1px solid #d7e1da; border-radius: 8px; font: inherit; }
.investor-signed-document-preview { display: block; width: 100%; height: min(70vh, 820px); margin-top: 12px; border: 1px solid #d8e2dc; border-radius: 8px; background: #fff; }
.investor-invitation-form { grid-template-columns: 1fr 180px; }
.investor-invitation-result { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; padding: 13px; background: #edf7f2; border-radius: 10px; }
.investor-invitation-result label { grid-column: 1 / -1; }
.investor-invitation-result span { color: #627169; font-size: 12px; }
.investor-invitation-list,.investor-application-list { display: grid; gap: 12px; margin-top: 14px; }
.investor-invitation-row,.investor-application-card { padding: 15px; background: #fff; border: 1px solid #dfe9e2; border-radius: 12px; }
.investor-invitation-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: #596a61; font-size: 13px; }
.investor-application-card h4 { margin: 0; color: #193b4c; font-size: 17px; }
.investor-application-meta { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px 14px; margin: 12px 0; color: #586a61; font-size: 13px; overflow-wrap: anywhere; }
.investor-application-terms { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding-top: 12px; border-top: 1px solid #edf1ee; }
.investor-application-terms label { display: grid; gap: 5px; color: #52635b; font-size: 12px; font-weight: 650; }
.investor-application-terms input,.investor-application-terms textarea,.investor-application-terms select { width: 100%; min-height: 38px; padding: 8px 9px; border: 1px solid #d7e1da; border-radius: 8px; font: inherit; font-weight: 400; }
.investor-application-terms textarea { min-height: 72px; resize: vertical; }
.investor-application-terms .wide { grid-column: 1 / -1; }
.investor-application-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.investor-application-note { width: 100%; min-height: 64px; padding: 8px 10px; border: 1px solid #d7e1da; border-radius: 8px; font: inherit; }
.investor-application-status { display: inline-flex; margin-top: 5px; padding: 5px 9px; color: #775a12; background: #fff2d2; border-radius: 999px; font-size: 11px; font-weight: 750; }
.investor-application-status.status-draft_ready { color: #135f48; background: #e2f5eb; }
.investor-application-card .investor-admin-form-note { margin-top: 10px; }

@media print {
  .investor-contract-print { max-width: 800px; margin: 20px auto; color: #111; font-family: Georgia, serif; line-height: 1.55; }
  .investor-contract-print h1,.investor-contract-print h2 { text-align: center; }
  .investor-contract-print table { width: 100%; border-collapse: collapse; }
  .investor-contract-print td,.investor-contract-print th { padding: 6px; border: 1px solid #999; text-align: left; }
  .investor-contract-draft-warning { padding: 10px; border: 2px solid #a33; color: #a33; font-weight: 700; text-align: center; }
}

@media (max-width: 900px) {
  .investor-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .investor-admin-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-payout-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .investor-summary-grid,.investor-detail-grid,.investor-admin-form { grid-template-columns: 1fr; }
  .investor-section-heading { align-items: stretch; flex-direction: column; }
  .investor-section-heading select { width: 100%; }
  .investor-file-field,.project-update-description { grid-column: auto; }
  .admin-investor-header { flex-direction: column; }
  .admin-payout-actions { grid-template-columns: 1fr; }
  .admin-topup-row { grid-template-columns: 1fr; }
  .investor-admin-actions > input[type=date],.investor-admin-actions > select { flex: 1 1 100%; width: 100%; }
}

@media (max-width: 600px) {
  .investor-portfolio-card { padding: 17px; border-radius: 19px; }
  .investor-portfolio-head { align-items: flex-start; margin-bottom: 17px; }
  .investor-profile-block { align-items: flex-start; gap: 13px; }
  .investor-avatar-wrap { flex-basis: 70px; width: 70px; height: 70px; }
  .investor-profile-initials { font-size: 21px; }
  .investor-profile-copy h2 { font-size: 22px; }
  .investor-summary-card { min-height: 110px; padding: 15px; }
  .investor-summary-card strong { font-size: 20px; }
  .investor-summary-card small { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .investor-summary-card { transition: none; }
  .investor-summary-card:hover { transform: none; }
}

@media (max-width: 600px) {
  .finance-page main {
    width: min(100% - 22px, 1120px);
    margin-top: 18px;
  }

  .finance-page main > section {
    padding: 18px 14px;
    border-radius: 16px;
  }

  .finance-page .section-heading { gap: 14px; }

  .finance-page .download-actions { flex-direction: column; }

  .finance-page .download-actions .button { width: 100%; }
}

/* Admin sign-in */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at top left, #dff7f2, transparent 38%), #f4f7fb;
}

.login-card {
  width: min(100%, 430px);
  padding: 36px;
  border: 1px solid #e6ebf1;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgb(16 40 70 / 10%);
}

.login-card .brand-logo { width: 54px; height: 54px; margin-bottom: 22px; }
.login-card .eyebrow { margin: 0 0 8px; color: #087e70; font-weight: 800; letter-spacing: .12em; }
.login-card h1 { margin: 0 0 8px; font-size: 1.8rem; }
.login-description { margin: 0 0 24px; color: #667085; }
.login-card form { display: grid; gap: 16px; }
.login-card label { display: grid; gap: 7px; font-weight: 650; }
.login-card input { width: 100%; padding: 12px 14px; border: 1px solid #d8dee8; border-radius: 11px; font: inherit; }
.login-card input:focus { outline: 3px solid rgb(8 126 112 / 16%); border-color: #087e70; }
.login-submit { width: 100%; justify-content: center; margin-top: 4px; }
.login-error { margin: 0; color: #b42318; }
