/* ═══════════════════════════════════════
   EscrowMM DASHBOARD — Premium 3D Styles
   Volumetric Dark · Tactile Glass · Crypto 3.0
   ═══════════════════════════════════════ */

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

:root {
    --bg-0: #030308;
    --bg-1: #070712;
    --bg-2: #0b0b1a;
    --bg-3: #101024;
    --bg-card: rgba(12, 12, 28, 0.7);
    --bg-hover: rgba(18, 18, 40, 0.85);
    --bg-input: rgba(255, 255, 255, 0.035);
    --bg-input-hover: rgba(255, 255, 255, 0.055);
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --border-focus: rgba(0, 212, 138, 0.45);
    --text-1: #eaeaf2;
    --text-2: #7e7e96;
    --text-3: #484860;
    --accent: #00d48a;
    --accent-dim: rgba(0, 212, 138, 0.1);
    --accent-glow: rgba(0, 212, 138, 0.3);
    --danger: #f04444;
    --danger-dim: rgba(240, 68, 68, 0.1);
    --warning: #f5a623;
    --warning-dim: rgba(245, 166, 35, 0.1);
    --blue: #3b82f6;
    --blue-dim: rgba(59, 130, 246, 0.1);
    --purple: #8b5cf6;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
    --transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);

    /* 3D Depth tokens */
    --shadow-ambient: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-elevated: 0 4px 16px rgba(0,0,0,0.3), 0 8px 32px rgba(0,0,0,0.15);
    --shadow-floating: 0 8px 30px rgba(0,0,0,0.4), 0 20px 60px rgba(0,0,0,0.2);
    --inset-highlight: inset 0 1px 0 rgba(255,255,255,0.05), inset 0 0 0 1px rgba(255,255,255,0.02);
    --inset-depth: inset 0 2px 4px rgba(0,0,0,0.25);
    --border-glow: rgba(0, 212, 138, 0.25);
}

html, body { height: 100%; }
body {
    font-family: var(--font);
    background: var(--bg-0);
    color: var(--text-1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ══ TOAST NOTIFICATIONS ══ */
.toast-container {
    position: fixed;
    top: 16px; right: 16px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: rgba(16, 16, 36, 0.9);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    animation: toastIn 0.4s var(--transition);
    pointer-events: auto;
    min-width: 280px;
    max-width: 400px;
    box-shadow: var(--shadow-floating), var(--inset-highlight);
}

.toast.success { border-left: 3px solid var(--accent); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--blue); }
.toast.warning { border-left: 3px solid var(--warning); }

.toast-icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
}

.toast-text { flex: 1; font-size: 0.85rem; }

.toast.closing { animation: toastOut 0.3s ease-in forwards; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(60px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(60px); }
}

/* ══ MODAL ══ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.show { display: flex; }

.modal-card {
    width: 100%;
    max-width: 440px;
    background: rgba(11, 11, 26, 0.95);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    animation: fadeUp 0.3s var(--transition);
    overflow: hidden;
    box-shadow: var(--shadow-floating), var(--inset-highlight);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.modal-header {
    padding: 24px 24px 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-body {
    padding: 16px 24px 24px;
}

.modal-body .input-group { margin-bottom: 16px; }
.modal-body .input-group:last-child { margin-bottom: 0; }
.modal-body p { font-size: 0.9rem; color: var(--text-2); line-height: 1.6; }

.modal-actions {
    padding: 0 24px 24px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ══ AUTH SCREEN ══ */
.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
}

.auth-orb-1 {
    width: 500px; height: 500px;
    background: rgba(0,210,106,0.1);
    top: -100px; right: -100px;
    animation: orbDrift 20s ease-in-out infinite;
}

.auth-orb-2 {
    width: 400px; height: 400px;
    background: rgba(99,102,241,0.08);
    bottom: -100px; left: -100px;
    animation: orbDrift 25s ease-in-out infinite reverse;
}

.auth-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 0%, transparent 75%);
}

@keyframes orbDrift {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(40px, -30px); }
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 40px;
    background: rgba(8, 8, 20, 0.85);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(40px) saturate(1.5);
    -webkit-backdrop-filter: blur(40px) saturate(1.5);
    animation: fadeUp 0.5s var(--transition);
    box-shadow: var(--shadow-floating), var(--inset-highlight);
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 32px;
}
.auth-logo span { color: var(--accent); }

.auth-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.auth-sub {
    color: var(--text-2);
    font-size: 0.9rem;
    margin-bottom: 28px;
}
.auth-sub strong { color: var(--accent); }

