/* ===== Plan Page — Dark Teal Theme ===== */
:root {
    --pl-bg: #0B1120;
    --pl-card: #151D2E;
    --pl-card-2: #1A2332;
    --pl-surface: #1E293B;
    --pl-border: rgba(0, 208, 132, 0.12);
    --pl-border-soft: rgba(255, 255, 255, 0.06);
    --pl-teal: #00D084;
    --pl-teal-bright: #14FFEC;
    --pl-teal-dim: #06B6D4;
    --pl-teal-glow: rgba(0, 208, 132, 0.35);
    --pl-text: #F1F5F9;
    --pl-text-sec: #94A3B8;
    --pl-text-muted: #64748B;
    --pl-radius: 20px;
    --pl-radius-sm: 14px;
    --pl-grad: linear-gradient(90deg, #00D084 0%, #14FFEC 50%, #06B6D4 100%);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
    background: var(--pl-bg) !important;
    overflow-x: hidden;
    overflow-y: auto !important;
    height: auto !important;
}
body {
    background-image: none !important;
    color: var(--pl-text);
}
body::-webkit-scrollbar { width: 6px; }
body::-webkit-scrollbar-track { background: var(--pl-bg); }
body::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }

.plan-wrap {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: 100vh;
    padding: 18px 14px 44px;
    max-width: 480px;
    margin: 0 auto;
}

.plan-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--pl-teal);
    background: var(--pl-card);
    border: 1px solid var(--pl-border);
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    margin-bottom: 16px;
}
.plan-back-btn:hover {
    background: rgba(0, 208, 132, 0.1);
    transform: translateX(-2px);
}

/* ===== Header ===== */
.plan-header {
    text-align: center;
    margin: 4px 0 20px;
}
.plan-header .pl-pre {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 208, 132, 0.1);
    color: var(--pl-teal);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 10px;
    border: 1px solid var(--pl-border);
}
.plan-header .pl-pre i { font-size: 10px; }
.plan-header h2 {
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
    color: var(--pl-text);
    line-height: 1.15;
}
.plan-header p {
    font-size: 13px;
    color: var(--pl-text-sec);
    margin: 0 auto;
    max-width: 360px;
    line-height: 1.55;
    font-weight: 500;
}

/* ===== Stats strip ===== */
.plan-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0 auto 22px;
}
.plan-stat {
    background: var(--pl-card);
    border: 1px solid var(--pl-border-soft);
    border-radius: var(--pl-radius-sm);
    padding: 12px 8px;
    text-align: center;
}
.plan-stat .lbl {
    font-size: 9.5px;
    color: var(--pl-text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.plan-stat .val {
    font-size: 16px;
    font-weight: 800;
    margin-top: 3px;
    color: var(--pl-teal);
    letter-spacing: -0.01em;
}

/* ===== Plan Grid ===== */
.plan-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

/* ===== Plan Card ===== */
.plan-card {
    position: relative;
    background: var(--pl-card);
    border: 1px solid var(--pl-border-soft);
    border-radius: var(--pl-radius);
    padding: 22px 18px 18px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5);
}
.plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 208, 132, 0.06);
}
.plan-card[data-theme="teal"] {
    --c-grad: var(--pl-grad);
    --c-shadow: var(--pl-teal-glow);
    --c-accent: var(--pl-teal);
}

/* Decorative dots top-right */
.plan-card-decor {
    position: absolute;
    top: 20px;
    right: 20px;
    display: grid;
    grid-template-columns: repeat(3, 5px);
    gap: 5px;
    opacity: 0.35;
    pointer-events: none;
}
.plan-card-decor span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--pl-text-muted);
}

/* Plan number badge */
.plan-card-num {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--pl-teal);
    color: #0B1120;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 15px;
    z-index: 2;
    box-shadow: 0 4px 16px var(--pl-teal-glow);
}

