/**
 * fullzexpert — Custom Styles
 * Component extensions and page-specific rules.
 */

/* ============================================
   FONT AWESOME
   ============================================ */

@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    font-display: block;
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.woff2') format('woff2');
}

.fa, .fas, .far, .fal, .fab,
.fa-solid, .fa-regular, .fa-brands {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "FontAwesome" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    -webkit-font-smoothing: antialiased !important;
    display: inline-block !important;
}

/* ============================================
   CARD COMPONENT
   ============================================ */

.xe-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
}

.xe-card-head {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.xe-card-body { padding: 0; }

.xe-card-foot {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.xe-card-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Info box */
.xe-info-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 16px;
    background: var(--blue-bg);
    border: 1px solid rgba(37,99,235,0.15);
    border-radius: var(--r);
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.55;
}

.xe-info-box i { color: var(--blue); flex-shrink: 0; margin-top: 1px; }

.xe-warn-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 14px 16px;
    background: var(--warn-bg);
    border: 1px solid rgba(217,119,6,0.2);
    border-radius: var(--r);
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.55;
}

.xe-warn-box i { color: var(--warn); flex-shrink: 0; margin-top: 1px; }

/* ============================================
   SECTION VIEW-ALL LINK
   ============================================ */

.xe-view-all {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-faint);
    transition: color var(--t);
    display: flex;
    align-items: center;
    gap: 4px;
}

.xe-view-all:hover { color: var(--green); }
.xe-view-all i { font-size: 11px; }

/* ============================================
   DASHBOARD NOTICE BANNER
   ============================================ */

.xe-notice {
    background: var(--white);
    border: 1px solid rgba(220,38,38,0.2);
    border-left: 3px solid var(--danger);
    border-radius: var(--r-lg);
    padding: 14px 18px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.55;
}

.xe-notice-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(220,38,38,0.45);
    animation: noticePulse 1.8s ease-out infinite;
}

@keyframes noticePulse {
    0%   { box-shadow: 0 0 0 0   rgba(220,38,38,0.45); }
    70%  { box-shadow: 0 0 0 7px rgba(220,38,38,0);    }
    100% { box-shadow: 0 0 0 0   rgba(220,38,38,0);    }
}

.xe-notice-body { flex: 1; }
.xe-notice-title { font-weight: 700; color: var(--text); margin-bottom: 2px; }

.xe-notice-dismiss {
    background: none;
    border: none;
    color: var(--text-faint);
    font-size: 15px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: color var(--t);
    line-height: 1;
}

.xe-notice-dismiss:hover { color: var(--danger); }

/* ============================================
   PRODUCT TABLE (shortcode scaffold)
   ============================================ */

/* fullzexpert product rows are served by PHP shortcodes;
   these rules style whatever the shortcode outputs inside .xe-section */

.xe-section .products-list,
.xe-section .woocommerce ul.products {
    padding: 0 !important;
}

/* ============================================
   QUICK NAV — active icon nudge
   ============================================ */

.xe-nav-item.active {
    box-shadow: inset 0 0 0 1px rgba(5,150,105,0.25);
}

/* ============================================
   STAT VALUE WALLET FIX
   ============================================ */

.woo-wallet-my-wallet-container,
.woo-wallet-my-wallet-container *,
.mini-wallet,
.mini-wallet * {
    color: var(--green) !important;
    text-decoration: none !important;
    pointer-events: none !important;
    cursor: default !important;
}

/* ============================================
   CONTACT PAGE — CHANNEL CARDS
   ============================================ */

.xe-channels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.xe-channel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px 16px;
    text-align: center;
    transition: border-color var(--t);
}

.xe-channel:hover { border-color: var(--border-hi); }

.xe-channel i {
    font-size: 22px;
    color: var(--green);
    margin-bottom: 9px;
    display: block;
}

.xe-channel-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 3px;
}

.xe-channel-desc {
    font-size: 12px;
    color: var(--text-faint);
}

/* ============================================
   ADD FUNDS — INSTRUCTIONS BOX
   ============================================ */

#xe-funds-instructions { display: none; }

/* ============================================
   FILTERS BAR
   ============================================ */

.xe-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.xe-filter {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-faint);
    background: var(--bg);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--t);
}

.xe-filter:hover { border-color: var(--green); color: var(--green); }

.xe-filter.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

