/* ============================================
   XR Trade Bot Dashboard - Styles
   ============================================ */

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a1f2e;
    --bg-card-hover: #222a3e;
    --border-color: #2a3040;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-orange: #f59e0b;
    --accent-cyan: #06b6d4;
    --sidebar-width: 240px;
    --header-height: 64px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

body {
    font-family: 'Times New Roman', 'Noto Sans Lao', Georgia, serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); }

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

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

.logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; }
.logo i { color: var(--accent-blue); font-size: 24px; animation: pulse-robot 2s infinite; }

@keyframes pulse-robot {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.logo-text { color: var(--text-primary); }
.logo-text .accent { color: var(--accent-blue); }

.sidebar-toggle {
    background: none; border: none; color: var(--text-secondary);
    font-size: 18px; cursor: pointer; padding: 4px; border-radius: 4px; transition: var(--transition);
}
.sidebar-toggle:hover { color: var(--text-primary); background: var(--bg-card); }

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

.nav-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    color: var(--text-secondary); text-decoration: none; border-radius: var(--radius-sm);
    transition: var(--transition); font-weight: 500; font-size: 14px;
}
.nav-item i { width: 20px; text-align: center; font-size: 16px; }
.nav-item:hover { background: var(--bg-card); color: var(--text-primary); }
.nav-item.active { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); }

.sidebar-footer { padding: 16px; border-top: 1px solid var(--border-color); }

.status-indicator { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-green); animation: blink 1.5s infinite; }
.status-dot.disconnected { background: var(--accent-red); animation: none; }

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ============================================
   Dashboard Wrapper - Full Width
   ============================================ */
.dashboard {
    width: 100%;
    min-height: 100vh;
}

/* ============================================
   Main Content - Full Width & Height Flex
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--transition);
}

/* Top Bar */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.page-title { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.page-title i { color: var(--accent-blue); }
.top-bar-right { display: flex; align-items: center; gap: 12px; }

.btn {
    display: flex; align-items: center; justify-content: center; padding: 8px 16px;
    border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-secondary);
    border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); font-size: 14px;
}
.btn:hover { background: var(--bg-card-hover); color: var(--text-primary); border-color: var(--accent-blue); }
.btn-refresh { padding: 8px 12px; font-size: 16px; }
.btn-refresh.spinning i { animation: spin 0.8s linear; }

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

.theme-toggle {
    padding: 8px 12px; background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); cursor: pointer; color: var(--text-secondary);
    transition: var(--transition); font-size: 16px;
}
.theme-toggle:hover { color: var(--accent-orange); background: var(--bg-card-hover); }

/* ============================================
   Sections - Full Width
   ============================================ */
.section { display: none; }
.section.active { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }

/* ============================================
   Cards Grid - Full Width
   ============================================ */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    padding: 0 20px;
}

.card {
    display: flex; align-items: center; gap: 16px; padding: 20px;
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius); transition: var(--transition); cursor: default;
}
.card:hover { border-color: var(--accent-blue); transform: translateY(-2px); box-shadow: var(--shadow); }

.card-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.card-icon-blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.card-icon-purple { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.card-icon-orange { background: rgba(245, 158, 11, 0.15); color: var(--accent-orange); }
.card-icon-green { background: rgba(34, 197, 94, 0.15); color: var(--accent-green); }
.card-icon-red { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }

.card-info { flex: 1; min-width: 0; }
.card-label { display: block; font-size: 13px; color: var(--text-muted); font-weight: 500; margin-bottom: 4px; }
.card-value { display: block; font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.card-change { font-size: 13px; font-weight: 500; }
.card-change.positive { color: var(--accent-green); }
.card-change.negative { color: var(--accent-red); }
.card-loading .card-value { color: var(--text-muted); }

/* ============================================
   Charts
   ============================================ */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    padding: 0 20px;
}

.chart-container { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius); overflow: hidden; transition: var(--transition); }
.chart-container:hover { border-color: var(--accent-blue); }
.chart-container.full-width { grid-column: 1 / -1; }
.chart-header { padding: 16px 20px; border-bottom: 1px solid var(--border-color); }
.chart-header h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.chart-header h3 i { color: var(--accent-blue); }
.chart-body { padding: 16px; height: 300px; position: relative; }
.chart-body canvas { max-height: 100%; max-width: 100%; }

/* ============================================
   Tables - Full Width
   ============================================ */
.table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    margin: 0 20px 20px;
}

.table-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border-color); }
.table-header h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.table-header h3 i { color: var(--accent-blue); }

.badge { padding: 4px 12px; background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); border-radius: 20px; font-size: 12px; font-weight: 500; }

.table-wrapper { overflow-x: auto; padding: 0; }

