/* ========================================
   NEUROBRO V6.0 - DARK TERMINAL CSS
   Bloomberg Terminal Style Trading Interface
   ======================================== */

/* RESET & BASE STYLES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    background-color: #0d1117;
    color: #c9d1d9;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ========================================
   TERMINAL HEADER
   ======================================== */

.terminal-header {
    background: linear-gradient(180deg, #161b22 0%, #0d1117 100%);
    border-bottom: 1px solid #30363d;
    padding: 12px 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #58a6ff;
    letter-spacing: 2px;
}

.version {
    color: #7d8590;
    font-size: 12px;
    margin-left: 4px;
}

.status-indicator {
    color: #3fb950;
    font-size: 12px;
    animation: blink 2s infinite;
}

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

.system-info {
    display: flex;
    gap: 20px;
}

.info-item {
    font-size: 12px;
    color: #7d8590;
}

/* ========================================
   TERMINAL CONTAINER
   ======================================== */

.terminal-container {
    display: flex;
    gap: 0;
    min-height: calc(100vh - 60px);
}

/* ========================================
   SIDEBAR
   ======================================== */

.sidebar {
    width: 20%;
    background: #161b22;
    border-right: 1px solid #30363d;
    padding: 20px 15px;
}

.sidebar-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 11px;
    color: #7d8590;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.btn-terminal {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 10px;
    border: 1px solid #30363d;
    border-radius: 6px;
    background: #21262d;
    color: #c9d1d9;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-terminal:hover {
    background: #30363d;
    border-color: #58a6ff;
}

.btn-terminal.btn-primary {
    background: #1f6feb;
    border-color: #1f6feb;
    color: #ffffff;
}

.btn-terminal.btn-primary:hover {
    background: #388bfd;
    border-color: #388bfd;
}

.btn-terminal.btn-warning {
    background: #9a6700;
    border-color: #9a6700;
    color: #ffffff;
}

.btn-terminal.btn-warning:hover {
    background: #e3b341;
    border-color: #e3b341;
}

.btn-terminal.btn-danger {
    background: #da3633;
    border-color: #da3633;
    color: #ffffff;
}

.btn-terminal.btn-danger:hover {
    background: #f85149;
    border-color: #f85149;
}

.config-display {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 12px;
}

.config-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.config-item:last-child {
    margin-bottom: 0;
}

.config-label {
    color: #7d8590;
}

.config-value {
    color: #58a6ff;
    font-weight: 600;
}

.config-input {
    width: 120px;
    padding: 4px 6px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 3px;
    color: #58a6ff;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 11px;
    text-align: right;
}

.config-input:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.1);
}

.config-input-small {
    width: 45px;
    padding: 4px 6px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 3px;
    color: #58a6ff;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 12px;
    text-align: center;
}

.config-input-small:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.1);
}

.config-inputs-inline {
    display: flex;
    align-items: center;
    gap: 2px;
}

.config-inputs-inline span {
    color: #7d8590;
    font-size: 10px;
}

.config-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-input-large {
    width: 120px;
    padding: 4px 6px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 3px;
    color: #58a6ff;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 11px;
    text-align: right;
}

.config-input-large:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.1);
}

.config-display {
    color: #3fb950;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 11px;
    min-width: 60px;
    text-align: right;
}

.config-hint {
    color: #7d8590;
    font-size: 10px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.config-hint span {
    color: #3fb950;
    font-weight: 600;
}

.config-select {
    width: 100px;
    padding: 4px 6px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 3px;
    color: #58a6ff;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 12px;
    cursor: pointer;
}

.config-select:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.1);
}

.config-select option {
    background: #0d1117;
    color: #c9d1d9;
}