/* ============================================
   ORDER STATUS INLINE
   ============================================ */

.order-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 600;
}

.order-status.completed   { background: var(--green-bg); color: var(--green); }
.order-status.processing  { background: var(--warn-bg); color: var(--warn); }
.order-status.cancelled   { background: var(--danger-bg); color: var(--danger); }
.order-status.pending     { background: var(--surface-3); color: var(--text-faint); border: 1px solid var(--border); }

/* ============================================
   RESPONSIVE EXTRAS
   ============================================ */

@media (max-width: 768px) {
    .xe-channels { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .xe-channels { grid-template-columns: 1fr; }
}

/* ============================================
   PAYMENT PAGES
   ============================================ */

/* Back link shared across payment pages */
.xe-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-faint);
    text-decoration: none;
    margin-bottom: 24px;
    transition: color var(--t);
}
.xe-back-link:hover { color: var(--text); }

/* Payment page header with coin icon */
.xe-payment-header-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 32px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.xe-payment-coin-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.xe-payment-coin-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px 0;
}

.xe-payment-coin-network {
    font-size: 13px;
    color: var(--text-faint);
    margin: 0;
}

/* Amount summary */
.xe-payment-summary {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    padding: 20px 24px;
    margin-bottom: 20px;
}

.xe-payment-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
    color: var(--text-dim);
}

.xe-payment-summary-row:last-child { border-bottom: none; }

.xe-payment-summary-total {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.xe-payment-summary-total strong { color: var(--green); font-size: 17px; }

/* Address card */
.xe-payment-address-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.xe-payment-address-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.xe-payment-address-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 24px;
}

.xe-payment-address-input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 10px 14px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    color: var(--text);
    min-width: 0;
}

.xe-payment-address-input:focus { outline: none; border-color: var(--green); }

.xe-copy-btn { flex-shrink: 0; }

/* QR code */
.xe-payment-qr {
    text-align: center;
}

.xe-payment-qr img {
    background: white;
    padding: 12px;
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    display: inline-block;
}

.xe-payment-qr-label {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 8px;
    margin-bottom: 0;
}

/* Warnings */
.xe-payment-warning {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-radius: var(--r-lg);
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 20px;
    align-items: flex-start;
}

.xe-payment-warning i { flex-shrink: 0; margin-top: 2px; font-size: 15px; }

.xe-payment-warning--blue {
    background: rgba(37,99,235,0.07);
    border: 1px solid rgba(37,99,235,0.18);
    color: var(--text-dim);
}
.xe-payment-warning--blue i { color: var(--blue); }

.xe-payment-warning--yellow {
    background: rgba(217,119,6,0.08);
    border: 1px solid rgba(217,119,6,0.22);
    color: var(--text-dim);
}
.xe-payment-warning--yellow i { color: var(--warn); }

.xe-payment-warning--red {
    background: rgba(220,38,38,0.07);
    border: 1px solid rgba(220,38,38,0.2);
    color: var(--text-dim);
}
.xe-payment-warning--red i { color: var(--danger); }

/* Page actions row */
.xe-payment-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Payment method selection on add-funds page */
.xe-payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.xe-payment-method {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--r-lg);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all var(--t);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.xe-payment-method:hover { border-color: var(--border-hi); box-shadow: var(--shadow-sm); }
.xe-payment-method.selected { border-color: var(--green); background: var(--green-bg); }

.xe-payment-method-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.xe-payment-method.selected .xe-payment-method-icon { background: white; }

.xe-payment-method-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.xe-payment-method-ticker {
    font-size: 11px;
    color: var(--text-faint);
    font-weight: 500;
}

/* Form card wrapper (contact + add-funds) */
.xe-form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 32px;
    box-shadow: var(--shadow-sm);
}

/* Amount presets */
.amount-preset.selected {
    background: var(--green);
    border-color: var(--green);
    color: white;
}

/* Article styles for single/page templates */
.xe-article { }
.xe-back-link { margin-bottom: 20px; }
.xe-article-header { margin-bottom: 24px; }
.xe-article-title { font-size: 26px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.xe-article-meta { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-faint); flex-wrap: wrap; }
.xe-article-meta span { display: flex; align-items: center; gap: 5px; }
.xe-article-thumbnail { margin-bottom: 24px; }
.xe-article-thumbnail img { width: 100%; border-radius: var(--r-lg); height: auto; }
.xe-article-content { font-size: 15px; line-height: 1.75; color: var(--text-dim); }
.xe-article-content h2, .xe-article-content h3, .xe-article-content h4 { color: var(--text); margin: 24px 0 12px; }
.xe-article-content p { margin-bottom: 16px; }
.xe-article-content a { color: var(--green); text-decoration: underline; }
.xe-article-content img { max-width: 100%; height: auto; border-radius: var(--r); }

