/**
 * Swyfttrade Dashboard — clean brand-green system
 * Light + dark. Existing component classes are preserved.
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
    --primary: #11773a;
    --primary-hover: #0e6331;
    --primary-light: #3aaf6e;
    --primary-dark: #0d5a2d;
    --primary-glow: rgba(17, 119, 58, 0.28);
    --forest: #0f2418;

    --bg-primary: #f5f7f5;
    --bg-secondary: #eef3ef;
    --bg-tertiary: #e5eee7;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-hover: #f2f7f3;
    --bg-active: #e7f3ea;

    --text-primary: #102016;
    --text-secondary: #4d5f54;
    --text-muted: #7a8b80;

    --border-color: rgba(17, 119, 58, 0.1);
    --border-hover: rgba(17, 119, 58, 0.28);

    --shadow-sm: 0 1px 2px rgba(16, 32, 22, 0.04);
    --shadow-md: 0 10px 28px rgba(16, 32, 22, 0.06);
    --shadow-lg: 0 22px 48px rgba(16, 32, 22, 0.1);

    --success: #11773a;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    --radius: 1rem;
    --radius-sm: 0.75rem;
    --radius-pill: 999px;

    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'IBM Plex Mono', 'SF Mono', monospace;
    --topbar-h: 72px;
}

[data-theme="light"] {
    --bg-primary: #f5f7f5;
    --bg-secondary: #eef3ef;
    --bg-tertiary: #e5eee7;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-hover: #f2f7f3;
    --bg-active: #e7f3ea;
    --text-primary: #102016;
    --text-secondary: #4d5f54;
    --text-muted: #7a8b80;
    --border-color: rgba(17, 119, 58, 0.1);
    --shadow-sm: 0 1px 2px rgba(16, 32, 22, 0.04);
    --shadow-md: 0 10px 28px rgba(16, 32, 22, 0.06);
    --shadow-lg: 0 22px 48px rgba(16, 32, 22, 0.1);
}

[data-theme="dark"] {
    --primary: #3aaf6e;
    --primary-hover: #2d9b5c;
    --primary-light: #5ec98a;
    --forest: #e8f5ee;
    --bg-primary: #0b0f0c;
    --bg-secondary: #121714;
    --bg-tertiary: #181f1b;
    --bg-card: #141a16;
    --bg-sidebar: #101511;
    --bg-hover: #1b231e;
    --bg-active: #203028;
    --text-primary: #eef6f0;
    --text-secondary: #a3b5aa;
    --text-muted: #7d8f84;
    --border-color: rgba(17, 119, 58, 0.18);
    --border-hover: rgba(58, 175, 110, 0.4);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 22px 48px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-main);
    background:
        radial-gradient(ellipse 80% 40% at 100% -10%, rgba(17, 119, 58, 0.07), transparent 55%),
        var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
}

img {
    max-width: 100%;
}

/* ── Top bar ── */
.dash-topbar {
    position: sticky;
    top: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--topbar-h);
    padding: 0.65rem 1.75rem;
    background: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(18px) saturate(1.2);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

[data-theme="dark"] .dash-topbar {
    background: rgba(11, 15, 12, 0.82);
    box-shadow: none;
}

.dash-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.dash-brand img,
.auth-brand img,
.brand-logo {
    height: 38px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.brand-logo--light {
    display: block !important;
}

.brand-logo--dark {
    display: none !important;
}

html[data-theme="dark"] .brand-logo--light {
    display: none !important;
}

html[data-theme="dark"] .brand-logo--dark {
    display: block !important;
}

.dash-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.dash-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}

.dash-nav-link i {
    font-size: 0.85rem;
    opacity: 0.85;
}

.dash-nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.dash-nav-link.active {
    background: var(--bg-active);
    color: var(--primary);
}

.dash-more {
    position: relative;
}

.dash-more-btn {
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

.dash-more-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.55rem);
    left: 0;
    min-width: 240px;
    padding: 0.45rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    z-index: 1200;
}

.dash-more-menu.show {
    display: block;
}

.dash-more-menu a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.75rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.dash-more-menu a:hover,
.dash-more-menu a.active {
    background: var(--bg-hover);
    color: var(--primary);
}

.dash-tools {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-left: auto;
    flex-shrink: 0;
}

