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

:root {
    --bg-main: #060b14;
    --bg-surface: #0c1220;
    --bg-card: #111827;
    --bg-card-hover: #162238;
    --bg-card-alt: #0e1726;
    --bg-input: #090e18;
    --bg-glass: rgba(12, 18, 32, 0.75);
    --bg-glass-card: rgba(17, 24, 39, 0.75);

    --border: #1e2d45;
    --border-light: rgba(255, 255, 255, 0.08);
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-active: rgba(6, 182, 212, 0.5);

    --text-main: #f8fafc;
    --text-bright: #ffffff;
    --text-muted: #94a3b8;
    --text-dim: #64748b;

    --cyan: #06b6d4;
    --cyan-glow: rgba(6, 182, 212, 0.25);
    --cyan-light: #22d3ee;
    --green: #10b981;
    --green-glow: rgba(16, 185, 129, 0.25);
    --green-light: #34d399;
    --red: #f43f5e;
    --red-glow: rgba(244, 63, 94, 0.25);
    --red-light: #fb7185;
    --amber: #f59e0b;
    --amber-glow: rgba(245, 158, 11, 0.25);
    --blue: #3b82f6;
    --blue-glow: rgba(59, 130, 246, 0.25);
    --purple: #8b5cf6;
    --purple-glow: rgba(139, 92, 246, 0.25);
    --emerald: #10b981;

    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 25px var(--cyan-glow);

    --sidebar-w: 260px;
    --topbar-h: 64px;
    --bottom-nav-h: 68px;

    --font: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
    font-size: 13.5px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

/* ─── TYPOGRAPHY HIERARCHY ─── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font);
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.15s ease;
}

.mono-text {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum', 'zero';
    letter-spacing: -0.02em;
}

/* ─── APP SHELL LAYOUT ─── */
.app-container {
    display: flex;
    min-height: 100vh;
    background: radial-gradient(circle at 50% 0%, rgba(6, 182, 212, 0.04) 0%, transparent 60%),
                radial-gradient(circle at 100% 100%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
                var(--bg-main);
}

/* ─── SIDEBAR (DESKTOP + MOBILE DRAWER) ─── */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(16px);
}

.sidebar-brand {
    padding: 20px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 800;
    color: #000;
    box-shadow: 0 0 18px var(--cyan-glow);
    flex-shrink: 0;
}

.brand-title {
    font-family: var(--font);
    font-size: 15px;
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.brand-subtitle {
    font-size: 10px;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-top: 2px;
}

.sidebar-menu {
    list-style: none;
    padding: 14px 12px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.menu-category {
    font-family: var(--font);
    font-size: 10px;
    font-weight: 800;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 14px 12px 6px;
}

.menu-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.18s ease;
    white-space: nowrap;
    border: 1px solid transparent;
}

.menu-item a:hover {
    background: var(--bg-card);
    color: var(--text-bright);
    border-color: rgba(255, 255, 255, 0.05);
}

.menu-item.active a {
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.14), rgba(59, 130, 246, 0.06));
    color: var(--cyan-light);
    border-color: rgba(6, 182, 212, 0.28);
    font-weight: 700;
    box-shadow: inset 0 0 12px rgba(6, 182, 212, 0.08);
}

.menu-badge {
    margin-left: auto;
    background: var(--red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    min-width: 18px;
    text-align: center;
    box-shadow: 0 0 8px var(--red-glow);
}

.sidebar-footer {
    padding: 16px 18px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.15);
}

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

.avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--purple), var(--blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-weight: 800;
    font-size: 13px;
    color: #fff;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.3);
}

.user-name {
    font-family: var(--font);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-bright);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 135px;
}

.user-role {
    font-size: 10px;
    color: var(--text-dim);
    font-weight: 600;
}

