/* Groww Platform Replica - CSS Stylesheet */

:root {
    --bg-main: #0c0d0f;
    --bg-card: rgba(22, 24, 30, 0.75);
    --bg-header: rgba(12, 13, 15, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(0, 208, 156, 0.25);
    
    --color-green: #00d09c;
    --color-red: #ff5c5c;
    --color-text-main: #f5f6f8;
    --color-text-muted: #8e95a5;
    --bg-hover: rgba(255, 255, 255, 0.04);
    
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --border-radius: 12px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--color-text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-col: column;
    flex-direction: column;
    overflow-x: hidden;
}

/* Helper Text Classes */
.text-green { color: var(--color-green) !important; }
.text-red { color: var(--color-red) !important; }
.hidden { display: none !important; }

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    height: 64px;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.groww-logo {
    width: 28px;
    height: 28px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.badge-api {
    font-size: 10px;
    background: rgba(0, 208, 156, 0.15);
    color: var(--color-green);
    padding: 2px 6px;
    border-radius: 20px;
    border: 1px solid rgba(0, 208, 156, 0.3);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.search-container {
    position: relative;
    width: 320px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
}

#stock-search {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px 8px 38px;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: var(--transition-fast);
}

#stock-search:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--color-green);
    box-shadow: 0 0 10px rgba(0, 208, 156, 0.15);
}

.search-results-dropdown {
    position: absolute;
    top: 42px;
    left: 0;
    width: 100%;
    background: #181a20;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    max-height: 300px;
    overflow-y: auto;
    z-index: 110;
}

.search-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: var(--transition-fast);
}

.search-item:hover {
    background: var(--bg-hover);
}

.search-item .name {
    font-weight: 500;
    font-size: 14px;
}

.search-item .symbol {
    font-size: 11px;
    color: var(--color-text-muted);
}

.search-item .badge {
    font-size: 10px;
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.demo-mode-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--color-text-muted);
    background: rgba(255,255,255,0.04);
    padding: 6px 12px;
    border-radius: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-dot.green {
    background-color: var(--color-green);
    box-shadow: 0 0 8px var(--color-green);
}

.margin-badge {
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 12px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.margin-badge .lbl {
    font-size: 10px;
    color: var(--color-text-muted);
}

.margin-badge .val {
    font-size: 13px;
    font-weight: 600;
}

.profile-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 20px;
    background: rgba(255,255,255,0.04);
    transition: var(--transition-fast);
}

.profile-chip:hover {
    background: rgba(255,255,255,0.08);
}

.avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--color-green);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 11px;
}

.profile-name {
    font-size: 13px;
    font-weight: 500;
}

/* Indices Strip */
.indices-strip {
    display: flex;
    gap: 16px;
    padding: 12px 24px;
    background: var(--bg-main);
    overflow-x: auto;
}

.index-card {
    flex: 1;
    min-width: 260px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.index-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(22, 24, 30, 0.9);
}

.index-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.index-name {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 600;
}

.index-ltp {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-heading);
}

.index-change {
    font-size: 11px;
    font-weight: 500;
}

.index-sparkline {
    width: 80px;
    height: 40px;
}

/* Main Workspace Grid */
.main-layout {
    display: grid;
    grid-template-columns: 300px 1fr 320px;
    gap: 16px;
    padding: 0 24px 16px 24px;
    flex: 1;
}

/* Cards & Panel Styling */
.panel-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

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

.card-header h3 {
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-heading);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 20px;
    cursor: pointer;
    outline: none;
}

.btn-icon:hover {
    color: #fff;
}

/* Left Panel Watchlist */
.watchlist-card {
    height: 320px;
    display: flex;
    flex-direction: column;
}

.watchlist-list {
    flex: 1;
    overflow-y: auto;
}

.watchlist-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    transition: var(--transition-fast);
}

.watchlist-item:hover {
    background: var(--bg-hover);
}

.watchlist-item.selected {
    background: rgba(0, 208, 156, 0.05);
    border-left: 3px solid var(--color-green);
}