.market-status {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 12px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 12px;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-label {
    color: #7d8590;
}

.status-value {
    font-weight: 600;
}

.ara-count {
    color: #f0883e;
}

.qualified-count {
    color: #3fb950;
}

/* ========================================
   MAIN DISPLAY
   ======================================== */

.main-display {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* ========================================
   TERMINAL BOXES
   ======================================== */

.terminal-box {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.box-header {
    background: #21262d;
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    border-bottom: 1px solid #30363d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ara-header {
    background: linear-gradient(90deg, #4d2d00 0%, #3d2300 100%);
    color: #f0883e;
    border-bottom: 1px solid #633400;
}

.golden-header {
    background: linear-gradient(90deg, #4a3f00 0%, #3d3400 100%);
    color: #e3b341;
    border-bottom: 1px solid #633400;
}

.progress-content {
    padding: 20px;
}

.welcome-content {
    padding: 40px;
}

/* ========================================
   PROGRESS BAR
   ======================================== */

.progress-bar-container {
    width: 100%;
    height: 30px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1f6feb 0%, #388bfd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: width 0.3s ease;
    min-width: 0;
}

.progress-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 600;
}

.progress-info {
    text-align: center;
    font-size: 12px;
    color: #7d8590;
}

/* ========================================
   TABLES
   ======================================== */

.table-container {
    overflow-x: auto;
}

.search-container {
    padding: 10px 15px;
    border-bottom: 1px solid #30363d;
}

.search-container .terminal-input {
    width: 100%;
    padding: 8px 12px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 4px;
    color: #c9d1d9;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 13px;
}

.search-container .terminal-input:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.terminal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.terminal-table thead {
    background: #21262d;
}

.terminal-table th {
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    color: #7d8590;
    letter-spacing: 1px;
    border-bottom: 1px solid #30363d;
}

.terminal-table td {
    padding: 10px;
    border-bottom: 1px solid #21262d;
}

.terminal-table tbody tr {
    transition: background 0.2s;
}

.terminal-table tbody tr:hover {
    background: #21262d;
}

.terminal-table tbody tr:last-child td {
    border-bottom: none;
}

/* Stock colors */
.price-up {
    color: #3fb950;
}

.price-down {
    color: #f85149;
}

.ara-badge {
    background: #f0883e;
    color: #000;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

/* ========================================
   ASCII LOGO
   ======================================== */

.ascii-logo {
    font-family: monospace;
    font-size: 10px;
    line-height: 1.2;
    color: #58a6ff;
    text-align: center;
    margin: 20px 0;
}

.system-msg {
    text-align: center;
    color: #7d8590;
    margin: 5px 0;
    font-size: 13px;
}

.ready-msg {
    text-align: center;
    color: #3fb950;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 600;
}

.instructions {
    text-align: center;
    color: #58a6ff;
    margin: 10px 0;
    font-size: 12px;
}

/* ========================================
   MODAL
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    overflow: hidden;
}

.modal-header {
    background: #21262d;
    padding: 15px 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #30363d;
}

.close-btn {
    color: #7d8590;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: #f85149;
}

.modal-body {
    padding: 20px;
}

.terminal-input {
    width: 100%;
    padding: 12px 15px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #c9d1d9;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 15px;
}

.terminal-input:focus {
    outline: none;
    border-color: #58a6ff;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.1);
}

/* ========================================
   ARA SECTION
   ======================================== */

.ara-content {
    padding: 15px;
}

.ara-stock {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(240, 136, 62, 0.1);
    border: 1px solid rgba(240, 136, 62, 0.3);
    border-radius: 6px;
    margin-bottom: 10px;
}

.ara-stock:last-child {
    margin-bottom: 0;
}

.ara-ticker {
    color: #f0883e;
    font-weight: 600;
    font-size: 14px;
}

.ara-pct {
    color: #f0883e;
    font-weight: 600;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .terminal-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #30363d;
    }

    .system-info {
        display: none;
    }

    .main-display {
        padding: 15px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-green {
    color: #3fb950;
}

.text-red {
    color: #f85149;
}

.text-blue {
    color: #58a6ff;
}

.text-orange {
    color: #f0883e;
}

.text-gray {
    color: #7d8590;
}

.blink {
    animation: blink 1s infinite;
}

/* ========================================
   DETAIL BUTTON
   ======================================== */

.detail-btn {
    background: #21262d;
    border: 1px solid #30363d;
    color: #58a6ff;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.detail-btn:hover {
    background: #30363d;
    border-color: #58a6ff;
    transform: scale(1.1);
}
