:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #242d2a;
  background: #f7f9f8;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #26312d;
  --muted: #8a9691;
  --line: #e9eeeb;
  --green: #2b8062;
  --green-dark: #246e55;
  --mint: #e9f4ef;
  --white: #fff;
  --shadow: 0 2px 9px rgb(27 49 40 / 3%), 0 14px 36px rgb(27 49 40 / 2%);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 360px; min-height: 100vh; }
html { overflow-x: hidden; }
button, input, select { font: inherit; }
button { cursor: pointer; }
#app { min-height: 100vh; }

.sidebar {
  width: 248px;
  padding: 27px 18px 17px;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid #edf0ee;
  z-index: 4;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 39px; height: 39px; border-radius: 12px; color: #fff; background: #3b9472; display: grid; place-items: center; }
.brand-mark svg { width: 29px; height: 29px; }
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand-copy strong { font: 800 17px system-ui, sans-serif; letter-spacing: -.8px; }
.brand-copy small { color: #91a099; font-size: 8px; font-weight: 700; letter-spacing: 1.5px; }
.sidebar-label { padding: 0 11px; margin: 48px 0 12px; color: #a4afaa; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.side-nav { display: grid; gap: 5px; }
.nav-link { min-height: 43px; padding: 0 11px; display: flex; align-items: center; gap: 12px; border-radius: 8px; color: #74817b; font-size: 12px; font-weight: 600; text-decoration: none; transition: background .15s, color .15s; }
.nav-link svg { width: 17px; height: 17px; flex: none; }
.nav-link:hover { background: #f6f8f7; color: var(--ink); }
.nav-link.active { background: #eaf4ef; color: #2d775c; }
.nav-count { margin-left: auto; min-width: 21px; padding: 3px 6px; border-radius: 12px; background: rgb(255 255 255 / 75%); color: #829089; text-align: center; font-size: 9px; }
.sidebar-bottom { margin-top: auto; }
.privacy-note { margin: 0 3px 17px; padding: 13px 10px; display: flex; gap: 9px; align-items: flex-start; background: #f7f9f8; border: 1px solid #eff2f0; border-radius: 9px; }
.privacy-icon { color: #549478; }
.privacy-icon svg { width: 18px; height: 18px; }
.privacy-note span:last-child, .profile > span:nth-child(2) { display: flex; flex-direction: column; gap: 3px; }
.privacy-note strong { color: #53615a; font-size: 9px; font-weight: 700; }
.privacy-note small { color: #929e98; font-size: 9px; }
.profile { padding: 14px 5px 0; border-top: 1px solid #edf0ee; display: flex; align-items: center; gap: 9px; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #447a64; background: #e7f0eb; font-size: 12px; font-weight: 700; }
.profile strong { color: #49564f; font-size: 10px; font-weight: 700; }
.profile small { color: #9aa49f; font-size: 9px; }
.profile-more { margin-left: auto; color: #8d9993; font-size: 19px; line-height: 1; letter-spacing: 1px; transform: translateY(-3px); }

.main-content { max-width: 1560px; min-height: 100vh; margin-left: 248px; padding: 0 42px; }
.topbar { height: 70px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #ecefed; }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #9aa59f; font-size: 11px; }
.breadcrumb strong { color: #53615a; font-weight: 600; }
.crumb-separator { color: #c1c9c4; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.today-label { color: #8d9993; font-size: 10px; }
.button { border: 1px solid transparent; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; font-weight: 600; transition: background .15s, border-color .15s, transform .15s; }
.button:active { transform: translateY(1px); }
.button svg { width: 15px; height: 15px; }
.button-primary { min-height: 36px; padding: 0 14px; color: white; background: #398665; box-shadow: 0 2px 4px rgb(41 111 81 / 12%); }
.button-primary:hover { background: #2d7657; }
.button-outline { min-height: 34px; padding: 0 11px; color: #67746d; border-color: #e5eae7; background: #fff; }
.button-outline:hover { border-color: #bdcfc5; background: #fbfcfb; }
.page-heading { padding: 32px 0 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.eyebrow { display: flex; align-items: center; gap: 7px; color: #83938b; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #63a884; box-shadow: 0 0 0 3px #e7f2eb; }
h1, h2, p { margin: 0; }
h1 { margin-top: 9px; color: #29342f; font: 700 25px system-ui, sans-serif; letter-spacing: -.8px; }
.heading-period { color: #829089; font-weight: 500; font-size: 16px; letter-spacing: -.2px; }
.page-subtitle { margin-top: 6px; color: #89958f; font-size: 11px; }
.period-control { display: flex; align-items: center; gap: 9px; padding-bottom: 2px; }
.period-switch { padding: 3px; display: inline-flex; border: 1px solid #e8edea; background: #fff; border-radius: 7px; }
.period-button { min-height: 27px; padding: 0 10px; color: #849089; background: transparent; border: 0; border-radius: 5px; font-size: 9px; font-weight: 600; }
.period-button.selected { color: #397a5e; background: #eaf4ee; }
.month-picker { height: 34px; padding: 0 9px; display: flex; align-items: center; gap: 7px; border: 1px solid #e6ebe8; border-radius: 7px; background: #fff; color: #84918a; transition: opacity .15s; }
.month-picker svg { width: 14px; height: 14px; flex: none; }
.month-picker input { width: 102px; border: 0; outline: 0; background: transparent; color: #627068; font-size: 9px; }
.picker-disabled { opacity: .48; }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.summary-card { min-width: 0; padding: 15px 16px 13px; border: 1px solid #e9eeeb; border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
.card-topline { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.card-label { overflow: hidden; color: #78857e; font-size: 10px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.card-icon { width: 29px; height: 29px; display: grid; flex: none; place-items: center; border-radius: 8px; }
.card-icon svg { width: 16px; height: 16px; }
.green-icon { color: #428365; background: #eaf4ee; }
.blue-icon { color: #577eaa; background: #eff4fa; }
.amber-icon { color: #bb8b40; background: #fbf5e9; }
.purple-icon { color: #8570aa; background: #f4f0f9; }
.summary-value { margin-top: 10px; color: #2e3934; font: 700 22px system-ui, sans-serif; letter-spacing: -.75px; white-space: nowrap; }
.card-foot { margin-top: 7px; display: flex; align-items: center; gap: 6px; overflow: hidden; color: #97a19c; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.foot-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; }
.green-dot { background: #60a584; }.blue-dot { background: #7999bd; }.amber-dot { background: #d3a654; }.purple-dot { background: #9a84bd; }

.breakdown-section { margin-top: 31px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-heading h2 { color: #34413a; font: 700 14px system-ui, sans-serif; letter-spacing: -.3px; }
.section-heading p { margin-top: 5px; color: #98a29d; font-size: 10px; }
.section-tag { padding: 5px 8px; color: #77877e; background: #eef3f0; border-radius: 5px; font-size: 9px; font-weight: 600; }
.method-grid { margin-top: 13px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.method-card { min-width: 0; padding: 15px 16px 13px; background: #fff; border: 1px solid #e9eeeb; border-radius: 9px; box-shadow: var(--shadow); }
.method-card.method-empty { background: #fdfefd; }
.method-header { display: flex; align-items: center; gap: 8px; }
.method-symbol { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; }
.method-symbol svg { width: 17px; height: 17px; }
.cash-symbol { color: #458469; background: #eaf4ee; }.card-symbol { color: #5e82a8; background: #eff4fa; }.upi-symbol { color: #856fa9; background: #f3eff8; }
.method-name { color: #46534c; font-size: 11px; font-weight: 700; }
.method-mark { margin-left: auto; font-size: 8px; font-weight: 600; }
.cash-mark { padding: 4px 6px; color: #52836b; background: #eff7f1; border-radius: 4px; }
.fee-mark { color: #9ba59f; }
.method-total { margin-top: 13px; color: #2f3c35; font: 700 19px system-ui, sans-serif; letter-spacing: -.6px; }
.method-caption { margin-top: 2px; color: #9aa49f; font-size: 9px; }
.method-divider { height: 1px; margin: 12px 0 9px; background: #edf0ee; }
.method-detail { display: flex; justify-content: space-between; gap: 8px; color: #929d97; font-size: 9px; line-height: 1.9; }
.method-detail strong { color: #758179; font-size: 9px; font-weight: 600; }
.received-detail { color: #69786f; }
.received-detail strong { color: #3d7058; font-weight: 700; }
.accounting-note { margin-top: 10px; padding: 9px 11px; display: flex; align-items: center; gap: 8px; color: #7d8c83; background: #f0f5f2; border: 1px solid #e9f0eb; border-radius: 7px; font-size: 9px; line-height: 1.55; }
.accounting-note strong { color: #547562; }
.note-info { width: 15px; height: 15px; display: grid; place-items: center; flex: none; border: 1px solid #a9beb0; border-radius: 50%; color: #679076; font: 600 9px system-ui, sans-serif; }

.transactions-section { margin-top: 30px; }
.transactions-heading { align-items: center; }
.table-actions { display: flex; align-items: center; gap: 8px; }
.search-box { height: 34px; width: 180px; padding: 0 9px; display: flex; align-items: center; gap: 6px; border: 1px solid #e7ece9; border-radius: 7px; background: #fff; }
.search-box svg { width: 15px; height: 15px; flex: none; color: #9ba59f; }
.search-box input { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; color: #46534c; font-size: 9px; }
.search-box input::placeholder { color: #a3ada7; }
.export-button { height: 34px; }
.table-wrap { margin-top: 13px; overflow: hidden; border: 1px solid #e9eeeb; border-radius: 9px; background: #fff; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #fafbfa; }
th { padding: 11px 12px; color: #99a39e; border-bottom: 1px solid #edf0ee; font-size: 8px; font-weight: 700; letter-spacing: .45px; white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid #f0f2f1; color: #68756e; font-size: 10px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fcfdfc; }
.amount-col { text-align: right; }
.amount-col strong { color: #4a574f; font-size: 10px; font-weight: 600; }
.date-cell { color: #78857d; }
.transaction-note-cell { display: flex; flex-direction: column; gap: 3px; white-space: normal; }
.transaction-note-cell strong { color: #4d5a52; font-size: 10px; font-weight: 600; }
.payment-badge { padding: 4px 7px; display: inline-flex; align-items: center; gap: 5px; border-radius: 5px; font-size: 8px; font-weight: 600; }
.badge-dot { width: 5px; height: 5px; border-radius: 50%; }
.payment-badge.cash { color: #4f8568; background: #eef6f0; }.cash .badge-dot { background: #69a27e; }
.payment-badge.card { color: #6484a6; background: #f0f4f9; }.card .badge-dot { background: #7b9abc; }
.payment-badge.upi { color: #806ca0; background: #f4f0f8; }.upi .badge-dot { background: #9882b5; }
.fee-cell { color: #a47f4b; font-size: 9px; }
.net-cell strong { color: #3f7259; }
.actions-cell { width: 32px; padding-right: 8px; text-align: center; }
.row-action { padding: 5px 7px; color: #718078; background: transparent; border: 0; border-radius: 4px; font-size: 9px; font-weight: 600; }
.row-action:hover { color: #507a64; background: #eef5f0; }
.empty-state { min-height: 197px; padding: 25px 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state[hidden] { display: none; }
.empty-icon { width: 39px; height: 39px; margin-bottom: 9px; display: grid; place-items: center; color: #619076; background: #eef5f0; border-radius: 12px; }
.empty-icon svg { width: 21px; height: 21px; }
.empty-state > strong { color: #55645b; font: 700 12px system-ui, sans-serif; }
.empty-state p { margin-top: 5px; color: #9aa49f; font-size: 9px; }
.empty-state .button { margin-top: 13px; }
.table-empty { display: none; }
.table-footer { padding: 9px 2px 0; display: flex; justify-content: space-between; color: #a0aaa4; font-size: 8px; }
.page-footer { margin-top: 27px; padding: 13px 0 19px; display: flex; justify-content: space-between; border-top: 1px solid #ebefec; color: #a1aaa5; font-size: 8px; }
.footer-dot { padding: 0 3px; color: #c5cdc8; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.transaction-dialog { width: min(475px, calc(100vw - 28px)); max-height: min(720px, calc(100vh - 28px)); padding: 0; overflow: auto; border: 1px solid #e6ece8; border-radius: 14px; background: #fff; box-shadow: 0 22px 70px rgb(20 37 29 / 20%); }
.transaction-dialog::backdrop { background: rgb(30 43 37 / 34%); backdrop-filter: blur(2px); }
.transaction-dialog form { padding: 24px; }
.dialog-heading { margin-bottom: 20px; display: flex; justify-content: space-between; gap: 10px; }
.dialog-kicker { color: #799083; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.dialog-heading h2 { margin-top: 6px; color: #303d36; font: 700 19px system-ui, sans-serif; letter-spacing: -.5px; }
.dialog-heading p { margin-top: 5px; color: #8e9a93; font-size: 10px; }
.icon-button { width: 28px; height: 28px; display: grid; place-items: center; flex: none; color: #89958e; background: #f5f7f6; border: 0; border-radius: 7px; font-size: 20px; line-height: 1; }
.icon-button:hover { background: #ecf1ee; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 12px; }
.field { min-width: 0; display: flex; flex-direction: column; gap: 6px; color: #5b6860; font-size: 9px; font-weight: 600; }
.field[hidden] { display: none; }
.full-field { grid-column: 1 / -1; }
.field > span { display: flex; justify-content: space-between; }
.optional { color: #a0aaa4; font-size: 8px; font-weight: 400; }
.currency-hint { color: #84948a; font-weight: 500; }
.field input, .field select { width: 100%; height: 37px; padding: 0 10px; border: 1px solid #e4eae6; border-radius: 6px; outline: none; color: #4d5b53; background: #fff; font-size: 10px; }
.field input:focus, .field select:focus { border-color: #78aa8d; box-shadow: 0 0 0 3px rgb(95 154 119 / 11%); }
.field input::placeholder { color: #b1bab5; }
.field input:disabled { color: #aab3ae; background: #f7f9f8; cursor: not-allowed; }
.field-hint { min-height: 10px; color: #9aa49e; font-size: 8px; font-weight: 400; }
.net-preview { margin-top: 16px; padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #e4eee7; border-radius: 7px; background: #f3f8f4; color: #668070; font-size: 10px; }
.net-preview > span { display: flex; align-items: center; gap: 7px; }
.preview-dot { width: 6px; height: 6px; border-radius: 50%; background: #59a078; }
.net-preview strong { color: #367453; font: 700 15px system-ui, sans-serif; }
.received-preview { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; color: #748179; font-size: 9px; }
.received-preview strong { color: #46564c; font: 700 12px system-ui, sans-serif; }
.form-error { margin-top: 9px; color: #a64040; font-size: 9px; }
.dialog-actions { margin-top: 17px; padding-top: 14px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid #edf0ee; }
.dialog-actions .button { min-height: 35px; }
.toast { position: fixed; right: 24px; bottom: 22px; z-index: 10; padding: 11px 15px; color: white; background: #32473b; border-radius: 7px; box-shadow: 0 8px 26px rgb(26 39 31 / 18%); font-size: 10px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.storage-warning { position: fixed; right: 18px; bottom: 18px; z-index: 9; max-width: 340px; padding: 12px 14px; color: #7b501f; background: #fff7e8; border: 1px solid #f0dfc0; border-radius: 8px; box-shadow: var(--shadow); font-size: 10px; line-height: 1.5; }
.storage-warning[hidden] { display: none; }
.profile-more { padding: 4px; border: 0; background: transparent; cursor: pointer; }
.auth-screen { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: #f5f8f6; }
.auth-screen[hidden] { display: none; }
.auth-card { width: min(100%, 410px); padding: 30px; border: 1px solid #e8eeea; border-radius: 14px; background: #fff; box-shadow: 0 16px 48px rgb(27 49 40 / 7%); }
.auth-brand { padding: 0; }
.auth-copy { margin: 30px 0 22px; }
.auth-copy h1 { margin-top: 8px; font-size: 23px; }
.auth-copy p { margin-top: 7px; color: #849089; font-size: 11px; line-height: 1.6; }
.auth-card form { display: grid; gap: 14px; }
.auth-card .field { font-size: 10px; }
.auth-card .field input { height: 42px; font-size: 12px; }
.auth-submit { width: 100%; min-height: 41px; margin-top: 2px; }
.auth-switch { width: 100%; margin-top: 16px; padding: 8px; border: 0; background: transparent; color: #397a5e; font-size: 10px; font-weight: 600; }
.auth-message { color: #397a5e; font-size: 10px; line-height: 1.5; }
.auth-setup { margin-top: 16px; padding: 10px 12px; border: 1px solid #f0dfc0; border-radius: 7px; background: #fff7e8; color: #7b501f; font-size: 10px; line-height: 1.5; }

@media (min-width: 1400px) {
  .main-content { padding-right: 54px; padding-left: 54px; }
  .summary-card { padding: 18px 19px 15px; }
  .method-card { padding: 17px 19px 15px; }
}
@media (max-width: 1100px) {
  .sidebar { width: 210px; }
  .main-content { margin-left: 210px; padding: 0 27px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-card { padding: 14px 16px; }
  .card-label { font-size: 10px; }
}
@media (max-width: 760px) {
  .sidebar { width: 62px; padding: 17px 8px 12px; align-items: center; }
  .brand { padding: 0; }
  .brand-mark { width: 36px; height: 36px; }
  .brand-copy, .sidebar-label, .nav-count, .privacy-note, .profile > span { display: none; }
  .nav-link { font-size: 0; }
  .side-nav { width: 100%; margin-top: 35px; }
  .nav-link { min-height: 42px; justify-content: center; padding: 0; gap: 0; }
  .nav-link svg { width: 19px; height: 19px; }
  .profile { width: 100%; justify-content: center; padding: 12px 0 0; }
  .avatar { width: 30px; height: 30px; }
  .main-content { margin-left: 62px; padding: 0 18px; overflow-x: clip; }
  .topbar { height: 58px; }
  .today-label { display: none; }
  .page-heading { padding: 25px 0 17px; align-items: flex-start; flex-direction: column; }
  h1 { font-size: 22px; }
  .heading-period { font-size: 14px; }
  .period-control { width: 100%; justify-content: space-between; }
  .method-grid { gap: 8px; }
  .method-card { padding: 12px 10px; }
  .method-header { gap: 5px; }
  .method-symbol { width: 25px; height: 25px; }
  .method-symbol svg { width: 15px; height: 15px; }
  .method-name { font-size: 10px; }
  .method-mark { font-size: 7px; }
  .method-total { font-size: 16px; }
  .method-detail, .method-detail strong { font-size: 8px; }
  .transactions-heading { align-items: flex-start; flex-direction: column; }
  .table-actions { width: 100%; }
  .search-box { flex: 1; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 720px; }
  .table-empty { min-width: 0; }
  .empty-state { min-width: 0; }
  .accounting-note { align-items: flex-start; }
}
@media (max-width: 480px) {
  .main-content { padding: 0 12px; }
  .top-add { padding: 0 9px; font-size: 9px; }
  .top-add svg { width: 13px; height: 13px; }
  .breadcrumb { font-size: 9px; gap: 6px; }
  .summary-grid { gap: 8px; }
  .summary-card { padding: 11px 10px; }
  .card-label { font-size: 8px; }
  .card-icon { width: 25px; height: 25px; }
  .card-topline { align-items: flex-start; }
  .card-label { white-space: normal; line-height: 1.25; }
  .summary-value { font-size: 18px; }
  .card-foot { align-items: flex-start; font-size: 8px; white-space: normal; }
  .card-foot .foot-dot { margin-top: 3px; }
  .method-grid { grid-template-columns: 1fr; gap: 8px; }
  .method-card { padding: 12px 13px; }
  .method-total { margin-top: 8px; }
  .method-divider { margin: 8px 0 6px; }
  .page-footer { gap: 10px; font-size: 7px; }
  .transaction-dialog form { padding: 18px; }
}
