:root {
  --green:#2f6b3f;
  --dark-green:#1e4d2b;
  --brown:#7a4a24;
  --gold:#e6a93b;
  --bg:#f4f7f1;
  --card:#ffffff;
  --text:#243024;
  --muted:#6b756b;
  --danger:#b42318;
  --border:#dfe8db;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

button, input, select {
  font: inherit;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: linear-gradient(160deg,#e9f3e7,#fff6df);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 22px;
  padding: 26px;
  box-shadow: 0 18px 45px rgba(38,70,44,.16);
  border: 1px solid var(--border);
}

.logo {
  width: 112px;
  height: 112px;
  object-fit: contain;
  display: block;
  margin: 0 auto 12px;
}

h1, h2, h3 {
  margin: 0;
}

.subtitle {
  text-align: center;
  color: var(--muted);
  margin: 8px 0 22px;
}

.field {
  margin-bottom: 14px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--dark-green);
}

input, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px;
  background: #fbfdf9;
  outline: none;
}

input:focus, select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47,107,63,.12);
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
}

.btn.secondary {
  background: #fff;
  color: var(--green);
  border: 1px solid var(--green);
}

.btn.small {
  width: auto;
  padding: 9px 12px;
  border-radius: 10px;
}

.error {
  background: #fff0f0;
  color: var(--danger);
  padding: 10px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 14px;
}

.hint {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 14px;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  height: 68px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--dark-green);
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - 68px);
}

.sidebar {
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 16px;
}

.nav-item {
  display: block;
  padding: 12px;
  border-radius: 12px;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 8px;
  background: #f8fbf6;
  border: 0;
  text-align: left;
  cursor: pointer;
  width: 100%;
}

.nav-item.active {
  background: #e6f2e2;
  color: var(--green);
}

.content {
  padding: 22px;
  max-width: 1180px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 14px;
}

.badge {
  background: #fff3d2;
  color: #704500;
  padding: 8px 10px;
  border-radius: 99px;
  font-weight: 800;
  font-size: 12px;
}

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

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(38,70,44,.06);
}

.card .label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

.card .value {
  font-size: 28px;
  font-weight: 900;
  margin-top: 8px;
  color: var(--dark-green);
}

.section {
  margin-top: 18px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
}

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

.table th {
  background: #f2f7ef;
  color: var(--dark-green);
}

.hidden-finance {
  background: #fff8e8;
  border: 1px dashed var(--gold);
  padding: 14px;
  border-radius: 14px;
  color: #704500;
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.lang-toggle button {
  border: 0;
  background: #fff;
  padding: 8px 10px;
  cursor: pointer;
}

.lang-toggle button.active {
  background: var(--green);
  color: #fff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
  margin-top: 14px;
}

.form-grid .btn {
  grid-column: 1 / -1;
}

@media(max-width:800px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: flex;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    gap: 8px;
    padding: 10px;
  }

  .nav-item {
    white-space: nowrap;
    margin: 0;
  }

  .content {
    padding: 16px;
  }

  .grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

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

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

  .page-head {
    display: block;
  }
}
.sidebar {
  width: 250px;
}

.nav-item {
  border: 1px solid #cfd8cf;
  box-shadow: none;
  font-size: 16px;
}

.nav-item.active {
  background: #e6f2e2;
  border-color: #2f6b3f;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 999;
  overflow: auto;
  padding: 30px;
}