/* Pagination */
.xe-pagination { margin-top: 32px; }
.xe-pagination .nav-links { display: flex; gap: 8px; justify-content: center; align-items: center; }
.xe-pagination .page-numbers {
    padding: 7px 14px;
    border-radius: var(--r);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    border: 1px solid var(--border);
    background: var(--white);
    text-decoration: none;
    transition: all var(--t);
}
.xe-pagination .page-numbers:hover { border-color: var(--green); color: var(--green); }
.xe-pagination .page-numbers.current { background: var(--green); border-color: var(--green); color: white; }

/* Post entry card */
.xe-post-entry {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 24px;
    margin-bottom: 16px;
}
.xe-post-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.xe-post-title a { color: var(--text); text-decoration: none; }
.xe-post-title a:hover { color: var(--green); }
.xe-post-meta { font-size: 12px; color: var(--text-faint); margin-bottom: 10px; display: flex; gap: 10px; }
.xe-post-excerpt { font-size: 14px; color: var(--text-dim); margin-bottom: 16px; line-height: 1.6; }

/* Product card grid (archive / search) */
.xe-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.xe-product-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    overflow: hidden;
    transition: box-shadow var(--t), border-color var(--t);
}
.xe-product-card:hover { box-shadow: var(--shadow-md); border-color: var(--border-hi); }
.xe-product-card-img-wrap { display: block; height: 160px; overflow: hidden; }
.xe-product-card-img { width: 100%; height: 100%; object-fit: cover; }
.xe-product-card-body { padding: 16px; }
.xe-product-card-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 8px; line-height: 1.4; }
.xe-product-card-title a { color: inherit; text-decoration: none; }
.xe-product-card-title a:hover { color: var(--green); }
.xe-product-card-price { font-size: 15px; font-weight: 700; color: var(--green); margin-bottom: 12px; }
.xe-product-card-excerpt { font-size: 12.5px; color: var(--text-faint); margin-bottom: 12px; line-height: 1.5; }

/* Empty state */
.xe-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-faint);
}
.xe-empty-state i { font-size: 40px; display: block; margin-bottom: 16px; }
.xe-empty-state p { margin-bottom: 20px; font-size: 14px; }

/* ============================================
   RESPONSIVE — PAYMENT PAGES
   ============================================ */

@media (max-width: 600px) {
    .xe-payment-header-card { padding: 20px 16px; }
    .xe-payment-coin-title  { font-size: 18px; }
    .xe-form-card           { padding: 20px 16px; }
    .xe-payment-address-row { flex-direction: column; align-items: stretch; }
    .xe-payment-actions     { flex-direction: column; }
    .xe-payment-actions .xe-btn { width: 100%; justify-content: center; }
    .xe-payment-methods     { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   SHADOW VARIABLES (fallback for all contexts)
   ============================================ */

:root {
    --shadow-sm: 0 1px 3px rgba(15,23,42,0.07), 0 1px 2px rgba(15,23,42,0.04);
    --shadow-md: 0 4px 16px rgba(15,23,42,0.1),  0 2px 6px rgba(15,23,42,0.06);
}

[data-theme="dark"] {
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3),  0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.45), 0 2px 6px rgba(0,0,0,0.3);
}

/* ============================================
   PROFILE PAGE
   ============================================ */

.xe-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.xe-profile-card {
    height: 100%;
}

.xe-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
}

.xe-card-title-icon {
    color: var(--green);
    font-size: 14px;
}

.xe-profile-email-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.xe-profile-email-info { flex: 1; }

.xe-form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 7px;
}

.xe-profile-email-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    padding: 11px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r);
}

.xe-profile-hint {
    font-size: 12.5px;
    color: var(--text-faint);
    margin-top: 8px;
    line-height: 1.55;
}

.xe-form-hint {
    font-size: 12px;
    color: var(--text-faint);
    margin-top: 6px;
    line-height: 1.5;
}