/* Total Investment header */
.plan-card-invest {
    text-align: center;
    padding: 36px 12px 20px;
}
.plan-card-invest-lbl {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pl-text-muted);
    margin-bottom: 6px;
}
.plan-card-price {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    font-feature-settings: 'tnum';
    line-height: 1;
}
.plan-card-price .ccy {
    font-size: 18px;
    font-weight: 700;
    color: var(--pl-teal);
    opacity: 0.85;
}
.plan-card-price .amt {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--pl-teal);
    line-height: 1;
    text-shadow: 0 0 30px var(--pl-teal-glow);
}
.plan-card-price .per {
    font-size: 16px;
    color: var(--pl-teal);
    font-weight: 700;
    opacity: 0.7;
}
.plan-card-price-range {
    font-size: 11px;
    color: var(--pl-text-sec);
    font-weight: 600;
    margin-top: 6px;
    letter-spacing: 0.04em;
}

/* Info rows */
.plan-card-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}
.plan-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--pl-card-2);
    border: 1px solid var(--pl-border-soft);
    border-radius: var(--pl-radius-sm);
}
.plan-row-ico {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 208, 132, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pl-teal);
    font-size: 14px;
    flex-shrink: 0;
    background: rgba(0, 208, 132, 0.06);
    line-height: 1;
}
.plan-row-ico i {
    display: block;
    font-style: normal;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--pl-teal);
}
.plan-row-lbl {
    flex: 1;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    min-width: 0;
}
.plan-row-val {
    font-size: 15px;
    font-weight: 800;
    color: var(--pl-teal);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

/* Level progress rings */
.plan-levels {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.plan-level {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 10px;
    background: var(--pl-card-2);
    border: 1px solid var(--pl-border-soft);
    border-radius: var(--pl-radius-sm);
}
.plan-level-ring {
    position: relative;
    width: 72px;
    height: 72px;
}
.plan-level-ring svg {
    width: 100%;
    height: 100%;
    display: block;
}
.plan-level-ring .ring-bg {
    stroke: rgba(255, 255, 255, 0.08);
}
.plan-level-ring .ring-fg {
    stroke: var(--pl-teal);
    stroke-linecap: round;
    filter: drop-shadow(0 0 6px var(--pl-teal-glow));
}
.plan-level-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: var(--pl-teal);
}
.plan-level-lbl {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pl-text-muted);
}

/* Invest Now button */
.plan-buy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 15px 20px;
    border: none;
    border-radius: var(--pl-radius-sm);
    font-size: 15px;
    font-weight: 800;
    color: #0B1120;
    cursor: pointer;
    background: var(--pl-grad);
    box-shadow: 0 8px 28px var(--pl-teal-glow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    font-family: inherit;
    text-decoration: none;
    letter-spacing: 0.01em;
}
.plan-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(0, 208, 132, 0.45);
    color: #0B1120;
}
.plan-buy-btn i { font-size: 13px; }

/* ===== Legacy class support (modal / other pages) ===== */
.plan-card-content,
.plan-card-headline,
.plan-card-divider,
.plan-stats-grid,
.plan-stat-box,
.plan-card-tier,
.plan-card-banner,
.plan-card-foot,
.plan-card-lock { display: none; }

/* ===== Modal ===== */
.plan-modal .modal-backdrop { background: rgba(11, 17, 32, 0.88); backdrop-filter: blur(4px); }
.plan-modal .modal-dialog { max-width: 460px; margin: 16px auto; }
.plan-modal .modal-content {
    background: var(--pl-card) !important;
    border-radius: var(--pl-radius) !important;
    border: 1px solid var(--pl-border-soft) !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5) !important;
    padding: 0 !important;
    overflow: hidden;
    color: var(--pl-text);
}
.plan-modal .modal-header { display: none; }

.pm-head {
    background: var(--pl-grad);
    color: #0B1120;
    padding: 18px;
    position: relative;
}
.pm-head-row {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}
.pm-head-icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.pm-head-info .lbl {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.75;
}
.pm-head-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.pm-close {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(0, 0, 0, 0.15);
    color: #0B1120;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    margin-left: auto;
}