/* ─── MAIN CONTENT WRAPPER ─── */
.main-wrapper {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

/* ─── TOPBAR ─── */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 30;
    flex-shrink: 0;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.page-title {
    font-family: var(--font);
    font-size: 17px;
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right, .topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.status-indicator-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--bg-card);
    border: 1px solid var(--border);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: var(--radius-full);
}
.status-dot.online  { background: var(--green); box-shadow: 0 0 8px var(--green); }
.status-dot.offline { background: var(--red);   box-shadow: 0 0 8px var(--red);   }
.status-dot.warning { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

/* ─── CONTENT BODY ─── */
.content-body {
    padding: 26px 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
    max-width: 1600px;
    width: 100%;
}

/* ─── ALERTS ─── */
.app-alert {
    padding: 13px 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    backdrop-filter: blur(12px);
}
.app-alert-success { background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.35); color: #6ee7b7; }
.app-alert-danger  { background: rgba(244, 63, 94, 0.12);  border: 1px solid rgba(244, 63, 94, 0.35);  color: #fda4af; }
.app-alert-warning { background: rgba(245, 158, 11, 0.12); border: 1px solid rgba(245, 158, 11, 0.35); color: #fde68a; }
.app-alert-info    { background: rgba(59, 130, 246, 0.12); border: 1px solid rgba(59, 130, 246, 0.35); color: #bfdbfe; }

/* ─── STATS GRID & CARDS ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cyan), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.stat-card:hover {
    border-color: rgba(6, 182, 212, 0.35);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.stat-card:hover::before { opacity: 1; }

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-label, .stat-title {
    font-family: var(--font);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.stat-icon {
    font-size: 18px;
    opacity: 0.85;
}

.stat-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    color: var(--text-bright);
    letter-spacing: -0.03em;
    line-height: 1.1;
}
.stat-value.profit { color: var(--green); }
.stat-value.loss   { color: var(--red); }
.stat-value.text-cyan { color: var(--cyan); }
.stat-value.text-amber { color: var(--amber); }

.stat-subtext {
    font-size: 12px;
    color: var(--text-dim);
    font-weight: 500;
}

/* ─── APP CARDS ─── */
.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.app-card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.015);
}

.app-card-title {
    font-family: var(--font);
    font-size: 14.5px;
    font-weight: 800;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 9px;
    letter-spacing: -0.01em;
}

.app-card-body {
    padding: 22px;
}

/* ─── BUTTONS ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    outline: none;
    text-decoration: none;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), #0891b2);
    color: #041018;
    box-shadow: 0 0 16px var(--cyan-glow);
    font-weight: 800;
}
.btn-primary:hover {
    box-shadow: 0 0 24px rgba(6, 182, 212, 0.45);
    transform: translateY(-1px);
    color: #041018;
}

.btn-danger {
    background: linear-gradient(135deg, var(--red), #be123c);
    color: #fff;
    box-shadow: 0 0 14px var(--red-glow);
}
.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(244, 63, 94, 0.4);
    color: #fff;
}

.btn-success {
    background: linear-gradient(135deg, var(--green), #047857);
    color: #fff;
    box-shadow: 0 0 14px var(--green-glow);
}
.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-bright);
    border-color: var(--text-dim);
}

.btn-warning {
    background: linear-gradient(135deg, var(--amber), #b45309);
    color: #000;
    font-weight: 800;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 11.5px;
    border-radius: var(--radius-sm);
}

.w-full {
    width: 100%;
}

/* ─── FORMS & INPUTS ─── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 16px;
}

.form-label {
    font-family: var(--font);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.2px;
}

.form-input, select.form-input, textarea.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-bright);
    font-family: var(--font-body);
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus, select.form-input:focus, textarea.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px var(--cyan-glow);
}

.form-input::placeholder, .form-textarea::placeholder {
    color: var(--text-dim);
}

.form-input-sm {
    padding: 7px 11px;
    font-size: 12px;
}

select.form-input, .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
    cursor: pointer;
}

textarea.form-input, .form-textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

.form-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: border-color 0.15s;
}
.form-switch:hover {
    border-color: var(--border-light);
}

.switch-input {
    appearance: none;
    -webkit-appearance: none;
    width: 44px;
    height: 24px;
    background: #334155;
    border-radius: var(--radius-full);
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.switch-input::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
}
.switch-input:checked { background: var(--cyan); }
.switch-input:checked::after { transform: translateX(20px); }

.form-actions, .card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding-top: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.cards-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ─── BADGES ─── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    border: 1px solid transparent;
}
.badge-success { background: rgba(16, 185, 129, 0.12); color: var(--green);  border-color: rgba(16, 185, 129, 0.35); }
.badge-danger  { background: rgba(244, 63, 94, 0.12);  color: var(--red);    border-color: rgba(244, 63, 94, 0.35);  }
.badge-warning { background: rgba(245, 158, 11, 0.12); color: var(--amber);  border-color: rgba(245, 158, 11, 0.35); }
.badge-info    { background: rgba(59, 130, 246, 0.12); color: var(--blue);   border-color: rgba(59, 130, 246, 0.35); }
.badge-purple  { background: rgba(139, 92, 246, 0.12); color: var(--purple); border-color: rgba(139, 92, 246, 0.35); }
.badge-cyan    { background: rgba(6, 182, 212, 0.12);  color: var(--cyan);   border-color: rgba(6, 182, 212, 0.35);  }
.badge-neutral, .badge-gray { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border-color: var(--border); }

.paper-pill { font-size: 10px; font-weight: 800; padding: 2px 8px; background: rgba(59, 130, 246, 0.15); color: var(--blue); border: 1px solid rgba(59, 130, 246, 0.3); border-radius: var(--radius-full); }
.live-pill  { font-size: 10px; font-weight: 800; padding: 2px 8px; background: rgba(16, 185, 129, 0.15); color: var(--green); border: 1px solid rgba(16, 185, 129, 0.3); border-radius: var(--radius-full); }

/* ─── TABLES ─── */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
.table-responsive::-webkit-scrollbar {
    height: 6px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.app-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
    min-width: 600px;
}
.app-table th {
    padding: 12px 18px;
    font-family: var(--font);
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    white-space: nowrap;
}
.app-table td {
    padding: 13px 18px;
    color: var(--text-main);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}
.app-table tr:last-child td { border-bottom: none; }
.app-table tbody tr {
    transition: background-color 0.15s;
}
.app-table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ─── SIGNAL CARDS & FEED ─── */
.signals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.signal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: all 0.2s ease;
    position: relative;
}
.signal-card:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.signal-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.symbol-badge {
    font-size: 15px;
    font-weight: 800;
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-bright);
}