.goat-modal {
  max-width: 1100px;
  margin: auto;
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.icon-btn {
  border: 1px solid #2f6b3f;
  color: #2f6b3f;
  background: #fff;
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
}

.close-btn {
  border: 0;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
}

.profile-summary {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  margin-top: 16px;
}

.profile-img {
  width: 220px;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.info-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.info-value {
  margin-top: 5px;
  font-weight: 800;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.record-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.status-pill {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 8px;
  background: #dff2d8;
  color: #17642c;
  font-weight: 800;
  font-size: 12px;
}

@media(max-width:800px) {
  .profile-summary {
    grid-template-columns: 1fr;
  }

  .profile-img {
    width: 100%;
    height: 220px;
  }

  .profile-grid,
  .mini-grid,
  .record-grid {
    grid-template-columns: 1fr;
  }

  .modal-overlay {
    padding: 10px;
  }
}
/* ===== Alignment Fix for Goat Profile UI ===== */

.content {
  max-width: none;
  width: 100%;
}

.sidebar {
  width: 230px;
  min-width: 230px;
}

.layout {
  grid-template-columns: 230px 1fr;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 14px 18px;
  border: 1px solid #d5dfd3;
  border-radius: 12px;
  background: #fff;
  color: #213021;
  font-size: 16px;
  font-weight: 800;
  box-shadow: none;
}

.nav-item.active {
  background: #e8f4e4;
  border-color: #2f6b3f;
  color: #2f6b3f;
}

/* Profile opens as right-side panel instead of full messed page */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.18);
  z-index: 999;
  overflow: auto;
  padding: 24px;
}

.goat-modal {
  width: min(980px, calc(100vw - 300px));
  margin-left: auto;
  margin-right: 20px;
  background: #fff;
  border-radius: 18px;
  padding: 20px;
  border: 1px solid #dfe8db;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.close-btn {
  border: 0;
  background: transparent;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
}

.profile-summary {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 20px;
  border: 1px solid #dfe8db;
  border-radius: 14px;
  padding: 14px;
}

.profile-img {
  width: 210px;
  height: 170px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid #dfe8db;
}

.profile-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 18px 24px;
  align-items: start;
}

.info-label {
  font-size: 12px;
  color: #6b756b;
  font-weight: 800;
  margin-bottom: 5px;
}

.info-value {
  font-size: 14px;
  font-weight: 800;
  color: #172817;
}

/* Fix form cards inside profile */
.mini-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 14px;
}

.mini-grid .card {
  padding: 14px;
}

.mini-grid .form-grid {
  display: block;
}

.mini-grid .field {
  margin-bottom: 10px;
}

.mini-grid input,
.mini-grid select {
  height: 42px;
  padding: 9px 10px;
  font-size: 13px;
}

.mini-grid .btn {
  height: 42px;
  padding: 8px 10px;
  font-size: 13px;
}

.record-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.record-grid > div {
  background: #fff;
  border: 1px solid #dfe8db;
  border-radius: 14px;
  padding: 14px;
}

.status-pill {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 8px;
  background: #dff2d8;
  color: #17642c;
  font-weight: 800;
  font-size: 12px;
}

/* Make tables clean */
.table {
  width: 100%;
  display: table;
  white-space: normal;
}

.table th,
.table td {
  vertical-align: middle;
}

/* Mobile fixes */
@media(max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: 100%;
    min-width: 100%;
  }

  .goat-modal {
    width: 100%;
    margin: 0;
  }

  .modal-overlay {
    padding: 10px;
  }

  .profile-summary {
    grid-template-columns: 1fr;
  }

  .profile-img {
    width: 100%;
    height: 220px;
  }

  .profile-grid,
  .mini-grid,
  .record-grid {
    grid-template-columns: 1fr !important;
  }
}
/* ===== Professional Transaction Page UI ===== */

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  align-items: end;
}

.form-grid .btn {
  grid-column: span 4;
  height: 46px;
}

.form-grid .field {
  margin-bottom: 0;
}

.form-grid label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.form-grid input,
.form-grid select {
  height: 44px;
}

.grid.section {
  grid-template-columns: repeat(3, 1fr);
}

.bank-panel {
  background: #ffffff;
  border: 1px solid #dfe8db;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(38,70,44,.08);
}

.bank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px;
  background: linear-gradient(135deg, #f2f7ef, #fff8e8);
  border-bottom: 1px solid #dfe8db;
}

.bank-title {
  font-size: 22px;
  font-weight: 900;
  color: #1e4d2b;
}

.bank-subtitle {
  font-size: 13px;
  color: #6b756b;
  margin-top: 4px;
}

.statement-filters {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 18px;
  background: #f8fbf6;
  border: 1px solid #dfe8db;
  border-radius: 14px;
  padding: 14px;
}

.statement-filters input,
.statement-filters select {
  height: 44px;
  background: #fff;
}

.bank-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  background: #fff;
}

