* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: #0f172a;
    color: #c8d5ea;
    font-family: -apple-system, 'Segoe UI', 'Noto Sans KR', system-ui, sans-serif;
}

.wrap {
    width: calc(100% - 80px);
    margin: 0 40px;
}

/* ── 헤더 ─────────────────────────────── */
.page-header {
    overflow: hidden;
    margin: 22px;
    padding-left: 10px;
}
.page-header div {
    float: left;
}
.page-header h1 {
    display: inline-block;
    font-size: 60px;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #dde6f8;
    padding-left: 20px;
}
.page-header p {
    display: inline-block;
    font-size: 14px;
    color: #525d74;
    letter-spacing: 0.04em;
    padding-left: 20px;
    margin-left: 20px;
    border-left: 1px solid #525d74;
}

/* ── 테이블 ───────────────────────────── */
.table-container {
    background: #1a1f3a;
    border: 1px solid #2a3458;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #39487c;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
thead tr {
    background: #182336;
    border-bottom: 1px solid #0e1e36;
}
thead th {
    padding: 18px 70px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #ddd;
    text-transform: uppercase;
    text-align: right;
    border-bottom: 1px solid #999;
}
thead th:first-child { text-align: left; }

tbody tr {
    background: #151e3d;
    border-bottom: 1px solid #2a3458;
    transition: background 0.12s;
}
tbody tr:nth-child(even) { background: #162445; }
tbody tr:hover {
    background: #0b1630;
    box-shadow: inset 3px 0 0 #1e40a0;
}

tbody td {
    padding: 15px 50px;
    font-size: 14px;
    font-weight: 500;
    text-align: right;
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid #2a3458;
}
tbody td:first-child {
    text-align: left;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.05em;
}
tbody tr:last-child td { border-bottom: none; }

.val-usd  { color: #e8f0ff; }
.val-jpy  { color: #5ba8ff; }
.val-eur  { color: #38d98a; }
.val-cny  { color: #f86b6b; }
.val-gbp  { color: #f5c842; }
.val-null { color: #111d32; }

/* ── 페이징 ───────────────────────────── */
.paging {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}
.paging a, .paging span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 18px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    text-decoration: none;
    color: #cdcdcd;
    background: #060d1c;
    border: 1px solid #0e1e36;
    transition: all 0.12s;
}
.paging a:hover {
    background: #0b1630;
    color: #5b8ed8;
    border-color: #1a3060;
}
.paging span.cur {
    background: #1a3880;
    color: #93c5fd;
    border-color: #2a52b8;
    font-weight: 700;
}
.paging span.disabled {
    color: #0c1628;
    border-color: #070e1c;
    background: transparent;
    cursor: default;
}

/* ── 년도 필터 폼 ────────────────────── */
.year-filter {
    margin-bottom: 8px;
}
.year-filter select {
    appearance: none;
    -webkit-appearance: none;
    background: #1a1f3a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23253d68'/%3E%3C/svg%3E") no-repeat right 11px center;
    background-size: 9px;
    border: 1px solid #2a3458;
    border-radius: 4px;
    color: #dfdfdf;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    padding: 7px 34px 7px 12px;
    cursor: pointer;
    outline: none;
    letter-spacing: 0.04em;
    transition: border-color 0.12s, color 0.12s;
}
.year-filter select:hover,
.year-filter select:focus {
    border-color: #1a3060;
    color: #93c5fd;
}

/* ── 하단 정보 ────────────────────────── */
.info {
    margin-top: 12px;
    text-align: center;
    font-size: 14px;
    color: #fff;
    letter-spacing: 0.05em;
}

/* ── 최근 데이터 카드 ─────────────────── */
.latest-card {
    background: #1a1f3a;
    border: 1px solid #2a3458;
    border-radius: 6px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.lc-date {
    font-size: 14px;
    color: #fff;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 10px;
}
.lc-date span {
    color: #999;
    font-size: 12px;
    letter-spacing: 0.04em;
}
.lc-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: #0a1628;
    border-radius: 4px;
    border: 1px solid #2a3458;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.lc-item {
    background: #060c1a;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 40px;
}
.lc-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: #2bb1ff;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.lc-label span {
    font-size: 14px;
    color: #5f86ce;
    font-weight: 400;
    letter-spacing: 0;
}
.lc-value {
    font-size: 30px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
    margin-bottom: 2px;
}
.lc-diff {
    font-size: 18px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}
.lc-rate {
    font-size: 18px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    display: flex;
    align-items: center;
    gap: 3px;
}
.lc-rate .arrow { font-size: 14px; }
.up   { color: #38d98a; }
.dn   { color: #f86b6b; }
.flat { color: #1e3560; }

/* ── 리스트 변동 서브라인 ──────────────── */
.td-sub {
    font-size: 14px;
    font-weight: 400;
    margin-top: 3px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    font-variant-numeric: tabular-nums;
    opacity: 0.85;
}
.td-sub em { font-style: normal; font-size: 14px; }

/* ── 도움말 ──────────────── */
.Ecos_Help {
    color: #abb5c7;
    padding: 50px 0px 10px 10px;
}
.Bar_line { 
    color: #445f91; 
    padding: 0px 10px;
}