.direction-badge {
    font-family: var(--font);
    font-size: 10px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.direction-badge.buy, .direction-badge.long  { background: rgba(16, 185, 129, 0.15); color: var(--green); border: 1px solid rgba(16, 185, 129, 0.4); }
.direction-badge.sell, .direction-badge.short { background: rgba(244, 63, 94, 0.15);  color: var(--red);   border: 1px solid rgba(244, 63, 94, 0.4); }
.direction-badge.neutral { background: rgba(148, 163, 184, 0.1); color: var(--text-muted); border: 1px solid var(--border); }

.signal-price-zones {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.price-zone-item {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.price-zone-label {
    font-family: var(--font);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-dim);
    text-transform: uppercase;
}
.price-zone-value {
    font-size: 13.5px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text-bright);
}
.price-zone-value.profit { color: var(--green); }
.price-zone-value.loss   { color: var(--red);   }

.signal-targets-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.target-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    padding: 7px 11px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.03);
}
.target-label {
    color: var(--text-muted);
    font-weight: 600;
}
.target-price {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--green);
}

/* ─── COLOR & TYPOGRAPHY UTILS ─── */
.profit, .text-emerald { color: var(--green) !important; }
.loss   { color: var(--red) !important; }
.text-cyan { color: var(--cyan) !important; }
.text-amber { color: var(--amber) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-bright { color: var(--text-bright) !important; }
.font-bold { font-weight: 700; }
.d-inline { display: inline-block; }
.border-subtle { border-color: var(--border-subtle) !important; }

/* ─── SPACING & FLEX UTILS ─── */
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.gap-2 { gap: 8px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* ─── AUTH SCREEN ─── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(circle at 50% 20%, rgba(6, 182, 212, 0.12) 0%, transparent 60%),
                radial-gradient(circle at 10% 90%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                var(--bg-main);
    position: relative;
}

.auth-card {
    max-width: 440px;
    width: 100%;
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: var(--radius-xl);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 32px rgba(6, 182, 212, 0.15);
    padding: 34px 30px;
}

.auth-logo-ring {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
    box-shadow: 0 0 32px var(--cyan-glow);
}

.auth-heading {
    font-family: var(--font);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-bright);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.auth-sub {
    font-size: 13.5px;
    color: var(--text-muted);
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.divider span {
    font-size: 11px;
    color: var(--text-dim);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pass-wrapper {
    position: relative;
}
.pass-wrapper .form-input {
    padding-right: 44px;
}
.pass-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dim);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: color 0.15s;
}
.pass-toggle:hover {
    color: var(--text-bright);
}

/* ─── MOBILE BOTTOM APP NAVIGATION ─── */
.mobile-nav-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-h);
    background: rgba(12, 18, 32, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid var(--border);
    z-index: 50;
    align-items: center;
    justify-content: space-around;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0));
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-dim);
    font-family: var(--font);
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    transition: all 0.18s ease;
    flex: 1;
    max-width: 80px;
}