.auth-form { display: flex; flex-direction: column; gap: 18px; }

/* OTP Icon */
.otp-icon-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.otp-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0,210,106,0.2); }
    50% { box-shadow: 0 0 0 16px rgba(0,210,106,0); }
}

/* ══ INPUT GROUPS ══ */
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2);
}

.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

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

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-3);
    pointer-events: none;
    z-index: 1;
}

.input-wrap input { padding-left: 42px !important; }

input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-1);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: all 0.25s;
    outline: none;
    box-shadow: var(--inset-depth);
}

input:hover { background: var(--bg-input-hover); border-color: var(--border-hover); }
input:focus {
    border-color: var(--border-focus);
    box-shadow: var(--inset-depth), 0 0 0 3px rgba(0, 212, 138, 0.06), 0 0 20px rgba(0, 212, 138, 0.04);
    background: var(--bg-input-hover);
}

input::placeholder { color: var(--text-3); }

.auth-error {
    font-size: 0.8rem;
    color: var(--danger);
    min-height: 0;
    display: none;
    padding: 8px 12px;
    background: var(--danger-dim);
    border-radius: var(--radius);
}
.auth-error.show { display: block; }

.auth-switch {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-2);
    margin-top: 24px;
}

/* OTP Inputs */
.otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.otp-sep {
    color: var(--text-3);
    font-size: 1.2rem;
    padding: 0 4px;
}

.otp-digit {
    width: 48px !important; height: 56px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: var(--mono);
    border-radius: var(--radius);
    padding: 0 !important;
    caret-color: var(--accent);
}

.otp-digit:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,210,106,0.1), 0 0 20px rgba(0,210,106,0.1);
}

/* ══ BUTTONS (Tactile 3D) ══ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
    position: relative;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, #00e09a 0%, #00c87a 40%, #00a86a 100%);
    color: #000;
    box-shadow:
        0 2px 0 rgba(0,0,0,0.12),
        0 4px 12px rgba(0, 212, 138, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.15);
    text-shadow: 0 1px 0 rgba(255,255,255,0.12);
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 50%);
    pointer-events: none;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 4px 0 rgba(0,0,0,0.1),
        0 8px 25px rgba(0, 212, 138, 0.3),
        0 0 50px rgba(0, 212, 138, 0.1),
        inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-primary:active {
    transform: translateY(1px);
    box-shadow:
        0 1px 0 rgba(0,0,0,0.12),
        0 2px 8px rgba(0, 212, 138, 0.15);
}

.btn-glow { box-shadow: 0 0 20px rgba(0,212,138,0.15), 0 2px 0 rgba(0,0,0,0.1); }
.btn-glow:hover { box-shadow: 0 0 40px rgba(0,212,138,0.25), 0 4px 0 rgba(0,0,0,0.08) !important; }

.btn-outline {
    background: rgba(255,255,255,0.025);
    color: var(--text-2);
    border: 1px solid var(--border);
    box-shadow: var(--inset-highlight);
}
.btn-outline:hover {
    border-color: var(--border-hover);
    color: var(--text-1);
    background: var(--bg-input);
    box-shadow: var(--inset-highlight), 0 4px 12px rgba(0,0,0,0.15);
}

.btn-full { width: 100%; }

.btn-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius);
    background: transparent;
    border: none;
    color: var(--text-2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.btn-icon:hover { background: var(--bg-input); color: var(--text-1); }

.btn-loader {
    display: none;
    width: 16px; height: 16px;
    border: 2px solid rgba(0,0,0,0.2);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
.btn.loading span, .btn.loading svg:not(.btn-loader) { display: none; }
.btn.loading .btn-loader { display: block; }

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

.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* ══ APP SHELL ══ */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ══ SIDEBAR (Glass Panel) ══ */
.sidebar {
    width: 240px;
    background: rgba(7, 7, 18, 0.9);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.15rem;
    font-weight: 800;
}
.sidebar-logo span { color: var(--accent); }

.sidebar-nav {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius);
    color: var(--text-2);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none !important;
}

.nav-item:hover { background: var(--bg-input); color: var(--text-1); }
.nav-item.active {
    background: var(--accent-dim);
    color: var(--accent);
    box-shadow: inset 3px 0 0 var(--accent), 0 0 16px rgba(0, 212, 138, 0.04);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00e09a, #00b8d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: #000;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 212, 138, 0.25);
}

