/* assets/css/style.css */


:root {
    /* 브랜드 컬러 */
    --color-primary: #0d6efd;
    --color-primary-soft: #e7f0ff;
    --color-accent: #20c997;

    /* 배경/테두리 */
    --color-page-bg: #f5f6fa;
    --color-card-bg: #ffffff;
    --color-border-subtle: #e2e5ec;

    /* 타이포 */
    --color-heading: #111827;
    --color-body: #374151;
    --color-muted: #6b7280;

    /* 라운드 & 그림자 */
    --radius-lg: 1rem;
    --radius-md: 0.75rem;
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-subtle: 0 8px 20px rgba(15, 23, 42, 0.06);

    /* 트랜지션 */
    --transition-fast: 150ms ease-out;
    --transition-normal: 220ms ease;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* -------------------------------------------------------------
   Global Typography (Pretendard)
-------------------------------------------------------------- */
html,
body {
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
        'Apple SD Gothic Neo', 'Noto Sans KR', 'Segoe UI', Roboto,
        'Helvetica Neue', Arial, sans-serif !important;
    font-weight: 400;
    letter-spacing: -0.02em;
    background-color: var(--color-page-bg);
    color: var(--color-body);	
}

/* 제목(Titles)은 기본 Bold */
h1,
h2,
h3,
h4,
h5 {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-heading);	
}

/* 작은 글씨 */
.small,
small {
    letter-spacing: -0.01em;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast), text-decoration-color var(--transition-fast), opacity var(--transition-fast);
}

a:hover,
a:focus {
    color: #1d4ed8; /* 조금 더 짙은 블루 */
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-heading);
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--color-muted);
    margin-bottom: 1.25rem;
}

.btn {
    text-decoration: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-color: #1d4ed8;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 14px 32px rgba(30, 64, 175, 0.45);
    transform: translateY(-1px);
}

.btn-primary:disabled,
.btn-primary.disabled {
    box-shadow: none;
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-outline-primary {
    border-width: 1.4px;
    color: #2563eb;
}


/* -------------------------------------------------------------
   공통 카드 / 요약 카드
-------------------------------------------------------------- */
.card,
.home-summary-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border-subtle);
    background-color: var(--color-card-bg);
    box-shadow: var(--shadow-subtle);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.card:hover,
.home-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}


/* -------------------------------------------------------------
   환율 박스
-------------------------------------------------------------- */
.rate-box {
    padding: 0.5rem 0;
}

.rate-section .rate-box {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-md);
    background: #f9fafb;
    border: 1px solid rgba(148, 163, 184, 0.28);
}

.rate-section .rate-box-main {
    background: radial-gradient(circle at top left, #e7f0ff, #ffffff);
    border-color: rgba(59, 130, 246, 0.45);
}


.rate-label {
    font-size: 0.8rem;
}

.rate-value {
    font-size: 1.2rem;
    font-weight: 600;
}

.rate-big,
.rate-box-main .rate-big {
    font-size: 1.5rem;
    font-weight: 700;
}

/* -------------------------------------------------------------
   회사 소개 영역
-------------------------------------------------------------- */
.company-intro-bg {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
    border: 1px solid #e5e7eb;
}
/* 회사 소개 특징 카드 */
.intro-feature h3 {
    letter-spacing: -0.2px;
}

.intro-feature p {
    line-height: 1.55;
}
.icon-circle {
    width: 42px;
    height: 42px;
    background: linear-gradient(145deg, #f9fafb, #eef1f5);
    border: 1px solid #d9dce1;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.icon-circle i {
    font-size: 1.25rem;
    color: #0d6efd; /* 금융톤 블루 */
}
/* -------------------------------------------------------------
   Navbar / Logo
-------------------------------------------------------------- */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.94);
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.25);
}

/* backdrop-filter 지원 브라우저에서만 살짝 투명하게 */
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .navbar {
        background: rgba(15, 23, 42, 0.88);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}

.navbar .nav-link {
    color: #e5e7eb;
    font-size: 0.9rem;
    transition: color var(--transition-fast), opacity var(--transition-fast);
    text-decoration: none; /* 추가 */
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: #ffffff;
    opacity: 1;
    text-decoration: none; /* 추가 */
}

.navbar-brand {
    text-decoration: none !important;
}
.navbar-brand:hover,
.navbar-brand:focus {
    text-decoration: none !important;
}

.brand-logo-mark {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.brand-logo-mark span:last-child {
    font-weight: 800;
    font-size: 1.25rem;
    color: #ffffff; /* navbar에서 밝게 */
}

.brand-logo-mark .logo-accent {
    color: #4ea2ff; /* 브랜드 포인트 */
}


.brand-logo-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: linear-gradient(135deg, #0d6efd, #4ea2ff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    box-shadow: 0 3px 6px rgba(13,110,253,0.35);
}


/* 환전 아이콘 */
.logo-mark-exchange {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #0d6efd, #2563eb);
    border-radius: 8px;
    position: relative;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}

/* 교차 화살표 */
.logo-mark-exchange::before,
.logo-mark-exchange::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 2.4px;
    background: #fff;
    border-radius: 2px;
}

