:root {
  color-scheme: light;
  --ink: #16221f;
  --muted: #7c8985;
  --line: #e9eeeb;
  --paper: #f5f7f6;
  --card: #ffffff;
  --green: #236b53;
  --green-dark: #174f3d;
  --green-pale: #e9f2ed;
  --lime: #c9e79a;
  --amber: #a06b21;
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: 14px; }
button, input, select { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 238px; padding: 30px 18px 20px; background: #fbfcfb; border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 2; }
.brand { height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 10px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; letter-spacing: -.7px; }
.brand-mark { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 9px; color: white; background: var(--green); font-size: 15px; font-weight: 700; }
.brand-period { color: #7ca76c; }
.sidebar-label, .section-kicker, .eyebrow { color: #97a39e; font-size: 9px; font-weight: 700; letter-spacing: 1.35px; }
.sidebar-label { margin: 55px 11px 14px; }
.main-nav { display: grid; gap: 5px; }
.nav-link { min-height: 42px; padding: 0 11px; display: flex; align-items: center; gap: 11px; border-radius: 8px; text-decoration: none; color: #75817d; font-size: 12px; font-weight: 500; }
.nav-link.active { color: var(--green-dark); background: #eaf2ed; font-weight: 700; }
.nav-icon { width: 18px; text-align: center; font-size: 16px; }
.soon { margin-left: auto; color: #a6b0ac; font-size: 9px; }
.sidebar-foot { margin-top: auto; padding: 13px 10px 3px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; color: #75817d; font-size: 11px; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #6eaa83; flex: 0 0 auto; }
.status-dot-muted { background: #bdc7c2; }
.lock-icon { color: #98a49f; font-size: 13px; }
.sidebar-foot .lock-icon { margin-left: auto; }
.main-content { max-width: 1640px; margin-left: 238px; padding: 0 40px 26px; }
.topbar { height: 67px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e8edeb; }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: #8b9792; font-size: 11px; }
.breadcrumb strong { color: #3b4944; font-weight: 600; }
.crumb-slash { color: #c0c9c4; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.market-status { display: flex; align-items: center; gap: 7px; color: #65736e; font-size: 10px; }
.avatar { width: 31px; height: 31px; border: 0; border-radius: 50%; background: #dce8df; color: var(--green-dark); font-weight: 700; font-size: 11px; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 33px 0 23px; }
.eyebrow { margin-bottom: 9px; letter-spacing: 1.2px; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.2; letter-spacing: -1.2px; font-weight: 600; }
.page-subtitle { margin-top: 8px; color: #87938e; font-size: 12px; }
.heading-actions { display: flex; gap: 9px; }
.button { min-height: 37px; border: 1px solid transparent; border-radius: 7px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; font-size: 11px; font-weight: 600; cursor: pointer; transition: background .15s ease, border .15s ease, transform .15s ease; }
.button:not(:disabled):active { transform: translateY(1px); }
.button-primary { color: #fff; background: var(--green); }
.button-primary:hover { background: var(--green-dark); }
.button-secondary { background: #fff; border-color: #dfe6e2; color: #51605a; }
.button-secondary:hover { border-color: #bdcec4; background: #fbfdfb; }
.button:disabled { color: #8e9a95; background: #f1f3f2; border-color: #e5e9e7; cursor: not-allowed; }
.button-icon { font-size: 16px; line-height: 1; }
.notice-bar { min-height: 40px; padding: 0 13px; display: flex; align-items: center; gap: 9px; border: 1px solid #e4ece7; border-radius: 7px; background: #edf4ef; color: #60766b; font-size: 10px; }
.privacy-warning { margin: -8px 0 16px; padding: 11px 13px; display: flex; gap: 7px; border: 1px solid #edc7bd; border-radius: 7px; background: #fff2ef; color: #8a3e31; font-size: 11px; line-height: 1.5; }
.privacy-warning strong { flex: 0 0 auto; }
.notice-icon { width: 15px; height: 15px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: #d7e8dc; color: var(--green); font-size: 10px; font-weight: 700; }
.notice-date { margin-left: auto; color: #88968f; white-space: nowrap; }
.summary-grid { display: grid; grid-template-columns: 1.35fr 1.15fr 1fr 1fr; gap: 13px; margin: 17px 0; }
.summary-card, .panel { border: 1px solid #e8edeb; border-radius: 9px; background: var(--card); box-shadow: 0 3px 12px rgba(35, 62, 49, .025); }
.summary-card { min-height: 119px; padding: 15px 17px 13px; }
.summary-primary { background: #f7fbf8; border-color: #e0eae3; }
.summary-top { display: flex; justify-content: space-between; align-items: center; color: #77837e; font-size: 10px; }
.summary-symbol { color: #a0afa7; font-size: 16px; }
.summary-value { margin-top: 15px; font-size: 23px; letter-spacing: -.8px; line-height: 1.1; font-weight: 600; }
.muted-value { color: #acb7b1; font-size: 16px; letter-spacing: -.3px; }
.value-unit { margin-left: 4px; color: #87938e; font-size: 11px; font-weight: 500; }
.summary-foot { margin-top: 13px; min-height: 16px; display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #99a39e; font-size: 9px; }
.summary-chip { padding: 3px 6px; border-radius: 4px; background: #e9f1eb; color: #61806c; font-size: 8px; }
.text-button { padding: 0; border: 0; background: none; color: var(--green); cursor: pointer; font-size: 10px; font-weight: 600; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 272px; align-items: start; gap: 15px; }
.panel { padding: 18px; }
.holdings-panel { min-height: 322px; padding: 18px 0 0; overflow: hidden; }
.holdings-panel > .panel-heading { padding: 0 18px 14px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-kicker { margin-bottom: 5px; }
h2 { font-size: 15px; line-height: 1.3; letter-spacing: -.35px; font-weight: 600; }
.panel-tools { display: flex; align-items: center; gap: 8px; }
.select-control { min-width: 115px; height: 31px; padding: 0 25px 0 10px; border: 1px solid #e5eae7; border-radius: 6px; background: #fff; color: #56635d; font-size: 10px; }
.icon-button { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #e5eae7; border-radius: 6px; background: #fff; color: #77857e; font-size: 16px; cursor: pointer; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: #f8faf9; }
th { height: 34px; color: #98a39e; font-size: 9px; font-weight: 600; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 18px; }
th:last-child, td:last-child { padding-right: 17px; }
td { height: 58px; border-top: 1px solid #f0f3f1; color: #617069; font-size: 10px; white-space: nowrap; }
td.asset-cell { color: var(--ink); font-size: 11px; font-weight: 600; }
.asset-meta { display: block; margin-top: 4px; color: #9aa59f; font-size: 9px; font-weight: 400; }
.asset-type-pill { margin-right: 5px; padding: 3px 5px; border-radius: 4px; background: #edf3ef; color: #62806e; font-size: 8px; font-weight: 600; }
.table-edit { border: 0; background: transparent; color: #789381; font-size: 10px; cursor: pointer; }
.table-edit:hover { color: var(--green-dark); }
.empty-cell { height: 140px; text-align: center; color: #a3ada8; font-size: 11px; }
.table-footer { min-height: 39px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #eff2f0; color: #9ba6a1; font-size: 9px; }
.table-footer-mark { color: #7b9c84; font-size: 8px; }
.right-column { display: grid; gap: 13px; }
.accounts-panel { padding: 16px 15px 12px; }
.compact-heading { align-items: center; }
.plus-button { color: var(--green); font-size: 18px; }
.account-list { margin-top: 12px; display: grid; gap: 3px; }
.account-row { width: 100%; min-height: 34px; padding: 0 7px; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 6px; background: transparent; text-align: left; cursor: pointer; color: #66746d; font-size: 10px; }
.account-row:hover, .account-row.selected { background: #f1f6f2; color: var(--green-dark); }
.account-row.selected { font-weight: 600; }
.account-icon { width: 19px; height: 19px; display: grid; place-items: center; border: 1px solid #e8eeea; border-radius: 5px; color: #82948a; font-size: 10px; }
.account-amount { margin-left: auto; color: #9ba6a0; font-size: 9px; }
.account-note { margin-top: 11px; padding-top: 10px; border-top: 1px solid #eff2f0; display: flex; align-items: center; gap: 6px; color: #a0aaa5; font-size: 8px; }
.small-loading { padding: 11px 4px; color: #a0aaa5; font-size: 10px; }
.update-panel { padding: 16px; background: #fff; }
.update-icon { width: 27px; height: 27px; margin-bottom: 11px; display: grid; place-items: center; border-radius: 7px; background: #edf4ef; color: #688773; font-size: 15px; }
.update-panel h2 { margin-top: 1px; }
.update-panel p { margin-top: 8px; color: #87938e; font-size: 9px; line-height: 1.65; }
.update-divider { height: 1px; margin: 13px 0 11px; background: #edf1ee; }
.button-full { width: 100%; min-height: 33px; font-size: 9px; }
.update-meta { margin-top: 10px; display: flex; align-items: center; gap: 6px; color: #9aa59f; font-size: 8px; }
.secondary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 15px; }
.secondary-grid .panel { min-height: 133px; padding: 16px 18px; }
.muted-inline { color: #a0aaa5; font-size: 9px; }
.empty-inline { min-height: 62px; display: flex; align-items: center; gap: 10px; color: #9aa59f; font-size: 10px; }
.calendar-icon, .insight-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: #f3f6f4; color: #9aaba0; font-size: 13px; }
.insight-icon { background: #f4f1e9; color: #ad9a70; }
.coming-badge { padding: 4px 7px; border-radius: 4px; background: #f3f5f4; color: #9aa49f; font-size: 8px; }
.page-footer { display: flex; justify-content: space-between; gap: 14px; margin-top: 20px; color: #a4aea9; font-size: 8px; }
.page-footer > span:first-child { font-size: 9px; font-weight: 700; letter-spacing: .7px; color: #718078; }
.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; }

.form-dialog { width: min(480px, calc(100% - 28px)); max-height: min(90vh, 760px); padding: 0; overflow: auto; border: 1px solid #e2e9e4; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 22px 70px rgba(27, 49, 38, .2); }
.holding-dialog { width: min(590px, calc(100% - 28px)); }
.form-dialog::backdrop { background: rgba(24, 37, 31, .34); backdrop-filter: blur(2px); }
.form-dialog form { padding: 23px; }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.dialog-heading h2 { margin-top: 1px; font-size: 18px; }
.dialog-close { width: 28px; height: 28px; border: 0; border-radius: 6px; background: #f4f6f5; color: #839089; font-size: 19px; cursor: pointer; }
.dialog-copy { margin: 10px 0 18px; color: #84918b; font-size: 10px; line-height: 1.6; }
.field-label { display: block; margin-bottom: 6px; color: #68766f; font-size: 10px; font-weight: 600; }
.text-input { width: 100%; min-height: 37px; padding: 0 10px; border: 1px solid #e1e8e3; border-radius: 6px; outline: none; background: #fff; color: #34443c; font-size: 11px; }
.text-input:focus { border-color: #8eb59c; box-shadow: 0 0 0 3px #eaf3ed; }
.text-input::placeholder { color: #b3bdb7; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 12px; }
.full-field { grid-column: 1 / -1; }
.form-field[hidden] { display: none; }
.optional-label { margin-left: 4px; color: #a6b0ab; font-size: 9px; font-weight: 400; }
.form-hint { margin-top: 15px; padding: 9px 10px; border-radius: 6px; background: #f6f8f6; color: #87958d; font-size: 9px; line-height: 1.5; }
.dialog-error { min-height: 16px; margin-top: 7px; color: #b14f46; font-size: 10px; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; margin-top: 15px; }
.toast { position: fixed; right: 25px; bottom: 24px; z-index: 10; max-width: min(380px, calc(100vw - 32px)); padding: 11px 14px; border: 1px solid #dce5df; border-radius: 7px; background: #243a30; color: #fff; box-shadow: 0 8px 25px rgba(20, 40, 30, .16); font-size: 10px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .18s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1160px) {
  .main-content { padding: 0 25px 24px; }
  .sidebar { width: 205px; }
  .main-content { margin-left: 205px; }
  .content-grid { grid-template-columns: minmax(0, 1fr) 245px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .sidebar { position: static; width: auto; height: 58px; padding: 0 16px; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; }
  .sidebar-label, .sidebar-foot { display: none; }
  .main-nav { margin-left: auto; display: flex; }
  .nav-link { min-height: 34px; padding: 0 8px; gap: 6px; font-size: 10px; }
  .nav-icon { width: auto; font-size: 13px; }
  .soon { display: none; }
  .main-content { margin-left: 0; padding: 0 18px 22px; }
  .topbar { height: 49px; }
  .content-grid { grid-template-columns: 1fr; }
  .right-column { grid-template-columns: 1fr 1fr; align-items: stretch; }
}
@media (max-width: 580px) {
  .main-content { padding: 0 13px 18px; }
  .sidebar { padding: 0 10px; }
  .brand { gap: 7px; font-size: 15px; }
  .brand-mark { width: 24px; height: 24px; }
  .main-nav { gap: 1px; }
  .nav-link { padding: 0 6px; font-size: 0; }
  .nav-icon { font-size: 16px; }
  .page-heading { align-items: start; flex-direction: column; padding: 23px 0 17px; }
  h1 { font-size: 24px; }
  .heading-actions { width: 100%; }
  .heading-actions .button { flex: 1; padding: 0 8px; font-size: 9px; }
  .notice-bar { align-items: start; padding: 9px; line-height: 1.5; }
  .notice-date { display: none; }
  .summary-grid { gap: 8px; margin: 11px 0; }
  .summary-card { min-height: 108px; padding: 12px; }
  .summary-value { font-size: 19px; }
  .muted-value { font-size: 13px; }
  .summary-caption { font-size: 8px; }
  .panel { padding: 14px; }
  .holdings-panel { padding: 14px 0 0; }
  .holdings-panel > .panel-heading { padding: 0 13px 12px; }
  .select-control { min-width: 95px; font-size: 9px; }
  table { min-width: 630px; }
  th:first-child, td:first-child { padding-left: 13px; }
  th:last-child, td:last-child { padding-right: 13px; }
  .table-footer { padding: 0 13px; font-size: 8px; }
  .right-column { grid-template-columns: 1fr; }
  .secondary-grid { grid-template-columns: 1fr; gap: 9px; margin-top: 10px; }
  .secondary-grid .panel { min-height: 120px; padding: 14px; }
  .page-footer { flex-direction: column; gap: 6px; }
  .form-dialog form { padding: 18px; }
  .form-grid { gap: 10px 8px; }
}