.user-details { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 0.85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-tag { font-size: 0.7rem; color: var(--text-3); }

/* ══ MAIN CONTENT ══ */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}

.view {
    display: none;
    padding: 32px;
    max-width: 1000px;
    animation: fadeUp 0.3s var(--transition);
}
.view.active { display: block; }

.view-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 28px;
}

.view-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.view-sub {
    font-size: 0.85rem;
    color: var(--text-3);
    margin-top: 2px;
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 28px 0 16px;
}

.section-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
}

.section-link {
    font-size: 0.8rem;
    color: var(--text-3);
    text-decoration: none !important;
}
.section-link:hover { color: var(--accent); }

/* ══ STATS ROW v2 ══ */
.stats-row-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.stat-card-v2 {
    padding: 18px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-elevated), var(--inset-highlight);
}

.stat-card-v2:hover {
    border-color: var(--border-glow);
    transform: translateY(-3px);
    box-shadow: var(--shadow-floating), 0 0 30px rgba(0, 212, 138, 0.06), var(--inset-highlight);
}

.stat-v2-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.stat-v2-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-v2-change {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    letter-spacing: 0.02em;
}

.stat-v2-change.up { background: var(--accent-dim); color: var(--accent); }
.stat-v2-change.down { background: var(--danger-dim); color: var(--danger); }

.stat-v2-val {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--mono);
    line-height: 1.2;
}

.stat-v2-label {
    font-size: 0.72rem;
    color: var(--text-3);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-v2-sparkline {
    height: 24px;
    margin-top: 8px;
    opacity: 0.5;
}

/* ══ CHART SECTION ══ */
.chart-section {
    margin-top: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.35s;
    box-shadow: var(--shadow-elevated), var(--inset-highlight);
}

.chart-section:hover { border-color: var(--border-hover); box-shadow: var(--shadow-floating), var(--inset-highlight); }

.chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.chart-sub {
    font-size: 0.78rem;
    color: var(--text-3);
    margin-top: 3px;
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 16px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-2);
}

.legend-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.chart-container {
    width: 100%;
    position: relative;
}

.chart-container canvas {
    width: 100% !important;
    height: 260px;
    display: block;
}

/* ══ ACTIVITY FEED ══ */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.activity-item:hover {
    border-color: rgba(0,210,106,0.3);
    background: var(--bg-hover);
}

.activity-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.activity-text { flex: 1; min-width: 0; }
.activity-text-main { font-size: 0.85rem; font-weight: 500; }
.activity-text-sub { font-size: 0.72rem; color: var(--text-3); margin-top: 1px; }
.activity-amount { font-family: var(--mono); font-size: 0.85rem; font-weight: 600; text-align: right; flex-shrink: 0; }
.activity-time { font-size: 0.7rem; color: var(--text-3); flex-shrink: 0; min-width: 50px; text-align: right; }


/* ══ DEALS LIST ══ */
.deals-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.deal-row {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 14px;
    box-shadow: var(--shadow-ambient);
}

.deal-row:hover {
    border-color: var(--border-glow);
    background: var(--bg-hover);
    transform: translateX(3px);
    box-shadow: var(--shadow-elevated), 0 0 20px rgba(0, 212, 138, 0.04);
}

.deal-currency-badge {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.deal-info { flex: 1; min-width: 0; }
.deal-info-top { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.deal-code { font-family: var(--mono); font-size: 0.85rem; font-weight: 600; }
.deal-partner { font-size: 0.8rem; color: var(--text-2); }
.deal-info-bottom { font-size: 0.75rem; color: var(--text-3); }

.deal-amount { text-align: right; flex-shrink: 0; }
.deal-amount-crypto { font-family: var(--mono); font-size: 0.9rem; font-weight: 600; }
.deal-amount-usd { font-size: 0.75rem; color: var(--text-3); }

.deal-status-badge {
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.status-active { background: var(--blue-dim); color: var(--blue); }
.status-waiting { background: var(--warning-dim); color: var(--warning); }
.status-completed { background: var(--accent-dim); color: var(--accent); }
.status-disputed { background: var(--danger-dim); color: var(--danger); }

/* ══ ROLE BADGES ══ */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.role-sender { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.role-receiver { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }

.role-explain {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.role-explain-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-input);
    border-radius: var(--radius);
}

.role-explain-item .role-badge { font-size: 0.75rem; padding: 4px 10px; }

/* ══ SIDEBAR EXTRAS ══ */
.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-3);
    padding: 14px 0 4px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
}

.you-tag {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 800;
    background: var(--accent);
    color: #000;
    margin-left: 4px;
    vertical-align: middle;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-3);
}