/* ↗ */
.logo-mark-exchange::before {
    top: 8px;
    left: 5px;
    transform: rotate(40deg);
    box-shadow: 6px 6px 0 0 #fff; /* 화살촉 */
}

/* ↙ */
.logo-mark-exchange::after {
    top: 14px;
    left: 9px;
    transform: rotate(-140deg);
    box-shadow: -6px -6px 0 0 #fff; /* 화살촉 */
}

.logo-mark-currency {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd, #2563eb);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
    color: #fff;
    position: relative;
}

.logo-mark-currency::before {
    content: "$";
    position: absolute;
    left: 6px;
}

.logo-mark-currency::after {
    content: "₩";
    position: absolute;
    right: 6px;
}


.logo-mark-swap {
    width: 26px;
    height: 26px;
    position: relative;
}

.logo-mark-swap::before,
.logo-mark-swap::after {
    content: " ";
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    top: 4px;
    background: #2563eb;
}

.logo-mark-swap::before {
    left: 2px;
    background: #2563eb;
}

.logo-mark-swap::after {
    right: 2px;
    background: #20c997;
}



/* PC용 Navbar 여백/간격 */
@media (min-width: 992px) {
    .navbar .navbar-brand {
        margin-right: 2.5rem;
    }

    #mainNavbar .navbar-nav {
        column-gap: 1.25rem;
    }

    .navbar {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
}

/* 공통 테이블 베이스 */
.table {
    border-collapse: separate;
    border-spacing: 0;
    border-color: var(--color-border-subtle);
    font-size: 0.9rem;
}

/* 헤더 셀 */
.table thead th {
    border-bottom-width: 1px;
    border-color: rgba(148, 163, 184, 0.45);
    background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
    color: #4b5563;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none; /* 필요하면 uppercase */
}

/* 바디 셀 */
.table tbody td {
    border-color: rgba(226, 232, 240, 0.8);
    vertical-align: middle;
}

/* 첫/마지막 셀 살짝 둥글게 (더 카드 느낌) */
.table tbody tr:first-child td:first-child {
    border-top-left-radius: 0.5rem;
}
.table tbody tr:first-child td:last-child {
    border-top-right-radius: 0.5rem;
}
.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 0.5rem;
}
.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 0.5rem;
}

