/* ==========================================================================
   SADING (SAHABATTRADING) PREMIUM STYLE SYSTEM
   Theme: Galactic Obsidian & Ultra-Low Latency Institutional Trading
   ========================================================================== */

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

:root {
    /* Color Palette */
    --bg-deep: #060814;
    --bg-card: rgba(13, 17, 34, 0.7);
    --bg-card-hover: rgba(19, 25, 48, 0.85);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-active: rgba(0, 229, 255, 0.3);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --neon-blue: #00e5ff;
    --neon-gold: #ffaa00;
    --neon-green: #00e676;
    --neon-red: #ff1744;
    --neon-purple: #d500f9;
    
    /* Font Families */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    /* Shadows & Glows */
    --glow-blue: 0 0 15px rgba(0, 229, 255, 0.35);
    --glow-green: 0 0 15px rgba(0, 230, 118, 0.35);
    --glow-red: 0 0 15px rgba(255, 23, 68, 0.35);
    --glow-gold: 0 0 15px rgba(255, 170, 0, 0.35);
    
    --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    background-color: var(--bg-deep);
    background-image: 
        radial-gradient(at 10% 10%, rgba(0, 229, 255, 0.05) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(213, 0, 249, 0.04) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(6, 8, 20, 1) 0px, var(--bg-deep) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--neon-blue);
}

/* Main Container Layout */
.app-container {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 100vh;
    max-height: 100vh;
}

/* Sidebar Styling */
aside.sidebar {
    background: rgba(8, 10, 24, 0.85);
    border-right: 1px solid var(--border-glass);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    padding: 24px;
    overflow-y: auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: bold;
    font-size: 20px;
    color: white;
    box-shadow: var(--glow-blue);
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text span {
    font-size: 10px;
    color: var(--neon-blue);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    display: block;
    margin-top: -3px;
}

/* Controls & Simulation Panel */
.panel-section {
    margin-bottom: 24px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
    font-weight: 600;
}

.control-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

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

.input-wrapper span.unit {
    position: absolute;
    right: 12px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 12px;
}

input[type="number"], select {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 13px;
    transition: var(--transition-smooth);
}

input[type="number"]:focus, select:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
}

/* Dynamic Asset Select Cards */
.asset-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.asset-card {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.asset-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.asset-card.active {
    border-color: var(--neon-blue);
    box-shadow: var(--glow-blue);
}

.asset-card.active.gold-pair {
    border-color: var(--neon-gold);
    box-shadow: var(--glow-gold);
}

.asset-card .asset-name {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: bold;
    display: block;
}

.asset-card .asset-price {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-family: monospace;
}

/* Button & Action */
.action-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
    color: white;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--glow-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.action-btn:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.action-btn:active {
    transform: scale(0.98);
}

/* Toggle Switches */
.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--neon-red);
}

input:checked + .slider.green-switch {
    background-color: var(--neon-green);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* Main Dashboard Window */
main.main-content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    padding: 24px;
    gap: 24px;
}

/* Header Area */
header.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 16px 24px;
    backdrop-filter: blur(16px);
}

.sys-time {
    font-family: monospace;
    font-size: 14px;
    color: var(--neon-blue);
    background: rgba(0, 229, 255, 0.1);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(0, 229, 255, 0.2);
}

.badge-row {
    display: flex;
    gap: 12px;
}

.sys-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
}

.sys-badge .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.sys-badge .dot.active {
    background: var(--neon-green);
    box-shadow: var(--glow-green);
}

/* Dashboard Body Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 24px;
    flex: 1;
}

.main-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.side-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Glassmorphic Widget Container */
.glass-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-widget:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.1);
}

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

.widget-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: var(--neon-blue);
}

/* Real-Time Trading Chart Area */
.chart-container {
    height: 240px;
    width: 100%;
    position: relative;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    overflow: hidden;
}

/* Decision Block */
.decision-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 16px;
    border: 1px solid var(--border-glass);
    position: relative;
}

.decision-result {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 800;
    letter-spacing: -1px;
    margin: 12px 0;
    text-transform: uppercase;
}

.decision-result.buy {
    color: var(--neon-green);
    text-shadow: var(--glow-green);
}

.decision-result.sell {
    color: var(--neon-red);
    text-shadow: var(--glow-red);
}

.decision-result.wait {
    color: var(--neon-gold);
    text-shadow: var(--glow-gold);
}

/* Terminal Console View for Prompt Log Output */
.terminal-block {
    background: #02030a;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.6;
    padding: 16px;
    color: #4ade80;
    overflow-y: auto;
    height: 480px;
    max-height: 480px;
    border-left: 3px solid var(--neon-blue);
}

.terminal-title {
    font-weight: bold;
    color: #f8fafc;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
}