.watchlist-sym-box {
    display: flex;
    flex-direction: column;
}

.watchlist-sym {
    font-weight: 600;
    font-size: 14px;
}

.watchlist-name {
    font-size: 10px;
    color: var(--color-text-muted);
}

.watchlist-price-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.watchlist-ltp {
    font-weight: 700;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

/* Flashing animations */
.flash-green {
    background-color: rgba(0, 208, 156, 0.25) !important;
}

.flash-red {
    background-color: rgba(255, 92, 92, 0.25) !important;
}

.watchlist-change {
    font-size: 11px;
}

/* Movers tab */
.market-movers-card {
    height: calc(100% - 336px);
    margin-top: 16px;
    display: flex;
    flex-direction: column;
}

.movers-tabs {
    display: flex;
    gap: 8px;
}

.mover-tab {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
}

.mover-tab.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.movers-list {
    flex: 1;
    overflow-y: auto;
}

.mover-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.mover-item .sym {
    font-weight: 600;
}

.mover-item .price-info {
    display: flex;
    gap: 8px;
}

.mover-item .change {
    font-weight: 600;
}

/* Center Panel Header */
.center-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.active-instrument-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 16px 20px;
}

.inst-meta h1 {
    font-size: 22px;
    font-family: var(--font-heading);
    font-weight: 600;
}

.inst-badges {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.badge {
    font-size: 10px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--color-text-muted);
}

.inst-pricing {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.price-val {
    font-size: 24px;
    font-weight: 800;
    font-family: var(--font-heading);
}

.change-val {
    font-size: 13px;
    font-weight: 600;
}

/* Workspace tab controls */
.center-workspace-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    gap: 20px;
}

.workspace-tab {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 4px;
    position: relative;
}

.workspace-tab.active {
    color: var(--color-green);
}

.workspace-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-green);
}

.workspace-content-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    min-height: 430px;
    display: flex;
    flex-direction: column;
}

.workspace-panel {
    display: none;
    flex-direction: column;
    padding: 16px;
    flex: 1;
}

.workspace-panel.active {
    display: flex;
}

.chart-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.interval-selector {
    display: flex;
    gap: 6px;
}

.int-btn {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: var(--color-text-muted);
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

.int-btn.active {
    background: var(--color-green);
    color: #000;
    border-color: var(--color-green);
}

.chart-timeframe-lbl {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* Option Chain Styling */
.option-chain-controls {
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.option-chain-controls label {
    font-size: 12px;
    color: var(--color-text-muted);
}

#expiry-select {
    background: #181a20;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    outline: none;
    font-size: 12px;
}

.option-chain-table-wrapper {
    flex: 1;
    overflow: auto;
    max-height: 350px;
}

.option-chain-table, .greeks-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: center;
}

.option-chain-table th, .greeks-table th {
    background: #14161d;
    padding: 8px;
    font-weight: 600;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 5;
}

.option-chain-table th.call-header {
    background: rgba(0, 208, 156, 0.05);
    color: var(--color-green);
}

.option-chain-table th.put-header {
    background: rgba(255, 92, 92, 0.05);
    color: var(--color-red);
}

.option-chain-table th.strike-header {
    background: #1c1e24;
    color: #fff;
}

.option-chain-table td, .greeks-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.option-chain-table tr:hover, .greeks-table tr:hover {
    background: rgba(255,255,255,0.02);
}

/* ITM Options shading */
.itm-call {
    background: rgba(0, 208, 156, 0.03);
}

.itm-put {
    background: rgba(255, 92, 92, 0.03);
}

.strike-cell {
    background: #16181d;
    font-weight: 700;
}

/* Greeks layout */
.greeks-table td {
    padding: 10px;
}

/* Key Stats & Depth bottom grid */
.details-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    padding-bottom: 6px;
}

.stat-item .lbl {
    color: var(--color-text-muted);
}

.stat-item .val {
    font-weight: 600;
}

.depth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px;
}

.depth-half table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 6px;
}

.depth-half th {
    text-align: left;
    color: var(--color-text-muted);
    font-weight: 500;
    padding-bottom: 4px;
}