/* Input with password toggle */
.xe-input-wrap {
    position: relative;
}

.xe-input-pw-wrap .xe-input {
    padding-right: 44px;
}

.xe-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-faint);
    cursor: pointer;
    padding: 4px;
    font-size: 14px;
    line-height: 1;
    transition: color var(--t);
    font-family: inherit;
}

.xe-pw-toggle:hover { color: var(--text); }

/* Password strength bar */
.xe-pw-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.xe-pw-strength-bar {
    flex: 1;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.xe-pw-strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.2s ease, background 0.2s ease;
}

.xe-pw-strength-label {
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

/* Dark mode overrides for profile */
[data-theme="dark"] .xe-profile-email-value {
    background: var(--surface-3);
    border-color: var(--border);
    color: var(--text);
}

[data-theme="dark"] .xe-pw-strength-bar { background: var(--border); }

/* ============================================
   DARK MODE — CUSTOM COMPONENT OVERRIDES
   ============================================ */

[data-theme="dark"] .xe-notice {
    background: var(--white);
    border-color: rgba(239,68,68,0.3);
}

[data-theme="dark"] .xe-channel {
    background: var(--white);
    border-color: var(--border);
}

[data-theme="dark"] .xe-channel:hover { border-color: var(--border-hi); }

[data-theme="dark"] .xe-filter {
    background: var(--surface-3);
    border-color: var(--border);
    color: var(--text-faint);
}

[data-theme="dark"] .xe-filter.active {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

[data-theme="dark"] .xe-pagination .page-numbers {
    background: var(--white);
    border-color: var(--border);
    color: var(--text-dim);
}

[data-theme="dark"] .xe-post-entry {
    background: var(--white);
    border-color: var(--border);
}

[data-theme="dark"] .xe-product-card {
    background: var(--white);
    border-color: var(--border);
}

[data-theme="dark"] .xe-payment-header-card {
    background: var(--white);
    border-color: var(--border);
}

[data-theme="dark"] .xe-payment-summary {
    background: var(--white);
    border-color: var(--border);
}

[data-theme="dark"] .xe-payment-summary-row { border-bottom-color: var(--border); }

[data-theme="dark"] .xe-payment-address-card {
    background: var(--white);
    border-color: var(--border);
}

[data-theme="dark"] .xe-payment-address-input {
    background: var(--surface-3);
    border-color: var(--border);
    color: var(--text);
}

[data-theme="dark"] .xe-payment-qr img {
    background: #fff;
    border-color: var(--border);
}

[data-theme="dark"] .xe-payment-warning--blue {
    background: rgba(96,165,250,0.1);
    border-color: rgba(96,165,250,0.25);
}

[data-theme="dark"] .xe-payment-warning--yellow {
    background: rgba(245,158,11,0.1);
    border-color: rgba(245,158,11,0.25);
}

[data-theme="dark"] .xe-payment-warning--red {
    background: rgba(239,68,68,0.1);
    border-color: rgba(239,68,68,0.25);
}

[data-theme="dark"] .xe-form-card {
    background: var(--white);
    border-color: var(--border);
}

[data-theme="dark"] .xe-payment-method {
    background: var(--white);
    border-color: var(--border);
}

[data-theme="dark"] .xe-payment-method:hover {
    border-color: var(--border-hi);
    background: var(--surface-3);
}

[data-theme="dark"] .xe-payment-method.selected {
    border-color: var(--green);
    background: var(--green-bg);
}

[data-theme="dark"] .xe-payment-method-icon { background: var(--surface-3); }
[data-theme="dark"] .xe-payment-method.selected .xe-payment-method-icon { background: rgba(16,185,129,0.15); }

[data-theme="dark"] .amount-preset {
    background: var(--surface-3);
    border-color: var(--border);
    color: var(--text-dim);
}

[data-theme="dark"] .amount-preset.selected {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

/* Info/warn boxes */
[data-theme="dark"] .xe-info-box {
    background: rgba(96,165,250,0.1);
    border-color: rgba(96,165,250,0.25);
    color: var(--text-dim);
}

[data-theme="dark"] .xe-warn-box {
    background: rgba(245,158,11,0.1);
    border-color: rgba(245,158,11,0.25);
    color: var(--text-dim);
}

/* ============================================
   IMPROVED PAYMENT PAGE SPACING
   ============================================ */

/* Ensure consistent section spacing */
.xe-payment-header-card,
.xe-payment-summary,
.xe-payment-address-card,
.xe-payment-warning,
.xe-form-card {
    margin-bottom: 20px;
}

/* Better back link styling */
.xe-back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-faint);
    text-decoration: none;
    margin-bottom: 24px;
    padding: 8px 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    transition: all var(--t);
}

.xe-back-link:hover {
    color: var(--text);
    border-color: var(--border-hi);
    background: var(--bg);
}

[data-theme="dark"] .xe-back-link {
    background: var(--white);
    border-color: var(--border);
    color: var(--text-faint);
}

[data-theme="dark"] .xe-back-link:hover {
    background: var(--surface-3);
    border-color: var(--border-hi);
    color: var(--text);
}

/* ============================================
   RESPONSIVE — PROFILE PAGE
   ============================================ */

@media (max-width: 768px) {
    .xe-profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .xe-profile-grid {
        gap: 16px;
    }
}

/* ============================================
   AUTH PAGES (Login / Register / Forgot PW)
   ============================================ */

.xe-auth-wrapper {
    min-height: calc(100vh - 61px); /* 61px = header + border */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: var(--bg);
    background-image:
        linear-gradient(rgba(5,150,105,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(5,150,105,0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    position: relative;
    overflow: hidden;
}

/* Floating orbs */
.xe-auth-wrapper::before,
.xe-auth-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.xe-auth-wrapper::before {
    width: 560px;
    height: 560px;
    background: radial-gradient(circle, rgba(5,150,105,0.12) 0%, transparent 70%);
    top: -180px;
    right: -180px;
    animation: xe-auth-float1 20s ease-in-out infinite;
}

.xe-auth-wrapper::after {
    width: 440px;
    height: 440px;
    background: radial-gradient(circle, rgba(16,185,129,0.09) 0%, transparent 70%);
    bottom: -130px;
    left: -130px;
    animation: xe-auth-float2 26s ease-in-out infinite;
}

@keyframes xe-auth-float1 {
    0%,100% { transform: translate(0,0) scale(1); }
    33%     { transform: translate(28px,-28px) scale(1.08); }
    66%     { transform: translate(-18px,18px) scale(0.93); }
}

@keyframes xe-auth-float2 {
    0%,100% { transform: translate(0,0) scale(1); }
    33%     { transform: translate(-36px,26px) scale(0.92); }
    66%     { transform: translate(26px,-16px) scale(1.07); }
}

.xe-auth-container {
    max-width: 440px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Brand mark at top of auth card */
.xe-auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 32px;
    text-decoration: none;
}

.xe-auth-brand-mark {
    width: 36px;
    height: 36px;
    background: var(--green);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -1px;
    flex-shrink: 0;
}

.xe-auth-brand-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

/* Card */
.xe-auth-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.xe-auth-head {
    text-align: center;
    margin-bottom: 28px;
}

.xe-auth-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.xe-auth-subtitle {
    font-size: 14px;
    color: var(--text-faint);
}

/* Alert */
.xe-auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 9px;
    margin-bottom: 20px;
    font-size: 13.5px;
    font-weight: 500;
    border: 1px solid;
    line-height: 1.5;
}

.xe-auth-alert i { flex-shrink: 0; margin-top: 1px; }

.xe-auth-alert-error {
    background: rgba(220,38,38,0.08);
    color: var(--danger);
    border-color: rgba(220,38,38,0.25);
}

.xe-auth-alert-success {
    background: rgba(5,150,105,0.08);
    color: var(--green);
    border-color: rgba(5,150,105,0.25);
}

.xe-auth-alert-info {
    background: rgba(37,99,235,0.07);
    color: #2563eb;
    border-color: rgba(37,99,235,0.2);
}

/* Form groups */
.xe-auth-group {
    margin-bottom: 18px;
}

.xe-auth-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 7px;
}

.xe-auth-required { color: var(--danger); margin-left: 2px; }

.xe-auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.xe-auth-input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-faint);
    font-size: 15px;
    pointer-events: none;
    z-index: 1;
}