.empty-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--text-3);
}

.empty-state h3 { color: var(--text-2); font-size: 1.1rem; margin-bottom: 6px; }
.empty-state p { font-size: 0.9rem; margin-bottom: 20px; }

/* ══ DEALS FILTER ══ */
.deals-filter {
    display: flex;
    gap: 4px;
    background: var(--bg-input);
    border-radius: var(--radius);
    padding: 3px;
}

.filter-btn {
    padding: 6px 14px;
    border: none;
    background: transparent;
    border-radius: calc(var(--radius) - 2px);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-3);
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover { color: var(--text-2); }
.filter-btn.active { background: var(--bg-3); color: var(--text-1); }

/* ══ CREATE DEAL WIZARD ══ */
.wizard-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.wiz-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-3);
    font-weight: 500;
    white-space: nowrap;
}

.wiz-step span {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    transition: all 0.3s;
}

.wiz-step.active { color: var(--accent); }
.wiz-step.active span {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

.wiz-step.done span {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
}

.wiz-connector {
    flex: 1;
    height: 1px;
    background: var(--border);
    margin: 0 8px;
    min-width: 20px;
}

.wizard-panel { display: none; animation: fadeUp 0.3s var(--transition); }
.wizard-panel.active { display: block; }
.wizard-panel h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 4px; }
.wiz-desc { font-size: 0.85rem; color: var(--text-3); margin-bottom: 24px; }

.currency-select-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.currency-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 12px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-elevated), var(--inset-highlight);
}

.currency-option:hover { border-color: var(--border-hover); background: var(--bg-hover); transform: translateY(-3px); box-shadow: var(--shadow-floating); }
.currency-option.selected {
    border-color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 30px rgba(0, 212, 138, 0.12), var(--shadow-elevated), var(--inset-highlight);
}

.currency-option .icon {
    width: 44px; height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s;
}

.currency-option:hover .icon { transform: scale(1.1); }

.currency-option .name { font-size: 0.85rem; font-weight: 600; }
.currency-option .tag { font-size: 0.7rem; color: var(--text-3); }

.amount-input-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}

.amount-input-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,210,106,0.08);
}

.amount-prefix {
    padding-left: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.amount-input {
    border: none !important;
    background: transparent !important;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--mono);
    padding: 18px !important;
    box-shadow: none !important;
}

.crypto-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-input);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: var(--text-3);
    margin-bottom: 24px;
}

.wiz-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 28px;
}

.search-input {
    padding: 14px !important;
    font-size: 0.95rem !important;
}

.search-results {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 280px;
    overflow-y: auto;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
}

.search-result-item:hover { border-color: var(--accent); background: var(--bg-hover); }

.selected-partner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--accent-dim);
    border: 1px solid rgba(0,210,106,0.3);
    border-radius: var(--radius);
    margin-top: 12px;
}

.review-card {
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-elevated), var(--inset-highlight);
}

.review-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.review-row:last-child { border-bottom: none; }
.review-label { color: var(--text-3); font-size: 0.85rem; }
.review-value { font-weight: 600; font-size: 0.9rem; }

/* ══ CHAT VIEW ══ */
.chat-view {
    padding: 0 !important;
    max-width: none !important;
    display: none;
    flex-direction: column;
    height: 100vh;
}
.chat-view.active { display: flex; }

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-1);
    flex-shrink: 0;
}

.chat-deal-info { flex: 1; }
.chat-deal-top { display: flex; align-items: center; gap: 8px; }

.chat-deal-code {
    font-family: var(--mono);
    font-weight: 700;
    font-size: 0.95rem;
}

