/* ===================================================
   Dark/Light Green Sub-Page Theme — applied globally via sub_head
   Dark:  bg #050f08, accent #00e676
   Light: bg #f2f7f4, accent #00a152
   =================================================== */

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

/* ===== Dark (default) ===== */
body { background:linear-gradient(160deg, #020c05 0%, #04200d 25%, #073320 50%, #0a4a2a 75%, #0d5e33 100%) !important; background-attachment:fixed !important; color:#e8f5e9; 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; }

/* Page Header */
.m-page-header {
  background:#0d1f12 !important;
  border-bottom:1px solid #1e3d25 !important;
}
.m-page-header .material-symbols-outlined { color:#6dbf7e !important; }
.m-page-header h1 { color:#e8f5e9 !important; }

/* Cards */
.m-card {
  background:#0d1f12 !important;
  border:1px solid #1e3d25 !important;
  box-shadow:0 2px 12px rgba(0,0,0,0.3) !important;
}
.m-card-title { color:#4caf50 !important; }
.m-card-title .material-symbols-outlined { color:#00e676 !important; }

/* Tabs */
.m-tabs .active,
.m-tabs a.active { background:#00c853 !important; color:#050f08 !important; }
.m-tabs li:not(.active),
.m-tabs a:not(.active) {
  background:#0d1f12 !important;
  color:#4caf50 !important;
  box-shadow:none !important;
  border:1px solid #1e3d25 !important;
}

/* Fields */
.m-field-label { color:#4caf50 !important; }
.m-field-input {
  background:#050f08 !important;
  border:1.5px solid #1e3d25 !important;
  color:#e8f5e9 !important;
}
.m-field-input:focus {
  border-color:#00e676 !important;
  background:#050f08 !important;
}
.m-field-input[readonly] {
  background:#020a04 !important;
  color:#4caf50 !important;
}
.m-field-input::placeholder { color:#2d6b3e !important; }
.m-field-input:-webkit-autofill,
.m-field-input:-webkit-autofill:hover,
.m-field-input:-webkit-autofill:focus {
  -webkit-text-fill-color:#e8f5e9 !important;
  -webkit-box-shadow:0 0 0 1000px #050f08 inset !important;
  caret-color:#e8f5e9 !important;
}
.m-field-textarea {
  background:#050f08 !important;
  border:1.5px solid #1e3d25 !important;
  color:#e8f5e9 !important;
}
.m-field-textarea:focus { border-color:#00e676 !important; background:#050f08 !important; }
.m-field-textarea::placeholder { color:#2d6b3e !important; }
.m-field-error { color:#ef9a9a !important; }

/* Select */
.m-select {
  background-color:#050f08 !important;
  border:1.5px solid #1e3d25 !important;
  color:#e8f5e9 !important;
}

/* Notice/Info banner */
.m-notice {
  background:linear-gradient(135deg, #071a0c, #0d3321, #1b5e35) !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 #1e3d25 !important; }
.m-history-num { color:#2d6b3e !important; }
.m-history-content .m-hc-title { color:#e8f5e9 !important; }
.m-history-content .m-hc-date { color:#2d6b3e !important; }
.m-history-point.plus { color:#00e676 !important; }
.m-history-point.minus { color:#ef9a9a !important; }
.m-history-empty { color:#2d6b3e !important; }

/* Pagination */
.m-pagination a, .m-pagination span {
  color:#6dbf7e !important;
  background:transparent !important;
}
.m-pagination a:hover { background:#1e3d25 !important; }
.m-pagination .active { background:#00c853 !important; color:#050f08 !important; }

/* Market cards */
.mk-card {
  background:#0d1f12 !important;
  border:1px solid #1e3d25 !important;
  box-shadow:none !important;
}
.mk-card:hover { box-shadow:0 4px 16px rgba(0,0,0,0.35) !important; border-color:#4caf50 !important; }
.mk-price-label { color:#4caf50 !important; }
.mk-price { color:#e8f5e9 !important; }
.mk-usdt { color:#00e676 !important; }
.mk-arrow { color:#2d6b3e !important; }
.mk-card.open .mk-arrow { color:#00e676 !important; }
.mk-detail { background:#020a04 !important; border-top:1px solid #1e3d25 !important; }
.mk-detail-info { color:#6dbf7e !important; }
.mk-detail-info span { color:#4caf50 !important; }

/* Empty / hint */
.m-empty { background:#0d1f12 !important; color:#2d6b3e !important; border:1px solid #1e3d25 !important; }
.m-hint { color:#4caf50 !important; }
.m-hint .material-symbols-outlined { color:#00e676 !important; }

/* Profile card (mypage) */
.m-profile {
  background:linear-gradient(135deg, #071a0c, #0d3321, #1b5e35) !important;
}
.m-pw-section { background:#020a04 !important; border:1px solid #1e3d25 !important; }

/* Small button */
.m-btn-small {
  background:#0d1f12 !important;
  border:1.5px solid #4caf50 !important;
  color:#00e676 !important;
}
.m-btn-small:hover { background:#00c853 !important; color:#050f08 !important; }

/* Search */
.m-search-card { background:#0d1f12 !important; border:1px solid #1e3d25 !important; box-shadow:none !important; }
.m-search-input {
  background:#050f08 !important;
  border:1.5px solid #1e3d25 !important;
  color:#e8f5e9 !important;
}
.m-search-input:focus { border-color:#00e676 !important; }
.m-search-input::placeholder { color:#2d6b3e !important; }
.m-search-btn { background:#00c853 !important; color:#050f08 !important; }

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

/* Recommender tree */
.container_tree { background:#050f08 !important; }
.tree1 a { text-decoration:none !important; }
.user_infom {
  background:#0d1f12 !important;
  border:1px solid #1e3d25 !important;
  border-radius:10px !important;
  color:#6dbf7e !important;
}
.user_infom:hover { border-color:#4caf50 !important; }
.tree_idbox { color:#e8f5e9 !important; }
.tree_namebox, .tree_datebox { color:#4caf50 !important; }
.tree1 ul { border-left:1px solid #1e3d25 !important; }
.tree1 ul li::before { border-color:#1e3d25 !important; }

/* Recent/Notice lists */
.m-recent-list, .m-notice-list {
  background:#0d1f12 !important;
  border:1px solid #1e3d25 !important;
}
.m-recent-item, .m-notice-item {
  border-bottom:1px solid #1e3d25 !important;
}
.m-recent-item:hover, .m-notice-item:hover { background:#142a18 !important; }
.m-recent-date, .m-notice-date { color:#2d6b3e !important; }
.m-recent-id { color:#6dbf7e !important; }
.m-recent-amount { color:#00e676 !important; }
.m-notice-title { color:#e8f5e9 !important; }
.m-recent-empty { color:#2d6b3e !important; }

/* Rollup history specific */
.m-section-title { color:#e8f5e9 !important; }
.m-section-title .material-symbols-outlined { color:#00e676 !important; }

/* ===== Blue button overrides — green replacement ===== */
/* Primary action buttons (.m-btn, .m-submit-btn) */
.m-btn,
.m-submit-btn {
  background:linear-gradient(135deg, #00c853, #00e676) !important;
  color:#050f08 !important;
  box-shadow:0 4px 14px rgba(0,200,83,0.3) !important;
}
.m-btn:hover,
.m-submit-btn:hover {
  box-shadow:0 6px 20px rgba(0,230,118,0.45) !important;
}

/* Market buy button */
.mk-buy-btn {
  background:linear-gradient(135deg, #00c853, #00e676) !important;
  color:#050f08 !important;
  box-shadow:0 2px 8px rgba(0,200,83,0.3) !important;
}
.mk-buy-btn:hover {
  box-shadow:0 4px 14px rgba(0,230,118,0.45) !important;
}

/* Search button */
.m-search-btn {
  background:#00c853 !important;
  color:#050f08 !important;
}

/* Small inline button */
.m-btn-small {
  border-color:#4caf50 !important;
  background:#0d1f12 !important;
  color:#00e676 !important;
}
.m-btn-small:hover {
  background:#00c853 !important;
  color:#050f08 !important;
}

/* Link button (market history pages) */
.m-link-btn {
  color:#00e676 !important;
  border-color:#4caf50 !important;
}

/* Total summary card */
.m-total-card {
  background:linear-gradient(135deg, #071a0c, #0d3321, #1b5e35) !important;
}

/* Profile card */
.m-profile {
  background:linear-gradient(135deg, #071a0c, #0d3321, #1b5e35) !important;
}

/* Notice banner (cash_charge etc.) */
.m-notice {
  background:linear-gradient(135deg, #071a0c, #0d3321, #1b5e35) !important;
}

/* Field focus border */
.m-field-input:focus,
.m-field-textarea:focus,
.m-search-input:focus {
  border-color:#00e676 !important;
  background:#050f08 !important;
}

/* ===== SweetAlert2 — dark mode ===== */
.swal2-popup {
  background:#0d1f12 !important;
  border:1px solid #1e3d25 !important;
  border-radius:16px !important;
}
.swal2-title, .title_sweet { color:#e8f5e9 !important; }
.swal2-html-container, .desc_sweet { color:#6dbf7e !important; }
.swal2-styled.swal2-confirm {
  background:#00c853 !important;
  color:#050f08 !important;
  border:none !important;
  box-shadow:none !important;
}
.swal2-styled.swal2-confirm:focus { box-shadow:none !important; }
.swal2-styled.swal2-cancel {
  background:#142a18 !important;
  color:#6dbf7e !important;
  border:1px solid #1e3d25 !important;
  box-shadow:none !important;
}
.swal2-icon { border-color:#1e3d25 !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:#00e676 !important; color:#00e676 !important; }
.swal2-icon.swal2-success .swal2-success-ring { border-color:rgba(0,230,118,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;
}
