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

:root {
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --bg-sidebar: #0d1117;
    --border: #30363d;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --accent: #f7931a;
    --accent-hover: #e8850f;
    --green: #3fb950;
    --red: #f85149;
    --blue: #58a6ff;
    --purple: #bc8cff;
    --yellow: #d29922;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
.sidebar {
    width: 220px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 28px;
    color: var(--accent);
}

.logo-text {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.logo-text small.logo-sub {
    font-size: 10px;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.nav-menu {
    list-style: none;
    padding: 10px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-size: 14px;
}

.nav-item:hover {
    background: rgba(247, 147, 26, 0.1);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(247, 147, 26, 0.15);
    color: var(--accent);
    border-left: 3px solid var(--accent);
}

.nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

/* MAIN CONTENT */
.content {
    margin-left: 220px;
    padding: 30px;
    flex: 1;
    min-height: 100vh;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

h1 {
    font-size: 24px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

h2 {
    font-size: 20px;
    margin: 24px 0 16px;
    color: var(--text-primary);
}

h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

/* METRICS GRID */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.metric-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.metric-card.positive .metric-value {
    color: var(--green);
}

.metric-card.negative .metric-value {
    color: var(--red);
}

/* CHARTS */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.chart-container.full-width {
    width: 100%;
}

.charts-full {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

canvas {
    max-height: 350px;
}

/* TABLE */
.table-wrapper {
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th {
    background: rgba(247, 147, 26, 0.1);
    color: var(--accent);
    padding: 12px 10px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
    position: sticky;
    top: 0;
}

td {
    padding: 10px;
    border-top: 1px solid var(--border);
    white-space: nowrap;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.pnl-positive {
    color: var(--green);
    font-weight: 600;
}

.pnl-negative {
    color: var(--red);
    font-weight: 600;
}

/* BUTTONS */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--accent);
    color: #000;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
}

.btn-danger {
    background: rgba(248, 81, 73, 0.15);
    color: var(--red);
    border: 1px solid rgba(248, 81, 73, 0.3);
}

.btn-danger:hover {
    background: rgba(248, 81, 73, 0.25);
}

.btn-small {
    padding: 4px 8px;
    font-size: 11px;
}

.btn-large {
    padding: 12px 24px;
    font-size: 15px;
    width: 100%;
    margin-top: 10px;
}

.controls-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

/* BACKTEST */
.backtest-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
}

.backtest-params {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
}

.param-group {
    margin-bottom: 14px;
}

.param-group.inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.param-group label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.param-group input,
.param-group select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.param-group input:focus,
.param-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.backtest-results {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.backtest-output {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.8;
}

.backtest-output .stat-line {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
}

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

.backtest-output .stat-value {
    font-weight: 600;
}

.placeholder-text {
    color: var(--text-secondary);
    font-style: italic;
}

/* MODELS */
.models-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.model-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
}

.model-card.works {
    border-color: rgba(63, 185, 80, 0.3);
}

.model-card.doesnt-work {
    border-color: rgba(248, 81, 73, 0.3);
}

.model-card.neutral {
    border-color: rgba(210, 153, 34, 0.3);
}

.model-content ul {
    list-style: none;
    padding: 0;
}

.model-content li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    line-height: 1.5;
}

.model-content li:last-child {
    border-bottom: none;
}

.strategy-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.strategy-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
}

.strategy-card h4 {
    color: var(--accent);
    margin-bottom: 10px;
}

.strategy-card .stat {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 13px;
}

.optimal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.optimal-card {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 16px;
}

.optimal-card .opt-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.optimal-card .opt-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    margin: 4px 0;
}

.optimal-card .opt-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* DATA */
.data-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.data-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.data-section p {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 10px;
}

.data-section input[type="file"] {
    margin: 10px 0;
}

.data-status {
    margin-top: 10px;
    font-size: 13px;
}

.data-stats p {
    margin: 6px 0;
    font-size: 14px;
}

.data-stats span {
    color: var(--accent);
    font-weight: 600;
}

.sources-info {
    display: grid;
    gap: 16px;
}

.source-item {
    padding: 12px;
    background: var(--bg-dark);
    border-radius: 6px;
    border-left: 3px solid var(--accent);
}

.source-item strong {
    color: var(--accent);
    display: block;
    margin-bottom: 6px;
}

.source-item p {
    margin: 0;
    line-height: 1.5;
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
}

.modal-close:hover {
    color: var(--text-primary);
}

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

.form-group label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

/* STRATEGY SUMMARY */
.strategy-summary {
    background: rgba(247, 147, 26, 0.08);
    border: 1px solid rgba(247, 147, 26, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
}

.strategy-summary p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* SIDEBAR FOOTER / LIVE DATA */
.sidebar-footer {
    margin-top: auto;
    padding: 15px 20px;
    border-top: 1px solid var(--border);
}

.live-data {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 10px;
    align-items: center;
}

.live-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.live-value {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    text-align: right;
}

/* CALCULATOR */
.calc-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
}

.calc-inputs {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.calc-results {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.calc-output {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 2;
}

.calc-output .calc-line {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
}

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

.calc-output .calc-value {
    font-weight: 700;
    color: var(--text-primary);
}

.calc-output .calc-highlight {
    background: rgba(247, 147, 26, 0.1);
    border: 1px solid rgba(247, 147, 26, 0.3);
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    text-align: center;
}

.calc-output .calc-highlight .big {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}

/* PROGRESS BAR */
.progress-wrap {
    margin-top: 12px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.3s;
    width: 0%;
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* FETCH CONTROLS */
.fetch-controls {
    margin-top: 12px;
}

.fetch-row {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.fetch-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.data-section.highlight {
    border-color: rgba(247, 147, 26, 0.3);
    background: linear-gradient(135deg, var(--bg-card), rgba(247, 147, 26, 0.03));
}

/* OPTION CHAIN TABLE */
#optionChainTable td {
    font-size: 12px;
    padding: 6px 8px;
}

#optionChainTable .atm-row td {
    background: rgba(247, 147, 26, 0.1);
    font-weight: 600;
}

/* BUTTON DISABLED STATE */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================
   GUIDE TAB
   ========================================== */

.guide-hero {
    background: linear-gradient(135deg, rgba(247, 147, 26, 0.12), rgba(88, 166, 255, 0.08));
    border: 1px solid rgba(247, 147, 26, 0.3);
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 32px;
}

.guide-hero-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}

.guide-hero-sub {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
    max-width: 700px;
}

.guide-hero-chips {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.guide-chip {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.guide-chip.green  { background: rgba(63, 185, 80, 0.15); color: var(--green); border: 1px solid rgba(63,185,80,0.3); }
.guide-chip.orange { background: rgba(247,147,26,0.15); color: var(--accent); border: 1px solid rgba(247,147,26,0.3); }
.guide-chip.red    { background: rgba(248,81,73,0.15); color: var(--red); border: 1px solid rgba(248,81,73,0.3); }
.guide-chip.blue   { background: rgba(88,166,255,0.15); color: var(--blue); border: 1px solid rgba(88,166,255,0.3); }

.guide-section {
    margin-bottom: 40px;
}

.guide-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* QUICK START STEPS */
.guide-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.guide-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    transition: border-color 0.2s;
}

.guide-step:hover {
    border-color: rgba(247, 147, 26, 0.4);
}

.step-num {
    min-width: 34px;
    height: 34px;
    background: var(--accent);
    color: #000;
    font-size: 16px;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-body {
    flex: 1;
}

.step-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.step-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.step-desc strong {
    color: var(--text-primary);
}

/* TABS GRID */
.guide-tabs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.guide-tab-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.guide-tab-card:hover {
    border-color: rgba(247, 147, 26, 0.35);
}

.gtc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border);
}

.gtc-icon {
    font-size: 18px;
}

.gtc-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
}

.gtc-body {
    padding: 16px 18px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.gtc-body p {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.gtc-body ul {
    padding-left: 16px;
    margin-bottom: 8px;
}

.gtc-body ul li {
    margin-bottom: 5px;
}

.gtc-body strong {
    color: var(--text-primary);
}

.gtc-tip {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(247, 147, 26, 0.08);
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.gtc-formula {
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(88, 166, 255, 0.06);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--blue);
    line-height: 1.8;
}

.gtc-formula strong {
    color: var(--accent);
}

/* STRATEGY DEEP DIVE */
.guide-strategy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.guide-strategy-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
}

.guide-strategy-card.green-border  { border-top: 3px solid var(--green); }
.guide-strategy-card.red-border    { border-top: 3px solid var(--red); }
.guide-strategy-card.orange-border { border-top: 3px solid var(--accent); }
.guide-strategy-card.blue-border   { border-top: 3px solid var(--blue); }

.guide-strategy-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

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

.guide-table tr {
    border-bottom: 1px solid var(--border);
}

.guide-table tr:last-child {
    border-bottom: none;
}

.guide-table td {
    padding: 7px 0;
    vertical-align: top;
    line-height: 1.4;
}

.guide-table td:first-child {
    color: var(--text-secondary);
    width: 40%;
    padding-right: 10px;
    white-space: nowrap;
}

.guide-table td:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

/* DATA SOURCES */
.guide-sources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

.guide-source-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
}

.gs-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.gs-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

.gs-badge.green  { background: rgba(63,185,80,0.15); color: var(--green); border: 1px solid rgba(63,185,80,0.3); }
.gs-badge.blue   { background: rgba(88,166,255,0.15); color: var(--blue); border: 1px solid rgba(88,166,255,0.3); }
.gs-badge.orange { background: rgba(247,147,26,0.15); color: var(--accent); border: 1px solid rgba(247,147,26,0.3); }

.gs-data {
    font-size: 12px;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-weight: 500;
}

.gs-detail {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* FAQ */
.guide-faq {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px 18px;
}

.faq-q {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.faq-q::before {
    content: 'Q: ';
    color: var(--accent);
}

.faq-a {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-a strong {
    color: var(--text-primary);
}

.faq-a code {
    background: rgba(88, 166, 255, 0.1);
    border: 1px solid rgba(88, 166, 255, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--blue);
}

/* WORKFLOW TIMELINE */
.guide-workflow {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 4px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 24px;
}

.wf-time {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    padding: 10px 0;
    border-right: 2px solid rgba(247, 147, 26, 0.3);
    text-align: right;
    padding-right: 16px;
}

.wf-action {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 10px 0;
    line-height: 1.5;
}

.wf-action strong {
    color: var(--text-primary);
}

/* ==========================================
   GOOGLE DRIVE + ARTIO BRANDING
   ========================================== */

/* Sidebar Google Drive block */
.gdrive-sidebar {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.btn-gdrive {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 12px;
    background: rgba(66, 133, 244, 0.12);
    border: 1px solid rgba(66, 133, 244, 0.3);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-gdrive:hover {
    background: rgba(66, 133, 244, 0.22);
    border-color: rgba(66, 133, 244, 0.5);
}

.btn-gdrive svg {
    flex-shrink: 0;
}

.gdrive-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.gdrive-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid var(--border);
}

.gdrive-name {
    font-size: 11px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.gdrive-actions {
    display: flex;
    gap: 4px;
}

.gdrive-actions .btn {
    flex: 1;
    padding: 4px 6px;
    font-size: 11px;
    text-align: center;
}

/* Sidebar branding */
.sidebar-brand {
    margin-top: 12px;
    text-align: center;
}

.brand-text {
    font-size: 10px;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
    opacity: 0.6;
}

.brand-text strong {
    color: var(--accent);
    font-weight: 700;
    opacity: 1;
}

/* Google Drive Data Section */
.gdrive-section {
    border-color: rgba(66, 133, 244, 0.3);
    background: linear-gradient(135deg, var(--bg-card), rgba(66, 133, 244, 0.03));
}

.gdrive-data-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

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

.gdrive-status-dot.offline {
    background: var(--text-secondary);
}

.gdrive-status-dot.online {
    background: var(--green);
    box-shadow: 0 0 6px rgba(63, 185, 80, 0.5);
}

/* Guide ARTIO badge */
.guide-hero-badge {
    display: inline-block;
    padding: 3px 12px;
    background: rgba(247, 147, 26, 0.2);
    border: 1px solid rgba(247, 147, 26, 0.4);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1200px) {
    .charts-row {
        grid-template-columns: 1fr;
    }
    .models-grid {
        grid-template-columns: 1fr;
    }
    .backtest-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    .logo-text, .nav-item span:last-child {
        display: none;
    }
    .content {
        margin-left: 60px;
        padding: 15px;
    }
    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}