.chat-deal-status {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
    background: var(--accent-dim);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.chat-deal-sub {
    font-size: 0.75rem;
    color: var(--text-3);
    margin-top: 2px;
}

.chat-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Chat Sidebar */
.chat-sidebar {
    width: 0;
    overflow: hidden;
    border-left: 1px solid var(--border);
    background: var(--bg-1);
    transition: width 0.3s var(--transition);
    flex-shrink: 0;
}

.chat-sidebar.open { width: 300px; }

.chat-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.chat-sidebar-header h3 { font-size: 0.95rem; }

.chat-sidebar-body {
    padding: 16px;
    overflow-y: auto;
    height: calc(100% - 57px);
}

.sidebar-field {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.sidebar-field:last-child { border-bottom: none; }
.sidebar-field-label { font-size: 0.7rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.sidebar-field-value { font-size: 0.85rem; font-weight: 500; }
.sidebar-field-value.mono { font-family: var(--mono); }
.sidebar-field-value.green { color: var(--accent); }

/* Chat message styles */
.chat-msg {
    display: flex;
    gap: 10px;
    max-width: 75%;
    animation: msgIn 0.25s var(--transition);
}

@keyframes msgIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-msg.own { align-self: flex-end; flex-direction: row-reverse; }

.msg-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.7rem;
    color: #000;
    flex-shrink: 0;
}

.msg-bubble {
    padding: 10px 14px;
    background: var(--bg-3);
    border-radius: 12px 12px 12px 4px;
    max-width: 100%;
}

.chat-msg.own .msg-bubble {
    background: rgba(0,210,106,0.12);
    border-radius: 12px 12px 4px 12px;
}

.msg-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 3px;
}

.msg-text { font-size: 0.9rem; line-height: 1.5; word-break: break-word; }

.msg-time {
    font-size: 0.65rem;
    color: var(--text-3);
    margin-top: 4px;
}

.msg-img {
    max-width: 280px;
    border-radius: 8px;
    margin-top: 6px;
    cursor: pointer;
    transition: transform 0.2s;
}
.msg-img:hover { transform: scale(1.02); }

/* System embeds in chat */
.chat-embed {
    width: 100%;
    max-width: 460px;
    animation: msgIn 0.3s var(--transition);
}

.embed-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    border-left: 3px solid var(--accent);
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: var(--shadow-elevated), var(--inset-highlight);
}

.embed-card:hover { border-color: var(--border-hover); }
.embed-card.warning { border-left-color: var(--warning); }
.embed-card.danger { border-left-color: var(--danger); }
.embed-card.blue { border-left-color: var(--blue); }
.embed-card.success { border-left-color: var(--accent); }

.embed-header {
    padding: 14px 16px 0;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.embed-body { padding: 10px 16px 14px; }

.embed-field {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.85rem;
}
.embed-field-label { color: var(--text-3); }
.embed-field-value { font-weight: 600; font-family: var(--mono); }

.embed-actions {
    padding: 10px 16px 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.embed-btn {
    padding: 8px 18px;
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
}

.embed-btn.green {
    background: linear-gradient(135deg, #00e09a, #00c87a);
    color: #000;
    box-shadow: 0 2px 0 rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.12);
}
.embed-btn.green:hover { box-shadow: 0 4px 0 rgba(0,0,0,0.08), 0 0 20px var(--accent-glow); transform: translateY(-2px); }
.embed-btn.green:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(0,0,0,0.1); }
.embed-btn.red {
    background: linear-gradient(135deg, #f04444, #dc2626);
    color: white;
    box-shadow: 0 2px 0 rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.1);
}
.embed-btn.red:hover { box-shadow: 0 4px 0 rgba(0,0,0,0.08), 0 0 20px rgba(240,68,68,0.25); transform: translateY(-2px); }
.embed-btn.red:active { transform: translateY(1px); box-shadow: 0 1px 0 rgba(0,0,0,0.1); }
.embed-btn.gray { background: var(--bg-input); color: var(--text-2); border: 1px solid var(--border); box-shadow: var(--inset-highlight); }
.embed-btn.gray:hover { border-color: var(--border-hover); color: var(--text-1); box-shadow: var(--inset-highlight), 0 4px 12px rgba(0,0,0,0.12); }
.embed-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

.embed-footer {
    padding: 8px 16px;
    border-top: 1px solid var(--border);
    font-size: 0.7rem;
    color: var(--text-3);
}

/* Completed / disabled embed states */
.embed-card.embed-done {
    opacity: 0.6;
    border-left-color: var(--text-3) !important;
}
.embed-card.embed-done:hover { opacity: 0.75; }
.embed-status-tag {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-left: auto;
}
.embed-status-tag.done {
    background: var(--accent-dim);
    color: var(--accent);
}
.embed-done-line {
    font-size: 0.85rem;
    color: var(--text-2);
}
.embed-done-line strong { color: var(--text-1); }

.address-box {
    padding: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--mono);
    font-size: 0.78rem;
    word-break: break-all;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.address-box:hover { background: var(--accent-dim); border-color: var(--accent); }

.address-box .copy-icon { margin-left: auto; color: var(--text-3); flex-shrink: 0; }

/* Typing indicator */
.chat-typing {
    height: 0;
    overflow: hidden;
    padding: 0 20px;
    font-size: 0.75rem;
    color: var(--text-3);
    transition: height 0.2s, padding 0.2s;
}

.chat-typing.show {
    height: 24px;
    padding: 4px 20px;
}

.typing-dots {
    display: inline-flex;
    gap: 3px;
    margin-left: 4px;
}
.typing-dots span {
    width: 4px; height: 4px;
    border-radius: 50%;
    background: var(--text-3);
    animation: typeDot 1.4s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typeDot {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Chat input */
.chat-input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-1);
    flex-shrink: 0;
}

.chat-input-bar input[type="text"] {
    flex: 1;
    border: none;
    background: var(--bg-input);
    padding: 12px 16px;
    border-radius: 20px;
}

.chat-input-bar input[type="text"]:focus {
    box-shadow: none;
    background: var(--bg-input-hover);
}

.btn-send {
    background: var(--accent) !important;
    color: #000 !important;
    border-radius: 50% !important;
    width: 38px !important;
    height: 38px !important;
}

.btn-send:hover {
    box-shadow: 0 0 16px var(--accent-glow) !important;
}

/* ══ PROFILE ══ */
.profile-card {
    max-width: 500px;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-elevated), var(--inset-highlight);
}