.bank-table th {
  background: #f2f7ef;
  color: #334433;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 13px 12px;
  border-bottom: 1px solid #dfe8db;
  text-align: left;
  white-space: nowrap;
}

.bank-table td {
  padding: 15px 12px;
  border-bottom: 1px solid #edf3ea;
  vertical-align: middle;
}

.bank-table tbody tr:hover {
  background: #fbfdf9;
}

.txn-desc {
  font-weight: 900;
  color: #243024;
}

.txn-meta {
  font-size: 12px;
  color: #6b756b;
  margin-top: 5px;
  line-height: 1.4;
}

.amount-col {
  text-align: right !important;
  white-space: nowrap;
}

.debit-amt {
  color: #b42318;
  font-weight: 900;
}

.credit-amt {
  color: #17642c;
  font-weight: 900;
}

.balance-amt {
  color: #1e4d2b;
  font-weight: 900;
}

.status-pill {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 999px;
  background: #dff2d8;
  color: #17642c;
  font-weight: 900;
  font-size: 12px;
  text-transform: capitalize;
}

.bank-table a {
  color: #2f6b3f;
  font-weight: 800;
  text-decoration: none;
}

.bank-table a:hover {
  text-decoration: underline;
}

.bank-table .btn.small {
  padding: 7px 10px;
  font-size: 12px;
  width: auto;
  white-space: nowrap;
}

@media(max-width: 1100px) {
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid .btn {
    grid-column: span 2;
  }

  .grid.section {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .form-grid .btn {
    grid-column: span 1;
  }

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

  .statement-filters {
    grid-template-columns: 1fr;
  }

  .bank-panel {
    overflow-x: auto;
  }

  .bank-table {
    min-width: 1000px;
  }

  .bank-header {
    align-items: flex-start;
    gap: 10px;
    flex-direction: column;
  }
}
/* ===== Cashbook Statement Alignment Fix ===== */

.bank-panel {
  width: 100%;
  overflow-x: auto;
}

.bank-panel > div {
  min-width: 1050px;
}

.bank-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.bank-table th,
.bank-table td {
  padding: 12px 10px;
  vertical-align: top;
  word-break: break-word;
}

.bank-table th:nth-child(1),
.bank-table td:nth-child(1) {
  width: 95px;
}

.bank-table th:nth-child(2),
.bank-table td:nth-child(2) {
  width: 260px;
}

.bank-table th:nth-child(3),
.bank-table td:nth-child(3) {
  width: 120px;
}

.bank-table th:nth-child(4),
.bank-table td:nth-child(4),
.bank-table th:nth-child(5),
.bank-table td:nth-child(5),
.bank-table th:nth-child(6),
.bank-table td:nth-child(6) {
  width: 115px;
  text-align: right;
  white-space: nowrap;
}

.bank-table th:nth-child(7),
.bank-table td:nth-child(7) {
  width: 100px;
  text-align: center;
}

.bank-table th:nth-child(8),
.bank-table td:nth-child(8) {
  width: 70px;
  text-align: center;
}

.bank-table th:nth-child(9),
.bank-table td:nth-child(9) {
  width: 150px;
  text-align: center;
}

.txn-desc {
  display: block;
  font-weight: 900;
  line-height: 1.3;
}

.txn-meta {
  display: block;
  font-size: 12px;
  color: #6b756b;
  margin-top: 4px;
  line-height: 1.4;
}

.statement-filters {
  display: grid;
  grid-template-columns: minmax(320px, 2fr) minmax(170px, 1fr) minmax(150px, 1fr);
  gap: 12px;
  align-items: center;
}

.statement-filters input,
.statement-filters select {
  width: 100%;
  height: 44px;
}

@media(max-width: 900px) {
  .bank-panel {
    overflow-x: auto;
  }

  .bank-panel > div {
    min-width: 1050px;
  }
}
.online-status {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.online-status.online {
  background: #e7f7e8;
  color: #17642c;
}

.online-status.offline {
  background: #fff0f0;
  color: #b42318;
}

.online-status.syncing {
  background: #fff6db;
  color: #8a5a00;
}

.online-status.synced {
  background: #e7f7e8;
  color: #17642c;
}
@keyframes spin {

  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }

}