.depth-half td {
    padding: 4px 0;
}

.bids-half td:first-child { color: var(--color-green); font-weight: 600; }
.asks-half td:first-child { color: var(--color-red); font-weight: 600; }

.bids-half td:last-child, .asks-half td:last-child {
    text-align: right;
    color: #fff;
}

.depth-card h3 {
    padding: 12px 16px 0 16px;
    font-size: 13px;
}

.total-qty {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 4px;
}

/* Right Panel Order Widget */
.order-panel-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

.order-type-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.order-tab {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 0;
    text-align: center;
    position: relative;
}

.order-tab.active {
    color: #fff;
}

.order-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
}

.tx-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 16px;
}

.tx-btn {
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 0;
    cursor: pointer;
    background: transparent;
    color: var(--color-text-muted);
    transition: var(--transition-fast);
}

.tx-btn.buy-btn.active {
    background: var(--color-green);
    color: #000;
}

.tx-btn.sell-btn.active {
    background: var(--color-red);
    color: #fff;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.form-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-item label {
    font-size: 11px;
    color: var(--color-text-muted);
    font-weight: 500;
}

.form-item select, .form-item input {
    background: #1c1e24;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: var(--transition-fast);
}

.form-item select:focus, .form-item input:focus {
    border-color: var(--color-green);
}

.quantity-item {
    position: relative;
}

.lot-info {
    position: absolute;
    right: 12px;
    bottom: 10px;
    font-size: 10px;
    color: var(--color-text-muted);
}

.smart-fields-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.margin-estimator {
    background: rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 12px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 12px;
}

.margin-row {
    display: flex;
    justify-content: space-between;
}

.margin-row .lbl {
    color: var(--color-text-muted);
}

.margin-row .val {
    font-weight: 600;
}

.shortfall-row {
    border-top: 1px dashed rgba(255, 92, 92, 0.3);
    padding-top: 6px;
    margin-top: 2px;
}

.btn-execute {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 14px 0;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 16px;
    transition: var(--transition-fast);
    outline: none;
}

.btn-execute.buy {
    background: linear-gradient(135deg, #00d09c, #00b080);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 208, 156, 0.25);
}

.btn-execute.buy:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 208, 156, 0.35);
}

.btn-execute.sell {
    background: linear-gradient(135deg, #ff5c5c, #e04a4a);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 92, 92, 0.25);
}

.btn-execute.sell:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 92, 92, 0.35);
}

/* Bottom Trading Desk Panel */
.bottom-panel {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    min-height: 240px;
    display: flex;
    flex-direction: column;
}

.bottom-tabs {
    display: flex;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    gap: 24px;
}

.bottom-tab {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 12px 4px;
    position: relative;
}

.bottom-tab.active {
    color: var(--color-green);
}

.bottom-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-green);
}

.bottom-content-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.bottom-tab-panel {
    display: none;
}

.bottom-tab-panel.active {
    display: block;
}

.bottom-panel-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.bottom-panel-table th {
    color: var(--color-text-muted);
    font-weight: 500;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.bottom-panel-table td {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

/* Logs panel terminal style */
.logs-panel {
    display: none;
    flex-direction: column;
}

.logs-panel.active {
    display: flex;
}

.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--color-text-muted);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.btn-clear {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border-color);
    color: var(--color-text-muted);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
}

.btn-clear:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.terminal-body {
    background: #060709;
    border-radius: 6px;
    padding: 12px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    max-height: 180px;
    overflow-y: auto;
    color: #a9ffb4;
    line-height: 1.5;
}

