/* ===================================================
   Dark: Navy Blue / Light: Green Sub-Page Theme — applied globally via sub_head
   Dark:  bg #02050c, accent #38bdf8
   Light: bg #f2f7f4, accent #00a152
   =================================================== */

/* ===== CSS 변수 재정의 (sub_common.css --main 덮어쓰기) ===== */
:root {
  --main: #38bdf8 !important;
  --sub:  #38bdf8 ;
}

/* 라이트모드는 기존 그린 팔레트 유지 */
:root[data-theme="light"] {
  --main: #00c853 !important;
  --sub:  #00e676 ;
}

/* ===== Dark (default) — Tarascan near-black + subtle sky glow ===== */
body {
  background:
    radial-gradient(ellipse 80% 50% at 88% 4%, rgba(56,189,248,0.06), transparent 60%),
    radial-gradient(ellipse 70% 45% at 6% 96%, rgba(2,132,199,0.07), transparent 58%),
    #02050c !important;
  background-attachment:fixed !important;
  color:#ffffff; transition:color 0.3s;
}

.wrap { background:transparent !important; }

/* ===== Light mode ===== */
[data-theme="light"] body { background:linear-gradient(160deg,#e8f5e9 0%,#c8e6c9 35%,#a5d6a7 70%,#81c784 100%) !important; background-attachment:fixed !important; color:#1b3a22; }
[data-theme="light"] .wrap { background:transparent !important; }
[data-theme="light"] .m-page-header { background:#ffffff !important; border-bottom:1px solid #cde5d4 !important; }
[data-theme="light"] .m-page-header .material-symbols-outlined { color:#388e3c !important; }
[data-theme="light"] .m-page-header h1 { color:#1b3a22 !important; }
[data-theme="light"] .m-card { background:#ffffff !important; border:1px solid #cde5d4 !important; box-shadow:0 2px 12px rgba(0,0,0,0.06) !important; }
[data-theme="light"] .m-card-title { color:#2e7d32 !important; }
[data-theme="light"] .m-card-title .material-symbols-outlined { color:#00a152 !important; }
[data-theme="light"] .m-tabs .active,[data-theme="light"] .m-tabs a.active { background:#00a152 !important; color:#fff !important; }
[data-theme="light"] .m-tabs li:not(.active),[data-theme="light"] .m-tabs a:not(.active) { background:#ffffff !important; color:#388e3c !important; border:1px solid #cde5d4 !important; }
[data-theme="light"] .m-field-label { color:#388e3c !important; }
[data-theme="light"] .m-field-input { background:#f8fdf9 !important; border:1.5px solid #cde5d4 !important; color:#1b3a22 !important; }
[data-theme="light"] .m-field-input:focus { border-color:#00a152 !important; background:#fff !important; }
[data-theme="light"] .m-field-input[readonly] { background:#eaf4ee !important; color:#7aab86 !important; }
[data-theme="light"] .m-field-input::placeholder { color:#a5c8ad !important; }
[data-theme="light"] .m-field-input:-webkit-autofill,[data-theme="light"] .m-field-input:-webkit-autofill:focus { -webkit-text-fill-color:#1b3a22 !important; -webkit-box-shadow:0 0 0 1000px #fff inset !important; }
[data-theme="light"] .m-field-textarea { background:#f8fdf9 !important; border:1.5px solid #cde5d4 !important; color:#1b3a22 !important; }
[data-theme="light"] .m-field-textarea:focus { border-color:#00a152 !important; background:#fff !important; }
[data-theme="light"] .m-select { background-color:#f8fdf9 !important; border:1.5px solid #cde5d4 !important; color:#1b3a22 !important; }
[data-theme="light"] .m-notice { background:linear-gradient(135deg,#2e7d32,#388e3c) !important; color:#fff !important; }
[data-theme="light"] .m-warning { background:#fff3f3 !important; border:1px solid #ffcdd2 !important; }
[data-theme="light"] .m-warning p { color:#c62828 !important; }
[data-theme="light"] .m-history-item { border-bottom:1px solid #cde5d4 !important; }
[data-theme="light"] .m-history-num { color:#7aab86 !important; }
[data-theme="light"] .m-history-content .m-hc-title { color:#1b3a22 !important; }
[data-theme="light"] .m-history-content .m-hc-date { color:#7aab86 !important; }
[data-theme="light"] .m-history-point.plus { color:#00a152 !important; }
[data-theme="light"] .m-history-point.minus { color:#c62828 !important; }
[data-theme="light"] .m-history-empty { color:#a5c8ad !important; }
/* [data-theme="light"] .m-pagination a,[data-theme="light"] .m-pagination span { color:#388e3c !important; } */
[data-theme="light"] .m-pagination a:hover { background:#eaf4ee !important; }
[data-theme="light"] .m-pagination .active { background:#00a152 !important; color:#fff !important; }
[data-theme="light"] .mk-card { background:#ffffff !important; border:1px solid #cde5d4 !important; }
[data-theme="light"] .mk-card:hover { border-color:#2e7d32 !important; }
[data-theme="light"] .mk-price-label { color:#7aab86 !important; }
[data-theme="light"] .mk-price { color:#1b3a22 !important; }
[data-theme="light"] .mk-usdt { color:#00a152 !important; }
[data-theme="light"] .mk-detail { background:#f2f7f4 !important; border-top:1px solid #cde5d4 !important; }
[data-theme="light"] .m-empty { background:#ffffff !important; color:#a5c8ad !important; border:1px solid #cde5d4 !important; }
[data-theme="light"] .m-hint { color:#388e3c !important; }
[data-theme="light"] .m-profile { background:linear-gradient(135deg,#2e7d32,#388e3c,#43a047) !important; }
[data-theme="light"] .m-pw-section { background:#f8fdf9 !important; border:1px solid #cde5d4 !important; }
[data-theme="light"] .m-btn-small { background:#fff !important; border-color:#2e7d32 !important; color:#00a152 !important; }
[data-theme="light"] .m-btn-small:hover { background:#00a152 !important; color:#fff !important; }
[data-theme="light"] .m-search-card { background:#ffffff !important; border:1px solid #cde5d4 !important; }
[data-theme="light"] .m-search-input { background:#f8fdf9 !important; border:1.5px solid #cde5d4 !important; color:#1b3a22 !important; }
[data-theme="light"] .m-search-input:focus { border-color:#00a152 !important; }
[data-theme="light"] .m-search-btn { background:#00a152 !important; color:#fff !important; }
[data-theme="light"] .user_infom { background:#ffffff !important; border:1px solid #cde5d4 !important; color:#388e3c !important; }
[data-theme="light"] .tree_idbox { color:#1b3a22 !important; }
[data-theme="light"] .tree_namebox,[data-theme="light"] .tree_datebox { color:#388e3c !important; }
[data-theme="light"] .tree1 ul { border-left:1px solid #cde5d4 !important; }
[data-theme="light"] .tree1 ul li::before { border-color:#cde5d4 !important; }
[data-theme="light"] .m-recent-list,[data-theme="light"] .m-notice-list { background:#ffffff !important; border:1px solid #cde5d4 !important; }
[data-theme="light"] .m-recent-item,[data-theme="light"] .m-notice-item { border-bottom:1px solid #cde5d4 !important; }
[data-theme="light"] .m-recent-item:hover,[data-theme="light"] .m-notice-item:hover { background:#eaf4ee !important; }
[data-theme="light"] .m-recent-date,[data-theme="light"] .m-notice-date { color:#a5c8ad !important; }
[data-theme="light"] .m-recent-id { color:#388e3c !important; }
[data-theme="light"] .m-recent-amount { color:#00a152 !important; }
[data-theme="light"] .m-notice-title { color:#1b3a22 !important; }
[data-theme="light"] .m-section-title { color:#1b3a22 !important; }
[data-theme="light"] .m-section-title .material-symbols-outlined { color:#00a152 !important; }
[data-theme="light"] .m-btn,[data-theme="light"] .m-submit-btn { background:linear-gradient(135deg,#00a152,#00c853) !important; color:#fff !important; box-shadow:0 4px 14px rgba(0,161,82,0.25) !important; }
[data-theme="light"] .mk-buy-btn { background:linear-gradient(135deg,#00a152,#00c853) !important; color:#fff !important; }
[data-theme="light"] .m-link-btn { color:#00a152 !important; border-color:#2e7d32 !important; }
[data-theme="light"] .m-total-card { background:linear-gradient(135deg,#2e7d32,#388e3c,#43a047) !important; }
[data-theme="light"] .m-tab { background:#ffffff !important; border-top:1px solid rgba(0,0,0,0.07) !important; box-shadow:0 -2px 12px rgba(0,0,0,0.06); }
[data-theme="light"] .m-tab a { color:#bdbdbd !important; }
[data-theme="light"] .m-tab .active a { color:#3d9140 !important; }
[data-theme="light"] .m-card-title .history_title { color:#4caf50 !important; background: #4caf50}
[data-theme="light"] .point_h .m-card {background:#ffffff !important; border:1px solid #cde5d4 !important; box-shadow:0 2px 12px rgba(0,0,0,0.06) !important; }
[data-theme="light"] .point_h .m-card::before, [data-theme="light"] .point_h .m-card::after, [data-theme="light"] .point_d .m-notice::before{display: none !important;}
[data-theme="light"] .point_h .m-history-item {
  border-radius: 0 !important; background-color: transparent !important;   border-bottom: 1px solid #cde5d4 !important; height: auto !important;}
[data-theme="light"] .point_h .m-history-item:not(:first-child) {margin-top: 0;}
[data-theme="light"] .point_d .m-notice { background:linear-gradient(135deg,#2e7d32,#388e3c) !important; color:#fff !important; }
[data-theme="light"] .m-btn.glow {  background:linear-gradient(135deg, #00c853, #00e676) !important; color:#050f08 !important; box-shadow:0 4px 14px rgba(0,200,83,0.3) !important;}
[data-theme="light"] .wrap.glass::before {content: none;}

.m-btn.glow {
  background: linear-gradient(180deg, #7dd3fc 0%, #0284c7 83.65%) !important; border: 1px solid #bae6fd80 !important;box-shadow: 0px 0px 8px 0px #7dd3fc !important; color: white !important;
}

/* 배경 */
.wrap.glass {position: relative; }
.wrap.glass::before {content: '';position: absolute;inset: 0;background:linear-gradient(180deg, rgba(18,40,90,0.42) 0%, rgba(12,28,66,0.48) 100%);backdrop-filter:blur(2px);opacity: 1;  z-index: 0;}

/* 내부 콘텐츠가 이미지 위에 오도록 */
.wrap.glass > * {
  position: relative;
  z-index: 1;
}

.m-card-title .history_title { 
  background: linear-gradient(90deg, #0284c7 0%, #e0f2fe 50%, #7dd3fc 100%) ;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  color: transparent ; 
}


/* Page Header */
.m-page-header {
  background:#0a0f1c !important;
  border-bottom:1px solid #16203a !important;
}
.m-page-header .material-symbols-outlined { color:#c2ccda !important; }
.m-page-header h1 { color:#ffffff !important; }

/* Cards */
.m-card {
  background:#0a0f1c !important;
  border:1px solid #16203a !important;
  box-shadow:0 2px 12px rgba(0,0,0,0.3) !important;
}
.m-card-title { color:#7dd3fc !important; }
.m-card-title .material-symbols-outlined { color:#38bdf8 !important; }

.point_h .m-card, .point_d .m-notice { position: relative !important; background: transparent !important;  position: relative;}
.point_h .m-card::before, .point_d .m-notice::before {content: ''; position: absolute; inset: -2px; border-radius: 14px;   background: linear-gradient(  139.1deg,  #062038 0%,  #0284c7 24.86%, #bae6fd 49.72%,  #0c4a6e 74.58%, #0a3854 99.44% ); -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0); -webkit-mask-composite: xor;mask-composite: exclude; padding: 2px;pointer-events: none;z-index: 3; }
.point_h .m-card::after {content: '';position: absolute;inset: 0;border-radius: 14px; background:linear-gradient(165deg, #0e1424 0%, #0a0f1c 55%, #060a14 100%); z-index: 0;}
.point_h .m-card > p ,.point_h .m-card > div, .point_d .m-notice > p, .point_d .m-notice >div {position: relative; z-index: 1}
.point_h .m-history-item {border-radius: 12px; background-color: #07598573; border-bottom: none !important; padding: 16px; height: 65px;}
.point_h .m-history-item:not(:first-child) {margin-top: 12px;}

.point_d .m-notice {background-color: #0a0f1c  !important}

/* Tabs */
.m-tabs .active,
.m-tabs a.active { background:#38bdf8 !important; color:#fff !important; }
.m-tabs li:not(.active),
.m-tabs a:not(.active) {
  background:#0a0f1c !important;
  color:#7dd3fc !important;
  box-shadow:none !important;
  border:1px solid #16203a !important;
}

/* Fields */
.m-field-label { color:#7dd3fc !important; }
.m-field-input {
  background:#02050c !important;
  border:1.5px solid #16203a !important;
  color:#ffffff !important;
}
.m-field-input:focus {
  border-color:#38bdf8 !important;
  background:#02050c !important;
}
.m-field-input[readonly] {
  background:#02050c !important;
  color:#7dd3fc !important;
}
.m-field-input::placeholder { color:#8b97a8 !important; }
.m-field-input:-webkit-autofill,
.m-field-input:-webkit-autofill:hover,
.m-field-input:-webkit-autofill:focus {
  -webkit-text-fill-color:#ffffff !important;
  -webkit-box-shadow:0 0 0 1000px #02050c inset !important;
  caret-color:#ffffff !important;
}
.m-field-textarea {
  background:#02050c !important;
  border:1.5px solid #16203a !important;
  color:#ffffff !important;
}
.m-field-textarea:focus { border-color:#38bdf8 !important; background:#02050c !important; }
.m-field-textarea::placeholder { color:#8b97a8 !important; }
.m-field-error { color:#ef9a9a ; }

/* Select */
.m-select {
  background-color:#fff !important;
  border:1.5px solid #16203a !important;
  color:#ffffff !important;
}

/* Notice/Info banner */
.m-notice {
  background:linear-gradient(135deg, #0a0f1c, #141c30, #075985) !important;
}

/* Warning */
.m-warning {
  background:#1a0a0a !important;
  border:1px solid #4a1a1a !important;
}
.m-warning p { color:#ef9a9a !important; }

/* History items */
.m-history-item { border-bottom:1px solid #16203a !important; }
.m-history-num { color:#38bdf8 !important; }
.m-history-content .m-hc-title { color:#ffffff !important; }
.m-history-content .m-hc-date { color:#38bdf8 !important; }
.m-history-point.plus { color:#38bdf8 !important; }
.m-history-point.minus { color:#ef9a9a !important; }
.m-history-empty { color:#8b97a8 !important; }


/* Pagination */
.m-pagination a, .m-pagination span {
  color:#c2ccda !important;
  background:transparent !important;
}
.m-pagination a:hover { background:#16203a !important; }
.m-pagination .active { background:#38bdf8 !important; color:#fff !important; box-shadow: 0px 0px 4px 0px #7dd3fc80;
}


/* Market cards */
.mk-card {
  background:#0a0f1c !important;
  border:1px solid #16203a !important;
  box-shadow:none !important;
}
.mk-card:hover { box-shadow:0 4px 16px rgba(0,0,0,0.35) !important; border-color:#7dd3fc !important; }
.mk-price-label { color:#7dd3fc !important; }
.mk-price { color:#ffffff !important; }
.mk-usdt { color:#38bdf8 !important; }
.mk-arrow { color:#8b97a8 !important; }
.mk-card.open .mk-arrow { color:#38bdf8 !important; }
.mk-detail { background:#02050c !important; border-top:1px solid #16203a !important; }
.mk-detail-info { color:#c2ccda !important; }
.mk-detail-info span { color:#7dd3fc !important; }

/* Empty / hint */
.m-empty { background:#0a0f1c !important; color:#8b97a8 !important; border:1px solid #16203a !important; }
.m-hint { color:#7dd3fc !important; }
.m-hint .material-symbols-outlined { color:#38bdf8 !important; }

/* Profile card (mypage) */
.m-profile {
  background:linear-gradient(135deg, #0a0f1c, #141c30, #075985) !important;
}
.m-pw-section { background:#02050c !important; border:1px solid #16203a !important; }

/* Small button */
.m-btn-small {
  background:#0a0f1c !important;
  border:1.5px solid #7dd3fc !important;
  color:#38bdf8 !important;
}
.m-btn-small:hover { background:#38bdf8 !important; color:#fff !important; }

/* Search */
.m-search-card { background:#0a0f1c !important; border:1px solid #16203a !important; box-shadow:none !important; }
.m-search-input {
  background:#02050c !important;
  border:1.5px solid #16203a !important;
  color:#ffffff !important;
}
.m-search-input:focus { border-color:#38bdf8 !important; }
.m-search-input::placeholder { color:#8b97a8 !important; }
.m-search-btn { background:#38bdf8 !important; color:#fff !important; }

/* Legend (recommender tree) */
.m-legend-item { color:#7dd3fc !important; }

/* Recommender tree */
.container_tree { background:#02050c !important; }
.tree1 a { text-decoration:none !important; }
.user_infom {
  background:#0a0f1c !important;
  border:1px solid #16203a !important;
  border-radius:10px !important;
  color:#c2ccda !important;
}
.user_infom:hover { border-color:#7dd3fc !important; }
.tree_idbox { color:#ffffff !important; }
.tree_namebox, .tree_datebox { color:#7dd3fc !important; }
.tree1 ul { border-left:1px solid #16203a !important; }
.tree1 ul li::before { border-color:#16203a !important; }

/* Recent/Notice lists */
.m-recent-list, .m-notice-list {
  background:#0a0f1c !important;
  border:1px solid #16203a !important;
}
.m-recent-item, .m-notice-item {
  border-bottom:1px solid #16203a !important;
}
.m-recent-item:hover, .m-notice-item:hover { background:#0e1424 !important; }
.m-recent-date, .m-notice-date { color:#8b97a8 !important; }
.m-recent-id { color:#c2ccda !important; }
.m-recent-amount { color:#38bdf8 !important; }
.m-notice-title { color:#ffffff !important; }
.m-recent-empty { color:#8b97a8 !important; }

/* Rollup history specific */
.m-section-title { color:#ffffff !important; }
.m-section-title .material-symbols-outlined { color:#38bdf8 !important; }

/* ===== Blue button overrides — green replacement ===== */
/* Primary action buttons (.m-btn, .m-submit-btn) */
.m-btn,
.m-submit-btn {
  background:linear-gradient(135deg, #38bdf8, #38bdf8) !important;
  color:#fff !important;
  box-shadow:0 4px 14px rgba(56,189,248,0.3) !important;
}
.m-btn:hover,
.m-submit-btn:hover {
  box-shadow:0 6px 20px rgba(56,189,248,0.45) !important;
}

/* Market buy button */
.mk-buy-btn {
  background:linear-gradient(135deg, #38bdf8, #38bdf8) !important;
  color:#fff !important;
  box-shadow:0 2px 8px rgba(56,189,248,0.3) !important;
}
.mk-buy-btn:hover {
  box-shadow:0 4px 14px rgba(56,189,248,0.45) !important;
}

/* Search button */
.m-search-btn {
  background:#38bdf8 !important;
  color:#fff !important;
}

/* Small inline button */
.m-btn-small {
  border-color:#7dd3fc !important;
  background:#0a0f1c !important;
  color:#38bdf8 !important;
}
.m-btn-small:hover {
  background:#38bdf8 !important;
  color:#fff !important;
}

/* Link button (market history pages) */
.m-link-btn {
  color:#38bdf8 !important;
  border-color:#7dd3fc !important;
}

/* Total summary card */
.m-total-card {
  background:#0e1424 !important;
}

/* Profile card */
.m-profile {
  background:linear-gradient(135deg, #0a0f1c, #141c30, #075985) !important;
}

/* Notice banner (cash_charge etc.) */
.m-notice {
  background:linear-gradient(135deg, #0a0f1c, #141c30, #075985) !important;
}

/* Field focus border */
.m-field-input:focus,
.m-field-textarea:focus,
.m-search-input:focus {
  border-color:#38bdf8 !important;
  background:#02050c !important;
}

/* ===== SweetAlert2 — dark mode ===== */
.swal2-popup {
  background:linear-gradient(165deg, #0e1424 0%, #0a0f1c 55%, #060a14 100%) !important;
  border:1px solid #22314f !important;
  border-radius:16px !important;
  box-shadow:0 8px 40px rgba(0,0,0,0.45), 0 0 24px rgba(56,189,248,0.18), inset 0 1px 0 rgba(186,230,253,0.15) !important;
}
.swal2-title, .title_sweet { color:#ffffff !important; }
.swal2-html-container, .desc_sweet { color:#c2ccda !important; }
.swal2-styled.swal2-confirm {
  background:linear-gradient(135deg, #38bdf8, #38bdf8) !important;
  color:#fff !important;
  border:none !important;
  box-shadow:0 2px 12px rgba(56,189,248,0.4) !important;
}
.swal2-styled.swal2-confirm:focus { box-shadow:0 2px 12px rgba(56,189,248,0.4) !important; }
.swal2-styled.swal2-cancel {
  background:#0e1424 !important;
  color:#c2ccda !important;
  border:1px solid #22314f !important;
  box-shadow:none !important;
}
.swal2-icon { border-color:#22314f !important; }
.swal2-icon.swal2-warning { border-color:#f59e0b !important; color:#f59e0b !important; }
.swal2-icon.swal2-error { border-color:#ef4444 !important; color:#ef4444 !important; }
.swal2-icon.swal2-success { border-color:#38bdf8 !important; color:#38bdf8 !important; }
.swal2-icon.swal2-success .swal2-success-ring { border-color:rgba(56,189,248,0.3) !important; }

/* ===== SweetAlert2 — light mode ===== */
[data-theme="light"] .swal2-popup {
  background:#ffffff !important;
  border:1px solid #cde5d4 !important;
}
[data-theme="light"] .swal2-title,
[data-theme="light"] .title_sweet { color:#1b3a22 !important; }
[data-theme="light"] .swal2-html-container,
[data-theme="light"] .desc_sweet { color:#388e3c !important; }
[data-theme="light"] .swal2-styled.swal2-confirm {
  background:linear-gradient(135deg,#00a152,#00c853) !important;
  color:#fff !important;
}
[data-theme="light"] .swal2-styled.swal2-cancel {
  background:#eaf4ee !important;
  color:#2e7d32 !important;
  border:1px solid #cde5d4 !important;
}