.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { padding: 12px 16px; text-align: left; font-weight: 600; color: var(--text-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border-color); background: var(--bg-card); white-space: nowrap; }
.data-table td { padding: 10px 16px; border-bottom: 1px solid var(--border-color); color: var(--text-secondary); transition: var(--transition); }
.data-table tbody tr { transition: var(--transition); cursor: default; }
.data-table tbody tr:hover { background: var(--bg-card-hover); }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table .positive { color: var(--accent-green); }
.data-table .negative { color: var(--accent-red); }
.data-table .symbol-cell { font-weight: 600; color: var(--text-primary); }
.data-table .price-cell { font-weight: 600; font-family: 'Inter', monospace; color: var(--text-primary); }

.loading-row { text-align: center; padding: 40px !important; color: var(--text-muted); }

.table-controls { display: flex; gap: 8px; align-items: center; }

.search-input { padding: 8px 14px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 14px; width: 200px; transition: var(--transition); font-family: inherit; }
.search-input:focus { outline: none; border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.search-input::placeholder { color: var(--text-muted); }

.filter-select { padding: 8px 14px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary); font-size: 14px; cursor: pointer; font-family: inherit; transition: var(--transition); }
.filter-select:focus { outline: none; border-color: var(--accent-blue); }

/* ============================================
   Analysis Grid
   ============================================ */
.analysis-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
    padding: 0 20px;
}

.analysis-card { cursor: default; }
.analysis-card .card-value { font-size: 28px; }

/* ============================================
   Bot Card - Full Width
   ============================================ */
.bot-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius); overflow: hidden; margin: 0 20px; }

.bot-header { display: flex; align-items: center; gap: 16px; padding: 24px; background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1)); border-bottom: 1px solid var(--border-color); }
.bot-icon i { font-size: 40px; color: var(--accent-blue); animation: pulse-robot 2s infinite; }
.bot-header h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.bot-header p { color: var(--text-secondary); font-size: 14px; }
.bot-body { padding: 24px; }

.bot-info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.bot-info-item { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--bg-card); border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; border: 1px solid var(--border-color); }
.bot-info-item i { color: var(--accent-blue); }

.bot-commands h4 { font-size: 15px; margin-bottom: 12px; color: var(--text-primary); }
.command-block { background: var(--bg-card); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 8px; border: 1px solid var(--border-color); }
.command-block code { font-family: 'Fira Code', 'Consolas', monospace; font-size: 14px; color: var(--accent-cyan); }
.bot-note { margin-top: 16px; padding: 12px 16px; background: rgba(59, 130, 246, 0.05); border-radius: var(--radius-sm); font-size: 14px; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.bot-note i { color: var(--accent-blue); }

/* ============================================
   Toast Notification
   ============================================ */
.toast {
    position: fixed; bottom: 24px; right: 24px; display: flex; align-items: center; gap: 10px;
    padding: 14px 20px; background: var(--bg-secondary); border: 1px solid var(--accent-green);
    border-radius: var(--radius-sm); box-shadow: var(--shadow); transform: translateY(120px);
    opacity: 0; transition: var(--transition); z-index: 1000; font-size: 14px; font-weight: 500;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast i { color: var(--accent-green); font-size: 18px; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .analysis-grid { grid-template-columns: repeat(2, 1fr); }
    .charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    
    .main-content { margin-left: 0; width: 100%; padding: 0; }
    .section.active { padding: 0; }
    
    .summary-cards { grid-template-columns: 1fr 1fr; padding: 0 10px; }
    .charts-grid { padding: 0 10px; }
    .analysis-grid { grid-template-columns: 1fr 1fr; padding: 0 10px; }
    .bot-card { margin: 0 10px; }
    .table-container { margin: 0 10px 16px; }
    
    .top-bar { flex-direction: column; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: 0; }
    .page-title { font-size: 16px; }
    .page-title i { font-size: 16px; }
    .summary-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
    .card { padding: 14px; gap: 12px; }
    .card-icon { width: 40px; height: 40px; font-size: 16px; }
    .card-value { font-size: 18px; }
    .card-label { font-size: 11px; }
    .charts-grid { grid-template-columns: 1fr; gap: 12px; }
    .chart-body { height: 220px; }
    .analysis-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .analysis-card .card-value { font-size: 22px; }
    .table-controls { flex-direction: column; width: 100%; }
    .search-input { width: 100%; }
    .filter-select { width: 100%; }
    .table-header { flex-wrap: wrap; gap: 8px; }
    .table-header h3 { font-size: 13px; }
    .data-table { font-size: 12px; }
    .data-table th, .data-table td { padding: 8px 10px; }
    .bot-header { padding: 16px; flex-direction: column; text-align: center; }
    .bot-header h2 { font-size: 17px; }
    .bot-body { padding: 16px; }
    .bot-info-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .command-block code { font-size: 12px; word-break: break-all; }
}

@media (max-width: 480px) {
    .summary-cards { grid-template-columns: 1fr; }
    .analysis-grid { grid-template-columns: 1fr; }
    .bot-info-grid { grid-template-columns: 1fr; }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.card, .chart-container, .table-container { animation: fadeInUp 0.5s ease forwards; }
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.1s; }
.card:nth-child(3) { animation-delay: 0.15s; }
.card:nth-child(4) { animation-delay: 0.2s; }

@keyframes rowFlash { 0% { background: rgba(59, 130, 246, 0.15); } 100% { background: transparent; } }
tr.flash { animation: rowFlash 1s ease; }

/* ============================================
   AI SIGNAL Terminal
   ============================================ */
.sig-scan { position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 0; background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,212,255,0.008) 2px, rgba(0,212,255,0.008) 4px); }