/* 행 hover 효과 (기본) */
.table-hover tbody tr {
    transition: background-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.table-hover tbody tr:hover:not(.row-pending) {
    background-color: #f9fafb;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
}

/* 고급 테이블 스킨: 금융/거래용 */
.table-modern {
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: #ffffff;
}

.table-modern thead th {
    background: linear-gradient(to right, #eff6ff, #e0f2fe);
    color: #1f2937;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom-color: rgba(148, 163, 184, 0.5);
}

.table-modern tbody tr {
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.table-modern tbody tr:last-child {
    border-bottom: none;
}

.table-modern tbody td {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

/* 숫자열 정렬 유틸 (원하면 HTML에서 클래스 붙여서 사용) */
.table-modern .cell-number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* 상태/배지 같은 칼럼은 살짝 더 진하게 */
.table-modern .cell-status {
    font-weight: 600;
    color: #111827;
}

/* hover 효과는 더 섬세하게 */
.table-modern.table-hover tbody tr:hover:not(.row-pending) {
    background: radial-gradient(circle at top left, #eff6ff, #ffffff);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

/* -------------------------------------------------------------
   홈 히어로 영역 (영상 배경)
-------------------------------------------------------------- */
.home-hero {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    min-height: 260px;
    background: linear-gradient(135deg, #020617 0%, #0b1220 40%, #020617 100%);
    box-shadow: var(--shadow-soft);
}

.hero-video-wrapper {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(1.08) contrast(1.12) saturate(1.06);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.45));
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    color: #e5e7eb;
}

.hero-title {
    line-height: 1.3;
    letter-spacing: -0.03em;
	color: #ffffff;
}

.hero-subtitle {
    font-size: 0.95rem;
    color: #9ca3af;
}

.hero-badge {
    background: rgba(15, 23, 42, 0.75);
    border-radius: 999px;
    padding: 0.25rem 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.7);
}

.hero-stats {
    color: #f3f4f6; /* 매우 밝은 회색 → 눈부심 없는 화이트 */
    font-size: 0.85rem;
    opacity: 0.92;
}

.hero-stats i {
    color: #ffffff !important; /* 아이콘은 완전 화이트 */
    opacity: 0.95;
	text-shadow: 0 0 6px rgba(255, 255, 255, 0.3);
}

.hero-stats strong {
    color: #ffffff;
    font-weight: 700;
}

.hero-stats > div {
    padding-right: 10px;
    border-right: 1px solid rgba(255,255,255,0.2);
}

.hero-stats > div:last-child {
    border-right: none;
}


/* -------------------------------------------------------------
   최근 거래 현황 테이블
-------------------------------------------------------------- */
.recent-orders .table thead th {
    font-size: 0.8rem;
    white-space: nowrap;
}

.recent-orders .table tbody td {
    font-size: 0.85rem;
}

/* 테이블 row 높이 & 패딩 */
.recent-orders table tbody tr {
    height: 35px;
}

.recent-orders table tbody td {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

/* 대기 상태 행 강조 (공통) */
.row-pending {
    background-color: #fff7e6 !important;
    box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.35);
}

.row-pending:hover {
    background-color: #ffeccc !important;
}


/* -------------------------------------------------------------
   Footer
-------------------------------------------------------------- */
.footer {
    background-color: #10131a;
    color: #ced4da;
}

.footer a {
    color: #ced4da;
    text-decoration: none;
}

.footer a:hover {
    color: #ffffff;
    text-decoration: none; /* 이 줄만 추가 */
}


.footer-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* -------------------------------------------------------------
   기타 반응형 보정
-------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .card:hover,
    .home-summary-card:hover,
    .btn-primary:hover {
        transform: none !important;
    }
}


/* 모바일 trade history 마지막 구분선 제거 */
@media (max-width: 767.98px) {
    #trade_history_body_mobile > div:last-child {
        border-bottom: none;
    }
}

/* ============================================
   신청서 폼용 반응형 테이블
   PC: 기존 table 유지
   모바일(<768px): 항목/내용 세로 스택
============================================ */
@media (max-width: 767.98px) {
    .form-table-stack-mobile {
        width: 100%;
    }

    .form-table-stack-mobile thead {
        display: none;
    }

    .form-table-stack-mobile tbody,
    .form-table-stack-mobile tr,
    .form-table-stack-mobile td {
        display: block;
        width: 100%;
    }

    .form-table-stack-mobile th {
        display: none;
    }

    .form-table-stack-mobile tr {
        margin-bottom: 0.75rem;
        border-bottom: 1px solid #dee2e6;
        padding-bottom: 0.5rem;
    }

    .form-table-stack-mobile td {
        position: relative;
        padding-left: 40%;
        text-align: right;
        border: none;
    }

    .form-table-stack-mobile td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        top: 0;
        width: 38%;
        padding-right: 0.75rem;
        font-weight: 600;
        text-align: left;
        color: #6c757d;
        white-space: nowrap;
    }
}

/* 모바일에서 th/td를 세로로 쌓는 공용 스타일(거래 내역 등) */
@media (max-width: 767.98px) {
    .table-history-stack thead {
        display: none;
    }

    .table-history-stack tbody,
    .table-history-stack tr,
    .table-history-stack td {
        display: block;
        width: 100%;
    }

    .table-history-stack tr {
        margin-bottom: 0.75rem;
        border-bottom: 1px solid #dee2e6;
    }

    .table-history-stack td {
        text-align: left !important;
        padding-left: 7rem;
        position: relative;
    }

    .table-history-stack td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 600;
        font-size: 0.75rem;
        color: #6c757d;
        text-transform: none;
    }
}

/* 🔔 공통: 알림 드롭다운 */
.notification-menu {
    max-height: 420px;
    overflow-y: auto;
    min-width: 0 !important;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow: var(--shadow-soft);
    padding: 0.35rem;
	z-index: 2000 !important;
}

.notification-menu .dropdown-item {
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.notification-menu .dropdown-item + .dropdown-item {
    margin-top: 0.15rem;
}

.notification-menu .dropdown-item:hover,
.notification-menu .dropdown-item:focus {
    background-color: #eff6ff;
}

/* PC(>= 992px): 우측 끝 작은 드롭다운 */
@media (min-width: 992px) {
    .navbar .dropdown .notification-menu {
        position: absolute;
        right: 0;
        left: auto;
        width: 320px;
    }
}

/* 모바일/태블릿(<= 991.98px): 화면 기준, 상단 네비 아래 + 중앙 정렬 */
@media (max-width: 991.98px) {
    .navbar .dropdown .notification-menu,
    .navbar .dropdown .notification-menu[data-bs-popper] {
        position: fixed !important;                       /* 뷰포트 기준 */
        top: calc(56px + 0.4rem) !important;              /* 네비 높이 + 여백 (56px은 대략, 필요시 조정) */
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;           /* 가로 중앙 */

        width: min(420px, calc(100vw - 1.5rem)) !important;
        min-width: min(420px, calc(100vw - 1.5rem)) !important;
        max-width: calc(100vw - 1.5rem);
        max-height: min(420px, calc(100vh - 5rem));       /* 세로도 너무 길지 않게 */

        margin-top: 0;
        border-radius: 0.75rem;
        z-index: 2000 !important;
    }
}

header {
    position: relative;
    z-index: 1300;  /* 카드/히어로 박스들보다 위로 */
}

.navbar {
    position: relative;      /* 이미 있어도 상관 없음 */
    z-index: 1300;           /* header와 통일 */
}