.log-line.error { color: #ff8888; }
.log-line.system { color: #8cb4ff; }

/* Cancel modify action buttons */
.btn-action-cancel {
    background: rgba(255, 92, 92, 0.1);
    color: var(--color-red);
    border: 1px solid rgba(255, 92, 92, 0.3);
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: var(--transition-fast);
}

.btn-action-cancel:hover {
    background: var(--color-red);
    color: #000;
}

/* Setup Profile Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.modal-card {
    background: #181a20;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 450px;
    padding: 24px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.modal-header h2 {
    font-size: 18px;
    font-family: var(--font-heading);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-details-box {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.profile-details-box h3 {
    font-size: 14px;
    margin-bottom: 4px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cancel, .btn-save {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.btn-cancel {
    background: rgba(255,255,255,0.05);
    color: var(--color-text-muted);
}

.btn-save {
    background: var(--color-green);
    color: #000;
}

/* Auto Trader Bot Styles */
.bot-panel {
    padding: 16px;
    height: 100%;
}

.bot-grid {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 16px;
    height: 380px;
}

.bot-settings-panel {
    background: rgba(22, 24, 30, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow: hidden;
    height: 100%;
}

.bot-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.bot-title {
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-heading);
}

.bot-status-container {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.04);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.bot-status-text {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-indicator-dot.red {
    background: var(--color-red);
    box-shadow: 0 0 8px var(--color-red);
}

.status-indicator-dot.green {
    background: var(--color-green);
    box-shadow: 0 0 8px var(--color-green);
}

.bot-toggle-btn-container {
    margin-bottom: 16px;
}

.bot-toggle-btn-container button {
    width: 100%;
    padding: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.bot-form-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

.creds-section-title {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--color-text-muted);
    font-weight: 600;
    margin: 16px 0 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    padding-bottom: 4px;
    letter-spacing: 0.5px;
}

.real-creds-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bot-watchlist-manager {
    display: flex;
    flex-direction: column;
}

.bot-watchlist-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 4px 0;
}

.bot-watchlist-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    background: rgba(255,255,255,0.03);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-fast);
}

.bot-watchlist-item:hover {
    background: rgba(255,255,255,0.06);
}

.bot-watchlist-item input[type="checkbox"] {
    accent-color: var(--color-green);
    cursor: pointer;
}

.bot-watchlist-item label {
    cursor: pointer;
    font-weight: 500;
}

.bot-log-panel {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    height: 100%;
}

#bot-log-terminal {
    background: #08090b;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    line-height: 1.6;
    padding: 12px;
    flex: 1;
    overflow-y: auto;
    border-top: 1px solid var(--border-color);
}

#bot-log-terminal .log-line {
    border-bottom: 1px solid rgba(255,255,255,0.01);
    padding: 3px 0;
}

#bot-log-terminal .log-line.buy_signal, #bot-log-terminal .log-line.order_placed {
    color: #38ef7d;
}

#bot-log-terminal .log-line.sell_signal {
    color: #ff4e50;
}

#bot-log-terminal .log-line.analysis {
    color: #00d09c;
    opacity: 0.85;
}

#bot-log-terminal .log-line.info {
    color: #8e95a5;
}

#bot-log-terminal .log-line.warning {
    color: #f1c40f;
}

#bot-log-terminal .log-line.error {
    color: #e74c3c;
    font-weight: bold;
}

/* Groww Client Account Hub Modal Styles */
.profile-modal-card {
    width: 800px;
    max-width: 95%;
}

.modal-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 10px 0;
}

.profile-summary-section {
    border-right: 1px solid var(--border-color);
    padding-right: 24px;
}

.profile-user-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.02);
    padding: 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.user-avatar-large {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-green);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.user-meta-large h3 {
    font-size: 16px;
    font-family: var(--font-heading);
    margin-bottom: 2px;
}

.kyc-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}

.kyc-badge.green {
    background: rgba(0, 208, 156, 0.15);
    color: var(--color-green);
    border: 1px solid rgba(0, 208, 156, 0.3);
}

.profile-details-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 6px;
}

.detail-row .lbl {
    color: var(--color-text-muted);
}

.detail-row .val {
    font-weight: 500;
}

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

.profile-balances-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.bal-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bal-card .lbl {
    font-size: 10px;
    color: var(--color-text-muted);
}

.bal-card .val {
    font-size: 14px;
    font-weight: 600;
}

.profile-api-setup-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.setup-section-title {
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-heading);
    margin-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