/* Signal Header */
.sig-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; margin-bottom: 14px; background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)); background-color: var(--bg-secondary); border: 1px solid rgba(255,255,255,0.06); border-radius: 0; flex-wrap: wrap; }
.sig-h-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.sig-h-group { display: flex; align-items: center; gap: 8px; }
.sig-h-label { font-size: 9px; font-weight: 700; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; }
.sig-select { padding: 6px 12px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; color: var(--text-primary); font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.2s ease; outline: none; min-width: 72px; }
.sig-select:hover { border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); }
.sig-select:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(59,130,246,0.1); }
.sig-h-divider { width: 1px; height: 24px; background: rgba(255,255,255,0.06); }
.sig-h-right { display: flex; align-items: center; }
.sig-price-wrap { text-align: right; }
.sig-price-label { font-size: 9px; font-weight: 700; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 2px; }
.sig-price { font-size: 22px; font-weight: 800; font-family: 'Inter', monospace; color: var(--text-primary); letter-spacing: -0.5px; }

/* Signal Grid - Full Width */
.sig-grid { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 0 20px; margin-bottom: 14px; }

.sig-panel { background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); background-color: var(--bg-secondary); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: all 0.3s ease; }
.sig-panel:hover { border-color: rgba(255,255,255,0.1); }

.sig-panel-main { padding: 16px; min-height: 200px; display: flex; flex-direction: column; }

.sig-loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: 200px; }
.sig-load-spinner { width: 38px; height: 38px; border: 2px solid rgba(0,212,255,0.06); border-top-color: var(--accent-blue); border-radius: 50%; animation: spin 0.7s linear infinite; }
.sig-load-text { font-size: 11px; font-weight: 700; color: var(--accent-blue); letter-spacing: 3px; opacity: 0.5; animation: pulse-text 1.5s ease-in-out infinite; }

@keyframes pulse-text { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.7; } }

.sig-order { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 20px 16px; border-radius: 12px; overflow: hidden; transition: all 0.4s ease; margin-bottom: 12px; }
.sig-order-bg { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 12px; opacity: 0; transition: opacity 0.4s ease; }
.sig-order.buy .sig-order-bg { background: linear-gradient(135deg, rgba(34,197,94,0.04), rgba(34,197,94,0.01)); opacity: 1; }
.sig-order.sell .sig-order-bg { background: linear-gradient(135deg, rgba(239,68,68,0.04), rgba(239,68,68,0.01)); opacity: 1; }
.sig-order.buy { border: 1px solid rgba(34,197,94,0.15); }
.sig-order.sell { border: 1px solid rgba(239,68,68,0.15); }
.sig-order.hold { border: 1px solid rgba(255,255,255,0.06); }