.xe-auth-input {
    width: 100%;
    padding: 11px 16px 11px 42px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--r);
    font-size: 14.5px;
    color: var(--text);
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    -webkit-appearance: none;
}

.xe-auth-input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(5,150,105,0.12);
    background: var(--white);
}

.xe-auth-input::placeholder { color: var(--text-faint); }

.xe-auth-input.xe-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

/* Password toggle */
.xe-auth-pw-toggle {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-faint);
    cursor: pointer;
    padding: 6px;
    font-size: 15px;
    line-height: 1;
    transition: color 0.15s;
    font-family: inherit;
    z-index: 1;
}

.xe-auth-pw-toggle:hover { color: var(--text); }

/* Password input with toggle */
.xe-auth-input.xe-has-toggle { padding-right: 42px; }

/* Help text */
.xe-auth-hint {
    display: block;
    font-size: 11.5px;
    color: var(--text-faint);
    margin-top: 5px;
}

/* Form row (remember me + forgot link) */
.xe-auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13.5px;
}

.xe-auth-check {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}

.xe-auth-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: var(--green);
    border: 1px solid var(--border);
}

.xe-auth-check-label {
    color: var(--text-dim);
    font-size: 13.5px;
    cursor: pointer;
    font-weight: 500;
}

.xe-auth-forgot {
    color: var(--green);
    text-decoration: none;
    font-weight: 600;
    font-size: 13.5px;
    transition: color 0.15s;
}