.pm-body { padding: 18px; }
.pm-body label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    color: var(--pl-text-sec);
    margin-bottom: 7px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.pm-body .form-control {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--pl-border-soft);
    border-radius: 13px;
    font-size: 14px;
    font-family: inherit;
    color: var(--pl-text);
    background: var(--pl-bg);
    outline: none;
    font-weight: 600;
}
.pm-body .form-control:focus {
    border-color: var(--pl-teal);
    box-shadow: 0 0 0 3px rgba(0, 208, 132, 0.12);
}
.pm-body .input-group {
    display: flex;
    border: 1px solid var(--pl-border-soft);
    border-radius: 13px;
    background: var(--pl-bg);
    overflow: hidden;
}
.pm-body .input-group .form-control { border: none; background: transparent; }
.pm-body .input-group-text {
    background: var(--pl-grad) !important;
    color: #0B1120 !important;
    border: none;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 800;
    display: flex;
    align-items: center;
}

.gateway-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    padding: 6px 0;
}
.gateway-tile {
    position: relative;
    aspect-ratio: 1.25 / 1;
    min-height: 110px;
    border-radius: 16px;
    border: 1px solid var(--pl-border-soft);
    background: var(--pl-card-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 12px;
    transition: border-color 0.2s, transform 0.2s;
}
.gateway-tile img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.gateway-tile span {
    font-size: 13px;
    font-weight: 800;
    color: var(--pl-teal);
    text-align: center;
}
.gateway-tile:hover,
.gateway-tile.active {
    border-color: var(--pl-teal);
    transform: translateY(-2px);
}
.gateway-tile.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--pl-teal);
    color: #0B1120;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pm-details { display: none; }
.pm-details.is-visible { display: block; }
.pm-total {
    background: var(--pl-card-2);
    border: 1px solid var(--pl-border-soft);
    border-radius: 13px;
    padding: 11px 14px;
    margin: 4px 0 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.pm-total .cell .lbl {
    font-size: 9.5px;
    color: var(--pl-text-muted);
    font-weight: 700;
    text-transform: uppercase;
}
.pm-total .cell .val {
    font-size: 14px;
    font-weight: 800;
    color: var(--pl-teal);
    margin-top: 2px;
}
.pm-footer { display: flex; gap: 8px; }
.pm-btn {
    padding: 13px 18px;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 800;
    font-family: inherit;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.pm-btn-cancel {
    background: var(--pl-card-2);
    color: var(--pl-text-sec);
    border: 1px solid var(--pl-border-soft);
}
.pm-btn-submit,
.pm-btn-login {
    background: var(--pl-grad);
    color: #0B1120;
    flex: 1;
    text-decoration: none;
}

.gateway-info.d-none { display: none !important; }
.pm-body select[name="wallet_type"] { display: none; }
#selectedWalletLogo { display: none !important; }

/* ===== Animations ===== */
@keyframes planFade {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}
.plan-grid .plan-card {
    animation: planFade 0.45s ease both;
}
.plan-grid .plan-card:nth-child(2) { animation-delay: 0.06s; }
.plan-grid .plan-card:nth-child(3) { animation-delay: 0.12s; }
.plan-grid .plan-card:nth-child(4) { animation-delay: 0.18s; }

/* ===== Responsive ===== */
@media (min-width: 720px) {
    .plan-wrap:not(.plan-wrap--home) { max-width: 520px; }
}
.plan-wrap--home {
    max-width: 1100px;
    padding: 0;
    min-height: 0;
}
@media (max-width: 420px) {
    .plan-header h2 { font-size: 22px; }
    .plan-card-price .amt { font-size: 36px; }
    .plan-card { padding: 20px 14px 16px; }
    .plan-level-ring { width: 64px; height: 64px; }
    .plan-level-pct { font-size: 12px; }
    .plan-wrap { padding: 14px 10px 40px; }
}
@media (max-width: 360px) {
    .plan-levels { grid-template-columns: 1fr 1fr; gap: 8px; }
    .plan-row-val { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .plan-grid .plan-card,
    .plan-buy-btn,
    .plan-card {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
