/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:        #000000;
    --surface:   #0f0f0f;
    --surface2:  #0f0f0f;
    --border:    #2e2e2e;
    --text:      #dbdbdb;
    --muted:     #787b86;
    --primary:   #2962ff;
    --primary-h: #1e53e5;
    --success:   #26a69a;
    --warning:   #f59e0b;
    --error:     #ef5350;
    --info:      #06b6d4;
    --radius:    10px;
    --shadow:    0 4px 24px rgba(0,0,0,0.4);
}

html,
body,
#app,
.app-shell {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

/* ── Form controls ───────────────────────────────────────────────────────── */
.file-input-hidden {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
}

.text-input {
    flex: 1;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    padding: 6px 10px;
    font-size: 12px;
    outline: none;
    min-width: 120px;
}

.text-input:focus { border-color: var(--primary); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 0 16px;
    height: var(--bar-h, 30px);
    line-height: var(--bar-h, 30px);
    transition: background 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--primary-h); }
.btn.secondary { background: var(--surface2); border: 1px solid var(--border); color: var(--text); }
.btn.secondary:hover:not(:disabled) { border-color: var(--primary); color: #fff; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sm { padding: 0 12px; font-size: 11px; }

.btn-icon {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 14px;
    padding: 0 2px;
    opacity: 0.7;
    transition: opacity 0.15s;
}
.btn-icon:hover { opacity: 1; }

/* ── Chart ───────────────────────────────────────────────────────────────── */
.chart-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;
    isolation: isolate;
    line-height: 0; /* remove any inline spacing from the inner div */
}

.chart-host {
    width: 100%;
    height: 100%;
}

/* ── Hint text ───────────────────────────────────────────────────────────── */
.hint { color: var(--muted); font-size: 11px; }