.sig-order-badge { position: absolute; top: 8px; right: 10px; padding: 2px 10px; border-radius: 8px; font-size: 9px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.sig-order-badge.live { background: rgba(34,197,94,0.08); color: var(--accent-green); border: 1px solid rgba(34,197,94,0.15); animation: pulse-text 2s ease-in-out infinite; }

.sig-order-icon { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 6px; transition: all 0.4s ease; position: relative; z-index: 1; }
.sig-order.buy .sig-order-icon { background: rgba(34,197,94,0.08); color: var(--accent-green); box-shadow: 0 0 30px rgba(34,197,94,0.1); }
.sig-order.buy .sig-order-icon i { animation: bounce-up 2s ease-in-out infinite; }
.sig-order.sell .sig-order-icon { background: rgba(239,68,68,0.08); color: var(--accent-red); box-shadow: 0 0 30px rgba(239,68,68,0.1); }
.sig-order.sell .sig-order-icon i { animation: bounce-down 2s ease-in-out infinite; }
.sig-order.hold .sig-order-icon { background: rgba(255,255,255,0.03); color: var(--text-muted); }

@keyframes bounce-up { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes bounce-down { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

.sig-order-label { font-size: 26px; font-weight: 900; letter-spacing: 6px; text-transform: uppercase; transition: color 0.4s ease; position: relative; z-index: 1; }
.sig-order.buy .sig-order-label { color: var(--accent-green); text-shadow: 0 0 20px rgba(34,197,94,0.2); }
.sig-order.sell .sig-order-label { color: var(--accent-red); text-shadow: 0 0 20px rgba(239,68,68,0.2); }
.sig-order.hold .sig-order-label { color: var(--text-muted); }
.sig-order-sub { font-size: 10px; font-weight: 600; letter-spacing: 2px; color: var(--text-muted); margin-top: 2px; margin-bottom: 10px; position: relative; z-index: 1; }
.sig-order-mobile-price { display: none; }
.sig-order-mobile-acc { display: none; }

.sig-order-metrics { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; position: relative; z-index: 1; }
.sig-metric { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 14px; background: rgba(255,255,255,0.02); border-radius: 8px; border: 1px solid rgba(255,255,255,0.04); }
.sig-m-label { font-size: 8px; font-weight: 700; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; }
.sig-m-value { font-size: 15px; font-weight: 800; font-family: 'Inter', monospace; color: var(--text-primary); }

.sig-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.sig-stat { display: flex; flex-direction: column; align-items: center; padding: 10px 8px; background: rgba(255,255,255,0.01); border: 1px solid rgba(255,255,255,0.04); border-radius: 10px; transition: all 0.3s ease; }
.sig-stat:hover { border-color: rgba(255,255,255,0.08); background: rgba(255,255,255,0.02); }
.sig-stat i { font-size: 14px; color: var(--accent-blue); opacity: 0.4; margin-bottom: 2px; }
.sig-stat-label { font-size: 8px; font-weight: 700; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 1px; }
.sig-stat-val { font-size: 15px; font-weight: 800; font-family: 'Inter', monospace; color: var(--text-primary); }
.sig-pat { font-size: 10px !important; }

.sig-bottom-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 12px; }

.sig-analysis, .sig-bb { border: 1px solid rgba(255,255,255,0.04); border-radius: 10px; overflow: hidden; }
.sig-analysis-hdr { padding: 8px 14px; font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 1.5px; text-transform: uppercase; border-bottom: 1px solid rgba(255,255,255,0.04); display: flex; align-items: center; gap: 6px; }
.sig-analysis-hdr i { color: var(--accent-blue); opacity: 0.6; }
.sig-reasons { list-style: none; padding: 4px 0; margin: 0; }
.sig-reasons li { padding: 5px 14px; font-size: 11px; color: var(--text-secondary); border-bottom: 1px solid rgba(255,255,255,0.02); }
.sig-reasons li::before { content: '▸'; color: var(--accent-blue); opacity: 0.3; margin-right: 6px; font-size: 10px; }

.sig-bb-grid { padding: 8px 14px; display: flex; flex-direction: column; gap: 4px; }
.sig-bb-item { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); }
.sig-bb-item strong { font-family: 'Inter', monospace; font-weight: 600; }

/* Signal Actions */
.sig-actions { display: flex; justify-content: center; padding: 12px 20px; position: relative; }

.sig-analyze-btn {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 16px 44px; background: linear-gradient(135deg, #2563eb, #1d4ed8, #1e40af);
    border: none; border-radius: 14px; color: #fff; font-size: 15px; font-weight: 800;
    letter-spacing: 3px; text-transform: uppercase; cursor: pointer; font-family: inherit;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); min-width: 240px; overflow: visible;
    box-shadow: 0 4px 20px rgba(37,99,235,0.3), 0 0 60px rgba(37,99,235,0.1); isolation: isolate;
}
.sig-analyze-btn::before { content: ''; position: absolute; inset: -2px; border-radius: 16px; background: linear-gradient(135deg, rgba(59,130,246,0.4), rgba(139,92,246,0.2), rgba(59,130,246,0.4)); z-index: -2; animation: btn-border-glow 3s ease-in-out infinite; }
.sig-analyze-btn::after { content: ''; position: absolute; inset: 2px; border-radius: 12px; background: linear-gradient(135deg, #2563eb, #1d4ed8, #1e40af); z-index: -1; transition: opacity 0.4s ease; }

@keyframes btn-border-glow { 0%, 100% { opacity: 0.5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.02); } }

.sig-analyze-btn .btn-shimmer { position: absolute; top: 0; left: -75%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent); transform: skewX(-25deg); transition: left 0.6s ease; pointer-events: none; }
.sig-analyze-btn:hover .btn-shimmer { left: 125%; }
.sig-analyze-btn:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 8px 30px rgba(37,99,235,0.4), 0 0 80px rgba(37,99,235,0.15); }
.sig-analyze-btn:hover::after { background: linear-gradient(135deg, #3b82f6, #2563eb, #1d4ed8); }
.sig-analyze-btn:active { transform: translateY(0) scale(0.97); box-shadow: 0 2px 10px rgba(37,99,235,0.3); }
.sig-analyze-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none !important; box-shadow: 0 4px 20px rgba(37,99,235,0.15) !important; }
.sig-analyze-btn:disabled::before { animation: none; }
.sig-analyze-btn i { font-size: 18px; transition: transform 0.3s ease; filter: drop-shadow(0 0 4px rgba(255,255,255,0.2)); }
.sig-analyze-btn:hover i { transform: scale(1.15) rotate(-5deg); }
.sig-analyze-btn .btn-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); position: absolute; pointer-events: none; }
.sig-analyze-btn .btn-dot-1 { top: 8px; right: 20px; animation: dot-pulse 2s ease-in-out infinite; }
.sig-analyze-btn .btn-dot-2 { bottom: 8px; left: 20px; animation: dot-pulse 2s ease-in-out infinite 0.5s; }