.mobile-nav-item span:first-child {
    font-size: 19px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.mobile-nav-item:active span:first-child {
    transform: scale(1.15);
}

.mobile-nav-item.active {
    color: var(--cyan);
    background: rgba(6, 182, 212, 0.1);
}
.mobile-nav-item.active span:first-child {
    filter: drop-shadow(0 0 6px var(--cyan-glow));
}

/* ─── TIMELINE ─── */
.timeline-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-left: 24px;
    border-left: 2px solid var(--border);
    margin: 10px 0;
}
.timeline-item {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    transition: border-color 0.15s;
}
.timeline-item:hover {
    border-color: rgba(6, 182, 212, 0.35);
}
.timeline-marker {
    position: absolute;
    left: -33px;
    top: 16px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--cyan);
    border: 3px solid var(--bg-main);
    box-shadow: 0 0 8px var(--cyan);
}
.timeline-marker.success { background: var(--green); box-shadow: 0 0 8px var(--green); }
.timeline-marker.danger  { background: var(--red);   box-shadow: 0 0 8px var(--red); }
.timeline-marker.warning { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

.timeline-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
    gap: 8px;
    flex-wrap: wrap;
}
.timeline-title {
    font-family: var(--font);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-bright);
}
.timeline-time {
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}
.timeline-body {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.6;
}
.timeline-pnl {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-mono);
}

/* ─── SIM SUMMARY BOX ─── */
.sim-summary-box {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(59, 130, 246, 0.08));
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 20px;
}

/* ─── PAGINATION ─── */
.pagination-wrapper {
    padding: 16px 20px;
}
nav[role="navigation"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    flex-wrap: wrap;
}
nav[role="navigation"] a, nav[role="navigation"] span {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-muted);
    transition: all 0.15s;
    font-weight: 600;
}
nav[role="navigation"] a:hover {
    background: var(--bg-card-hover);
    color: var(--text-bright);
}
nav[role="navigation"] span[aria-current="page"] {
    background: var(--cyan);
    color: #041018;
    border-color: var(--cyan);
    font-weight: 800;
}

/* ─── AUTO-TRADING LIVE BEACON & PULSE ANIMATIONS ─── */
@keyframes autotrade-radar {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        transform: scale(1.03);
        box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes beacon-ripple {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

@keyframes glow-border-green {
    0%, 100% {
        border-color: rgba(16, 185, 129, 0.4);
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.2), inset 0 0 10px rgba(16, 185, 129, 0.1);
    }
    50% {
        border-color: #10b981;
        box-shadow: 0 0 25px rgba(16, 185, 129, 0.45), inset 0 0 18px rgba(16, 185, 129, 0.2);
    }
}

.beacon-pulse-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
}

.beacon-dot {
    width: 8px;
    height: 8px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    position: relative;
    z-index: 2;
}

.beacon-wave {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(16, 185, 129, 0.6);
    animation: beacon-ripple 1.8s cubic-bezier(0, 0.2, 0.8, 1) infinite;
    z-index: 1;
}

.autotrade-card-active {
    animation: glow-border-green 3s infinite ease-in-out;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.04)) !important;
}

.btn-autotrade-pulse {
    animation: autotrade-radar 2.2s infinite ease-in-out;
    position: relative;
    overflow: hidden;
}