.xe-auth-forgot:hover { color: var(--green-hi); text-decoration: underline; }

/* Submit button */
.xe-auth-submit {
    width: 100%;
    padding: 13px;
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: var(--r);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(5,150,105,0.3);
}

.xe-auth-submit:hover {
    background: var(--green-hi);
    box-shadow: 0 4px 16px rgba(5,150,105,0.4);
    transform: translateY(-1px);
}

.xe-auth-submit:active { transform: translateY(0); }

.xe-auth-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.xe-auth-submit .xe-spin {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: xe-auth-spin 0.55s linear infinite;
    flex-shrink: 0;
}

.xe-auth-submit.xe-loading .xe-spin { display: block; }

@keyframes xe-auth-spin { to { transform: rotate(360deg); } }

/* Password strength */
.xe-auth-strength {
    margin-top: 8px;
    display: none;
}

.xe-auth-strength-bar {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.xe-auth-strength-fill {
    height: 100%;
    width: 0;
    border-radius: 2px;
    transition: width 0.25s ease, background 0.25s ease;
}

.xe-auth-strength-text {
    font-size: 11.5px;
    font-weight: 600;
    text-align: right;
    display: block;
}

/* Footer / switch link */
.xe-auth-switch {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 13.5px;
    color: var(--text-faint);
}

.xe-auth-switch a {
    color: var(--green);
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
}

.xe-auth-switch a:hover { text-decoration: underline; }

/* Dark mode — auth */
[data-theme="dark"] .xe-auth-card {
    background: var(--white);
    border-color: var(--border);
}

[data-theme="dark"] .xe-auth-input {
    background: var(--surface-3);
    border-color: var(--border);
    color: var(--text);
}

[data-theme="dark"] .xe-auth-input:focus {
    background: var(--white);
    border-color: var(--green);
}

[data-theme="dark"] .xe-auth-input::placeholder { color: var(--text-faint); }

[data-theme="dark"] .xe-auth-alert-error  { background: rgba(239,68,68,0.1);   border-color: rgba(239,68,68,0.3);   color: #fca5a5; }
[data-theme="dark"] .xe-auth-alert-success { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.3); color: var(--green); }
[data-theme="dark"] .xe-auth-alert-info   { background: rgba(96,165,250,0.1);  border-color: rgba(96,165,250,0.3); color: #93c5fd; }

[data-theme="dark"] .xe-auth-switch { border-top-color: var(--border); }
[data-theme="dark"] .xe-auth-brand-name { color: var(--text); }

[data-theme="dark"] .xe-auth-wrapper {
    background-image:
        linear-gradient(rgba(16,185,129,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16,185,129,0.04) 1px, transparent 1px);
}

/* ============================================
   RESPONSIVE — AUTH PAGES
   ============================================ */

@media (max-width: 480px) {
    .xe-auth-wrapper { padding: 24px 16px; }
    .xe-auth-card    { padding: 28px 20px; }
    .xe-auth-title   { font-size: 20px; }
    .xe-auth-row     { flex-direction: column; align-items: flex-start; gap: 10px; }
    .xe-auth-input   { font-size: 16px; } /* prevents iOS zoom */
}
