/* ==========================================================================
   우리자산 스타일시트
   1) 위쪽: 참고용 React UI 데모(asset-manager-ui)의 CSS 를 그대로 옮긴 부분
   2) 아래쪽: EJS 화면에 필요해서 새로 추가한 부분 (표, 폼, 로그인, 모바일 하단 탭 등)
   색을 바꾸고 싶다면 바로 아래 :root 의 변수만 고치면 돼요.
   ========================================================================== */
:root {
  --up: #17924f;     /* 상승·이익 색 (한국식 "빨강=상승"으로 바꾸려면 #e0525e 등으로) 이전색 : #4b9a7a;  */
  --down: #d6304a;   /* 하락·손실 색 (한국식으로 바꾸려면 #4d8fbb 등으로) 이전색 : #d9646f;*/
  --flat: #8b8595;
  --line: #eeeaf5;
  --accent: #a94f98;
}

/* ───────── 1) 참고 UI 원본 ───────── */
* { box-sizing:border-box; }
body {
  margin:0;
  font-family:Inter,"Pretendard","Noto Sans KR","Apple SD Gothic Neo","Malgun Gothic",system-ui,-apple-system,"Segoe UI",sans-serif;
  color:#29263a;
  background:#fbfaff;
}
button,input,select { font:inherit; }
button { cursor:pointer; border:0; }
.app { display:flex; min-height:100vh; }
.sidebar {
  width:238px;
  background:#fff;
  border-right:1px solid #eeeaf5;
  padding:27px 16px 18px;
  display:flex;
  flex-direction:column;
  position:fixed;
  inset:0 auto 0 0;
}
.brand {
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 10px 34px;
}
.brandMark {
  width:36px;
  height:36px;
  border-radius:12px;
  background:linear-gradient(135deg,#f3a9d8,#a9d9fa);
  display:grid;
  place-items:center;
  color:#fff;
  font-weight:800;
}
.brand b { display:block; font-size:17px; }
.brand span {
  font-size:10px;
  color:#aaa5b7;
  letter-spacing:1px;
}
.navLabel {
  font-size:10px;
  font-weight:800;
  color:#b4afbe;
  padding:0 12px 10px;
  letter-spacing:1.3px;
}
.navItem {
  width:100%;
  height:45px;
  border-radius:12px;
  background:transparent;
  color:#777283;
  display:flex;
  align-items:center;
  gap:12px;
  padding:0 12px;
  margin:2px 0;
  text-align:left;
}
.navItem.active {
  background:linear-gradient(100deg,#fff0fa,#f0f7ff);
  color:#b657a4;
  font-weight:700;
}
.navItem i {
  margin-left:auto;
  background:#f2d7eb;
  color:#a94f98;
  font-size:10px;
  border-radius:20px;
  padding:3px 7px;
  font-style:normal;
}
.sidebarBottom { margin-top:auto; }
.profileMini {
  border-top:1px solid #eeeaf5;
  margin-top:12px;
  padding:18px 8px 4px;
  display:flex;
  align-items:center;
  gap:9px;
}
.profileMini div:nth-child(2) { flex:1; }
.profileMini b,.profileMini span { display:block; }
.profileMini b { font-size:12px; }
.profileMini span { font-size:10px; color:#aaa; }
.avatar,.topAvatar {
  display:grid;
  place-items:center;
  background:#f6d9ec;
  color:#a84c94;
  border-radius:50%;
  font-weight:700;
}
.avatar {
  width:34px;
  height:34px;
  font-size:12px;
}
.main {
  margin-left:238px;
  width:calc(100% - 238px);
  padding:0 42px 50px;
}
.topbar {
  height:94px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  border-bottom:1px solid #eeeaf5;
}
.eyebrow {
  font-size:9px;
  letter-spacing:1.8px;
  color:#aaa3b3;
  font-weight:800;
}
.topbar h1 { font-size:22px; margin:4px 0 0; }
.topActions {
  display:flex;
  align-items:center;
  gap:14px;
}
.iconBtn {
  width:38px;
  height:38px;
  background:#fff;
  border:1px solid #eeeaf5;
  border-radius:12px;
  position:relative;
  color:#7b7585;
}
.iconBtn em {
  width:6px;
  height:6px;
  border-radius:50%;
  background:#e58fc8;
  position:absolute;
  right:8px;
  top:8px;
}
.topAvatar { width:37px; height:37px; }
.content {
  max-width:1180px;
  margin:0 auto;
  padding-top:28px;
}
.hero {
  display:flex;
  justify-content:space-between;
  align-items:end;
  padding:4px 3px 27px;
}
.hello { font-size:13px; color:#85808f; }
.hello span { color:#d57bc1; }
.hero h2 {
  font-size:26px;
  line-height:1.35;
  margin:8px 0 0;
  font-weight:500;
}
.hero h2 strong { font-weight:800; }
.primary {
  display:inline-flex;
  align-items:center;
  gap:7px;
  background:linear-gradient(135deg,#e79bd0,#9dcff5);
  color:white;
  padding:11px 16px;
  border-radius:12px;
  font-weight:700;
  box-shadow:0 8px 20px #deb9d633;
}
.secondary {
  display:inline-flex;
  align-items:center;
  gap:7px;
  background:#fff;
  border:1px solid #e9e4f0;
  color:#665f70;
  padding:10px 14px;
  border-radius:11px;
  font-weight:600;
}
.statGrid {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:15px;
  margin-bottom:16px;
}
.stat {
  border-radius:17px;
  padding:20px 20px 18px;
  min-height:145px;
  position:relative;
  overflow:hidden;
}
.stat.pink { background:linear-gradient(145deg,#fff0f9,#ffe8f4); }
.stat.blue { background:linear-gradient(145deg,#eef9ff,#e6f3ff); }
.stat.lavender { background:linear-gradient(145deg,#f6f1ff,#eee7ff); }
.stat.mint { background:linear-gradient(145deg,#effcf8,#e5f7f1); }
.statIcon {
  position:absolute;
  right:16px;
  top:16px;
  width:31px;
  height:31px;
  background:#ffffffaa;
  border-radius:10px;
  display:grid;
  place-items:center;
  color:#a969a0;
}
.stat>span { font-size:12px; color:#817b8a; }
.stat>strong {
  display:block;
  font-size:23px;
  margin:12px 0 8px;
  letter-spacing:-.6px;
}
.stat small {
  display:flex;
  align-items:center;
  gap:2px;
  color:#a45598;
  font-weight:700;
}
.stat.blue small { color:#4d8fbb; }
.stat.mint small { color:#4f987d; }
.grid2 {
  display:grid;
  grid-template-columns:1.25fr 1fr;
  gap:16px;
  margin-bottom:16px;
}
.card {
  background:#fff;
  border:1px solid #eeeaf4;
  border-radius:18px;
  padding:21px 22px;
  box-shadow:0 8px 30px #4b385a06;
}
.cardHead {
  display:flex;
  justify-content:space-between;
  align-items:start;
  margin-bottom:14px;
}
.card h3 { font-size:15px; margin:0 0 5px; }
.card p {
  font-size:11px;
  color:#aaa4b1;
  margin:0;
}
.periods {
  background:#f8f6fa;
  padding:3px;
  border-radius:9px;
}
.periods button {
  background:transparent;
  padding:5px 9px;
  border-radius:7px;
  font-size:10px;
  color:#999;
}
.periods button.sel {
  background:#fff;
  color:#9d5792;
  box-shadow:0 2px 6px #0000000c;
  font-weight:700;
}
.chartValue {
  font-size:23px;
  font-weight:800;
  margin:5px 0 2px;
}
.up {
  font-size:10px;
  color:#4b9a7a;
  vertical-align:middle;
  display:inline-flex;
  align-items:center;
  gap:2px;
  margin-left:5px;
}
.chart { height:180px; }
.pieWrap {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:22px;
  height:225px;
}
.pie {
  width:210px;
  height:210px;
  position:relative;
}
.pieCenter {
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
.pieCenter b { font-size:18px; }
.pieCenter span { font-size:10px; color:#aaa; }
.legend { width:150px; }
.legend>div {
  display:flex;
  align-items:center;
  gap:7px;
  padding:8px 0;
  font-size:11px;
  color:#777;
}
.legend b { margin-left:auto; color:#3e3947; }
.dot {
  width:8px;
  height:8px;
  border-radius:3px;
}
.incomeTotal {
  font-size:29px;
  font-weight:800;
  margin:10px 0 20px;
}
.incomeRows>div {
  display:flex;
  justify-content:space-between;
  border-top:1px solid #f0edf4;
  padding:12px 0;
  font-size:12px;
}
.incomeRows span { color:#89838f; }
.positive { color:#4b9a7a; }
.dividendHead {
  display:flex;
  align-items:baseline;
  gap:7px;
}
.dividendHead b { font-size:27px; }
.dividendHead span { font-size:10px; color:#aaa; }
.miniBars {
  height:150px;
  display:flex;
  align-items:end;
  justify-content:space-around;
  gap:10px;
  padding-top:17px;
}
.miniBars>div {
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:end;
  align-items:center;
  gap:7px;
}
.bar {
  width:22px;
  border-radius:8px 8px 3px 3px;
  background:linear-gradient(#efa7d7,#a8d9f7);
  min-height:20px;
}
.miniBars span { font-size:9px; color:#aaa; }
.textBtn {
  background:none;
  color:#9b5a91;
  display:flex;
  align-items:center;
  gap:3px;
  font-size:11px;
  font-weight:700;
}
.assetTable { font-size:11px; margin-top:14px; }
.tr {
  display:grid;
  grid-template-columns:2fr 1fr 1fr 1fr;
  align-items:center;
  gap:15px;
  border-top:1px solid #f0edf4;
  padding:13px 2px;
}
.tr.th {
  border-top:0;
  color:#aaa;
  font-size:10px;
  padding-top:2px;
}
.assetName {
  display:flex;
  align-items:center;
  gap:10px;
}
.coin {
  width:33px;
  height:33px;
  border-radius:10px;
  background:#f7edf7;
  display:grid;
  place-items:center;
  font-weight:800;
  color:#a85d9c;
}
.assetName b,.assetName small { display:block; }
.assetName small {
  font-size:9px;
  color:#aaa;
  margin-top:3px;
}
.pageIntro {
  display:flex;
  justify-content:space-between;
  align-items:end;
  padding:22px 2px 25px;
}
.pageIntro h2 { margin:0; font-size:25px; }
.pageIntro p {
  margin:7px 0 0;
  color:#96909e;
  font-size:12px;
}
.statGrid.small { grid-template-columns:repeat(3,1fr); }
.statGrid.spaced { margin-top: 16px; }
.stat.simple {
  background:#fff;
  border:1px solid #eeeaf4;
  min-height:105px;
}
.stat.simple strong { font-size:22px; margin-top:13px; }
.emptyState { text-align:center; padding:70px 20px; }
.emptyIcon {
  width:55px;
  height:55px;
  margin:0 auto 15px;
  border-radius:17px;
  background:linear-gradient(135deg,#fff0fa,#edf8ff);
  display:grid;
  place-items:center;
  color:#bc76ae;
}
.emptyState h3 { font-size:15px; margin:0 0 7px; }
.emptyState p { font-size:11px; margin-bottom:18px; }
.modalBack {
  position:fixed;
  inset:0;
  background:#29203a55;
  backdrop-filter:blur(3px);
  display:grid;
  place-items:center;
  z-index:10;
}
.modal {
  width:450px;
  background:#fff;
  border-radius:22px;
  padding:25px;
  box-shadow:0 25px 70px #39263a33;
}
/* 표가 들어가는 모달(입출금 내역, 메모 등)은 PC에서 더 넓게. 화면이 좁으면 자동으로 화면 폭에 맞춰 줄어듦 */
.modal.wide { width: min(760px, calc(100% - 28px)); }
.modalTop {
  display:flex;
  justify-content:space-between;
  margin-bottom:22px;
}
.modalTop h2 { margin:0; font-size:19px; }
.modalTop p {
  font-size:10px;
  color:#aaa;
  margin:6px 0;
}
.modalTop>button {
  background:#f7f5f8;
  width:30px;
  height:30px;
  border-radius:9px;
  font-size:20px;
  color:#777;
}
.modal label,.field label {
  display:block;
  font-size:11px;
  color:#696271;
  font-weight:700;
  margin:12px 0 7px;
}
.input,input,select {
  height:43px;
  width:100%;
  border:1px solid #e7e2ec;
  border-radius:11px;
  outline:none;
  padding:0 12px;
  background:#fff;
  color:#423d49;
}
.input:focus,input:focus,select:focus { border-color:#d79bca; box-shadow:0 0 0 3px #f8eafa; }
.input.search {
  display:flex;
  align-items:center;
  gap:7px;
  color:#aaa;
}
.input.search input {
  border:0;
  padding:0;
  height:auto;
  box-shadow:none;
}
.two {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.modalActions {
  display:flex;
  justify-content:end;
  gap:8px;
  margin-top:24px;
}
.quickChoices { display:grid; gap:9px; }
.quickChoices button {
  padding:15px;
  text-align:left;
  border-radius:12px;
  background:#faf8fc;
  border:1px solid #eee8f3;
}
.inviteNote {
  background:#faf5fc;
  border-radius:11px;
  padding:12px;
  font-size:10px;
  color:#8f8191;
  margin-top:14px;
}
@media(max-width:900px) {
  .sidebar { width:76px; }
  .brand div:last-child,.navItem span,.navLabel,.profileMini div:nth-child(2),.profileMini>svg { display:none; }
  .brand { padding:0 4px 34px; }
  .navItem { justify-content:center; }
  .main {
    margin-left:76px;
    width:calc(100% - 76px);
    padding:0 20px;
  }
  .statGrid { grid-template-columns:1fr 1fr; }
  .grid2 { grid-template-columns:1fr; }
  .tr { grid-template-columns:2fr 1fr 1fr; }
  .tr>*:last-child { display:none; }
}
@media(max-width:600px) {
  .statGrid { grid-template-columns:1fr; }
  .hero {
    align-items:start;
    gap:20px;
    flex-direction:column;
  }
  .hero h2 { font-size:22px; }
  .topbar { height:76px; }
  .content { padding-top:18px; }
  .main { padding:0 12px; }
  .pageIntro {
    gap:15px;
    align-items:start;
    flex-direction:column;
  }
  .modal { width:calc(100% - 28px); }
}

/* ───────── 2) 새로 추가한 부분 ───────── */
a { color: inherit; text-decoration: none; }
.ic { flex: none; vertical-align: middle; }
button:focus-visible, a:focus-visible { outline: 2px solid #d79bca; outline-offset: 2px; }
input[type=checkbox] { width: auto; height: auto; padding: 0; }
input[readonly] { background: #faf8fc; }
[hidden] { display: none !important; }

/* 손익 색 */
.positive { color: var(--up); }
.negative { color: var(--down); }
.flat { color: var(--flat); }
.stat small.negative { color: var(--down); }
.stat small.flat { color: var(--flat); }
.stat small em { font-style: normal; font-weight: 500; color: #9a93a5; margin-left: 6px; }
.stat.simple small.sub { display: block; margin-top: 2px; font-size: 11px; font-weight: 600; color: #9a93a5; }
.stat.simple small.sub.positive { color: var(--up); }
.stat.simple small.sub.negative { color: var(--down); }
.incomeTotal.negative { color: var(--down); }
.incomeTotal.positive { color: var(--up); }

/* 사이드바를 링크(a)로 바꾼 부분 */
.brand { color: inherit; }
.profileMini { color: inherit; }
.navItem { font-size: 14px; }
.navItem:hover:not(.active) { background: #faf6fc; }
.navItem i { position: relative; }

/* 상단 알림·계정 팝업 */
.popWrap { position: relative; }
.topAvatar { cursor: pointer; border: 0; font-size: 14px; }
.popPanel { position: absolute; top: calc(100% + 8px); right: 0; width: 300px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: 0 18px 50px #39263a22; padding: 8px; z-index: 20; }
.popPanel.right { width: 220px; }
.popTitle { font-size: 10px; font-weight: 800; color: #b4afbe; padding: 8px 10px; letter-spacing: 1.2px; }
.popItem { display: block; padding: 10px; border-radius: 10px; font-size: 12px; }
.popItem:hover { background: #faf6fc; }
.popItem b { display: block; font-size: 12.5px; margin-bottom: 3px; }
.popItem span { color: #8b8595; font-size: 11px; line-height: 1.45; }
.popItem.plain { display: flex; align-items: center; gap: 8px; color: #5a5464; font-weight: 600; font-size: 12.5px; }
.btnReset { width: 100%; background: none; text-align: left; }
.popEmpty { padding: 14px 10px; font-size: 12px; color: #aaa; }
.popUser { padding: 10px; border-bottom: 1px solid #f0edf4; margin-bottom: 6px; }
.popUser b { display: block; font-size: 13px; }
.popUser span { font-size: 11px; color: #aaa; word-break: break-all; }

/* 알림 메시지 */
.flash { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; padding: 12px 14px;
  border-radius: 12px; font-size: 13px; font-weight: 600; line-height: 1.5; }
.flash.success { background: #effcf8; color: #3f8a70; border: 1px solid #d3f0e4; }
.flash.error { background: #fff1f3; color: #c0485a; border: 1px solid #fbd6db; }
.flash.warn { background: #fff8ec; color: #a8741f; border: 1px solid #f6e3bd; }
.flashClose { background: none; color: inherit; opacity: .6; padding: 2px; display: grid; place-items: center; }

/* 버튼 */
.primary, .secondary { cursor: pointer; }
.primary:hover { filter: brightness(1.04); }
.secondary:hover { background: #faf6fc; }
.primary.block, .secondary.block { display: flex; justify-content: center; width: 100%; margin-top: 14px; padding: 13px; }
.dangerBtn { background: #fff1f3; color: #c0485a; padding: 10px 14px; border-radius: 11px; font-weight: 700; }
.dangerBtn:hover { background: #ffe6ea; }
.linkBtn { background: none; color: #9b5a91; font-size: 11px; font-weight: 700; padding: 10px 0 4px; }
.textBtn { text-decoration: none; }

/* 카드 · 텍스트 */
.card.spaced { margin-top: 16px; }
.cardHead p { line-height: 1.5; }
.footNote { font-size: 11px; color: #aaa4b1; margin: 14px 2px 0; line-height: 1.6; }
.footNote a { color: var(--accent); font-weight: 700; }
.lastTradeNote { margin: 18px 2px 20px !important; }

.yearChips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.yearChip { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 12px; border-radius: 12px; font-size: 12px; background: #f4eff8; white-space: nowrap; }
.yearChip span { color: #8a7f91; }
.yearChip b { font-weight: 700; color: #29263a; font-size: 14px; }
.yearChip b.positive { color: var(--up); }
.yearChip b.negative { color: var(--down); }
.yearChip.c2 { background: #eaf3fb; }
.yearChip.c3 { background: #eaf8f0; }
.yearChip.c4 { background: #fff3e6; }
.yearChip.c5 { background: #fdeaf1; }
.yearChip.c6 { background: #f1eefb; }
.yearChip.c7 { background: #eef7f3; }
.yearChip.c8 { background: #fef6e8; }
.hint { font-size: 11px; color: #9a93a5; line-height: 1.6; margin: 8px 0 0; }
.muted { color: #aaa4b1; }
.emptyState.slim { padding: 22px 10px; }
.emptyState .secondary { text-decoration: none; }

/* 표 */
.tableWrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.dataTable { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 780px; }
.dataTable th { font-size: 10px; color: #aaa; font-weight: 700; text-align: left; padding: 0 10px 10px; white-space: nowrap; }
.dataTable td { padding: 13px 10px; border-top: 1px solid #f0edf4; vertical-align: middle; }
.dataTable tbody tr:hover { background: #fdfbfe; }
.dataTable .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dataTable .assetName small { font-size: 10.5px; }
small.block { display: block; font-size: 10px; margin-top: 3px; font-weight: 600; }
.regCell { font-size: 11px; color: #6d6777; white-space: nowrap; }
.rowActions { text-align: right; white-space: nowrap; }
.rowActions form { display: inline-block; margin: 0; }
.iconAction { width: 30px; height: 30px; border-radius: 9px; background: #f7f5f8; color: #7b7585; display: inline-grid; place-items: center; margin-left: 3px; }
.iconAction:hover { background: #f3e6f2; color: var(--accent); }
.iconAction.danger:hover { background: #ffe9ec; color: #c0485a; }
.badge { display: inline-block; padding: 2px 7px; border-radius: 20px; background: #f4eff8; color: #8a5f96; font-size: 10px; font-weight: 700; }
.badge.deposit { background: #eef7ff; color: #4d8fbb; }
.badge.installment { background: #f0fbf6; color: #4f987d; }
.badge.parking { background: #fff5e8; color: #b17b31; }
.badge.me { background: #fde8f5; color: #b0479a; }
.badge.outline { background: transparent; border: 1px solid #e5e0ea; color: #8a8393; }
.dataTable tr.closedRow td { color: #c4bfcb; }
.dataTable.compact { min-width: 0; }
.dataTable.compact th, .dataTable.compact td { padding: 7px 8px; font-size: 11.5px; }
.txAddForm {
  display: grid; margin-top: 14px; gap: 8px 10px;
  grid-template-columns: 150px 1fr auto;
  grid-template-areas: "date amount amount" "memo memo btn";
}
.txAddForm input[type=date] { grid-area: date; }
.txAddForm input[name=amount] { grid-area: amount; }
.txAddForm input[name=memo] { grid-area: memo; }   /* 메모는 다음 줄, 추가 버튼은 그 옆에 */
.txAddForm button.small { grid-area: btn; padding: 0 16px; height: 100%; font-size: 12px; }
.iconAction { position: relative; }
.countDot { position: absolute; top: -4px; right: -4px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 9px; font-weight: 700; line-height: 15px; text-align: center; }
.progress { height: 5px; background: #f0edf4; border-radius: 5px; margin: 6px 0 4px; overflow: hidden; width: 150px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, #efa7d7, #a8d9f7); }
.period { font-size: 11px; color: #5a5464; white-space: nowrap; }
a.tr:hover { background: #fcfaff; }

/* 대시보드 */
.chart { position: relative; }
.areaSvg { width: 100%; height: 100%; display: block; overflow: visible; }
.axisText { font-size: 10px; fill: #aaa; }
.chartTip { position: absolute; pointer-events: none; background: #29263a; color: #fff; font-size: 11px; padding: 6px 9px;
  border-radius: 8px; white-space: nowrap; transform: translate(-50%, -115%); z-index: 2; }
.chartNote { font-size: 11px; color: #aaa4b1; margin: 8px 0 0; }
.chartEmpty { height: 100%; display: grid; place-items: center; color: #aaa4b1; font-size: 12px; }
.donutSvg { width: 210px; height: 210px; display: block; }
.miniBars .bar { width: min(22px, 60%); min-height: 6px; }
.miniBars .bar.empty { background: #efeaf3; min-height: 3px; }
.miniBars > div.now span { color: var(--accent); font-weight: 800; }
.miniBars > div { min-width: 0; }

/* 모달 · 폼 */
.modalBack[hidden] { display: none; }
.modal { max-height: calc(100dvh - 40px); overflow-y: auto; }
.modal p { margin: 0; }
.field { margin-bottom: 2px; }
.field label { margin-top: 12px; }
.two { align-items: start; }
.checkRow { display: flex !important; align-items: center; gap: 8px; font-size: 12px !important; color: #5a5464 !important; font-weight: 600; margin: 12px 0 !important; cursor: pointer; }
.checkRow input { margin: 0; accent-color: #c982d9; }
.checkRow.boxed { height: 43px; border: 1px solid #e7e2ec; border-radius: 11px; padding: 0 12px; margin: 0 !important; }
.searchResults { border: 1px solid #eee8f3; border-radius: 12px; margin-top: 8px; max-height: 230px; overflow: auto; background: #fff; }
.searchItem { display: flex; width: 100%; text-align: left; gap: 10px; align-items: center; padding: 10px 12px; background: none; border-bottom: 1px solid #f4f1f7; }
.searchItem:last-child { border-bottom: 0; }
.searchItem:hover, .searchItem:focus-visible { background: #faf6fc; }
.searchItem b { font-size: 12.5px; }
.searchItem small { color: #aaa; font-size: 10.5px; display: block; margin-top: 2px; }
.searchItem .badge { margin-left: auto; }
.searchMsg { padding: 12px; font-size: 12px; color: #9a93a5; line-height: 1.5; }
.chosen { display: flex; align-items: center; gap: 10px; background: #faf5fc; border: 1px solid #f0dff0; border-radius: 12px; padding: 10px 12px; margin-top: 8px; font-size: 12px; }
.chosen b { font-size: 13px; }
.chosen small { color: #9a93a5; }
.chosen .clear { margin-left: auto; background: none; color: #9a93a5; font-size: 11px; font-weight: 700; }
.moreOpts { margin-top: 10px; }
.moreOpts summary { cursor: pointer; font-size: 11.5px; color: #8b8595; font-weight: 700; padding: 6px 0; }
.quickChoices a { display: flex; align-items: center; gap: 12px; padding: 15px; border-radius: 12px; background: #faf8fc; border: 1px solid #eee8f3; font-weight: 600; font-size: 14px; }
.quickChoices a:hover { background: #fbeff8; }
.qi { width: 34px; height: 34px; border-radius: 10px; background: #fff; display: grid; place-items: center; color: var(--accent); }
.inviteNote.big { font-size: 12.5px; line-height: 1.6; padding: 14px; margin: 0 0 16px; }

/* 가족 · 초대 */
.inviteList { display: grid; gap: 10px; }
.inviteRow { display: grid; grid-template-columns: 150px 1fr auto auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid #eee8f3; border-radius: 12px; }
.inviteRow form { margin: 0; }
.inviteRow.fresh { border-color: #e79bd0; background: #fff8fd; }
.inviteMeta b { display: block; font-size: 12.5px; }
.inviteMeta small { font-size: 10px; }
.inviteUrl { height: 38px; font-size: 11px; color: #6d6777; }
.inviteRow .secondary { padding: 8px 12px; font-size: 12px; }

/* 설정 */
.settingsGrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.card.wide { grid-column: 1 / -1; }
.settings .modalActions { margin-top: 16px; }

/* 로그인 · 가입 */
body.bare { background: linear-gradient(160deg, #fff0fa, #f0f7ff 60%, #fbfaff); min-height: 100vh; }
.authWrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.authCard { width: 100%; max-width: 400px; background: #fff; border: 1px solid #eeeaf4; border-radius: 22px; padding: 30px 28px; box-shadow: 0 25px 70px #39263a1a; }
.authBrand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.authBrand b { display: block; font-size: 17px; }
.authBrand span { font-size: 10px; color: #aaa5b7; letter-spacing: 1px; }
.authTitle { font-size: 22px; margin: 0 0 6px; line-height: 1.35; }
.authSub { font-size: 13px; color: #85808f; line-height: 1.6; margin: 0 0 18px; }
.authForm .field { margin-bottom: 4px; }
.authLinks { text-align: center; font-size: 12px; color: #85808f; margin: 18px 0 0; }
.authLinks a { color: var(--accent); font-weight: 700; }
.formError { background: #fff1f3; color: #c0485a; border: 1px solid #fbd6db; border-radius: 11px; padding: 11px 12px; font-size: 12.5px; margin-bottom: 14px; line-height: 1.5; }
.errorCard { max-width: 460px; margin: 40px auto; }

/* 태블릿 이하에서 사이드바가 아이콘만 남을 때 */
@media (max-width: 900px) {
  .settingsGrid { grid-template-columns: 1fr; }
  .sidebar .navItem i { position: absolute; margin: 0; top: 4px; right: 6px; }
  .navItem { position: relative; }
  .brand { justify-content: center; }
}

/* 폰: 사이드바를 하단 탭 바로 바꿈 */
@media (max-width: 700px) {
  .sidebar { inset: auto 0 0 0; width: 100%; height: calc(62px + env(safe-area-inset-bottom)); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    flex-direction: row; border-right: 0; border-top: 1px solid var(--line); z-index: 30; align-items: stretch; }
  .sidebar .brand, .sidebar .navLabel, .sidebar .profileMini { display: none; }
  .sidebar nav { display: flex; flex: 1; gap: 2px; }
  .sidebarBottom { margin: 0; display: flex; }
  .sidebar .navItem { flex-direction: column; justify-content: center; gap: 3px; height: 50px; width: auto; flex: 1; padding: 0 4px; margin: 0; font-size: 10px; text-align: center; }
  .sidebar .navItem span { display: block; white-space: nowrap; }
  .sidebar .navItem i { top: 1px; right: calc(50% - 22px); }
  .sidebarBottom .navItem { min-width: 52px; }
  .main { margin-left: 0; width: 100%; padding: 0 14px calc(86px + env(safe-area-inset-bottom)); }
  .topbar { height: 68px; }
  .popPanel { width: min(300px, calc(100vw - 28px)); }

  .statGrid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 14px; min-height: 112px; }
  .stat > strong { font-size: 17px; margin: 9px 0 6px; }
  .stat small { font-size: 11px; flex-wrap: wrap; }
  .statIcon { display: none; }
  .statGrid.small { grid-template-columns: 1fr; }
  .stat.simple { min-height: auto; }
  .stat.simple strong { margin: 8px 0 4px; }
  .pieWrap { flex-direction: column; height: auto; gap: 10px; }
  .legend { width: 100%; max-width: 260px; }
  .incomeTotal { font-size: 24px; }
  .modal { padding: 20px; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .inviteRow { grid-template-columns: 1fr auto; }
  .inviteUrl { grid-column: 1 / -1; order: 3; }
  .authCard { padding: 26px 22px; }
}

.up.negative { color: var(--down); }


/*20260921 추가 수정 코드 (글씨체, 글씨색상 등)*/
body { font-family: "Pretendard Variable", Pretendard, Inter, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; }
.hero h2 { font-size: 23px; }
.hero h2 strong, .stat > strong, .chartValue, .incomeTotal, .dividendHead b { font-weight: 650; }
.stat > strong { font-size: 21px; letter-spacing: -.4px; }
.topbar h1 { font-size: 19px; font-weight: 650; }
.card h3 { font-weight: 650; }
.topbar h1 {font-size:15px;}
/* 로고 글자: 분홍 → 하늘 그라데이션 */
.brand b, .authBrand b {
  background: linear-gradient(100deg, #cf6db4 0%, #8f8fe0 55%, #58a8e6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 800;
  letter-spacing: -.3px;
}

/*20260922 대시보드 수정*/
/* ───── 대시보드 개편 추가분 (style.css 맨 아래에 붙여넣으세요) ───── */
.stat small.subline { font-size: 10.5px; font-weight: 600; color: #9a93a5; margin-top: 4px; }
.stat small.subline.positive { color: var(--up); }
.stat small.subline.negative { color: var(--down); }
.stat small.subline.flat { color: var(--flat); }
.incomeRows.extra { margin-top: 10px; border-top: 1px dashed #e7e2ec; }
.incomeRows.extra > div:first-child { border-top: 0; }
.card > .hint { margin: 8px 0 0; }
.retCell b { display: block; }
.retCell small { display: block; font-size: 10px; font-weight: 600; margin-top: 3px; }
.miniBars > div[data-month] { cursor: pointer; border-radius: 8px; }
.miniBars > div[data-month]:hover { background: #faf6fc; }
.miniBars > div[data-month]:focus-visible { outline: 2px solid #d79bca; outline-offset: 1px; }
.divTotal { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 12px; padding: 14px; border-radius: 14px; background: #faf5fc; }
.divTotal b { font-size: 22px; }
.divList { display: grid; gap: 4px; max-height: 300px; overflow: auto; }
.divRow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 4px; border-bottom: 1px solid #f4f1f7; }
.divRow:last-child { border-bottom: 0; }
.divRow b { font-size: 13px; }
.divRow small { display: block; margin-top: 3px; font-size: 10.5px; color: #9a93a5; font-weight: 500; }

/* ───── v2 추가: 거래 내역 / 배당 설정 / 통계 화면 (style.css 맨 아래에 붙여넣으세요) ───── */
.miniBars .bar.est { opacity: .42; }
.miniBars.tall { height: 170px; }
.dividendHead .sub2 { margin-left: 14px; font-size: 15px; }
.miniBtn { background: #f7f5f8; color: #6d6777; font-size: 11px; font-weight: 700; padding: 7px 10px; border-radius: 9px; margin-left: 3px; }
.miniBtn:hover { background: #f3e6f2; color: var(--accent); }
.miniBtn.danger:hover { background: #ffe9ec; color: #c0485a; }
.rowActions.manage { min-width: 170px; }
.modal.wide { width: min(640px, calc(100vw - 24px)); }
.two.three { grid-template-columns: 1fr 1fr 1fr; }
.modalActions.tight { margin-top: 12px; }
.subTitle { font-size: 12px; font-weight: 800; color: #8b8595; margin: 20px 0 8px; }
.tradeTable { min-width: 0; font-size: 11.5px; }
.sideBuy { color: var(--up); font-weight: 700; }
.sideSell { color: var(--down); font-weight: 700; }
.planList { display: grid; gap: 8px; }
.planRow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #eee8f3; border-radius: 12px; }
.planRow b { display: block; font-size: 12.5px; }
.planRow small { color: #9a93a5; font-size: 11px; }
.planRow form { margin: 0; }
.yearNav { display: flex; align-items: center; gap: 10px; }
.yearNav b { font-size: 14px; }
.yearNav .secondary { padding: 8px 12px; font-size: 12px; }
.yearNav .disabled { opacity: .4; pointer-events: none; }
.dataTable tr.faded td { color: #c4bfcb; }
@media (max-width: 700px) {
  .two.three { grid-template-columns: 1fr; }
  .rowActions.manage { min-width: 0; }
}
.trendDelta { font-size: 12px; font-weight: 700; margin: 2px 0 4px; }
.trendDelta.positive { color: var(--up); }
.trendDelta.negative { color: var(--down); }

/* 20260922 */
.refreshWrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.checkRow.inline { margin: 0 !important; font-size: 11px !important; }
.stat.simple small.sub b { font-weight: 700; }
.srcTag { display: inline-block; padding: 1px 6px; border-radius: 20px; background: #f4eff8; color: #8a5f96; font-size: 9px; font-weight: 700; margin-left: 4px; vertical-align: middle; }
.srcTag.api { background: #eef7ff; color: #4d8fbb; }
/* public/css/style.css 맨 아래에 이 4줄만 추가하세요 (이미 넣으신 srcTag 등은 건드리지 않아도 됩니다) */
.planRow.api { background: #eef7ff; border-color: #d9ecfb; }
.planRow.api b { display: inline-flex; align-items: center; gap: 4px; }
.planRow small.muted { display: block; margin-top: 3px; }

.refreshWrap .checkRow.inline { white-space: nowrap; }
.ownerSelect { height: 38px; border: 1px solid #e7e2ec; border-radius: 10px; padding: 0 10px; font-size: 12.5px; background: #fff; margin-right: 4px; }
.ownerSectionHead { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid #f0edf4; }
.card > .ownerSectionHead:first-of-type { margin-top: 4px; padding-top: 0; border-top: 0; }
.ownerSectionHead h4 { margin: 0; font-size: 13px; font-weight: 800; }
.ownerMiniStats { display: flex; gap: 14px; font-size: 11px; color: #8b8595; flex-wrap: wrap; }
.ownerMiniStats b { color: #29263a; font-weight: 700; margin-left: 3px; }

/* 정보 아이콘(ⓘ): 숫자 계산 기준을 설명하는 작은 버튼 + 팝업 */
.infoDot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: #ece7f0; color: #8b8595; font-size: 9.5px; font-weight: 700; font-style: normal;
  border: none; padding: 0; margin-left: 4px; cursor: pointer; vertical-align: middle; line-height: 1;
}
.infoDot:hover, .infoDot:focus-visible { background: #ddd3e6; color: #6d6777; }
.infoBubble {
  position: absolute; z-index: 500; max-width: 260px; padding: 10px 12px; border-radius: 10px;
  background: #2c2a33; color: #f4f1f7; font-size: 11.5px; line-height: 1.55; font-weight: 500;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
}

/* 표 정렬: 열 제목(날짜·금액 등)을 눌러 그 값 기준으로 줄을 다시 세울 수 있는 표 */
table[data-sortable] th[data-sort-key] { cursor: pointer; user-select: none; }
table[data-sortable] th[data-sort-key]::after { content: '\21c5'; margin-left: 4px; font-size: 9px; opacity: .35; display: inline-block; }
table[data-sortable] th[data-sort-key]:hover::after { opacity: .7; }
table[data-sortable] th[data-sort-key].sortAsc::after { content: '\25b2'; opacity: .85; color: #9d5792; }
table[data-sortable] th[data-sort-key].sortDesc::after { content: '\25bc'; opacity: .85; color: #9d5792; }

/* 주식모으기(정기 자동매수) 목록 */
.dcaList { display: flex; flex-direction: column; gap: 10px; }
.dcaRow {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px; border: 1px solid #f0edf4; border-radius: 12px; background: #fff;
}
.dcaRow.paused { background: #fbfafc; opacity: .65; }
.dcaRow .assetName { flex: 1 1 220px; min-width: 180px; }
.dcaRow .assetName b { font-size: 13px; }
.dcaRow .assetName small { font-size: 10.5px; }
.dcaRuns { display: flex; flex-wrap: wrap; gap: 5px; flex: 1 1 220px; min-width: 160px; }
.dcaRunChip {
  display: inline-block; padding: 3px 8px; border-radius: 20px; font-size: 10px; font-weight: 700;
  background: #f4eff8; color: #8a5f96; cursor: default;
}
.dcaRunChip.bought { background: #eef9f1; color: #3f9463; }
.dcaRunChip.skipped { background: #f7f5f8; color: #9a94a4; }
.dcaRow .rowActions { flex: 0 0 auto; margin-left: auto; }