/* Fullscreen Lockscreen Overlay Style */
.lockscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.lockscreen-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.lockscreen-card {
    background: rgba(17, 26, 39, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    width: 420px;
    max-width: 90%;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.lock-icon-container {
    background: rgba(0, 208, 156, 0.1);
    color: var(--color-green);
    border: 1px solid rgba(0, 208, 156, 0.2);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    animation: pulseLock 2s infinite;
}

@keyframes pulseLock {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 208, 156, 0.3);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(0, 208, 156, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 208, 156, 0);
    }
}

.lock-svg {
    stroke-width: 2.2;
}

.lockscreen-card h2 {
    font-size: 20px;
    font-weight: 600;
    font-family: var(--font-heading);
    margin-bottom: 2px;
    color: #fff;
}

.lockscreen-subtext {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    line-height: 1.5;
}

.lock-input-item {
    width: 100%;
    margin-bottom: 8px;
}

.lock-input-item input {
    width: 100%;
    text-align: center;
    font-size: 15px;
    letter-spacing: 2px;
    padding: 12px;
}

.unlock-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.lockscreen-footer {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 12px;
}

.lockscreen-footer code {
    background: rgba(255,255,255,0.05);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* Header Navigation Links */
.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 32px;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.active {
    color: var(--color-green);
    background: rgba(0, 208, 156, 0.08);
    font-weight: 600;
}

/* Premium Notification Toast System */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 100000;
    pointer-events: none;
}

.toast-notification {
    background: rgba(17, 26, 39, 0.95);
    border-left: 4px solid var(--color-green);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    padding: 16px 20px;
    width: 320px;
    max-width: 90vw;
    display: flex;
    flex-direction: column;
    gap: 4px;
    pointer-events: auto;
    animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.toast-notification.success {
    border-left-color: var(--color-green);
}

.toast-notification.error {
    border-left-color: #ff5c5c;
}

.toast-notification.info {
    border-left-color: #38bdf8;
}

.toast-notification.warning {
    border-left-color: #fbbf24;
}

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

.toast-title {
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-heading);
    color: #fff;
}

.toast-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: #fff;
}

.toast-message {
    font-size: 12px;
    color: var(--color-text-muted);
    line-height: 1.4;
}

@keyframes slideInToast {
    from {
        transform: translateX(120%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOutToast {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* TradingView Chart Styles */
#chart-section {
    padding: 0 !important;
}

.tv-chart-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #131722;
    border-bottom: 1px solid var(--border-color);
    padding: 4px 8px;
    height: 38px;
}

.tv-bar-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tv-bar-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.tv-bar-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.tv-bar-btn.indicators-btn span {
    font-size: 11px;
}

.tv-bar-separator {
    width: 1px;
    height: 16px;
    background: var(--border-color);
    margin: 0 4px;
}

/* Dropdown styling */
.tv-dropdown {
    position: relative;
    display: inline-block;
}

.tv-dropdown-content {
    display: none;
    position: absolute;
    background-color: #1c2030;
    min-width: 100px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.5);
    z-index: 1000;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    top: 100%;
    left: 0;
    max-height: 250px;
    overflow-y: auto;
}

.tv-dropdown-content.show {
    display: block;
}

.tv-dropdown-content .dropdown-item {
    color: var(--color-text-muted);
    padding: 8px 12px;
    text-decoration: none;
    display: block;
    font-size: 12px;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.tv-dropdown-content .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.tv-dropdown-content .dropdown-item.active {
    color: var(--color-green);
    font-weight: 600;
}

/* TradingView-style bottom bar styling */
.tv-chart-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #131722;
    border-top: 1px solid var(--border-color);
    padding: 4px 12px;
    height: 34px;
}

.tv-range-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.tv-range-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.tv-range-btn.active {
    color: var(--color-green);
}

.tv-range-btn.go-to {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
}

.tv-toggle-btn {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 500;
    padding: 3px 6px;
    border-radius: 3px;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.tv-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.tv-toggle-btn.active {
    color: var(--color-green);
}

.tv-chart-bottom-bar .time-label {
    font-size: 11px;
    color: var(--color-text-muted);
}