.dash-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.dash-icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.dash-icon-btn.active {
    background: var(--bg-active);
    color: var(--primary);
}

#notificationBadge {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
}

.user-menu {
    position: relative;
}

.dash-user {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.2rem 0.55rem 0.2rem 0.2rem;
    border-radius: var(--radius-pill);
    cursor: pointer;
    border: 1px solid transparent;
}

.dash-user:hover {
    background: var(--bg-hover);
}

.user-avatar,
.user-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-placeholder {
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

.dash-user-meta {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.dash-user-meta small {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.dash-user-meta strong {
    font-size: 0.88rem;
    color: var(--text-primary);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 220px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    display: none;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 1200;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
}

.user-dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 350px;
    max-width: calc(100vw - 2rem);
    max-height: 400px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    z-index: 1200;
}

.notification-dropdown.show {
    display: block !important;
}

.mobile-menu-toggle {
    display: none;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    width: 42px;
    height: 42px;
    cursor: pointer;
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(14, 24, 16, 0.45);
    z-index: 1090;
}

.sidebar-overlay.active {
    display: block;
}

/* Legacy sidebar class kept as mobile drawer */
.dashboard-sidebar {
    display: none;
}

/* ── Main ── */
.dashboard-main {
    margin-left: 0;
    width: 100%;
    min-height: calc(100vh - var(--topbar-h));
    background: transparent;
}

.dashboard-header {
    display: none;
}

.dashboard-content {
    padding: 1.75rem 2rem 3rem;
    max-width: 1240px;
    margin: 0 auto;
}

.page-heading {
    margin-bottom: 1.5rem;
}

.page-heading h1 {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.page-heading p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.impersonation-banner {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #1a1a1a;
    padding: 0.75rem 1.5rem;
    border-radius: 0.85rem;
    margin: 1rem 2rem 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.impersonation-banner a {
    margin-left: auto;
    color: #1a1a1a;
}

/* ── Cards ── */
.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.15rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    width: 100%;
    max-width: 100%;
}

.dashboard-card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* ── Buttons ── */
.btn-primary,
.btn-secondary {
    border: none;
    padding: 0.8rem 1.4rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-family: inherit;
    font-size: 0.925rem;
}

.btn-primary {
    background: linear-gradient(180deg, #1b8a46 0%, #11773a 100%);
    color: #fff;
    box-shadow: 0 8px 18px var(--primary-glow);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #11773a 0%, #0e6331 100%);
    transform: translateY(-1px);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-hover);
    color: var(--text-primary);
}

/* ── Stats ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.15rem;
    margin-bottom: 1.75rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.15rem;
    padding: 1.35rem;
    position: relative;
    overflow: hidden;
}

.stat-label {
    font-size: 0.78rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-mono);
    letter-spacing: -0.03em;
}

.stat-change {
    font-size: 0.82rem;
    margin-top: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-muted);
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

/* ── Tables ── */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.table thead {
    background: var(--bg-secondary);
}

.table th {
    padding: 0.85rem 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}

.table td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 0.28rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-success { background: rgba(22, 163, 74, 0.12); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.14); color: #d97706; }
.badge-danger { background: rgba(239, 68, 68, 0.12); color: var(--danger); }
.badge-info { background: rgba(59, 130, 246, 0.12); color: var(--info); }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }

.form-label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.88rem;
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: var(--bg-card);
}

.form-control.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.field-error {
    color: var(--danger);
    font-size: 0.82rem;
    margin-top: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.support-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1050;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 0.7rem 1.1rem;
    border-radius: var(--radius-pill);
    box-shadow: 0 10px 24px var(--primary-glow);
}

.support-fab:hover { color: #fff; }

body.kyc-focus .support-fab,
body.kyc-focus #chat-application,
body.kyc-focus .dash-nav,
body.kyc-focus .mobile-menu-toggle {
    display: none !important;
}

body.kyc-focus .dashboard-content {
    max-width: 880px;
}

/* ── Auth ── */
body.auth-page {
    background: #f7f8f6;
}

html[data-theme="dark"] body.auth-page {
    background: var(--bg-primary);
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2.4rem 1.25rem 2rem;
    background: transparent;
}

.auth-card,
.auth-wrap {
    width: 100%;
    max-width: 420px;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    position: relative;
}

.auth-card.auth-wide,
.auth-wrap.auth-wide { max-width: 440px; }

.auth-top {
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    margin-bottom: 2.15rem;
}

.auth-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 2;
    text-decoration: none;
    margin: 0;
}

.auth-brand img,
.auth-brand .brand-logo {
    height: 40px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.auth-theme-btn {
    grid-column: 3;
    justify-self: end;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid #e4e6e3;
    background: #fff;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

html[data-theme="dark"] .auth-theme-btn {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--primary-light);
}

.auth-theme-btn:hover {
    border-color: var(--primary);
}

.auth-title-row {
    display: grid;
    grid-template-columns: 28px 1fr;
    align-items: center;
    column-gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.auth-title-row h1,
.auth-card h1,
.auth-wrap h1 {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-align: left;
    margin: 0;
    color: #141814;
}

.auth-back {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #141814;
    text-decoration: none;
    font-size: 1.05rem;
}

.auth-back:hover { color: var(--primary); }

.auth-card .auth-sub,
.auth-wrap .auth-sub {
    text-align: left;
    color: #8a8f88;
    margin: 0 0 1.45rem;
    font-size: 0.95rem;
}

.auth-card .auth-sub a,
.auth-wrap .auth-sub a,
.auth-forgot,
.auth-foot a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-foot a { text-decoration: underline; text-underline-offset: 3px; }

.auth-alert {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    margin-bottom: 1.15rem;
    font-size: 0.9rem;
}

.auth-alert.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-alert.success {
    background: rgba(22, 163, 74, 0.1);
    color: #15803d;
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.auth-card .form-group,
.auth-wrap .form-group { margin-bottom: 0.85rem; }

.auth-card .form-label,
.auth-wrap .form-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-card .form-control,
.auth-wrap .form-control {
    background: #fff;
    border: 1px solid #d9ddd6;
    border-radius: 12px;
    padding: 0.95rem 1.05rem;
    box-shadow: none;
    font-size: 0.95rem;
}

.auth-card .form-control:focus,
.auth-wrap .form-control:focus {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(17, 119, 58, 0.12);
}

.auth-pass {
    position: relative;
}

.auth-pass .form-control { padding-right: 3rem; }

.auth-eye {
    position: absolute;
    right: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9aa09a;
    cursor: pointer;
    padding: 0.2rem;
}

.auth-forgot {
    display: inline-block;
    margin: 0.15rem 0 1.15rem;
    font-size: 0.92rem;
}

.auth-card .btn-primary,
.auth-wrap .btn-primary {
    width: 100%;
    padding: 0.95rem 1.25rem;
    border-radius: 12px;
    box-shadow: none;
    background: var(--primary);
    color: #fff;
    font-weight: 800;
}

.auth-card .btn-primary:hover,
.auth-wrap .btn-primary:hover {
    background: var(--primary-hover);
    transform: none;
}

.auth-rules {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 1rem;
    list-style: none;
    margin: 0.15rem 0 1rem;
    padding: 0;
    color: #9aa09a;
    font-size: 0.78rem;
}

.auth-rules li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.auth-rules li::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #c5cbc2;
    flex-shrink: 0;
}

.auth-terms {
    display: flex;
    gap: 0.55rem;
    align-items: flex-start;
    margin: 0.35rem 0 1.15rem;
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.auth-terms input { margin-top: 0.28rem; accent-color: var(--primary); }

.auth-foot {
    text-align: center;
    margin-top: 1.45rem;
    color: #8a8f88;
    font-size: 0.92rem;
}

.auth-copy {
    text-align: center;
    margin: 2.4rem 0 0;
    color: #b0b5ac;
    font-size: 0.78rem;
}

.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.auth-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-active);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 1rem;
    font-size: 1.25rem;
}

html[data-theme="dark"] .auth-title-row h1,
html[data-theme="dark"] .auth-card h1,
html[data-theme="dark"] .auth-wrap h1,
html[data-theme="dark"] .auth-back {
    color: var(--text-primary);
}

html[data-theme="dark"] .auth-card .form-control,
html[data-theme="dark"] .auth-wrap .form-control {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* ── Live session ── */
.live-session {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    padding: 1.5rem 0 2rem;
}

.live-session h2 {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.4rem;
}

.live-session .live-lead {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.live-dot {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.live-dot::before {
    display: none;
}

.live-beacon {
    position: relative;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.live-beacon-core {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22), 0 0 14px rgba(239, 68, 68, 0.7);
    animation: liveCore 1.2s ease-in-out infinite;
    z-index: 2;
}

.live-beacon-wave {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 2px solid rgba(239, 68, 68, 0.55);
    animation: liveRipple 1.8s ease-out infinite;
}

.live-beacon-wave:nth-child(2) {
    animation-delay: 0.9s;
}

@keyframes liveCore {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.82); }
}

@keyframes liveRipple {
    0% { transform: scale(0.55); opacity: 0.9; }
    100% { transform: scale(1.7); opacity: 0; }
}

.live-info {
    text-align: left;
    background: rgba(17, 119, 58, 0.08);
    border: 1px solid rgba(17, 119, 58, 0.16);
    border-radius: 1rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.live-info i { color: var(--primary); margin-top: 0.2rem; }

.live-trade-row {
    border-radius: 1.15rem;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.live-trade-row video {
    width: 100%;
    display: block;
}

/* ── Payment pickers ── */
.pay-method-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 560px;
    margin: 0 auto;
}

.pay-method-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.15rem;
    padding: 1.25rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pay-method-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.pay-method-top {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.pay-method-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.pay-method-card h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.pay-method-card p {
    margin: 0.15rem 0 0;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.pay-method-card .btn-primary,
.pay-method-card .btn-secondary {
    width: 100%;
}

.pay-method-card.is-disabled {
    opacity: 0.72;
}

.expert-card {
    border-radius: 1.15rem !important;
}

.expert-search-wrap input,
.copy-btn {
    border-radius: 999px !important;
}

.alert-box {
    border-radius: 0.9rem !important;
}

/* ── Responsive ── */
@media (max-width: 992px) {
    .dash-nav {
        display: none;
        position: fixed;
        top: var(--topbar-h);
        left: 0.75rem;
        right: 0.75rem;
        flex-direction: column;
        align-items: stretch;
        background: var(--bg-card);
        border: 1px solid var(--border-color);
        border-radius: 1rem;
        padding: 0.6rem;
        box-shadow: var(--shadow-lg);
        z-index: 1120;
        max-height: calc(100vh - var(--topbar-h) - 1.5rem);
        overflow: auto;
    }

    .dash-nav.is-open { display: flex; }

    .dash-more-menu {
        position: static;
        display: block;
        box-shadow: none;
        border: none;
        padding: 0;
        min-width: 0;
    }

    .dash-more-btn { display: none; }

    .mobile-menu-toggle { display: flex; }

    .dash-user-meta { display: none; }

    .dashboard-content {
        padding: 1.15rem 1rem 5rem;
    }
}

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

    .notification-dropdown,
    .user-dropdown {
        position: fixed !important;
        right: 0.75rem !important;
        left: 0.75rem !important;
        width: auto !important;
        top: auto !important;
        bottom: 1rem !important;
    }

    .stats-grid { grid-template-columns: 1fr; }

    .btn-primary,
    .btn-secondary { width: 100%; }

    .table th,
    .table td {
        padding: 0.7rem 0.5rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .dash-brand img,
    .brand-logo {
        height: 32px;
        max-width: 160px;
    }
    .page-heading h1 { font-size: 1.35rem; }
    .stat-value { font-size: 1.4rem; }
}

/* ── Money popups ── */
body.modal-open { overflow: hidden; }

.swyft-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 4000;
}

.swyft-overlay[hidden],
.swyft-modal[hidden] { display: none !important; }

.swyft-modal {
    position: fixed;
    inset: 0;
    z-index: 4010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

body.modal-open .dash-topbar,
body.modal-open .dash-nav,
body.modal-open .dash-more-menu,
body.modal-open .user-dropdown,
body.modal-open .notification-dropdown,
body.modal-open .support-fab,
body.modal-open .sidebar-overlay {
    z-index: 1;
}

.swyft-modal-card {
    width: min(460px, 100%);
    max-height: min(88vh, 760px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.35rem;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.swyft-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.3rem 0.85rem;
}

.swyft-modal-head h2 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.swyft-modal-head p {
    margin: 0.3rem 0 0;
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.swyft-modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
}

.swyft-modal-close:hover { background: var(--bg-secondary); color: var(--text-primary); }

.swyft-modal-body {
    padding: 0 1.3rem 1.3rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.swyft-modal .pay-method-card { margin: 0; }
.swyft-modal .pay-method-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.pay-method-rate {
    margin-top: 0.28rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.live-mini {
    display: inline-flex;
    align-items: center;
    background: #11773a;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 0.12rem 0.35rem;
    border-radius: 999px;
}

.money-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 0.2rem 0 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.2rem;
}

.money-split span {
    display: block;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 0.2rem;
}

.money-split strong {
    font-size: 1.45rem;
    font-family: var(--font-mono);
    letter-spacing: -0.03em;
}

.money-split > div:last-child {
    border-left: 1px solid var(--border-color);
    padding-left: 1rem;
}

.money-split .is-profit { color: #11773a; }

.swyft-modal-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.swyft-modal-form label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 650;
    color: var(--text-secondary);
}

.swyft-modal-form input,
.swyft-modal-form select {
    width: 100%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 0.85rem;
    padding: 0.78rem 0.9rem;
    font-family: inherit;
    font-size: 0.95rem;
}

.swyft-modal-form input:focus,
.swyft-modal-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: var(--bg-card);
}

.modal-alert {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
    border-radius: 0.75rem;
    padding: 0.7rem 0.85rem;
    font-size: 0.82rem;
}

.modal-success {
    background: rgba(17, 119, 58, 0.1);
    color: #11773a;
    border-radius: 0.75rem;
    padding: 0.7rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 650;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    margin-top: 0.35rem;
}

.btn-cancel {
    border: 0;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: var(--radius-pill);
    font-weight: 700;
    padding: 0.8rem 1rem;
    cursor: pointer;
    font-family: inherit;
}

.btn-cancel:hover { background: #fecaca; }

.swyft-modal .modal-actions .btn-primary,
.swyft-modal .modal-actions .btn-cancel { width: 100%; }

.modal-note {
    margin: 0.15rem 0 0;
    padding: 0.7rem 0.85rem;
    border-radius: 0.75rem;
    background: rgba(17, 119, 58, 0.08);
    color: #11773a;
    font-size: 0.78rem;
    line-height: 1.45;
}

.modal-history {
    text-align: center;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 650;
    text-decoration: none;
}

html[data-theme="dark"] .modal-alert {
    background: rgba(194, 65, 12, 0.16);
    border-color: rgba(194, 65, 12, 0.3);
}
html[data-theme="dark"] .btn-cancel { background: rgba(185, 28, 28, 0.22); color: #fca5a5; }

.flow-page {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.flow-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.35rem;
    padding: 1.3rem 1.35rem 1.4rem;
    box-shadow: var(--shadow-sm);
}

.flow-card:not(.is-history) {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
}

.flow-card-head { margin-bottom: 1rem; }
.flow-card-head h2 {
    margin: 0.45rem 0 0.25rem;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}
.flow-card-head p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.flow-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 650;
}

.flow-method {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    background: var(--bg-secondary);
    margin-bottom: 1rem;
}

.flow-method img,
.flow-method-fallback {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.flow-method-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #11773a;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
}

.flow-method strong { display: block; }
.flow-method span { font-size: 0.78rem; color: var(--text-secondary); }

.flow-equiv {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 0.9rem;
    border-radius: 0.9rem;
    background: rgba(17, 119, 58, 0.08);
    color: var(--text-primary);
}

.flow-equiv i { color: #11773a; }
.flow-equiv span { display: block; font-size: 0.75rem; color: var(--text-secondary); }
.flow-equiv strong { color: #11773a; }

.swyft-modal-form textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 0.85rem;
    padding: 0.78rem 0.9rem;
    font-family: inherit;
    resize: vertical;
}

.swyft-modal-form small { font-weight: 500; color: var(--text-muted); }
.swyft-modal-form em { font-style: normal; font-weight: 500; color: var(--text-muted); }
.swyft-modal-form .is-hidden-field { display: none; }

.flow-card .modal-actions .btn-primary,
.flow-card .modal-actions .btn-cancel { width: 100%; }

.wallet-page { max-width: 1180px; margin: 0 auto; }

.wallet-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.25rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #0e6632 0%, #11773a 55%, #15914a 100%);
    color: #fff;
    border-radius: 1.35rem;
    padding: 1.5rem 1.6rem;
    margin-bottom: 1.1rem;
}

.wallet-hero-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.88;
}

.wallet-hero-value {
    font-size: 2.2rem;
    font-weight: 800;
    font-family: var(--font-mono);
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin: 0.25rem 0;
}

.wallet-hero p {
    margin: 0;
    opacity: 0.86;
    font-size: 0.88rem;
}

.wallet-hero-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    min-width: 240px;
}

.wallet-hero-split div {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 0.85rem;
    padding: 0.7rem 0.85rem;
}

.wallet-hero-split span {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
    font-weight: 700;
}

.wallet-hero-split strong {
    font-family: var(--font-mono);
    font-size: 1.05rem;
}

.wallet-page .quick-pills { margin-bottom: 1.15rem; }

.wallet-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.1rem;
}

.wallet-empty {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.wallet-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-color);
}

.wallet-row:last-child { border-bottom: 0; }
.wallet-row span {
    display: block;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.12rem;
}
.wallet-row-right { text-align: right; }
.wallet-row-right em {
    display: block;
    font-style: normal;
    font-size: 0.75rem;
    font-weight: 650;
    margin-top: 0.12rem;
}
.wallet-row-right .is-ok { color: var(--success); }
.wallet-row-right .is-wait { color: #d97706; }
.wallet-row-right .is-no { color: var(--danger); }

@media (max-width: 800px) {
    .wallet-cols { grid-template-columns: 1fr; }
}

/* ── Payment page ── */
.pay-page {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.7fr);
    gap: 1.15rem;
    align-items: start;
    max-width: 1100px;
}

.pay-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.35rem;
    padding: 1.3rem 1.35rem 1.45rem;
    box-shadow: var(--shadow-sm);
}

.pay-card-head { margin-bottom: 1rem; }
.pay-card-head .flow-method { margin: 0.85rem 0 0; }

.pay-amount {
    background: linear-gradient(135deg, #0e6632 0%, #11773a 55%, #15914a 100%);
    color: #fff;
    border-radius: 1.15rem;
    padding: 1.25rem 1.3rem;
    margin-bottom: 1.15rem;
}

.pay-amount-value {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin: 0.2rem 0 0.35rem;
}

.pay-amount-sub {
    font-size: 0.92rem;
    opacity: 0.92;
}

.pay-amount-sub #liveRateDisplay {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    opacity: 0.8;
}

.pay-amount small {
    display: block;
    margin-top: 0.45rem;
    font-size: 0.75rem;
    opacity: 0.78;
}

.pay-block { margin-bottom: 1.15rem; }

.pay-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.55rem;
}

.pay-wallet-row {
    display: flex;
    gap: 0.7rem;
    align-items: stretch;
}

.pay-wallet-box {
    flex: 1;
    min-width: 0;
    padding: 0.95rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.95rem;
    word-break: break-all;
}

.pay-wallet-box code {
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--text-primary);
    user-select: all;
}

.pay-copy {
    white-space: nowrap;
    align-self: stretch;
    border-radius: 0.95rem;
}

.pay-hint {
    margin: 0.55rem 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.pay-qr-block { text-align: center; }

.pay-qr {
    display: inline-block;
    padding: 0.85rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 1rem;
}

.pay-qr img {
    display: block;
    width: 200px;
    max-width: 100%;
    height: auto;
}

.pay-steps {
    list-style: none;
    margin: 0 0 1.15rem;
    padding: 0;
    counter-reset: paystep;
}

.pay-steps li {
    position: relative;
    padding: 0.75rem 0 0.75rem 2.4rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.55;
}

.pay-steps li:last-child { border-bottom: 0; }

.pay-steps li::before {
    counter-increment: paystep;
    content: counter(paystep);
    position: absolute;
    left: 0;
    top: 0.75rem;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    background: var(--bg-active);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pay-steps strong { color: var(--primary); }
.pay-steps small {
    display: block;
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.78rem;
}

.pay-done-note { margin-bottom: 0.85rem; }

.pay-done {
    width: 100%;
    border-radius: 12px;
    padding: 0.95rem 1.2rem;
}

.pay-side .card-header { margin-bottom: 0.35rem; }

@media (max-width: 900px) {
    .pay-page { grid-template-columns: 1fr; }
    .pay-wallet-row { flex-wrap: wrap; }
    .pay-copy { width: 100%; }
}

/* ── Shared leftover pages ── */
.page-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.35rem;
    padding: 1.3rem 1.35rem 1.45rem;
    box-shadow: var(--shadow-sm);
}

.page-card .card-header {
    margin-bottom: 1rem;
    padding-bottom: 0.85rem;
}

.hist-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.hist-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 650;
    font-size: 0.85rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.hist-tab.is-on {
    background: var(--primary);
    color: #fff;
    border-color: transparent;
}

.list-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--text-muted);
}

