/* =========================================================
   MoneySave 전체 CSS (한번에 붙여넣기용) - 한국 금융 포털 톤
   ========================================================= */

/* ===== Theme (통합 root) ===== */
:root{
  /* 한국 금융 포털 톤 */
  --bg:#f4f6f9;
  --card:#ffffff;

  /* 텍스트 대비(진하게) */
  --text:#0b1220;
  --muted:#4b5563;

  /* 선/그림자(또렷) */
  --line:#dbe2ea;
  --radius:12px;
  --shadow:0 10px 24px rgba(15,23,42,.08);

  /* 메인/포인트 */
  --accent:#1d4ed8;       /* 진한 블루 */
  --accent-soft:#e8efff;  /* 블루 연한 배경 */
  --warn:#f97316;         /* 주황(혜택/강조) */
  --danger:#ef4444;

  /* 헤더 전용 */
  --h-bg:#ffffff;
  --h-fg:var(--text);
  --h-muted:var(--muted);
  --h-border:var(--line);
  --h-accent:var(--accent);
  --h-radius:12px;
  --h-shadow:0 10px 24px rgba(15,23,42,.10);
  --h-max:1200px;
  --h-height:60px;

  /* 폰트(한국 느낌) */
  --h-font:"Noto Sans KR","Apple SD Gothic Neo","Malgun Gothic",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

/* ===== Base ===== */
body{
  margin:0;
  font-family: var(--h-font);
  background:var(--bg);
  color:var(--text);
}
.wrap{ max-width:1200px; margin:0 auto; padding:12px 14px; }
.link{ cursor:pointer; }

/* ===== MoneySave Portal Header (Responsive) ===== */
.portal-header{
  position:sticky;
  top:0;
  z-index:1000;
  background:var(--h-bg);
  border-bottom:1px solid var(--h-border);
  font-family:var(--h-font);
  box-shadow:0 2px 10px rgba(15,23,42,.04);
}
.portal-header .wrap{
  max-width:var(--h-max);
  margin:0 auto;
  padding:0 16px;
  height:var(--h-height);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

/* ===== Brand ===== */
.brand{ display:flex; align-items:center; gap:10px; min-width:200px; }
.brand a{ text-decoration:none; color:var(--h-fg); display:flex; align-items:center; gap:10px; }

/* 로고 이미지 자리 */
.logo-img{
  width:180px;
  height:auto;
  object-fit:contain;
  border-radius:10px;
  background:#fff;
}

/* 브랜드 텍스트 */
.brand-text .title{
  font-weight:900;
  letter-spacing:-.4px;
  font-size:18px;
  line-height:1.1;
}
.brand-text .sub{
  font-size:12px;
  color:var(--h-muted);
  margin-top:3px;
}

/* ===== Desktop Nav ===== */
.nav{
  display:flex;
  align-items:center;
  gap:6px;
  flex:1;
  justify-content:center;
}
.nav a{
  text-decoration:none;
  color:var(--h-fg);
  padding:9px 10px;
  border-radius:10px;
  font-size:14px;
  white-space:nowrap;
  font-weight:700;
}
.nav a:hover{ background:#eef2ff; }
.nav a.active{
  color:var(--h-accent);
  background:var(--accent-soft);
  font-weight:900;
}

/* ===== Right ===== */
.right{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:180px;
  justify-content:flex-end;
}
.search{
  display:flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border:1px solid var(--h-border);
  border-radius:12px;
  background:#fff;
  min-width:120px;
}
.search input{
  border:0;
  outline:0;
  background:transparent;
  width:100%;
  font-size:13px;
}
.search .icon{ font-size:14px; color:var(--h-muted); }

.hamburger{
  display:none;
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid var(--h-border);
  background:#fff;
  cursor:pointer;
}
.hamburger:active{ transform:translateY(1px); }
.hamburger .bars{ width:18px; height:12px; margin:0 auto; position:relative; }
.hamburger .bars span{
  position:absolute;
  left:0; right:0;
  height:2px;
  background:var(--h-fg);
  border-radius:2px;
}
.hamburger .bars span:nth-child(1){ top:0; }
.hamburger .bars span:nth-child(2){ top:5px; opacity:.75; }
.hamburger .bars span:nth-child(3){ top:10px; }

/* ===== Mobile Drawer ===== */
.drawer-backdrop{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  display:none;
  z-index:1100;
}
.drawer{
  position:fixed;
  top:0;
  right:-350px;
  width:320px;
  height:100%;
  background:var(--h-bg);
  border-left:1px solid var(--h-border);
  box-shadow:var(--h-shadow);
  z-index:1200;
  transition:right .22s ease;
  display:flex;
  flex-direction:column;
}
.drawer.open{ right:0; }
.drawer-backdrop.open{ display:block; }

.drawer-head{
  height:var(--h-height);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 16px;
  border-bottom:1px solid var(--h-border);
}
.drawer-head .close{
  width:42px;
  height:42px;
  border-radius:12px;
  border:1px solid var(--h-border);
  background:#fff;
  cursor:pointer;
}
.drawer-body{ padding:14px; overflow:auto; }
.drawer-search{
  display:flex;
  gap:8px;
  align-items:center;
  padding:12px 12px;
  border:1px solid var(--h-border);
  border-radius:12px;
  background:#fff;
}
.drawer-search input{
  border:0;
  outline:0;
  background:transparent;
  width:100%;
  font-size:14px;
}
.drawer-nav{ margin-top:12px; display:flex; flex-direction:column; gap:6px; }
.drawer-nav a{
  text-decoration:none;
  color:var(--h-fg);
  padding:12px 12px;
  border-radius:12px;
  border:1px solid transparent;
  background:#fff;
  font-weight:800;
}
.drawer-nav a:hover{ background:#f1f5ff; }
.drawer-nav a.active{
  border-color:rgba(29,78,216,.25);
  background:var(--accent-soft);
  color:var(--h-accent);
  font-weight:900;
}

/* ===== Responsive ===== */
@media (max-width: 980px){
  .nav{ display:none; }
  .search{ display:none; }
  .hamburger{ display:inline-flex; align-items:center; justify-content:center; }
  .brand{ min-width:auto; }
  .right{ min-width:auto; }
}
@media (max-width: 420px){
  .brand-text .title{ display:none; }
  .drawer{ width:86vw; }
  .brand-text .sub{ display:none; }
}

/* ===== Page Header ===== */
.header{
  display:flex;
  gap:12px;
  align-items:flex-end;
  justify-content:space-between;
  margin: 6px 0 12px;
  flex-wrap:wrap;
}
.title{ display:flex; flex-direction:column; gap:4px; }
h1{
  margin:0;
  font-size:20px;
  font-weight:900;
  letter-spacing:-0.4px;
}
.sub{
  color:var(--muted);
  font-size:12px;
}

#btnSearch{
    width:100%;
}
/* ===== Panel / Filters ===== */
.panel{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:12px;
}
.filters{
  display:grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  gap:10px;
  align-items:end;
}
.field label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin-bottom:6px;
}
.field select, .field input{
  width:100%;
  box-sizing:border-box;
  padding:10px 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  outline:none;
  font-size:14px;
  font-weight:700;
}
.field select:focus, .field input:focus{
  border-color:rgba(29,78,216,.45);
  box-shadow:0 0 0 3px rgba(29,78,216,.10);
}

/* ===== Actions / Buttons ===== */
.actions{ display:flex; gap:8px; justify-content:flex-end; }
.btn{
  border:1px solid var(--line);
  background:#fff;
  color:var(--text);
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
  font-weight:900;
  font-size:14px;
}
.btn.primary{
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}
.btn:hover{ background:#1e40af; }
.btn.primary:hover{ filter:brightness(.97); }
.btn:disabled{ opacity:.6; cursor:not-allowed; }

.meta-row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:10px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:12px;
}

/* ===== Table (PC) ===== */
.table-wrap{
  margin-top:12px;
  overflow:auto;
  border-radius:12px;
  border:1px solid var(--line);
  background:var(--card);
  box-shadow:var(--shadow);
}
table{ width:100%; border-collapse:collapse; min-width:800px; }
thead th{
  position:sticky;
  top:0;
  z-index:1;
  background:#f3f6fb;
  text-align:center;
  font-size:12px;
  color:#374151;
  padding:11px 10px;
  border-bottom:1px solid var(--line);
  white-space:nowrap;
  font-weight:900;
}
tbody td{
  text-align:center;
  padding:11px 10px;
  border-bottom:1px solid var(--line);
  vertical-align:top;
  font-size:14px;
  font-weight:700;
}
tbody tr:hover{ background:#f6f9ff; }

.rate{ font-weight:900; font-size:16px; letter-spacing:-0.3px; }
.muted{ color:var(--muted); font-size:12px; }

/* 은행 셀(로고+링크) */
.bank-cell{
  display:flex;
  align-items:center;
  gap:10px;
  white-space:nowrap;
}
.bank-logo{
  width:26px;
  height:26px;
  border-radius:8px;
  border:1px solid var(--line);
  background:#fff;
  object-fit:contain;
  flex:0 0 26px;
}
.bank-link{
  color:var(--accent);
  text-decoration:none;
  font-weight:900;
}
.bank-link:hover{ text-decoration:underline; }

.pill{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  background:var(--accent-soft);
  color:var(--accent);
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}
.pill.warn{
  background:rgba(249,115,22,.12);
  color:var(--warn);
}

.clickable{ cursor:pointer; }
.clickable:hover{ text-decoration: underline; }

/* ===== Cards (Mobile) ===== */
.cards{ display:none; margin-top:12px; gap:10px; flex-direction:column; }
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:12px;
  box-shadow:var(--shadow);
  padding:12px;
}
.card-top{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
}
.card-title{
  font-weight:900;
  font-size:15px;
  line-height:1.3;
  margin:0;
  cursor:pointer;
}
.card-title:hover{ text-decoration:underline; }
.card-bank{ margin-top:6px; display:flex; align-items:center; gap:8px; }
.card-right{ text-align:right; min-width:90px; }
.card-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:10px; }
.kv{
  border:1px dashed rgba(219,226,234,.9);
  border-radius:12px;
  padding:8px 10px;
  background:#f8fafc;
}
.kv .k{ color:var(--muted); font-size:12px; }
.kv .v{ font-weight:900; margin-top:2px; }

.footer-actions{ display:flex; justify-content:center; margin:14px 0 6px; }

@media (max-width: 860px){
  .filters{ grid-template-columns: 1fr 1fr; }
  .actions{ grid-column: 1 / -1; justify-content: stretch; }
  .actions .btn{ flex:1; }
  .table-wrap{ display:none; }
  .cards{ display:flex; }
  .banner{ 
    min-height: 120px; 
   
    }
  
}

/* ===== Modal ===== */
.modal-backdrop{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,0.45);
  display:none;
  align-items:center;
  justify-content:center;
  padding: 18px;
  z-index: 9999;
}
.modal-backdrop.show{
  display:flex;
  align-items:center;
  justify-content:center;
}
.modal{
  width:min(920px, calc(100vw - 24px));
  max-height:85vh;
  overflow:auto;
  background: var(--card);
  border-radius:16px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 60px rgba(0,0,0,0.18);
}
.modal-head{
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
  padding: 14px 14px 10px;
  border-bottom:1px solid var(--line);
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}
.modal-title{
  font-weight: 900;
  font-size: 16px;
  line-height: 1.35;
  margin:0;
}
.modal-sub{
  margin-top:6px;
  color: var(--muted);
  font-size: 12px;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.modal-close{
  border:1px solid var(--line);
  background:#fff;
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
  font-weight: 900;
}
.modal-body{ padding: 14px; }
.section{
  border:1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background:#fff;
  margin-bottom: 12px;
}
.section h3{
  margin:0 0 8px;
  font-size: 13px;
  color:#374151;
  letter-spacing: -0.1px;
  font-weight:900;
}
.pre{
  white-space: pre-wrap;
  line-height: 1.55;
  font-size: 13px;
}
.opt-table{
  width:100%;
  border-collapse: collapse;
  min-width: 520px;
}
.opt-table th, .opt-table td{
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align:left;
  font-size: 13px;
  vertical-align: top;
}
.opt-table th{
  color: var(--muted);
  font-size: 12px;
  background:#f3f6fb;
  position: static; /* sticky 제거 */
  font-weight:900;
}

/* === 링크 기본 스타일: 밑줄 X, 파란색 X, 진하게 === */
a, a:link, a:visited{
  /* color: inherit !important; */
  text-decoration: none !important;
  font-weight: 900;
}
a:hover, a:active{
  /* color: inherit !important; */
  text-decoration: none !important;
}


@media (max-width: 860px){
  .opt-table{ min-width: 0; }
}