.profile-avatar-lg {
    width: 72px; height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    color: #000;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(0, 212, 138, 0.2);
}

.profile-name { font-size: 1.3rem; font-weight: 700; }
.profile-tag { color: var(--text-3); font-size: 0.85rem; margin-bottom: 4px; }
.profile-joined { color: var(--text-3); font-size: 0.75rem; }

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.profile-stat {
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.profile-stat-val {
    font-size: 1.3rem;
    font-weight: 800;
    font-family: var(--mono);
}

.profile-stat-label {
    font-size: 0.75rem;
    color: var(--text-3);
    margin-top: 2px;
}

/* ══ SCROLLBAR ══ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.12); }

/* ══ RESPONSIVE ══ */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .stats-row { grid-template-columns: 1fr; }
    .currency-select-grid { grid-template-columns: repeat(2, 1fr); }
    .input-row { grid-template-columns: 1fr; }
    .view { padding: 20px; }
    .chat-sidebar.open { width: 100%; position: absolute; right: 0; top: 0; bottom: 0; z-index: 10; }
    .deals-filter { overflow-x: auto; }
    .support-layout { flex-direction: column; }
    .support-tickets-list { max-height: 200px; }
}

/* ══ CANCELLED STATUS ══ */
.status-cancelled {
    background: rgba(107, 114, 128, 0.12);
    color: #9ca3af;
}

/* ══ DANGER BUTTON ══ */
.btn-danger {
    background: var(--danger);
    color: white;
    border: none;
}
.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239,68,68,0.3);
}

/* ══ SUPPORT SYSTEM ══ */
.support-layout {
    display: flex;
    gap: 16px;
    height: calc(100vh - 180px);
    min-height: 400px;
}

.support-tickets-list {
    width: 320px;
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-y: auto;
}

.support-list-header {
    padding: 16px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-2);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 2;
}

.support-ticket-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border);
}

.support-ticket-item:hover { background: var(--bg-hover); }
.support-ticket-item.active {
    background: var(--accent-dim);
    border-left: 3px solid var(--accent);
}

.support-ticket-status {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.support-ticket-status.open { background: var(--accent); }
.support-ticket-status.closed { background: var(--text-3); }

.support-ticket-info { flex: 1; min-width: 0; }
.support-ticket-subject {
    font-size: 0.88rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.support-ticket-meta {
    font-size: 0.72rem;
    color: var(--text-3);
    margin-top: 2px;
    text-transform: capitalize;
}

.support-chat {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.support-chat-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    font-size: 0.9rem;
}

.support-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.support-chat-subject {
    font-size: 1rem;
    font-weight: 700;
}

.support-chat-meta {
    font-size: 0.75rem;
    color: var(--text-3);
    margin-top: 2px;
    text-transform: capitalize;
}

.support-closed-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-3);
    background: rgba(255,255,255,0.04);
    padding: 4px 12px;
    border-radius: 100px;
}

.support-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.support-input-bar {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.support-input-bar input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-1);
    font-family: var(--font);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s;
}

.support-input-bar input:focus {
    border-color: var(--border-focus);
}

.empty-state-sm {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-3);
    font-size: 0.85rem;
}

.chat-msg.staff .msg-bubble {
    border-left: 2px solid var(--warning);
}