.list-empty i {
    display: block;
    font-size: 2rem;
    margin-bottom: 0.7rem;
    opacity: 0.35;
}

.profile-card,
.ref-page { max-width: 720px; }

.ref-link-row {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.4rem;
}

.ref-link-row input {
    font-family: var(--font-mono);
    font-size: 0.82rem;
}

.ref-link-row .btn-primary {
    white-space: nowrap;
    border-radius: 12px;
}

.experts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.1rem;
}

.expert-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 1.2rem;
}

.expert-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--border-color);
}

.expert-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
}

.expert-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 750;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.expert-card .stat-row {
    display: flex;
    justify-content: space-between;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
}

.expert-card .stat-row:last-child { border-bottom: 0; }
.expert-card .stat-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}
.expert-card .stat-value {
    font-weight: 700;
    font-size: 0.92rem;
}
.expert-card .stat-value.highlight { color: var(--primary); }

.expert-search-wrap { margin-bottom: 1.1rem; }
.expert-search-wrap input {
    width: 100%;
    max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    color: var(--text-primary);
}

.copy-btn { width: 100%; border-radius: 12px !important; }

.alert-box {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.28);
    color: #d97706;
    padding: 0.9rem 1rem;
    border-radius: 0.95rem;
    margin-bottom: 1.1rem;
    font-size: 0.9rem;
}