@keyframes dot-pulse { 0%, 100% { opacity: 0.3; transform: scale(1); } 50% { opacity: 0.8; transform: scale(1.3); } }

@media (max-width: 600px) {
    .sig-analyze-btn { width: 100%; min-width: 0; padding: 16px 24px; font-size: 13px; letter-spacing: 2px; }
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-wrap { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 9999; background: var(--bg-primary); display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-scan { position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,212,255,0.006) 2px, rgba(0,212,255,0.006) 4px); }
.login-box { width: 100%; max-width: 400px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 20px; padding: 36px 32px 28px; text-align: center; animation: loginFadeIn 0.6s ease; box-shadow: 0 20px 60px rgba(0,0,0,0.4); position: relative; }

@keyframes loginFadeIn { from { opacity: 0; transform: translateY(30px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

.login-logo { margin-bottom: 28px; }
.login-logo-icon { width: 60px; height: 60px; margin: 0 auto 12px; background: linear-gradient(135deg, rgba(59,130,246,0.15), rgba(139,92,246,0.1)); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--accent-blue); animation: pulse-robot 2s infinite; }
.login-logo-text { font-size: 28px; font-weight: 900; color: var(--text-primary); letter-spacing: 1px; margin-bottom: 4px; }
.login-logo-text .accent { color: var(--accent-blue); }
.login-logo-sub { font-size: 12px; font-weight: 500; color: var(--text-muted); letter-spacing: 2px; text-transform: uppercase; }

.login-form { text-align: left; }
.login-field { margin-bottom: 16px; }
.login-field label { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; letter-spacing: 0.5px; }
.login-field label i { color: var(--accent-blue); opacity: 0.6; font-size: 13px; }
.login-field input { width: 100%; padding: 14px 16px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; color: var(--text-primary); font-size: 16px; font-family: inherit; outline: none; transition: all 0.3s ease; -webkit-appearance: none; }
.login-field input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 3px rgba(59,130,246,0.1); background: rgba(255,255,255,0.03); }
.login-field input::placeholder { color: var(--text-muted); }

.login-error { display: none; padding: 10px 14px; background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.12); border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--accent-red); margin-bottom: 16px; text-align: center; }

.login-btn { width: 100%; padding: 16px; background: linear-gradient(135deg, #2563eb, #1d4ed8); border: none; border-radius: 12px; color: #fff; font-size: 15px; font-weight: 800; letter-spacing: 2px; cursor: pointer; font-family: inherit; transition: all 0.3s ease; text-transform: uppercase; box-shadow: 0 4px 15px rgba(37,99,235,0.3); }
.login-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(37,99,235,0.4); }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.login-toggle-link { text-align: center; margin-top: 14px; font-size: 13px; color: var(--text-muted); }
.login-toggle-link a { color: var(--accent-blue); text-decoration: none; font-weight: 600; transition: all 0.2s ease; }
.login-toggle-link a:hover { color: #60a5fa; text-decoration: underline; }

.login-footer { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.04); font-size: 11px; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 6px; }
.login-footer i { color: var(--accent-blue); opacity: 0.5; }

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-wrap { max-width: 900px; padding: 0 20px; }
.admin-header { margin-bottom: 20px; }
.admin-header h2 { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.admin-header h2 i { color: var(--accent-blue); }
.admin-sub { font-size: 14px; color: var(--text-muted); }

.admin-card { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.admin-card-hdr { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border-color); font-size: 14px; font-weight: 700; color: var(--text-primary); gap: 8px; }
.admin-card-hdr i { color: var(--accent-blue); }
.admin-card-body { padding: 16px 20px; }

.admin-form-row { display: grid; grid-template-columns: 1fr 1fr 80px 120px; gap: 10px; margin-bottom: 12px; }
.admin-field label { display: block; font-size: 11px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; letter-spacing: 0.5px; }
.admin-input { width: 100%; padding: 10px 12px; background: rgba(255,255,255,0.02); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-primary); font-size: 14px; font-family: inherit; outline: none; transition: all 0.3s ease; }
.admin-input:focus { border-color: var(--accent-blue); box-shadow: 0 0 0 2px rgba(59,130,246,0.08); }
.admin-input-sm { text-align: center; font-weight: 700; }

.admin-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 20px; border: 1px solid; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; transition: all 0.3s ease; }
.admin-btn-primary { background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(59,130,246,0.05)); border-color: rgba(59,130,246,0.2); color: var(--accent-blue); }
.admin-btn-primary:hover { background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(59,130,246,0.1)); border-color: var(--accent-blue); }
.admin-btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 6px; }
.admin-btn-blue { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.15); color: var(--accent-blue); }
.admin-btn-blue:hover { background: rgba(59,130,246,0.15); }
.admin-btn-red { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.15); color: var(--accent-red); }
.admin-btn-red:hover { background: rgba(239,68,68,0.15); }
.admin-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { padding: 10px 14px; text-align: left; font-weight: 600; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border-color); background: rgba(255,255,255,0.01); white-space: nowrap; }
.admin-table td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.02); color: var(--text-secondary); vertical-align: middle; }
.admin-table tbody tr:hover { background: rgba(255,255,255,0.01); }
.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-role-badge { display: inline-block; padding: 2px 10px; border-radius: 6px; font-size: 10px; font-weight: 700; letter-spacing: 0.5px; }