.terminal-accent {
    color: var(--neon-blue);
}

/* Subtitle and value lines */
.stat-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-glass);
}

.stat-row:last-child {
    border-bottom: none;
}

.stat-label {
    color: var(--text-secondary);
}

.stat-value {
    font-weight: 600;
    font-family: monospace;
}

.stat-value.up {
    color: var(--neon-green);
}

.stat-value.down {
    color: var(--neon-red);
}

/* Zones visual representation list */
.zone-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.zone-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 8px 12px;
}

.zone-tag {
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.zone-tag.supply {
    background: rgba(255, 23, 68, 0.1);
    color: var(--neon-red);
    border: 1px solid rgba(255, 23, 68, 0.2);
}

.zone-tag.demand {
    background: rgba(0, 230, 118, 0.1);
    color: var(--neon-green);
    border: 1px solid rgba(0, 230, 118, 0.2);
}

/* Curfew alarm indicator */
.curfew-banner {
    display: none;
    align-items: center;
    gap: 16px;
    background: linear-gradient(90deg, rgba(255, 23, 68, 0.2) 0%, rgba(255, 170, 0, 0.15) 100%);
    border: 1px dashed var(--neon-red);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 16px;
    animation: pulseBorder 2s infinite alternate;
}

@keyframes pulseBorder {
    0% { border-color: rgba(255, 23, 68, 0.4); }
    100% { border-color: var(--neon-red); box-shadow: 0 0 10px rgba(255, 23, 68, 0.2); }
}

.curfew-banner.active {
    display: flex;
}

.curfew-text h4 {
    font-family: var(--font-heading);
    color: var(--neon-red);
    font-size: 14px;
    font-weight: 700;
}

.curfew-text p {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Latency Indicator */
.latency-timer {
    font-family: monospace;
    font-size: 11px;
    color: var(--text-muted);
    text-align: right;
    margin-top: 8px;
}

.latency-timer span {
    color: var(--neon-green);
    font-weight: bold;
}

/* Custom SVG chart element line glows */
.chart-line {
    fill: none;
    stroke: var(--neon-blue);
    stroke-width: 2.5;
    filter: drop-shadow(0px 0px 5px rgba(0, 229, 255, 0.5));
}

.chart-line.gold {
    stroke: var(--neon-gold);
    filter: drop-shadow(0px 0px 5px rgba(255, 170, 0, 0.5));
}

.chart-area-fill {
    fill: url(#blue-gradient);
    opacity: 0.12;
}

.chart-area-fill.gold {
    fill: url(#gold-gradient);
}

.grid-line {
    stroke: rgba(255, 255, 255, 0.03);
    stroke-width: 1;
}

.zone-line {
    stroke-width: 1.5;
    stroke-dasharray: 4,4;
}

.zone-line.supply {
    stroke: rgba(255, 23, 68, 0.5);
}

.zone-line.demand {
    stroke: rgba(0, 230, 118, 0.5);
}

.zone-line.poc {
    stroke: rgba(213, 0, 249, 0.5);
}

/* Pulsing current point */
.pulsing-dot {
    animation: pulseGlow 1.5s infinite;
}

@keyframes pulseGlow {
    0% { r: 4; opacity: 1; }
    50% { r: 8; opacity: 0.4; }
    100% { r: 4; opacity: 1; }
}

/* Form Styles and Labels */
.interactive-label-group {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 8px;
}

.badge-info {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-secondary);
}

/* Interactive custom slider styles */
.slider-custom {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    transition: background 0.3s;
}

.slider-custom::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--neon-blue);
    cursor: pointer;
    box-shadow: var(--glow-blue);
    transition: var(--transition-smooth);
}

.slider-custom::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider-custom.gold-slider::-webkit-slider-thumb {
    background: var(--neon-gold);
    box-shadow: var(--glow-gold);
}

/* Expert Brain Badge Glowing Styles */
.sys-badge.expert-active {
    background: rgba(0, 230, 118, 0.1) !important;
    border-color: rgba(0, 230, 118, 0.3) !important;
    color: var(--neon-green) !important;
    box-shadow: var(--glow-green) !important;
    font-weight: 700 !important;
}

.sys-badge.expert-active .dot {
    background: var(--neon-green) !important;
    box-shadow: var(--glow-green) !important;
    animation: pulseDot 1.5s infinite;
}

.sys-badge.expert-inactive {
    background: rgba(255, 23, 68, 0.05) !important;
    border-color: rgba(255, 23, 68, 0.15) !important;
    color: var(--text-muted) !important;
}

.sys-badge.expert-inactive .dot {
    background: var(--text-muted) !important;
    box-shadow: none !important;
}

@keyframes pulseDot {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

#terminal-content {
    white-space: pre-wrap;
    word-break: break-word;
}