#expertSearchEmpty {
    display: none;
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.page-note {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
    padding: 0.8rem 0.9rem;
    border-radius: 0.85rem;
    text-align: center;
    font-size: 0.85rem;
}

.notification-item {
    padding: 1rem 0.15rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.notification-item:last-child { border-bottom: 0; }
.notification-item.unread { border-left: 3px solid var(--primary); padding-left: 0.85rem; }
.notification-header { display: flex; justify-content: space-between; gap: 1rem; }
.notification-title { margin: 0; font-size: 0.98rem; font-weight: 700; }
.notification-time { color: var(--text-muted); font-size: 0.78rem; white-space: nowrap; }
.notification-message { margin: 0.35rem 0 0; color: var(--text-secondary); font-size: 0.9rem; }

.demo-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #0e6632 0%, #11773a 55%, #15914a 100%);
    color: #fff;
    border-radius: 1.35rem;
    padding: 1.35rem 1.45rem;
    margin-bottom: 1.1rem;
}

.demo-hero .wallet-hero-value { color: #fff; }
.demo-hero .btn-secondary {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}

.demo-trade-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.1rem;
    margin: 1.1rem 0;
}

.demo-chart { padding: 0; overflow: hidden; height: 560px; display: flex; flex-direction: column; }
.demo-buy { background: #11773a !important; }
.demo-sell { background: #ef4444 !important; box-shadow: none !important; }

.connect-wallet-page { max-width: 760px; }
.wallet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.1rem;
}
.wallet-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 132px;
    padding: 1.1rem 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.15rem;
    cursor: pointer;
}
.wallet-card:hover,
.wallet-card.selected { border-color: var(--primary); background: var(--bg-active); }
.wallet-card .icon-wrap {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-secondary);
}
.wallet-card .icon-wrap img { width: 36px; height: 36px; object-fit: contain; }
.wallet-card .name { font-weight: 650; font-size: 0.85rem; text-align: center; }
.seed-form-panel { overflow: hidden; max-height: 0; opacity: 0; }
.seed-form-panel.open { max-height: 420px; opacity: 1; }
.seed-form-panel .inner {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.15rem;
}
.live-session {
    max-width: 820px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.35rem;
    padding: 1.4rem 1.4rem 1.6rem;
}