.admin-plan-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; letter-spacing: 0.3px; white-space: nowrap; }
.plan-trial { background: rgba(251,146,60,0.12); color: #fb923c; border: 1px solid rgba(251,146,60,0.2); animation: pulse-trial 2s ease-in-out infinite; }
.plan-monthly { background: rgba(59,130,246,0.12); color: #60a5fa; border: 1px solid rgba(59,130,246,0.2); }
.plan-yearly { background: rgba(139,92,246,0.12); color: #a78bfa; border: 1px solid rgba(139,92,246,0.2); }
.plan-lifetime { background: rgba(34,197,94,0.1); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.plan-none { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 1px solid rgba(255,255,255,0.06); }

@keyframes pulse-trial {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.admin-expiry-ok { color: var(--accent-green); font-size: 12px; }
.admin-expiry-warning { color: #fbbf24; font-size: 12px; font-weight: 600; }
.admin-expiry-expired { color: var(--accent-red); font-size: 12px; font-weight: 700; }
.admin-btn-green { background: rgba(34,197,94,0.1); color: var(--accent-green); border: 1px solid rgba(34,197,94,0.2); }
.admin-btn-green:hover { background: rgba(34,197,94,0.2); }
.admin-btn-purple { background: rgba(139,92,246,0.1); color: #a78bfa; border: 1px solid rgba(139,92,246,0.2); }
.admin-btn-purple:hover { background: rgba(139,92,246,0.2); }

/* ============================================
   SUBSCRIPTION BADGE — Shows days left to all users
   ============================================ */
.sub-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    border: 1px solid;
    transition: all 0.3s ease;
}
.sub-badge i { font-size: 11px; }
.sub-active {
    background: rgba(34,197,94,0.1);
    color: #4ade80;
    border-color: rgba(34,197,94,0.2);
}
.sub-expiring {
    background: rgba(251,191,36,0.1);
    color: #fbbf24;
    border-color: rgba(251,191,36,0.2);
    animation: pulse-warning 2s ease-in-out infinite;
}
.sub-expired {
    background: rgba(255,51,102,0.12);
    color: #ff6b8a;
    border-color: rgba(255,51,102,0.2);
    animation: pulse-danger 1.5s ease-in-out infinite;
}
.sub-lifetime {
    background: rgba(0,212,255,0.1);
    color: #00d4ff;
    border-color: rgba(0,212,255,0.2);
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
@keyframes pulse-danger {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sub-badge { font-size: 10px; padding: 2px 8px; }
}

/* ============================================
   Admin — Subscription Expiry Alerts
   ============================================ */
.admin-expiry-alerts { margin-bottom: 16px; }
.admin-alert { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 10px; font-size: 13px; line-height: 1.5; margin-bottom: 8px; }
.admin-alert i { font-size: 16px; flex-shrink: 0; }
.admin-alert strong { font-weight: 700; }
.admin-alert-danger { background: rgba(255,51,102,0.08); border: 1px solid rgba(255,51,102,0.15); color: #ff6b8a; }
.admin-alert-danger i { color: #ff3366; }
.admin-alert-warning { background: rgba(251,191,36,0.08); border: 1px solid rgba(251,191,36,0.15); color: #fbbf24; }
.admin-alert-warning i { color: #fbbf24; }
.admin-role-admin { background: rgba(139,92,246,0.1); color: var(--accent-purple); }
.admin-role-user { background: rgba(59,130,246,0.1); color: var(--accent-blue); }
.admin-status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.admin-status-dot.active { background: var(--accent-green); box-shadow: 0 0 6px rgba(34,197,94,0.4); }
.admin-status-dot.inactive { background: var(--text-muted); }
.admin-actions { display: flex; gap: 6px; }
.admin-loading { text-align: center; padding: 24px; color: var(--text-muted); font-size: 13px; }

.admin-toggle { position: relative; display: inline-block; width: 36px; height: 20px; cursor: pointer; }
.admin-toggle input { opacity: 0; width: 0; height: 0; }
.admin-toggle-slider { position: absolute; inset: 0; background: rgba(255,255,255,0.08); border-radius: 20px; transition: all 0.3s ease; }
.admin-toggle-slider::before { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; background: var(--text-muted); border-radius: 50%; transition: all 0.3s ease; }
.admin-toggle input:checked + .admin-toggle-slider { background: rgba(34,197,94,0.2); }
.admin-toggle input:checked + .admin-toggle-slider::before { background: var(--accent-green); transform: translateX(16px); }

/* ============================================
   TOP BAR — User Badge & Logout
   ============================================ */
.top-bar-user { display: flex; align-items: center; gap: 8px; }
.user-badge { display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 8px; background: rgba(59,130,246,0.06); border: 1px solid rgba(59,130,246,0.1); border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--accent-blue); }
.user-badge i { font-size: 16px; }
.btn-logout { padding: 8px 12px; border: 1px solid rgba(239,68,68,0.15); background: rgba(239,68,68,0.06); color: var(--accent-red); border-radius: 8px; cursor: pointer; transition: all 0.3s ease; font-size: 16px; }
.btn-logout:hover { background: rgba(239,68,68,0.12); border-color: var(--accent-red); color: var(--accent-red); }

/* ============================================
   Mobile Floating AI Signal Button
   ============================================ */
.sig-float-btn { display: none; position: fixed; bottom: 24px; right: 24px; z-index: 999; width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-blue), #1d4ed8); border: 2px solid rgba(255,255,255,0.15); box-shadow: 0 4px 20px rgba(59,130,246,0.4), 0 0 40px rgba(59,130,246,0.15); cursor: pointer; align-items: center; justify-content: center; flex-direction: column; gap: 1px; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); -webkit-tap-highlight-color: transparent; user-select: none; }
.sig-float-btn:active { transform: scale(0.9); }
.sig-float-icon { font-size: 22px; color: #fff; line-height: 1; filter: drop-shadow(0 0 6px rgba(255,255,255,0.3)); }
.sig-float-text { font-size: 6px; font-weight: 800; color: #fff; letter-spacing: 0.5px; text-transform: uppercase; opacity: 0.9; line-height: 1; }
.sig-float-ring { position: absolute; top: -4px; left: -4px; right: -4px; bottom: -4px; border-radius: 50%; border: 2px solid rgba(59,130,246,0.3); animation: float-pulse 2s ease-in-out infinite; }

@keyframes float-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.15); opacity: 0.3; } }

@media (max-width: 768px) {
    .sig-float-btn { display: flex; }
    .main-content { margin-left: 0; width: 100%; }
    .section.active { padding: 0; }
    .summary-cards, .charts-grid, .analysis-grid { padding: 0 10px; }
    .table-container { margin: 0 10px 16px; }
    .bot-card { margin: 0 10px; }
    .sig-grid { padding: 0 10px; }
    .sig-actions { padding: 12px 10px; }
    .top-bar { border-radius: 0; padding: 12px 14px; margin-bottom: 14px; }
    .admin-wrap { padding: 0 10px; }
    .admin-form-row { grid-template-columns: 1fr; }
    .admin-table th, .admin-table td { padding: 8px 10px; }
}

@media (max-width: 480px) {
    .summary-cards { grid-template-columns: 1fr; }
    .analysis-grid { grid-template-columns: 1fr; }
    .sig-float-btn { bottom: 16px; right: 16px; width: 52px; height: 52px; }

    /* Mobile: simplified signal - show only LIVE bar */
    .sig-stats { display: none; }
    .sig-bottom-grid { display: none; }
    .sig-order-metrics { display: none; }
    .sig-order-sub { display: none; }
    .sig-order { padding: 14px 16px 12px; margin-bottom: 8px; }
    .sig-order-icon { width: 44px; height: 44px; font-size: 18px; margin-bottom: 4px; }
    .sig-order-label { font-size: 22px; letter-spacing: 4px; }
    .sig-order-badge { top: 6px; right: 8px; font-size: 8px; padding: 2px 8px; }
    .sig-h-right { display: none; }
    .sig-h-divider { display: none; }
    .sig-header { padding: 10px 12px; }
    .sig-select { padding: 5px 8px; font-size: 11px; }
    .sig-h-label { font-size: 8px; }
    .sig-analyze-btn { padding: 14px 20px; font-size: 13px; letter-spacing: 2px; min-width: 0; width: 100%; }
    .sig-panel-main { padding: 10px; min-height: 120px; }
    .sig-loading { min-height: 120px; }

    .sig-order-mobile-price { display: flex !important; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; position: relative; z-index: 1; }
    .sig-mob-price-label { font-size: 9px; font-weight: 700; color: var(--accent-green); letter-spacing: 1.5px; padding: 1px 6px; border-radius: 4px; background: rgba(34,197,94,0.08); border: 1px solid rgba(34,197,94,0.15); animation: pulse-text 2s ease-in-out infinite; }
    #sigMobilePrice { font-size: 16px; font-weight: 800; font-family: 'Inter', monospace; color: var(--text-primary); }
    .sig-order-mobile-acc { display: flex !important; align-items: center; justify-content: center; gap: 5px; margin-top: 6px; position: relative; z-index: 1; font-size: 12px; font-weight: 700; color: var(--accent-blue); letter-spacing: 1px; }
    .sig-order-mobile-acc i { font-size: 10px; opacity: 0.6; }
    #sigMobileAcc { font-family: 'Inter', monospace; font-weight: 800; }
}

/* ============================================
   WhatsApp Auto-Reply Modal — Chat Bubble Preview
   ============================================ */
.wa-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: wa-fade-in 0.3s ease;
}
.wa-modal-overlay.show {
    display: flex;
}

@keyframes wa-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wa-modal-box {
    width: 100%;
    max-width: 400px;
    background: #0c1220;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: wa-slide-up 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

@keyframes wa-slide-up {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.wa-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}
.wa-modal-close:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

.wa-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.wa-modal-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 20px rgba(37,211,102,0.2);
}
.wa-modal-info {
    display: flex;
    flex-direction: column;
}
.wa-modal-info strong {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
}
.wa-modal-info span {
    font-size: 11px;
    color: var(--accent-green);
    display: flex;
    align-items: center;
    gap: 4px;
}
.wa-modal-info span::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: blink 1.5s infinite;
}

.wa-modal-body {
    padding: 16px 20px 12px;
}

.wa-chat-bubble {
    background: rgba(37,211,102,0.06);
    border: 1px solid rgba(37,211,102,0.1);
    border-radius: 16px 16px 16px 4px;
    padding: 14px 16px;
    position: relative;
    animation: wa-bubble-in 0.5s ease 0.2s both;
}

@keyframes wa-bubble-in {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.wa-chat-msg {
    font-size: 14px;
    line-height: 1.7;
    color: #ffffff;
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(37,211,102,0.04);
    border-radius: 10px;
    border: 1px solid rgba(37,211,102,0.04);
}
.wa-chat-msg:last-child {
    margin-bottom: 0;
}

.wa-chat-price {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.06);
    text-align: center;
    padding: 12px;
    line-height: 1.8;
}

.wa-chat-time {
    font-size: 10px;
    color: rgba(255,255,255,0.5);
    text-align: right;
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px solid rgba(255,255,255,0.03);
}

.wa-modal-footer {
    padding: 10px 20px 20px;
}

.wa-modal-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(37,211,102,0.3);
}
.wa-modal-btn i {
    font-size: 20px;
}
.wa-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37,211,102,0.4);
}
.wa-modal-btn:active {
    transform: translateY(0) scale(0.97);
}

/* ============================================
   Floating Draggable WhatsApp Button
   ============================================ */
.wa-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: grab;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4), 0 0 50px rgba(37,211,102,0.15);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    animation: wa-float-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}
/* Hidden after login */
body.auth-ready .wa-float { display: none; }

.wa-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(37,211,102,0.5), 0 0 60px rgba(37,211,102,0.2);
}
.wa-float:active {
    cursor: grabbing;
    transform: scale(0.95);
}
.wa-float i {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}
.wa-float:hover i {
    transform: scale(1.1) rotate(-5deg);
}
.wa-float.dragging {
    cursor: grabbing;
    transform: scale(1.05);
    box-shadow: 0 8px 32px rgba(37,211,102,0.5), 0 0 60px rgba(37,211,102,0.25);
    transition: none !important;
    animation: none !important;
}

/* Tooltip */
.wa-float-tooltip {
    position: absolute;
    right: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.08);
}
.wa-float-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: rgba(0,0,0,0.85);
}
.wa-float:hover .wa-float-tooltip {
    opacity: 1;
}

/* Pulse ring */
.wa-float::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid rgba(37,211,102,0.3);
    animation: wa-pulse 2.5s ease-in-out infinite;
    pointer-events: none;
}
.wa-float.dragging::before {
    animation: none;
    opacity: 0.5;
}

@keyframes wa-float-in {
    from { opacity: 0; transform: translateY(30px) scale(0.8); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wa-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.3; }
}

/* Mobile */
@media (max-width: 768px) {
    .wa-float {
        bottom: 100px; /* above AI Signal float button */
        right: 16px;
        width: 52px;
        height: 52px;
        font-size: 24px;
        box-shadow: 0 4px 16px rgba(37,211,102,0.35);
    }
    .wa-float-tooltip {
        right: calc(100% + 10px);
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* ============================================
   LOGIN — WhatsApp Contact
   ============================================ */
.login-contact {
    text-align: center;
    padding: 14px 16px;
    margin-top: 16px;
    background: rgba(37,211,102,0.06);
    border: 1px solid rgba(37,211,102,0.1);
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.login-contact i {
    color: #25D366;
    font-size: 18px;
    margin-right: 6px;
    vertical-align: middle;
}

.login-contact strong {
    color: #25D366;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
}