.autotrade-badge-live {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.45);
    color: #10b981;
    font-family: var(--font);
    font-size: 11px;
    font-weight: 800;
    border-radius: 9999px;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.25);
    letter-spacing: 0.3px;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ─── SIDEBAR CLOSE BUTTON (MOBILE) ─── */
.sidebar-close-btn {
    display: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: auto;
}
.sidebar-close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--red);
    border-color: rgba(239, 68, 68, 0.4);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 85;
    transition: opacity 0.25s ease;
}
.sidebar-overlay.show {
    display: block;
}

/* ─── MOBILE & RESPONSIVE BREAKPOINTS (ADMIN & USER) ─── */
@media (max-width: 900px) {
    :root {
        --sidebar-w: 0px;
        --topbar-h: 56px;
        --bottom-nav-h: 58px;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 285px;
        z-index: 100;
        box-shadow: 12px 0 35px rgba(0, 0, 0, 0.85);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close-btn {
        display: flex;
    }

    .main-wrapper {
        margin-left: 0;
        padding-bottom: calc(var(--bottom-nav-h) + 24px);
    }

    .mobile-nav-bar {
        display: flex;
        height: var(--bottom-nav-h);
        padding: 4px 6px calc(4px + env(safe-area-inset-bottom, 0));
        z-index: 80;
    }

    .mobile-nav-item {
        font-size: 9px;
        padding: 4px 2px;
        gap: 2px;
        max-width: 72px;
    }

    .mobile-nav-item span:first-child {
        font-size: 18px;
    }

    .hamburger {
        display: flex !important;
        width: 34px;
        height: 34px;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        font-size: 18px;
        color: var(--text-bright);
        cursor: pointer;
        padding: 0;
    }

    .page-title {
        display: none !important;
    }

    .topbar-left {
        gap: 0 !important;
        flex-shrink: 0;
    }

    .topbar {
        padding: 0 12px;
        height: 56px;
        gap: 8px;
    }

    .topbar-actions {
        display: flex;
        align-items: center;
        gap: 6px !important;
        flex-wrap: nowrap;
    }

    .autotrade-badge-live,
    .status-indicator-pill {
        padding: 4px 8px;
        font-size: 10px;
        gap: 5px;
        height: 28px;
    }

    .topbar-actions .btn {
        padding: 4px 8px;
        font-size: 11px;
        height: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
    }

    .content-body {
        padding: 12px;
        gap: 14px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 12px 14px;
        border-radius: 10px;
    }

    .stat-title,
    .stat-label {
        font-size: 11px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-subtext {
        font-size: 11px;
    }

    .form-row, .form-row-3, .cards-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    .signals-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .app-card {
        border-radius: 10px;
    }

    .app-card-header {
        padding: 12px 14px;
        gap: 8px;
        flex-wrap: wrap;
    }

    .app-card-title {
        font-size: 14px;
    }

    .app-card-body {
        padding: 12px 14px;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        border: 1px solid var(--border);
    }

    .app-table th,
    .app-table td {
        padding: 8px 10px;
        font-size: 12px;
        white-space: nowrap;
    }
}

/* ─── NARROW SMARTPHONE SCREENS (<= 480px) ─── */
@media (max-width: 480px) {
    .topbar {
        padding: 0 8px;
    }

    .topbar-actions {
        gap: 4px !important;
    }

    .autotrade-badge-live {
        padding: 3px 6px;
        font-size: 9.5px;
    }

    .status-indicator-pill {
        padding: 3px 6px;
        font-size: 9.5px;
    }

    .topbar-actions .btn {
        padding: 3px 6px;
        font-size: 10px;
        height: 26px;
    }

    .content-body {
        padding: 10px 8px;
        gap: 10px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .stat-card {
        padding: 10px 10px;
    }

    .stat-value {
        font-size: 17px;
    }

    .stat-title,
    .stat-label {
        font-size: 10px;
    }

    .app-card-header {
        padding: 10px 12px;
    }

    .app-card-body {
        padding: 10px 12px;
    }

    .mobile-nav-bar {
        padding: 2px 2px calc(2px + env(safe-area-inset-bottom, 0));
        height: 54px;
    }

    .mobile-nav-item {
        font-size: 8px;
        padding: 2px 1px;
        gap: 1px;
    }

    .mobile-nav-item span:first-child {
        font-size: 16px;
    }
}