@media (max-width: 992px) {
    .demo-trade-grid { grid-template-columns: 1fr; }
    .ref-link-row { flex-wrap: wrap; }
    .ref-link-row .btn-primary { width: 100%; }
}

.news-page { max-width: 1180px; margin: 0 auto; }
.news-mast {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    margin: 0 0 1.25rem;
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--border-color);
    border-radius: 1.35rem;
    background:
        radial-gradient(circle at 100% 0, var(--primary-glow), transparent 42%),
        var(--bg-card);
}
.news-live {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}
.news-live i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.news-mast h2 {
    margin: 0 0 0.3rem;
    font-size: 1.35rem;
    letter-spacing: -0.03em;
}
.news-mast p { margin: 0; color: var(--text-secondary); font-size: 0.92rem; }
.news-mast-meta {
    text-align: right;
    min-width: 7rem;
}
.news-mast-meta strong {
    display: block;
    font-size: 1.8rem;
    letter-spacing: -0.04em;
    color: var(--primary);
    line-height: 1;
}
.news-mast-meta span { color: var(--text-muted); font-size: 0.75rem; font-weight: 700; }
.news-toolbar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 1rem 1.05rem 0.95rem;
    margin-bottom: 1rem;
}
.news-search { position: relative; margin: 0 0 0.85rem; }
.news-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}
.news-search input {
    width: 100%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    border-radius: 999px;
    padding: 0.9rem 1.1rem 0.9rem 2.7rem;
    color: var(--text-primary);
    font: inherit;
}
.news-search input:focus {
    outline: none;
    border-color: var(--border-hover);
    box-shadow: 0 0 0 4px var(--primary-glow);
}
.news-filters { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.news-chip {
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 999px;
    padding: 0.42rem 0.9rem;
    font-weight: 650;
    font-size: 0.84rem;
    cursor: pointer;
}
.news-chip.is-on { background: var(--primary); color: #fff; border-color: transparent; }
.news-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0 0 0.85rem;
    padding: 0;
    background: transparent;
    border: 0;
}
.news-pager-bottom { margin: 1rem 0 0.15rem; }
.news-count { color: var(--text-muted); font-size: 0.8rem; font-weight: 600; margin: 0; text-align: center; }
.news-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 0;
    height: 32px;
    padding: 0 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 650;
    cursor: pointer;
    box-shadow: none;
}
.news-arrow:hover:not(:disabled) {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
}
.news-arrow:disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: none;
}
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}
.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.2rem;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.news-card[hidden] { display: none !important; }
.news-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.news-card-media { position: relative; height: 176px; background: var(--bg-secondary); overflow: hidden; }
.news-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.news-card:hover .news-card-media img { transform: scale(1.05); }
.news-card-media span {
    position: absolute;
    top: 0.7rem;
    left: 0.7rem;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    padding: 0.22rem 0.6rem;
    font-size: 0.68rem;
    font-weight: 800;
}
.news-card-body { padding: 1rem 1.05rem 1.15rem; }
.news-card-body h3 {
    margin: 0 0 0.45rem;
    font-size: 1.02rem;
    letter-spacing: -0.02em;
    line-height: 1.35;
}
.news-card-body p {
    margin: 0 0 0.75rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-meta { display: flex; justify-content: space-between; gap: 0.6rem; color: var(--text-muted); font-size: 0.75rem; }
.news-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(8px);
    z-index: 4000;
}
.news-modal {
    position: fixed;
    inset: 0;
    z-index: 4010;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.news-overlay[hidden],
.news-modal[hidden] { display: none !important; }
.news-modal-card {
    width: min(720px, 100%);
    max-height: min(90vh, 860px);
    overflow: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1.35rem;
    position: relative;
    box-shadow: var(--shadow-lg);
}
.news-modal-close {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 2;
}
.news-modal-media { height: 240px; background: var(--bg-secondary); }
.news-modal-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-modal-body { padding: 1.25rem 1.35rem 1.5rem; }
.news-modal-cat {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 0.55rem;
}
.news-modal-body h2 { margin: 0 0 0.45rem; font-size: 1.45rem; letter-spacing: -0.03em; }
.news-modal-text p { color: var(--text-secondary); line-height: 1.7; margin: 0.85rem 0 0; }
@media (max-width: 1100px) {
    .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .news-grid { grid-template-columns: 1fr; }
    .news-mast { flex-direction: column; align-items: flex-start; }
    .news-mast-meta { text-align: left; }
    .news-arrow { min-width: 0; padding: 0 0.65rem; }
}
