/* Finance sub-tabs, Insurance policy cards and Fixed deposit cards */
.finance-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  animation: rise .18s ease-out;
}
.subtabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  scrollbar-width: thin;
}
.subtab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: #f4f6f8;
  color: #4e5a66;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: background .12s, color .12s, box-shadow .12s;
}
.subtab .icon { opacity: .72; }
.subtab:hover { background: #edf1f4; color: #2f3b47; }
.subtab.is-disabled,
.subtab.is-disabled:hover {
  background: #f6f8f9;
  color: #b3bcc5;
  cursor: not-allowed;
}
.subtab.is-active {
  background: var(--green);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 166, 81, .22);
}
.subtab.is-active .icon { opacity: 1; }
.subtab-dot {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 5px;
  height: 5px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #f59e0b;
}
.subtab.is-active .subtab-dot { background: #fff; }
.finance-content { padding: 16px; background: #f7f9f8; }
.finance-content.is-insurance { padding: 16px; }

/* ------------------------------------------------------------ page heading */
.view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.view-head h2 { font-size: 17px; font-weight: 780; letter-spacing: -.3px; line-height: 1.25; }
.view-head p {
  max-width: 780px;
  margin-top: 3px;
  color: #7c8895;
  font-size: 11.5px;
  line-height: 1.55;
}
.view-head.compact h2 { font-size: 16px; }
.eyebrow {
  margin-bottom: 3px;
  color: var(--green-700);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.view-head-meta { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.readonly-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid #e3e8ed;
  border-radius: 5px;
  background: #fff;
  color: #667085;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}
.count-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border: 1px solid #dcefe4;
  border-radius: 5px;
  background: #f4fbf7;
  color: var(--green-700);
  font-size: 9.5px;
  font-weight: 750;
  white-space: nowrap;
}

/* ----------------------------------------------------------- filter chips */
.status-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 10px; }
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 29px;
  padding: 0 10px;
  border: 1px solid #e3e8ed;
  border-radius: 999px;
  background: #fff;
  color: #5e6a77;
  font-size: 10.5px;
  font-weight: 650;
  transition: border-color .12s, background .12s, color .12s;
}
.status-chip:hover { border-color: #bfe4cf; }
.status-chip.is-active { border-color: var(--green); background: var(--green-soft); color: var(--green-700); }
.chip-count {
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: #f0f3f5;
  color: #667085;
  font-size: 9px;
  font-weight: 750;
}
.status-chip.is-active .chip-count { background: #fff; color: var(--green-700); }
.result-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 10px;
  color: #7c8895;
  font-size: 10.5px;
}
.result-summary strong { color: #303b47; font-weight: 750; }
.result-hint { display: inline-flex; align-items: center; gap: 5px; color: #98a2ad; }
.insurance-filter .field-grow { flex: 1 1 260px; }
.insurance-filter .field:nth-of-type(2) { flex: 0 1 190px; }
.insurance-filter .field:nth-of-type(3),
.insurance-filter .field:nth-of-type(4) { flex: 0 1 150px; }
.fixed-filter .field-grow { flex: 1 1 180px; }
.fixed-filter .field:nth-of-type(2),
.fixed-filter .field:nth-of-type(3) { flex: 0 1 105px; }
.fixed-filter .field:nth-of-type(4),
.fixed-filter .field:nth-of-type(5) { flex: 0 1 150px; }
.fixed-filter .field:nth-of-type(6) { flex: 0 1 145px; }

/* -------------------------------------------------------------- policy list */
.policy-list, .fixed-list { display: flex; flex-direction: column; gap: 10px; }
.policy-card, .fixed-card {
  overflow: hidden;
  border: 1px solid #e4e9ed;
  border-radius: 10px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.policy-card:hover, .fixed-card:hover { border-color: #d5e5dc; }
.policy-card.is-expanded, .fixed-card.is-expanded {
  border-color: #bfe4cf;
  box-shadow: 0 4px 18px rgba(5, 92, 58, .07);
}
.policy-summary, .fixed-summary {
  padding: 14px 16px 12px;
  background: linear-gradient(180deg, #fff, #fcfdfc);
}
.policy-head, .fixed-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.policy-identity, .fixed-title { display: flex; gap: 11px; min-width: 0; }
.plan-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 10px;
  color: #fff;
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: .03em;
}
.plan-mark.nem { background: linear-gradient(135deg, #0b8f4d, #16b56a); }
.plan-mark.aiico { background: linear-gradient(135deg, #1d4ed8, #3b82f6); }
.policy-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.policy-name-row h3 { font-size: 13.5px; font-weight: 780; letter-spacing: -.15px; }
.policy-sub { margin-top: 2px; color: #8a95a2; font-size: 10px; line-height: 1.5; }
.policy-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}
.auto-tag { background: #f7f9fa; }
.view-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 27px;
  padding: 0 9px;
  border: 1px solid #e3e8ed;
  border-radius: 5px;
  background: #fff;
  color: var(--green-700);
  font-size: 10px;
  font-weight: 700;
}
.view-more:hover { border-color: #bfe4cf; background: #f4fbf7; }
.view-more .chevron { transition: transform .15s; }
.policy-card.is-expanded .view-more .chevron,
.fixed-card.is-expanded .view-more .chevron { transform: rotate(180deg); }
.policy-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 18px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #e5eaee;
}
.meta-item { min-width: 0; }
.meta-label {
  display: block;
  margin-bottom: 3px;
  color: #8a95a2;
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.meta-value {
  display: block;
  overflow-wrap: anywhere;
  color: #303b47;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.45;
}
.meta-sub { display: block; margin-top: 1px; color: #98a2ad; font-size: 9px; font-weight: 500; }
.copyable { display: inline-flex; align-items: center; gap: 4px; }
.copy-btn {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #9aa4af;
}
.copy-btn:hover { background: #eef2f4; color: var(--green-700); }
.inline-note {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
}
.inline-note.warn { background: #fff8e8; color: #8a5a00; }
.inline-note.info { background: #eef4ff; color: #1d4ed8; }
.inline-note.danger { background: #fdf0ef; color: #b42318; }
.inline-note.neutral { background: #f4f6f8; color: #667085; }

/* ------------------------------------------------------------- fixed cards */
.fixed-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 9px;
  background: #eef7f1;
  color: #0a8f46;
}
.fixed-title h3 { font-size: 13px; font-weight: 750; }
.fixed-title p { margin-top: 2px; color: #8a95a2; font-size: 10px; }
.fixed-detail { border-top: 1px solid var(--line); background: #f9fbfa; }

/* ----------------------------------------------------------- expanded view */
.policy-detail { border-top: 1px solid var(--line); background: #f9fbfa; }
.detail-inner { padding: 16px; animation: rise .16s ease-out; }
.detail-section + .detail-section { margin-top: 16px; }
.section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: #5b6774;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.policy-detail .kv-grid,
.fixed-detail .kv-grid {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.policy-detail .kv-grid-3,
.fixed-detail .kv-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.policy-detail .kv-item > strong,
.fixed-detail .kv-item > strong { font-size: 11px; }
.benefit-pool {
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid #dcefe4;
  border-radius: 8px;
  background: linear-gradient(180deg, #f7fcf9, #fff);
}
.pool-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pool-stats span {
  display: block;
  color: #8a95a2;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.pool-stats strong { display: block; margin-top: 2px; font-size: 15px; letter-spacing: -.2px; font-variant-numeric: tabular-nums; }
.pool-bar { height: 6px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: #e6f0ea; }
.pool-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #17b26a, #00a651); }
.pool-caption { display: block; margin-top: 5px; color: #8a95a2; font-size: 9.5px; }
.benefit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.benefit-item { padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.benefit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.benefit-head strong { font-size: 11.5px; font-weight: 750; }
.benefit-limit { color: var(--green-700); font-size: 10px; font-weight: 750; text-align: right; white-space: nowrap; }
.benefit-rule { margin-top: 4px; color: #8a95a2; font-size: 10px; line-height: 1.5; }
.benefit-desc { margin-top: 5px; color: #6f7a86; font-size: 10.5px; line-height: 1.5; }
.benefit-foot { margin-top: 7px; }
.rule-chip {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f3;
  color: #5e6a77;
  font-size: 9px;
  font-weight: 600;
}
.benefit-lines {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin: 7px 0 0;
  padding: 0;
  color: #8a95a2;
  font-size: 9.5px;
  list-style: none;
}
.benefit-lines li { position: relative; padding-left: 9px; }
.benefit-lines li::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 0;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #b8c2cc;
}

/* ------------------------------------------------------------------ alerts */
.alert {
  display: flex;
  gap: 9px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 10.5px;
  line-height: 1.55;
}
.alert .icon { margin-top: 1px; }
.alert strong { display: block; margin-bottom: 1px; font-size: 11px; }
.alert p { opacity: .92; }
.alert-sub { margin-top: 4px; font-weight: 600; }
.alert-warning { border-color: #f3e0b5; background: #fff8e8; color: #7a5200; }
.alert-danger { border-color: #f6d4d4; background: #fdf0ef; color: #a01a12; }
.alert-info { border-color: #d5e2ff; background: #eef4ff; color: #1d4ed8; }
.alert-neutral { border-color: #e4e8ec; background: #f4f6f8; color: #5d6875; }
.refs {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: #7c8895;
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}
.ref-line { display: block; }

/* ---------------------------------------------------------------- timeline */
.timeline { position: relative; margin: 0; padding: 2px 0 2px 17px; list-style: none; }
.timeline::before {
  content: '';
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 4px;
  width: 1px;
  background: #dfe6ea;
}
.timeline-item { position: relative; padding-bottom: 11px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  top: 5px;
  left: -17px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 1px #ccecdb;
}
.timeline-body { padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.timeline-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.timeline-reason { color: #4d5a66; font-size: 10.5px; font-weight: 650; }
.timeline-meta { display: flex; align-items: center; gap: 5px; margin-top: 5px; color: #98a2ad; font-size: 9.5px; }
.dot-sep { color: #c1c8d0; }

/* ------------------------------------------------------------- policy docs */
.doc-accordion { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.doc-item + .doc-item { border-top: 1px solid var(--line); }
.doc-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  color: #3f4a56;
  font-size: 11px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.doc-item summary::-webkit-details-marker { display: none; }
.doc-item summary .chevron { color: #98a2ad; transition: transform .15s; }
.doc-item[open] summary { background: #f7fbf9; color: var(--green-700); }
.doc-item[open] summary .chevron { transform: rotate(180deg); }
.doc-body { padding: 0 13px 13px; color: #5d6875; font-size: 10.5px; line-height: 1.65; }
.doc-body p + p { margin-top: 7px; }
.claim-steps { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.claim-steps h5 {
  margin-bottom: 7px;
  color: #7b8794;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.claim-steps ol { margin: 0; padding-left: 17px; color: #5d6875; font-size: 10.5px; line-height: 1.6; }
.claim-steps li + li { margin-top: 4px; }
.detail-footnote {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  margin-top: 14px;
  color: #98a2ad;
  font-size: 9.5px;
  line-height: 1.5;
}

/* -------------------------------------------------------------- responsive */
@media (max-width: 1200px) {
  .policy-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .benefit-grid { grid-template-columns: 1fr; }
  .policy-detail .kv-grid-3, .fixed-detail .kv-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .finance-content { padding: 13px; }
  .policy-head, .fixed-head { flex-direction: column; }
  .policy-actions { justify-content: flex-start; }
  .policy-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view-head { flex-direction: column; }
  .view-head-meta { justify-content: flex-start; }
  .pool-stats { grid-template-columns: 1fr; gap: 7px; }
}
@media (max-width: 760px) {
  .subtabs { padding: 10px; }
  .subtab { height: 31px; padding: 0 10px; font-size: 10.5px; }
  .finance-content { padding: 11px; }
  .policy-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .policy-detail .kv-grid-3, .fixed-detail .kv-grid-3,
  .policy-detail .kv-grid, .fixed-detail .kv-grid { grid-template-columns: 1fr; }
  .insurance-filter .field, .fixed-filter .field { flex: 1 1 100% !important; }
  .filter-actions { width: 100%; }
  .filter-actions .btn { flex: 1; }
  .status-chip { font-size: 9.5px; }
}
